From a54a2c4d2d84418b6658697c7926321278e1e34f Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 2 Sep 2007 06:31:13 +0000 Subject: [PATCH] Fixed failing hunks. --- atimes.diff | 48 +++++++++++++++++++++--------------------- backup-dir-dels.diff | 48 +++++++++++++++++++++--------------------- copy-devices.diff | 14 ++++++------- omit-dir-changes.diff | 49 +++++++++++++++++++++---------------------- 4 files changed, 79 insertions(+), 80 deletions(-) diff --git a/atimes.diff b/atimes.diff index 00b933a..cdd6134 100644 --- a/atimes.diff +++ b/atimes.diff @@ -9,7 +9,7 @@ TODO: need to fix this to handle 64-bit time_t values! --- old/compat.c +++ new/compat.c -@@ -44,6 +44,7 @@ extern int prune_empty_dirs; +@@ -45,6 +45,7 @@ extern int prune_empty_dirs; extern int protocol_version; extern int preserve_uid; extern int preserve_gid; @@ -17,7 +17,7 @@ TODO: need to fix this to handle 64-bit time_t values! extern int preserve_acls; extern int preserve_xattrs; extern int preserve_hard_links; -@@ -58,7 +59,7 @@ extern char *dest_option; +@@ -59,7 +60,7 @@ extern char *dest_option; extern struct filter_list_struct filter_list; /* These index values are for the file-list's extra-attribute array. */ @@ -26,7 +26,7 @@ TODO: need to fix this to handle 64-bit time_t values! /* The server makes sure that if either side only supports a pre-release * version of a protocol, that both sides must speak a compatible version -@@ -99,6 +100,8 @@ void setup_protocol(int f_out,int f_in) +@@ -100,6 +101,8 @@ void setup_protocol(int f_out,int f_in) uid_ndx = ++file_extra_cnt; if (preserve_gid) gid_ndx = ++file_extra_cnt; @@ -138,7 +138,7 @@ TODO: need to fix this to handle 64-bit time_t values! #ifdef ICONV_OPTION if (ic_ndx) F_NDX(file) = flist->used + flist->ndx_start; -@@ -1191,6 +1217,8 @@ struct file_struct *make_file(const char +@@ -1181,6 +1207,8 @@ struct file_struct *make_file(const char F_OWNER(file) = st.st_uid; if (gid_ndx) F_GROUP(file) = st.st_gid; @@ -154,10 +154,10 @@ TODO: need to fix this to handle 64-bit time_t values! extern int preserve_perms; extern int preserve_times; +extern int preserve_atimes; - extern int omit_dir_times; extern int uid_ndx; extern int gid_ndx; -@@ -564,6 +565,9 @@ void itemize(const char *fnamecmp, struc + extern int delete_mode; +@@ -563,6 +564,9 @@ void itemize(const char *fnamecmp, struc && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) || (keep_time && cmp_time(file->modtime, sxp->st.st_mtime) != 0)) iflags |= ITEM_REPORT_TIME; @@ -167,7 +167,7 @@ TODO: need to fix this to handle 64-bit time_t values! if (!BITS_EQUAL(sxp->st.st_mode, file->mode, CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; if (uid_ndx && am_root && (uid_t)F_OWNER(file) != sxp->st.st_uid) -@@ -881,6 +885,8 @@ static int try_dests_reg(struct file_str +@@ -880,6 +884,8 @@ static int try_dests_reg(struct file_str if (link_dest) { if (!hard_link_one(file, fname, cmpbuf, 1)) goto try_a_copy; @@ -176,7 +176,7 @@ TODO: need to fix this to handle 64-bit time_t values! if (preserve_hard_links && F_IS_HLINKED(file)) finish_hard_link(file, fname, &sxp->st, itemizing, code, j); if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) { -@@ -1775,7 +1781,7 @@ static void touch_up_dirs(struct file_li +@@ -1774,7 +1780,7 @@ static void touch_up_dirs(struct file_li if (!(file->mode & S_IWUSR)) do_chmod(fname, file->mode); if (need_retouch_dir_times) @@ -199,15 +199,15 @@ TODO: need to fix this to handle 64-bit time_t values! c[11] = '\0'; --- old/options.c +++ new/options.c -@@ -57,6 +57,7 @@ int preserve_uid = 0; +@@ -56,6 +56,7 @@ int preserve_specials = 0; + int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; - int omit_dir_times = 0; +int preserve_atimes = 0; int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -338,6 +339,7 @@ void usage(enum logcode F) +@@ -344,6 +345,7 @@ void usage(enum logcode F) rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve modification times\n"); rprintf(F," -O, --omit-dir-times omit directories from --times\n"); @@ -215,17 +215,17 @@ TODO: need to fix this to handle 64-bit time_t values! rprintf(F," --super receiver attempts super-user activities\n"); #ifdef SUPPORT_XATTRS rprintf(F," --fake-super store/recover privileged attrs using xattrs\n"); -@@ -473,6 +475,9 @@ static struct poptOption long_options[] - {"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 }, +@@ -477,6 +479,9 @@ static struct poptOption long_options[] + {"times", 't', POPT_ARG_VAL, &preserve_times, 2, 0, 0 }, {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, + {"atimes", 'U', POPT_ARG_VAL, &preserve_atimes, 1, 0, 0 }, + {"no-atimes", 0, POPT_ARG_VAL, &preserve_atimes, 0, 0, 0 }, + {"no-U", 0, POPT_ARG_VAL, &preserve_atimes, 0, 0, 0 }, - {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, - {"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 }, - {"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 }, -@@ -1675,6 +1680,8 @@ void server_options(char **args,int *arg + {"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 }, +@@ -1691,6 +1696,8 @@ void server_options(char **args,int *arg argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; @@ -242,9 +242,9 @@ TODO: need to fix this to handle 64-bit time_t values! extern int preserve_executability; +extern int preserve_atimes; extern int preserve_times; - extern int omit_dir_times; extern int am_root; -@@ -274,6 +275,7 @@ int set_file_attrs(const char *fname, st + extern int am_server; +@@ -273,6 +274,7 @@ int set_file_attrs(const char *fname, st int updated = 0; statx sx2; int change_uid, change_gid; @@ -252,13 +252,13 @@ TODO: need to fix this to handle 64-bit time_t values! mode_t new_mode = file->mode; if (!sxp) { -@@ -311,18 +313,36 @@ int set_file_attrs(const char *fname, st +@@ -310,18 +312,36 @@ int set_file_attrs(const char *fname, st set_stat_xattr(fname, file); #endif + /* This code must be the first update in the function due to + * how it uses the "updated" variable. */ - if (!preserve_times || (S_ISDIR(sxp->st.st_mode) && omit_dir_times)) + if (!preserve_times || (S_ISDIR(sxp->st.st_mode) && preserve_times == 1)) flags |= ATTRS_SKIP_MTIME; + if (!preserve_atimes || S_ISDIR(sxp->st.st_mode)) + flags |= ATTRS_SKIP_ATIME; @@ -328,7 +328,7 @@ TODO: need to fix this to handle 64-bit time_t values! #define F_NDX(f) REQ_EXTRA(f, ic_ndx)->num --- old/rsync.yo +++ new/rsync.yo -@@ -353,6 +353,7 @@ to the detailed description below for a +@@ -354,6 +354,7 @@ to the detailed description below for a -D same as --devices --specials -t, --times preserve modification times -O, --omit-dir-times omit directories from --times @@ -336,7 +336,7 @@ TODO: need to fix this to handle 64-bit time_t values! --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently -@@ -930,6 +931,12 @@ it is preserving modification times (see +@@ -940,6 +941,12 @@ it is preserving modification times (see 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). @@ -349,7 +349,7 @@ TODO: need to fix this to handle 64-bit time_t values! 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 -@@ -1592,8 +1599,10 @@ quote(itemization( +@@ -1602,8 +1609,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). diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index 3f9fb0a..c2a7a89 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -21,7 +21,7 @@ To use this patch, run these commands for a successful build: --- old/backup.c +++ new/backup.c -@@ -28,10 +28,17 @@ extern int preserve_specials; +@@ -29,10 +29,17 @@ extern int preserve_specials; extern int preserve_links; extern int safe_symlinks; extern int backup_dir_len; @@ -39,7 +39,7 @@ To use this patch, run these commands for a successful build: /* make a complete pathname for backup file */ char *get_backup_name(const char *fname) -@@ -50,11 +57,28 @@ char *get_backup_name(const char *fname) +@@ -51,11 +58,28 @@ char *get_backup_name(const char *fname) return NULL; } @@ -69,7 +69,7 @@ To use this patch, run these commands for a successful build: if (!fnamebak) return 0; -@@ -95,7 +119,8 @@ static int make_bak_dir(char *fullpath) +@@ -96,7 +120,8 @@ static int make_bak_dir(char *fullpath) { statx sx; struct file_struct *file; @@ -79,7 +79,7 @@ To use this patch, run these commands for a successful build: char *end = rel + strlen(rel); char *p = end; -@@ -198,7 +223,8 @@ static int keep_backup(const char *fname +@@ -212,7 +237,8 @@ static int keep_backup(const char *fname if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS))) return 1; /* the file could have disappeared */ @@ -89,7 +89,7 @@ To use this patch, run these commands for a successful build: unmake_file(file); return 0; } -@@ -306,3 +332,13 @@ int make_backup(const char *fname) +@@ -327,3 +353,13 @@ int make_backup(const char *fname) return keep_backup(fname); return make_simple_backup(fname); } @@ -114,8 +114,8 @@ To use this patch, run these commands for a successful build: +extern int backup_suffix_dels_len; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct filter_list_struct server_filter_list; - -@@ -127,10 +130,14 @@ enum delret { + #ifdef ICONV_OPTION +@@ -131,10 +134,14 @@ enum delret { static enum delret delete_dir_contents(char *fname, int flags); @@ -131,7 +131,7 @@ To use this patch, run these commands for a successful build: } /* Delete a file or directory. If DEL_RECURSE is set in the flags, this will -@@ -166,9 +173,9 @@ static enum delret delete_item(char *fbu +@@ -170,9 +177,9 @@ static enum delret delete_item(char *fbu if (S_ISDIR(mode)) { what = "rmdir"; ok = do_rmdir(fbuf) == 0; @@ -145,7 +145,7 @@ To use this patch, run these commands for a successful build: ok = robust_unlink(fbuf) == 0; --- old/options.c +++ new/options.c -@@ -137,10 +137,14 @@ int no_detach +@@ -145,10 +145,14 @@ int no_detach int write_batch = 0; int read_batch = 0; int backup_dir_len = 0; @@ -160,7 +160,7 @@ To use this patch, run these commands for a successful build: char *tmpdir = NULL; char *partial_dir = NULL; char *basis_dir[MAX_BASIS_DIRS+1]; -@@ -152,7 +156,9 @@ char *stdout_format = NULL; +@@ -160,7 +164,9 @@ char *stdout_format = NULL; char *password_file = NULL; char *rsync_path = RSYNC_PATH; char *backup_dir = NULL; @@ -170,7 +170,7 @@ To use this patch, run these commands for a successful build: char *sockopts = NULL; int rsync_port = 0; int compare_dest = 0; -@@ -293,6 +299,8 @@ void usage(enum logcode F) +@@ -316,6 +322,8 @@ void usage(enum logcode F) rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n"); rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n"); rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); @@ -179,9 +179,9 @@ To use this patch, run these commands for a successful build: rprintf(F," -u, --update skip files that are newer on the receiver\n"); rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n"); rprintf(F," --append append data onto shorter files\n"); -@@ -527,7 +535,9 @@ static struct poptOption long_options[] - {"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 }, - {"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 }, +@@ -583,7 +591,9 @@ static struct poptOption long_options[] + {"backup", 'b', POPT_ARG_VAL, &make_backups, 1, 0, 0 }, + {"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 }, {"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 }, + {"backup-dir-dels", 0, POPT_ARG_STRING, &backup_dir_dels, 0, 0, 0 }, {"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 }, @@ -189,7 +189,7 @@ To use this patch, run these commands for a successful build: {"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 }, {"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 }, {"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 }, -@@ -1271,6 +1281,8 @@ int parse_arguments(int *argc, const cha +@@ -1378,6 +1388,8 @@ int parse_arguments(int *argc, const cha tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL); if (backup_dir) backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL); @@ -198,7 +198,7 @@ To use this patch, run these commands for a successful build: } if (server_filter_list.head && !am_sender) { struct filter_list_struct *elp = &server_filter_list; -@@ -1288,6 +1300,14 @@ int parse_arguments(int *argc, const cha +@@ -1395,6 +1407,14 @@ int parse_arguments(int *argc, const cha if (check_filter(elp, backup_dir, 1) < 0) goto options_rejected; } @@ -213,7 +213,7 @@ To use this patch, run these commands for a successful build: } if (!backup_suffix) -@@ -1299,6 +1319,16 @@ int parse_arguments(int *argc, const cha +@@ -1406,6 +1426,16 @@ int parse_arguments(int *argc, const cha backup_suffix); return 0; } @@ -230,7 +230,7 @@ To use this patch, run these commands for a successful build: if (backup_dir) { backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf); backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len; -@@ -1322,6 +1352,31 @@ int parse_arguments(int *argc, const cha +@@ -1429,6 +1459,31 @@ int parse_arguments(int *argc, const cha "P *%s", backup_suffix); parse_rule(&filter_list, backup_dir_buf, 0, 0); } @@ -259,10 +259,10 @@ To use this patch, run these commands for a successful build: + "--suffix-dels cannot be a null string without --backup-dir-dels\n"); + return 0; + } - if (make_backups && !backup_dir) - omit_dir_times = 1; -@@ -1689,6 +1744,10 @@ void server_options(char **args,int *arg + if (make_backups && !backup_dir) { + omit_dir_times = 0; /* Implied, so avoid -O to sender. */ +@@ -1816,6 +1871,10 @@ void server_options(char **args,int *arg args[ac++] = "--backup-dir"; args[ac++] = backup_dir; } @@ -273,7 +273,7 @@ To use this patch, run these commands for a successful build: /* Only send --suffix if it specifies a non-default value. */ if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) { -@@ -1697,7 +1756,13 @@ void server_options(char **args,int *arg +@@ -1824,7 +1883,13 @@ void server_options(char **args,int *arg goto oom; args[ac++] = arg; } @@ -286,5 +286,5 @@ To use this patch, run these commands for a successful build: + args[ac++] = arg; + } if (am_sender) { - if (delete_before) - args[ac++] = "--delete-before"; + if (max_delete > 0) { + if (asprintf(&arg, "--max-delete=%d", max_delete) < 0) diff --git a/copy-devices.diff b/copy-devices.diff index 21a9ceb..cf8b145 100644 --- a/copy-devices.diff +++ b/copy-devices.diff @@ -18,7 +18,7 @@ To use this patch, run these commands for a successful build: extern int preserve_specials; extern int preserve_hard_links; extern int preserve_perms; -@@ -1477,7 +1478,7 @@ static void recv_generator(char *fname, +@@ -1476,7 +1477,7 @@ static void recv_generator(char *fname, goto cleanup; } @@ -37,7 +37,7 @@ To use this patch, run these commands for a successful build: int preserve_links = 0; int preserve_hard_links = 0; int preserve_acls = 0; -@@ -334,6 +335,7 @@ void usage(enum logcode F) +@@ -340,6 +341,7 @@ void usage(enum logcode F) rprintf(F," -o, --owner preserve owner (super-user only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," --devices preserve device files (super-user only)\n"); @@ -45,7 +45,7 @@ To use this patch, run these commands for a successful build: rprintf(F," --specials preserve special files\n"); rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve modification times\n"); -@@ -488,6 +490,7 @@ static struct poptOption long_options[] +@@ -494,6 +496,7 @@ static struct poptOption long_options[] {"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 }, {"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 }, {"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 }, @@ -53,7 +53,7 @@ To use this patch, run these commands for a successful build: {"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 }, {"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 }, {"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 }, -@@ -1944,6 +1947,9 @@ void server_options(char **args,int *arg +@@ -1962,6 +1965,9 @@ void server_options(char **args,int *arg else if (remove_source_files) args[ac++] = "--remove-sent-files"; @@ -65,15 +65,15 @@ To use this patch, run these commands for a successful build: --- old/rsync.c +++ new/rsync.c -@@ -34,6 +34,7 @@ extern int preserve_perms; +@@ -33,6 +33,7 @@ extern int preserve_xattrs; + extern int preserve_perms; extern int preserve_executability; extern int preserve_times; - extern int omit_dir_times; +extern int copy_devices; extern int am_root; extern int am_server; extern int am_sender; -@@ -220,7 +221,8 @@ int read_ndx_and_attrs(int f_in, int *if +@@ -219,7 +220,8 @@ int read_ndx_and_attrs(int f_in, int *if if (iflags & ITEM_TRANSFER) { int i = ndx - cur_flist->ndx_start; diff --git a/omit-dir-changes.diff b/omit-dir-changes.diff index 2b0c41d..bd4fca2 100644 --- a/omit-dir-changes.diff +++ b/omit-dir-changes.diff @@ -9,23 +9,23 @@ To use this patch, run these commands for a successful build: --- old/generator.c +++ new/generator.c -@@ -44,6 +44,7 @@ extern int preserve_hard_links; +@@ -43,6 +43,7 @@ extern int preserve_specials; + extern int preserve_hard_links; extern int preserve_perms; extern int preserve_times; - extern int omit_dir_times; +extern int omit_dir_changes; extern int uid_ndx; extern int gid_ndx; extern int delete_mode; -@@ -556,6 +557,7 @@ void itemize(const char *fnamecmp, struc +@@ -555,6 +556,7 @@ void itemize(const char *fnamecmp, struc int keep_time = !preserve_times ? 0 - : S_ISDIR(file->mode) ? !omit_dir_times + : S_ISDIR(file->mode) ? preserve_times > 1 : !S_ISLNK(file->mode); + int omit_changes = omit_dir_changes && S_ISDIR(sxp->st.st_mode); if (S_ISREG(file->mode) && F_LENGTH(file) != sxp->st.st_size) iflags |= ITEM_REPORT_SIZE; -@@ -566,10 +568,11 @@ void itemize(const char *fnamecmp, struc +@@ -565,10 +567,11 @@ void itemize(const char *fnamecmp, struc iflags |= ITEM_REPORT_TIME; if (!BITS_EQUAL(sxp->st.st_mode, file->mode, CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; @@ -40,7 +40,7 @@ To use this patch, run these commands for a successful build: iflags |= ITEM_REPORT_GROUP; #ifdef SUPPORT_ACLS if (preserve_acls && !S_ISLNK(file->mode)) { -@@ -1229,7 +1232,7 @@ static void recv_generator(char *fname, +@@ -1235,7 +1238,7 @@ static void recv_generator(char *fname, statret = -1; new_root_dir = 0; } @@ -51,15 +51,15 @@ To use this patch, run these commands for a successful build: } --- old/options.c +++ new/options.c -@@ -56,6 +56,7 @@ int preserve_uid = 0; +@@ -56,6 +56,7 @@ int preserve_specials = 0; + int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; - int omit_dir_times = 0; +int omit_dir_changes = 0; int update_only = 0; int cvs_exclude = 0; int dry_run = 0; -@@ -337,6 +338,7 @@ void usage(enum logcode F) +@@ -344,6 +345,7 @@ void usage(enum logcode F) rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve modification times\n"); rprintf(F," -O, --omit-dir-times omit directories from --times\n"); @@ -67,27 +67,26 @@ To use this patch, run these commands for a successful build: rprintf(F," --super receiver attempts super-user activities\n"); #ifdef SUPPORT_XATTRS rprintf(F," --fake-super store/recover privileged attrs using xattrs\n"); -@@ -472,6 +474,7 @@ static struct poptOption long_options[] - {"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, - {"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 }, - {"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 }, +@@ -480,6 +482,7 @@ static struct poptOption long_options[] + {"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 }, + {"omit-dir-changes", 0, POPT_ARG_NONE, &omit_dir_changes, 0, 0, 0 }, {"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 }, {"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 }, {"no-super", 0, POPT_ARG_VAL, &am_root, 0, 0, 0 }, -@@ -1413,6 +1416,9 @@ int parse_arguments(int *argc, const cha - "P *%s", backup_suffix); +@@ -1430,6 +1433,8 @@ int parse_arguments(int *argc, const cha parse_rule(&filter_list, backup_dir_buf, 0, 0); } -+ -+ if (omit_dir_changes) -+ omit_dir_times = 2; - if (make_backups && !backup_dir) - omit_dir_times = 1; -@@ -1642,6 +1648,8 @@ void server_options(char **args,int *arg ++ if (omit_dir_changes) ++ omit_dir_times = 1; + if (make_backups && !backup_dir) { + omit_dir_times = 0; /* Implied, so avoid -O to sender. */ + if (preserve_times > 1) +@@ -1665,6 +1670,8 @@ void server_options(char **args,int *arg argstr[x++] = 'm'; - if (omit_dir_times == 2) + if (omit_dir_times) argstr[x++] = 'O'; + if (omit_dir_changes == 1) + args[ac++] = "--omit-dir-changes"; @@ -96,15 +95,15 @@ To use this patch, run these commands for a successful build: argstr[x++] = 'L'; --- old/rsync.c +++ new/rsync.c -@@ -34,6 +34,7 @@ extern int preserve_perms; +@@ -33,6 +33,7 @@ extern int preserve_xattrs; + extern int preserve_perms; extern int preserve_executability; extern int preserve_times; - extern int omit_dir_times; +extern int omit_dir_changes; extern int am_root; extern int am_server; extern int am_sender; -@@ -325,9 +326,11 @@ int set_file_attrs(const char *fname, st +@@ -324,9 +325,11 @@ int set_file_attrs(const char *fname, st updated = 1; } -- 2.34.1