X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/fc5573623194fab2a331d1ffc8d284c9e25e06e7..7170ca8dba0a407cd0c91b41b48163c7b682abb1:/atimes.diff diff --git a/atimes.diff b/atimes.diff index effc37d..4bc51f5 100644 --- a/atimes.diff +++ b/atimes.diff @@ -4,8 +4,8 @@ To use this patch, run these commands for a successful build: ./configure (optional if already run) make +based-on: 181c9faf928faad08ef095f4667afe460ec3bef6 diff --git a/compat.c b/compat.c -index 6e00072..795e6bd 100644 --- a/compat.c +++ b/compat.c @@ -43,6 +43,7 @@ extern int protocol_version; @@ -35,7 +35,6 @@ index 6e00072..795e6bd 100644 acls_ndx = ++file_extra_cnt; if (preserve_xattrs) diff --git a/flist.c b/flist.c -index 09b4fc5..169e918 100644 --- a/flist.c +++ b/flist.c @@ -55,6 +55,7 @@ extern int missing_args; @@ -55,7 +54,7 @@ index 09b4fc5..169e918 100644 static mode_t mode; #ifdef SUPPORT_HARD_LINKS static int64 dev; -@@ -484,6 +485,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, +@@ -494,6 +495,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, xflags |= XMIT_SAME_TIME; else modtime = file->modtime; @@ -69,7 +68,7 @@ index 09b4fc5..169e918 100644 #ifdef SUPPORT_HARD_LINKS if (tmp_dev != 0) { -@@ -568,6 +576,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, +@@ -578,6 +586,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, } if (!(xflags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); @@ -78,7 +77,7 @@ index 09b4fc5..169e918 100644 if (preserve_uid && !(xflags & XMIT_SAME_UID)) { if (protocol_version < 30) write_int(f, uid); -@@ -654,7 +664,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, +@@ -664,7 +674,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, static struct file_struct *recv_file_entry(struct file_list *flist, int xflags, int f) { @@ -87,7 +86,7 @@ index 09b4fc5..169e918 100644 static mode_t mode; #ifdef SUPPORT_HARD_LINKS static int64 dev; -@@ -793,6 +803,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist, +@@ -802,6 +812,16 @@ static struct file_struct *recv_file_entry(struct file_list *flist, } if (!(xflags & XMIT_SAME_MODE)) mode = from_wire_mode(read_int(f)); @@ -104,7 +103,7 @@ index 09b4fc5..169e918 100644 if (chmod_modes && !S_ISLNK(mode) && mode) mode = tweak_mode(mode, chmod_modes); -@@ -942,6 +962,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist, +@@ -952,6 +972,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist, F_GROUP(file) = gid; file->flags |= gid_flags; } @@ -113,7 +112,7 @@ index 09b4fc5..169e918 100644 if (unsort_ndx) F_NDX(file) = flist->used + flist->ndx_start; -@@ -1327,6 +1349,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1337,6 +1359,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, F_OWNER(file) = st.st_uid; if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */ F_GROUP(file) = st.st_gid; @@ -123,7 +122,6 @@ index 09b4fc5..169e918 100644 if (basename != thisname) file->dirname = lastdir; diff --git a/generator.c b/generator.c -index 12007a1..7d15744 100644 --- a/generator.c +++ b/generator.c @@ -455,6 +455,9 @@ void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statre @@ -182,7 +180,7 @@ index 12007a1..7d15744 100644 } } -@@ -1875,7 +1884,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) +@@ -1870,7 +1879,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx) STRUCT_STAT st; if (link_stat(fname, &st, 0) == 0 && cmp_time(st.st_mtime, file->modtime) != 0) @@ -192,7 +190,6 @@ index 12007a1..7d15744 100644 if (counter >= loopchk_limit) { if (allowed_lull) diff --git a/ifuncs.h b/ifuncs.h -index 8c128d5..7834d3a 100644 --- a/ifuncs.h +++ b/ifuncs.h @@ -35,6 +35,28 @@ realloc_xbuf(xbuf *xb, size_t sz) @@ -225,7 +222,6 @@ index 8c128d5..7834d3a 100644 to_wire_mode(mode_t mode) { diff --git a/log.c b/log.c -index a687375..0f714ad 100644 --- a/log.c +++ b/log.c @@ -715,7 +715,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op, @@ -239,7 +235,6 @@ index a687375..0f714ad 100644 c[10] = !(iflags & ITEM_REPORT_XATTR) ? '.' : 'x'; c[11] = '\0'; diff --git a/options.c b/options.c -index e7c6c61..01ccf5a 100644 --- a/options.c +++ b/options.c @@ -59,6 +59,7 @@ int preserve_specials = 0; @@ -268,7 +263,7 @@ index e7c6c61..01ccf5a 100644 {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 }, {"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 }, {"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 }, -@@ -2289,6 +2294,8 @@ void server_options(char **args, int *argc_p) +@@ -2306,6 +2311,8 @@ void server_options(char **args, int *argc_p) argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -278,7 +273,6 @@ index e7c6c61..01ccf5a 100644 argstr[x++] = 'p'; else if (preserve_executability && am_sender) diff --git a/rsync.c b/rsync.c -index 2c026a2..95a6ebe 100644 --- a/rsync.c +++ b/rsync.c @@ -384,6 +384,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, @@ -351,7 +345,6 @@ index 2c026a2..95a6ebe 100644 if (temp_copy_name) { if (do_rename(fnametmp, fname) < 0) { diff --git a/rsync.h b/rsync.h -index be7cf8a..2f85dee 100644 --- a/rsync.h +++ b/rsync.h @@ -61,6 +61,7 @@ @@ -370,7 +363,7 @@ index be7cf8a..2f85dee 100644 #define FULL_FLUSH 1 #define NORMAL_FLUSH 0 -@@ -652,12 +654,14 @@ extern int file_extra_cnt; +@@ -656,12 +658,14 @@ extern int file_extra_cnt; extern int inc_recurse; extern int uid_ndx; extern int gid_ndx; @@ -386,7 +379,6 @@ index be7cf8a..2f85dee 100644 #define DIRNODE_EXTRA_CNT 3 #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN) diff --git a/rsync.yo b/rsync.yo -index 941f7a5..ec98c6e 100644 --- a/rsync.yo +++ b/rsync.yo @@ -356,6 +356,7 @@ to the detailed description below for a complete description. verb( @@ -397,7 +389,7 @@ index 941f7a5..ec98c6e 100644 --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently -@@ -1071,6 +1072,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing +@@ -1078,6 +1079,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing the directories on the receiving side, it is a good idea to use bf(-O). This option is inferred if you use bf(--backup) without bf(--backup-dir). @@ -410,7 +402,7 @@ index 941f7a5..ec98c6e 100644 dit(bf(--super)) This tells the receiving side to attempt super-user activities even if the receiving rsync wasn't run by the super-user. These activities include: preserving users via the bf(--owner) option, preserving -@@ -1888,7 +1895,10 @@ quote(itemization( +@@ -1907,7 +1914,10 @@ quote(itemization( sender's value (requires bf(--owner) and super-user privileges). it() A bf(g) means the group is different and is being updated to the sender's value (requires bf(--group) and the authority to set the group). @@ -424,7 +416,6 @@ index 941f7a5..ec98c6e 100644 )) diff --git a/testsuite/atimes.test b/testsuite/atimes.test new file mode 100644 -index 0000000..bd3f292 --- /dev/null +++ b/testsuite/atimes.test @@ -0,0 +1,17 @@ @@ -446,7 +437,6 @@ index 0000000..bd3f292 +# The script would have aborted on error, so getting here means we've won. +exit 0 diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns -index b26aee3..0c1c7d8 100644 --- a/testsuite/rsync.fns +++ b/testsuite/rsync.fns @@ -215,6 +215,10 @@ checkit() { @@ -476,7 +466,6 @@ index b26aee3..0c1c7d8 100644 diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to" || failed=YES diff --git a/tls.c b/tls.c -index 8cc5748..c27c97f 100644 --- a/tls.c +++ b/tls.c @@ -108,6 +108,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst) @@ -571,7 +560,6 @@ index 8cc5748..c27c97f 100644 fprintf(F," -L, --link-owner display the owner+group on a symlink\n"); #ifdef SUPPORT_XATTRS diff --git a/util.c b/util.c -index 0cafed6..05f6d72 100644 --- a/util.c +++ b/util.c @@ -123,7 +123,7 @@ NORETURN void overflow_exit(const char *str)