From 7c4c2959ae79a01986ff24b5dc9ff4518cc9fb7b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 16 Oct 2007 16:04:28 +0000 Subject: [PATCH] Fixed failing hunks. --- atimes.diff | 6 +++--- detect-renamed-lax.diff | 36 ++++++++++++++++++------------------ drop-cache.diff | 10 +++++----- flags.diff | 18 +++++++++--------- preallocate.diff | 14 +++++++------- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/atimes.diff b/atimes.diff index ffd79ca..20489e6 100644 --- a/atimes.diff +++ b/atimes.diff @@ -26,7 +26,7 @@ TODO: need to fix this to handle 64-bit time_t values! #ifdef ICONV_OPTION int ic_ndx; -@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in) +@@ -122,6 +123,8 @@ void setup_protocol(int f_out,int f_in) uid_ndx = ++file_extra_cnt; if (preserve_gid) gid_ndx = ++file_extra_cnt; @@ -137,7 +137,7 @@ TODO: need to fix this to handle 64-bit time_t values! + if (preserve_atimes && !S_ISDIR(file->mode) && !S_ISLNK(file->mode) + && cmp_time(F_ATIME(file), sxp->st.st_atime) != 0) + iflags |= ITEM_REPORT_ATIME; - #ifndef HAVE_LCHMOD + #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST if (S_ISLNK(file->mode)) { ; @@ -884,6 +888,8 @@ static int try_dests_reg(struct file_str @@ -225,7 +225,7 @@ TODO: need to fix this to handle 64-bit time_t values! {"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 }, -@@ -1717,6 +1722,8 @@ void server_options(char **args, int *ar +@@ -1713,6 +1718,8 @@ void server_options(char **args, int *ar argstr[x++] = 'D'; if (preserve_times) argstr[x++] = 't'; diff --git a/detect-renamed-lax.diff b/detect-renamed-lax.diff index 66cb788..98a732a 100644 --- a/detect-renamed-lax.diff +++ b/detect-renamed-lax.diff @@ -33,7 +33,7 @@ switches to --detect-moved blindly accepts the staged file. diff = u_strcmp(fmid->basename, f->basename); if (diff == 0) { good_match = mid; -@@ -1826,6 +1828,21 @@ static void recv_generator(char *fname, +@@ -1831,6 +1833,21 @@ static void recv_generator(char *fname, fnamecmp = partialptr; fnamecmp_type = FNAMECMP_PARTIAL_DIR; statret = 0; @@ -77,23 +77,23 @@ switches to --detect-moved blindly accepts the staged file. {"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 }, {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 }, -@@ -1895,8 +1899,14 @@ void server_options(char **args, int *ar - } - } - /* Both sides need to know in case this disables incremental recursion. */ -- if (detect_renamed) -- args[ac++] = "--detect-renamed"; -+ if (detect_renamed) { -+ if (detect_renamed == 1) -+ args[ac++] = "--detect-renamed"; -+ else if (detect_renamed == 2) -+ args[ac++] = "--detect-renamed-lax"; -+ else -+ args[ac++] = "--detect-moved"; -+ } - - if (modify_window_set) { - if (asprintf(&arg, "--modify-window=%d", modify_window) < 0) +@@ -1889,8 +1893,14 @@ void server_options(char **args, int *ar + args[ac++] = "--super"; + if (size_only) + args[ac++] = "--size-only"; +- if (detect_renamed) +- args[ac++] = "--detect-renamed"; ++ if (detect_renamed) { ++ if (detect_renamed == 1) ++ args[ac++] = "--detect-renamed"; ++ else if (detect_renamed == 2) ++ args[ac++] = "--detect-renamed-lax"; ++ else ++ args[ac++] = "--detect-moved"; ++ } + } else { + if (skip_compress) { + if (asprintf(&arg, "--skip-compress=%s", skip_compress) < 0) --- old/rsync.yo +++ new/rsync.yo @@ -385,6 +385,8 @@ to the detailed description below for a diff --git a/drop-cache.diff b/drop-cache.diff index 52d14d7..1d57ecc 100644 --- a/drop-cache.diff +++ b/drop-cache.diff @@ -98,8 +98,8 @@ Changes: strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ strerror putenv iconv_open locale_charset nl_langinfo getxattr \ -- extattr_get_link sigaction sigprocmask) -+ extattr_get_link sigaction sigprocmask posix_fadvise64) +- extattr_get_link sigaction sigprocmask setattrlist) ++ extattr_get_link sigaction sigprocmask setattrlist posix_fadvise64) AC_CHECK_FUNCS(getpgrp tcgetpgrp) if test $ac_cv_func_getpgrp = yes; then @@ -161,7 +161,7 @@ Changes: {"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 }, {"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 }, {"ignore-existing", 0, POPT_ARG_NONE, &ignore_existing, 0, 0, 0 }, -@@ -1664,6 +1671,11 @@ void server_options(char **args, int *ar +@@ -1659,6 +1666,11 @@ void server_options(char **args, int *ar if (!am_sender) args[ac++] = "--sender"; @@ -188,7 +188,7 @@ Changes: * --- old/rsync.yo +++ new/rsync.yo -@@ -353,6 +353,7 @@ to the detailed description below for a +@@ -352,6 +352,7 @@ to the detailed description below for a --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently @@ -196,7 +196,7 @@ Changes: -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) -x, --one-file-system don't cross filesystem boundaries -@@ -1009,6 +1010,10 @@ NOTE: Don't use this option when the des +@@ -1014,6 +1015,10 @@ NOTE: Don't use this option when the des filesystem. It doesn't seem to handle seeks over null regions correctly and ends up corrupting the files. diff --git a/flags.diff b/flags.diff index 914083f..edb1b54 100644 --- a/flags.diff +++ b/flags.diff @@ -27,7 +27,7 @@ To use this patch, run these commands for a successful build: #ifdef ICONV_OPTION int ic_ndx; -@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in) +@@ -122,6 +123,8 @@ void setup_protocol(int f_out,int f_in) uid_ndx = ++file_extra_cnt; if (preserve_gid) gid_ndx = ++file_extra_cnt; @@ -44,7 +44,7 @@ To use this patch, run these commands for a successful build: setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ - strerror putenv iconv_open locale_charset nl_langinfo getxattr \ + chflags strerror putenv iconv_open locale_charset nl_langinfo getxattr \ - extattr_get_link sigaction sigprocmask) + extattr_get_link sigaction sigprocmask setattrlist) AC_CHECK_FUNCS(getpgrp tcgetpgrp) --- old/flist.c @@ -259,7 +259,7 @@ To use this patch, run these commands for a successful build: } } -@@ -1258,7 +1269,7 @@ static void recv_generator(char *fname, +@@ -1263,7 +1274,7 @@ static void recv_generator(char *fname, * full later (right before we handle its contents). */ if (statret == 0 && (S_ISDIR(sx.st.st_mode) @@ -268,7 +268,7 @@ To use this patch, run these commands for a successful build: goto cleanup; /* Any errors get reported later. */ if (do_mkdir(fname, file->mode & 0700) == 0) file->flags |= FLAG_DIR_CREATED; -@@ -1270,7 +1281,7 @@ static void recv_generator(char *fname, +@@ -1275,7 +1286,7 @@ static void recv_generator(char *fname, * we need to delete it. If it doesn't exist, then * (perhaps recursively) create it. */ if (statret == 0 && !S_ISDIR(sx.st.st_mode)) { @@ -277,7 +277,7 @@ To use this patch, run these commands for a successful build: goto skipping_dir_contents; statret = -1; } -@@ -1399,7 +1410,7 @@ static void recv_generator(char *fname, +@@ -1404,7 +1415,7 @@ static void recv_generator(char *fname, } /* Not the right symlink (or not a symlink), so * delete it. */ @@ -286,7 +286,7 @@ To use this patch, run these commands for a successful build: goto cleanup; } else if (basis_dir[0] != NULL) { int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, -@@ -1478,7 +1489,7 @@ static void recv_generator(char *fname, +@@ -1483,7 +1494,7 @@ static void recv_generator(char *fname, goto return_with_success; goto cleanup; } @@ -295,7 +295,7 @@ To use this patch, run these commands for a successful build: goto cleanup; } else if (basis_dir[0] != NULL) { int j = try_dests_non(file, fname, ndx, fnamecmpbuf, &sx, -@@ -1569,7 +1580,7 @@ static void recv_generator(char *fname, +@@ -1574,7 +1585,7 @@ static void recv_generator(char *fname, fnamecmp_type = FNAMECMP_FNAME; if (statret == 0 && !S_ISREG(sx.st.st_mode)) { @@ -376,7 +376,7 @@ To use this patch, run these commands for a successful build: if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); -@@ -1790,6 +1807,9 @@ void server_options(char **args, int *ar +@@ -1792,6 +1809,9 @@ void server_options(char **args, int *ar if (xfer_dirs && !recurse && delete_mode && am_sender) args[ac++] = "--no-r"; @@ -565,7 +565,7 @@ To use this patch, run these commands for a successful build: transfer. The resulting value is treated as though it was the permissions --- old/syscall.c +++ new/syscall.c -@@ -162,6 +162,15 @@ int do_chmod(const char *path, mode_t mo +@@ -173,6 +173,15 @@ int do_chmod(const char *path, mode_t mo } #endif diff --git a/preallocate.diff b/preallocate.diff index 2e825cf..6a3192d 100644 --- a/preallocate.diff +++ b/preallocate.diff @@ -15,8 +15,8 @@ To use this patch, run these commands for a successful build: strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \ setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \ strerror putenv iconv_open locale_charset nl_langinfo getxattr \ -- extattr_get_link sigaction sigprocmask) -+ extattr_get_link sigaction sigprocmask posix_fallocate) +- extattr_get_link sigaction sigprocmask setattrlist) ++ extattr_get_link sigaction sigprocmask setattrlist posix_fallocate) AC_CHECK_FUNCS(getpgrp tcgetpgrp) if test $ac_cv_func_getpgrp = yes; then @@ -77,7 +77,7 @@ To use this patch, run these commands for a successful build: {"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 }, {"append", 0, POPT_ARG_NONE, 0, OPT_APPEND, 0, 0 }, {"append-verify", 0, POPT_ARG_VAL, &append_mode, 2, 0, 0 }, -@@ -1285,6 +1294,15 @@ int parse_arguments(int *argc_p, const c +@@ -1284,6 +1293,15 @@ int parse_arguments(int *argc_p, const c } #endif @@ -93,7 +93,7 @@ To use this patch, run these commands for a successful build: if (write_batch && read_batch) { snprintf(err_buf, sizeof err_buf, "--write-batch and --read-batch can not be used together\n"); -@@ -1992,6 +2010,9 @@ void server_options(char **args, int *ar +@@ -1988,6 +2006,9 @@ void server_options(char **args, int *ar else if (remove_source_files) args[ac++] = "--remove-sent-files"; @@ -156,7 +156,7 @@ To use this patch, run these commands for a successful build: if (do_progress) --- old/rsync.h +++ new/rsync.h -@@ -564,6 +564,10 @@ struct ht_int64_node { +@@ -568,6 +568,10 @@ struct ht_int64_node { #define ACLS_NEED_MASK 1 #endif @@ -169,7 +169,7 @@ To use this patch, run these commands for a successful build: uint32 unum; --- old/rsync.yo +++ new/rsync.yo -@@ -353,6 +353,7 @@ to the detailed description below for a +@@ -352,6 +352,7 @@ to the detailed description below for a --super receiver attempts super-user activities --fake-super store/recover privileged attrs using xattrs -S, --sparse handle sparse files efficiently @@ -177,7 +177,7 @@ To use this patch, run these commands for a successful build: -n, --dry-run show what would have been transferred -W, --whole-file copy files whole (without rsync algorithm) -x, --one-file-system don't cross filesystem boundaries -@@ -1009,6 +1010,19 @@ NOTE: Don't use this option when the des +@@ -1014,6 +1015,19 @@ NOTE: Don't use this option when the des filesystem. It doesn't seem to handle seeks over null regions correctly and ends up corrupting the files. -- 2.34.1