Not the most elegant solution, but you can use LD_PRELOAD to override the relevant system calls and force everything to lowercase. I thought it is fun so I did a little proof of concept and...
> ls in out
in:
CyltApJik keumyomDu LidusIcweo spydjiPa SycsEyror tusUngEg
out:
> rsync -av in/ --rsync-path='env LD_PRELOAD=$PWD/lowercase.so rsync' localhost:out/
sending incremental file list
./
CyltApJik
LidusIcweo
SycsEyror
keumyomDu
spydjiPa
tusUngEg
sent 372 bytes received 129 bytes 1002.00 bytes/sec
total size is 0 speedup is 0.00
> ls out
cyltapjik keumyomdu lidusicweo spydjipa sycseyror tusungeg
And here is the sample, which may take a few iterations to become good enough to sync the whole thing.
> cat lowercase.c
#include <ctype.h>
#include <string.h>
#include <sys/stat.h>
#define __USE_GNU
#include <dlfcn.h>
static int (*real_lstat) (const char *, struct stat *) = NULL;
static int (*real_rename)(const char *, const char *) = NULL;
char * lowered(const char * string)
{
char * low = strndup(string, 2048);
char * c;
if (low == NULL) return NULL;
for (c = low; *c; c++) {
*c = tolower(*c);
}
return low;
}
int lstat(const char * path, struct stat * buf)
{
int ret = 0;
if (real_lstat == NULL) {
real_lstat = dlsym(RTLD_NEXT, "lstat");
}
ret = real_lstat(path, buf);
if (ret == 0) return ret;
ret = real_lstat(lowered(path), buf);
return ret;
}
int rename (__const char *__old, __const char *__new)
{
if (real_rename == NULL) {
real_rename = dlsym(RTLD_NEXT, "rename");
}
return real_rename(__old, lowered(__new));
}
> gcc -ldl -fPIC -shared -o lowercase.so lowercase.c