Tevfik Karagülle
2006-Mar-20 13:46 UTC
Rsync acl patch 1.113 compilation problems on cygwin
Hi, Recently, there have been some fundamental achievements regarding acl-support on the cygwin platform. I thought that it would be convenient to offer an acl-patch enabled rsync as a part of the cwrsync package (a yet another minimalist rsync on cygwin solution). I get some compilation errors. What I did: - Downloaded acl patch v1.113 from rsync site - Run commands below In the rsync source directory: # make clean # patch < patches/acls_diff_1_113.txt # ./prepare-source # ./configure --enable-acl-support checking whether to support ACLs... Using solaris ACLs configure: creating ./config.status config.status: creating Makefile config.status: creating lib/dummy config.status: creating zlib/dummy config.status: creating popt/dummy config.status: creating shconfig config.status: creating config.h rsync 2.6.7 configuration successful # make gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o rsync.c:105: warning: unused parameter 'dflt_perms' gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c generator.c -o generator.o generator.c: In function `recv_generator': generator.c:876: error: too few arguments to function `dest_mode' generator.c: At top level: generator.c:757: warning: 'dflt_perms' defined but not used make: *** [generator.o] Error 1 ----- I use gcc 3.4.4. Any ideas what I'm missing here ? Rgrds Tev cwRsync maintainer http://itefix.no/cwrsync http://sf.net/projects/sereds
On Mon, Mar 20, 2006 at 02:40:33PM +0100, Tevfik Karag?lle wrote:> rsync.c:105: warning: unused parameter 'dflt_perms'This would seem to indicate that the 3rd hunk in the patch for rsync.c didn't get applied: @@ -116,7 +118,7 @@ mode_t dest_mode(mode_t flist_mode, mode cur_mode |= (cur_mode & 0444) >> 2; } } else - cur_mode = flist_mode & ACCESSPERMS & ~orig_umask; + cur_mode = flist_mode & ACCESSPERMS & dflt_perms; if (daemon_chmod_modes && !S_ISLNK(flist_mode)) cur_mode = tweak_mode(cur_mode, daemon_chmod_modes); return (flist_mode & ~CHMOD_BITS) | (cur_mode & CHMOD_BITS); I tried applying revision 1.113 of the acls.diff to 2.6.7, and none of the hunks failed, so I don't know what might have caused this for you.> generator.c: In function `recv_generator': > generator.c:876: error: too few arguments to function `dest_mode'The dest_mode() call is at line 883 in both 2.6.7 and the CVS version of generator.c, so something is quite different about your generator.c. This hunk of the acls.diff patch added the extra arg to the dest_mode() call: @@ -871,7 +880,8 @@ static void recv_generator(char *fname, if (!preserve_perms) { int exists = statret == 0 && S_ISDIR(st.st_mode) == S_ISDIR(file->mode); - file->mode = dest_mode(file->mode, st.st_mode, exists); + file->mode = dest_mode(file->mode, st.st_mode, dflt_perms, + exists); } if (S_ISDIR(file->mode)) {> generator.c:757: warning: 'dflt_perms' defined but not usedThis makes me think that several hunks failed to apply, since dflt_perms is referenced in 3 of them (not countint the hunk that defined it). Did you apply other patches to the source prior to the acls.diff patch? ..wayne..