Here's a patch to rsync.spec that lets you say "--without lutimes" to override detection and build without support for lutimes. (It's a bit hackish, but it works.)


You can see the reason at https://bugzilla.samba.org/show_bug.cgi?id=4977 ; here's a summary:

rsync will make calls to lutimes (to change the mtime of symlinks) if support for lutimes is detected at build-time. lutimes support appears to be fs-specific, so calls to lutimes can fail even on systems where the build-time detection succeeds. This results in potentially large numbers of error messages, which aren't likely to mean anything important (it means the symlinks created by rsync don't have the mtime of the symlink it was copying - the symlink does exist, and the target is unaffected).

Since there isn't a run-time option to tell rsync to not call lutimes, I made this patch to provide a build-time option to never call lutimes.



I am not subscribed to the list, please CC: replies to [EMAIL PROTECTED]

--

Shad Sterling
[EMAIL PROTECTED]
http://shadsterling.com



Index: rsync.spec
===================================================================
RCS file: /cvsroot/SPECS/rsync.spec,v
retrieving revision 1.122
diff -u -r1.122 rsync.spec
--- rsync.spec  5 Sep 2007 14:20:23 -0000       1.122
+++ rsync.spec  10 Oct 2007 22:24:39 -0000
@@ -3,6 +3,7 @@
 # Conditional build:
 %bcond_with    rsh     # set remote shell command to rsh instead of ssh (old 
behaviour)
 %bcond_with    tests   # perform "make test"
+%bcond_without lutimes # force no utimes
 #
 %ifarch alpha
 %undefine      with_tests
@@ -37,6 +38,7 @@
 BuildRequires: openssl-devel
 BuildRequires: popt-devel
 BuildRequires: rpmbuild(macros) >= 1.318
+BuildRequires: sed
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/rsyncd
@@ -172,6 +174,10 @@
        --enable-xattr-support \
        --disable-debug \
        --with-rsyncd-conf=%{_sysconfdir}/rsyncd.conf
+%{!?with_lutimes:sed '
+/^#define HAVE_LUTIMES 1$/ c\
+/* HAVE_LUTIMES removed by --without lutimes */
+' -i config.h }
 %{__make} proto
 %{__make}
 

_______________________________________________
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to