http://bugs.gentoo.org/218577 the rsync code currently does things like: #ifdef HAVE_UTIMES <do utimes stuff> #elif defined HAVE_UTIME <do utime stuff> #else fail! #endif the problem here is when rsync detects the utimes function. the older utime code is ifdef-ed away so it isnt available at runtime. that means rsync will only be runtime usable on newer systems. if you take a recent glibc and compile it against recent kernel headers, you get a C library that supports both utimes and utime, and will run fine regardless of the kernel. if it supports utimes(), glibc will return the expected values. if it doesnt, glibc will return ENOSYS. what i'm proposing is decoupling of the #if logic so that it isnt an if;else: #ifdef HAVE_UTIMES <do utimes stuff and return if successful> #endif #ifdef HAVE_UTIME <do utime stuff and return if successful> #endif <return failure>
Created attachment 3324 [details] Patch to allow utimes or utime to be called This patch moves the time-calls into syscall.c (where they belong), and then extends the login in set_modtime() to allow a fallback of using do_utimes() to using do_times() if it gets an ENOSYS error on a normal file or directory. See what you think of this logic.
I'm considering this for inclusion in 3.0.4 (as it is too late to get into 3.0.3).
that seems to accomplish what i proposed nicely ... i dont actually have a system to test against though, but i'll see if i can get someone to test it
i got a user who is affected by this and they said the patch in question worked for them when applied to rsync-3.0.2
I'm checking in a change for this.