From: Wayne Davison Date: Wed, 16 Mar 2005 02:26:44 +0000 (+0000) Subject: Fixed failing hunks. X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/5e048c14dd26a88afec23cc5b29dd6de84c64160 Fixed failing hunks. --- diff --git a/acls.diff b/acls.diff index 7557372..48b45d0 100644 --- a/acls.diff +++ b/acls.diff @@ -1193,7 +1193,7 @@ ACLs to a non-ACL-supporting disk should complain. free(file); if (verbose > 1) { ---- orig/configure.in 2005-03-01 06:22:19 +--- orig/configure.in 2005-03-16 02:19:29.819770817 +++ configure.in 2004-08-19 19:53:27 @@ -467,6 +467,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no AC_CHECK_LIB(resolv, strcasecmp) @@ -1285,18 +1285,18 @@ ACLs to a non-ACL-supporting disk should complain. AC_CONFIG_FILES([Makefile lib/dummy zlib/dummy popt/dummy shconfig]) AC_OUTPUT ---- orig/flist.c 2005-03-03 18:44:42 -+++ flist.c 2005-02-14 02:45:34 -@@ -971,6 +971,8 @@ void send_file_name(int f, struct file_l +--- orig/flist.c 2005-03-16 02:19:29.897764030 ++++ flist.c 2005-03-16 02:24:11 +@@ -970,6 +970,8 @@ static struct file_struct *send_file_nam file = make_file(fname, flist, f == -2 ? SERVER_FILTERS : ALL_FILTERS); if (!file) - return; + return NULL; + if (!MAKE_ACL(file, fname)) + return; maybe_emit_filelist_progress(flist); -@@ -979,6 +981,10 @@ void send_file_name(int f, struct file_l +@@ -978,6 +980,10 @@ static struct file_struct *send_file_nam if (file->basename[0]) { flist->files[flist->count++] = file; send_file_entry(file, f, base_flags); @@ -1305,9 +1305,9 @@ ACLs to a non-ACL-supporting disk should complain. + /* Cleanup unsent ACL(s). */ + SEND_ACL(file, -1); } - - if (recursive && S_ISDIR(file->mode) -@@ -1292,6 +1298,8 @@ struct file_list *recv_file_list(int f) + return file; + } +@@ -1304,6 +1310,8 @@ struct file_list *recv_file_list(int f) flags |= read_byte(f) << 8; file = receive_file_entry(flist, flags, f); @@ -1316,7 +1316,7 @@ ACLs to a non-ACL-supporting disk should complain. if (S_ISREG(file->mode)) stats.total_size += file->length; -@@ -1314,6 +1322,8 @@ struct file_list *recv_file_list(int f) +@@ -1326,6 +1334,8 @@ struct file_list *recv_file_list(int f) clean_flist(flist, relative_paths, 1); @@ -1325,9 +1325,9 @@ ACLs to a non-ACL-supporting disk should complain. if (f >= 0) { /* Now send the uid/gid list. This was introduced in * protocol version 15 */ ---- orig/generator.c 2005-03-09 23:46:28 +--- orig/generator.c 2005-03-16 02:19:29.980756807 +++ generator.c 2005-03-11 11:18:22 -@@ -711,6 +711,10 @@ static void recv_generator(char *fname, +@@ -712,6 +712,10 @@ static void recv_generator(char *fname, if (set_perms(fname, file, statret ? NULL : &st, 0) && verbose && code && f_out != -1) rprintf(code, "%s/\n", safe_fname(fname)); @@ -4597,7 +4597,7 @@ ACLs to a non-ACL-supporting disk should complain. next; } ---- orig/options.c 2005-03-09 18:53:53 +--- orig/options.c 2005-03-16 02:19:30.152741841 +++ options.c 2005-02-14 02:46:05 @@ -44,6 +44,7 @@ int keep_dirlinks = 0; int copy_links = 0; @@ -4607,7 +4607,7 @@ ACLs to a non-ACL-supporting disk should complain. int preserve_perms = 0; int preserve_devices = 0; int preserve_uid = 0; -@@ -178,6 +179,7 @@ static void print_rsync_version(enum log +@@ -179,6 +180,7 @@ static void print_rsync_version(enum log char const *got_socketpair = "no "; char const *have_inplace = "no "; char const *hardlinks = "no "; @@ -4615,7 +4615,7 @@ ACLs to a non-ACL-supporting disk should complain. char const *links = "no "; char const *ipv6 = "no "; STRUCT_STAT *dumstat; -@@ -194,6 +196,10 @@ static void print_rsync_version(enum log +@@ -195,6 +197,10 @@ static void print_rsync_version(enum log hardlinks = ""; #endif @@ -4626,7 +4626,7 @@ ACLs to a non-ACL-supporting disk should complain. #ifdef SUPPORT_LINKS links = ""; #endif -@@ -208,9 +214,9 @@ static void print_rsync_version(enum log +@@ -209,9 +215,9 @@ static void print_rsync_version(enum log "Copyright (C) 1996-2005 by Andrew Tridgell and others\n"); rprintf(f, "\n"); rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " @@ -4638,7 +4638,7 @@ ACLs to a non-ACL-supporting disk should complain. /* Note that this field may not have type ino_t. It depends * on the complicated interaction between largefile feature -@@ -280,6 +286,7 @@ void usage(enum logcode F) +@@ -281,6 +287,7 @@ void usage(enum logcode F) rprintf(F," -H, --hard-links preserve hard links\n"); rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n"); rprintf(F," -p, --perms preserve permissions\n"); @@ -4646,7 +4646,7 @@ ACLs to a non-ACL-supporting disk should complain. rprintf(F," -o, --owner preserve owner (root only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," -D, --devices preserve devices (root only)\n"); -@@ -402,6 +409,7 @@ static struct poptOption long_options[] +@@ -404,6 +411,7 @@ static struct poptOption long_options[] {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 }, {"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 }, @@ -4654,7 +4654,7 @@ ACLs to a non-ACL-supporting disk should complain. {"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 }, {"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 }, {"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 }, -@@ -854,6 +862,24 @@ int parse_arguments(int *argc, const cha +@@ -862,6 +870,24 @@ int parse_arguments(int *argc, const cha basis_dir[basis_dir_cnt++] = (char *)arg; break; @@ -4679,7 +4679,7 @@ ACLs to a non-ACL-supporting disk should complain. default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -1261,6 +1287,8 @@ void server_options(char **args,int *arg +@@ -1269,6 +1295,8 @@ void server_options(char **args,int *arg if (preserve_hard_links) argstr[x++] = 'H'; @@ -4688,9 +4688,9 @@ ACLs to a non-ACL-supporting disk should complain. if (preserve_uid) argstr[x++] = 'o'; if (preserve_gid) ---- orig/rsync.c 2005-02-25 17:08:57 +--- orig/rsync.c 2005-03-16 02:19:30.453715649 +++ rsync.c 2004-07-03 20:11:58 -@@ -138,6 +138,14 @@ int set_perms(char *fname,struct file_st +@@ -137,6 +137,14 @@ int set_perms(char *fname,struct file_st } #endif @@ -4705,9 +4705,9 @@ ACLs to a non-ACL-supporting disk should complain. if (verbose > 1 && flags & PERMS_REPORT) { enum logcode code = daemon_log_format_has_i || dry_run ? FCLIENT : FINFO; ---- orig/rsync.h 2005-03-09 18:53:49 +--- orig/rsync.h 2005-03-16 02:19:30.524709471 +++ rsync.h 2004-07-03 20:11:58 -@@ -638,6 +638,40 @@ struct stats { +@@ -639,6 +639,40 @@ struct stats { #include "lib/permstring.h" #include "lib/addrinfo.h" @@ -4748,7 +4748,7 @@ ACLs to a non-ACL-supporting disk should complain. #include "proto.h" /* We have replacement versions of these if they're missing. */ ---- orig/rsync.yo 2005-03-05 18:58:26 +--- orig/rsync.yo 2005-03-16 02:19:30.727691806 +++ rsync.yo 2004-07-03 20:11:58 @@ -316,6 +316,7 @@ to the detailed description below for a -H, --hard-links preserve hard links @@ -4758,7 +4758,7 @@ ACLs to a non-ACL-supporting disk should complain. -o, --owner preserve owner (root only) -g, --group preserve group -D, --devices preserve devices (root only) -@@ -623,6 +624,11 @@ source file's permissions and the umask +@@ -624,6 +625,11 @@ source file's permissions and the umask other files (including updated files) retain their existing permissions (which is the same behavior as other file-copy utilities, such as cp). diff --git a/append.diff b/append.diff index a5c6ce5..3e6ccb4 100644 --- a/append.diff +++ b/append.diff @@ -1,7 +1,7 @@ This patch adds the --append option, which works like a "resume" mode in an ftp client, appending new data onto the end of the files it updates. ---- orig/generator.c 2005-03-09 23:46:28 +--- orig/generator.c 2005-03-16 02:19:29.980756807 +++ generator.c 2005-03-03 02:59:17 @@ -51,6 +51,7 @@ extern int remove_sent_files; extern int update_only; @@ -11,7 +11,7 @@ an ftp client, appending new data onto the end of the files it updates. extern int make_backups; extern int csum_length; extern int ignore_times; -@@ -463,35 +464,42 @@ static void generate_and_send_sums(int f +@@ -466,35 +467,42 @@ static void generate_and_send_sums(int f OFF_T offset = 0; sum_sizes_sqroot(&sum, len); @@ -61,7 +61,7 @@ an ftp client, appending new data onto the end of the files it updates. } if (mapbuf) -@@ -957,6 +965,9 @@ static void recv_generator(char *fname, +@@ -973,6 +981,9 @@ static void recv_generator(char *fname, return; } @@ -71,7 +71,7 @@ an ftp client, appending new data onto the end of the files it updates. if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH) ; else if (fnamecmp_type == FNAMECMP_FUZZY) -@@ -1129,7 +1140,7 @@ void generate_files(int f_out, struct fi +@@ -1143,7 +1154,7 @@ void generate_files(int f_out, struct fi if (delete_before && !local_name && flist->count > 0) do_delete_pass(flist); @@ -80,7 +80,7 @@ an ftp client, appending new data onto the end of the files it updates. whole_file = 0; if (verbose >= 2) { rprintf(FINFO, "delta-transmission %s\n", -@@ -1180,6 +1191,8 @@ void generate_files(int f_out, struct fi +@@ -1194,6 +1205,8 @@ void generate_files(int f_out, struct fi only_existing = max_size = opt_ignore_existing = 0; update_only = always_checksum = size_only = 0; ignore_times = 1; @@ -130,7 +130,7 @@ an ftp client, appending new data onto the end of the files it updates. matched(f, s, buf, j, -2); matched(f, s, buf, len, -1); } ---- orig/options.c 2005-03-09 18:53:53 +--- orig/options.c 2005-03-16 02:19:30.152741841 +++ options.c 2005-03-11 11:21:34 @@ -39,6 +39,7 @@ int make_backups = 0; **/ @@ -140,7 +140,7 @@ an ftp client, appending new data onto the end of the files it updates. int archive_mode = 0; int keep_dirlinks = 0; int copy_links = 0; -@@ -164,6 +165,7 @@ static int F_option_cnt = 0; +@@ -165,6 +166,7 @@ static int F_option_cnt = 0; static int modify_window_set; static int refused_delete, refused_archive_part; static int refused_partial, refused_progress, refused_delete_before; @@ -148,7 +148,7 @@ an ftp client, appending new data onto the end of the files it updates. static char *max_size_arg; static char partialdir_for_delayupdate[] = ".~tmp~"; -@@ -272,6 +274,7 @@ void usage(enum logcode F) +@@ -273,6 +275,7 @@ void usage(enum logcode F) rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX); 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"); @@ -156,7 +156,7 @@ an ftp client, appending new data onto the end of the files it updates. rprintf(F," -d, --dirs transfer directories without recursing\n"); rprintf(F," -l, --links copy symlinks as symlinks\n"); rprintf(F," -L, --copy-links transform symlink into referent file/dir\n"); -@@ -398,6 +401,7 @@ static struct poptOption long_options[] +@@ -400,6 +403,7 @@ static struct poptOption long_options[] {"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 }, {"copy-links", 'L', POPT_ARG_NONE, ©_links, 0, 0, 0 }, {"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 }, @@ -164,7 +164,7 @@ an ftp client, appending new data onto the end of the files it updates. {"whole-file", 'W', POPT_ARG_VAL, &whole_file, 1, 0, 0 }, {"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 }, {"copy-unsafe-links",0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 }, -@@ -571,6 +575,8 @@ static void set_refuse_options(char *bp) +@@ -574,6 +578,8 @@ static void set_refuse_options(char *bp) refused_partial = op->val; else if (wildmatch("progress", op->longName)) refused_progress = op->val; @@ -173,7 +173,7 @@ an ftp client, appending new data onto the end of the files it updates. break; } if (!is_wild) -@@ -1105,6 +1111,14 @@ int parse_arguments(int *argc, const cha +@@ -1113,6 +1119,14 @@ int parse_arguments(int *argc, const cha bwlimit_writemax = 512; } @@ -188,7 +188,7 @@ an ftp client, appending new data onto the end of the files it updates. if (delay_updates && !partial_dir) partial_dir = partialdir_for_delayupdate; -@@ -1415,7 +1429,9 @@ void server_options(char **args,int *arg +@@ -1423,7 +1437,9 @@ void server_options(char **args,int *arg if (opt_ignore_existing && am_sender) args[ac++] = "--ignore-existing"; @@ -199,7 +199,7 @@ an ftp client, appending new data onto the end of the files it updates. args[ac++] = "--inplace"; if (tmpdir) { ---- orig/receiver.c 2005-03-10 00:06:01 +--- orig/receiver.c 2005-03-16 02:19:30.248733487 +++ receiver.c 2005-02-11 20:26:32 @@ -44,6 +44,7 @@ extern int remove_sent_files; extern int module_id; @@ -238,7 +238,7 @@ an ftp client, appending new data onto the end of the files it updates. while ((i = recv_token(f_in, &data)) != 0) { if (do_progress) show_progress(offset, total_size); -@@ -364,6 +387,7 @@ int recv_files(int f_in, struct file_lis +@@ -399,6 +422,7 @@ int recv_files(int f_in, struct file_lis send_msg(MSG_DONE, "", 0); if (keep_partial && !partial_dir) make_backups = 0; /* prevents double backup */ @@ -246,7 +246,7 @@ an ftp client, appending new data onto the end of the files it updates. continue; } ---- orig/rsync.yo 2005-03-05 18:58:26 +--- orig/rsync.yo 2005-03-16 02:19:30.727691806 +++ rsync.yo 2005-02-11 20:36:38 @@ -308,6 +308,7 @@ to the detailed description below for a --suffix=SUFFIX backup suffix (default ~ w/o --backup-dir) @@ -256,7 +256,7 @@ an ftp client, appending new data onto the end of the files it updates. -d, --dirs transfer directories without recursing -l, --links copy symlinks as symlinks -L, --copy-links transform symlink into referent file/dir -@@ -563,6 +564,14 @@ should not use this option to update fil +@@ -564,6 +565,14 @@ should not use this option to update fil rsync will be unable to update a file in-place that is not writable by the receiving user. @@ -271,8 +271,8 @@ an ftp client, appending new data onto the end of the files it updates. dit(bf(-d, --dirs)) Tell the sending side to include any directories that are encountered. Unlike bf(--recursive), a directory's contents are not copied unless the directory was specified on the command-line as either "." or a ---- orig/sender.c 2005-03-10 00:05:58 -+++ sender.c 2005-02-20 00:17:01 +--- orig/sender.c 2005-03-16 02:19:30.828683018 ++++ sender.c 2005-03-16 02:25:18 @@ -28,6 +28,7 @@ extern int log_format_has_i; extern int daemon_log_format_has_i; extern int csum_length; @@ -295,11 +295,11 @@ an ftp client, appending new data onto the end of the files it updates. if (s->count == 0) return(s); -@@ -234,6 +242,7 @@ void send_files(struct file_list *flist, - /* For inplace: redo phase turns off the backup - * flag so that we do a regular inplace send. */ - make_backups = 0; -+ append_mode = 0; - continue; - } - break; +@@ -235,6 +243,7 @@ void send_files(struct file_list *flist, + /* For inplace: redo phase turns off the backup + * flag so that we do a regular inplace send. */ + make_backups = 0; ++ append_mode = 0; + continue; + } +