Skip to content

Commit c336504

Browse files
committed
The patches for 3.2.4pre4.
1 parent db01c27 commit c336504

28 files changed

+271
-271
lines changed

backup-deleted.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ To use this patch, run these commands for a successful build:
77
./configure (optional if already run)
88
make
99

10-
based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
10+
based-on: d821e4cbfbc66848cdf91a336af26fdb89dd9a8f
1111
diff --git a/generator.c b/generator.c
1212
--- a/generator.c
1313
+++ b/generator.c
14-
@@ -1837,7 +1837,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
14+
@@ -1843,7 +1843,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
1515
goto notify_others;
1616

1717
if (read_batch || whole_file) {
@@ -20,16 +20,16 @@ diff --git a/generator.c b/generator.c
2020
if (!(backupptr = get_backup_name(fname)))
2121
goto cleanup;
2222
if (!(back_file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
23-
@@ -1873,7 +1873,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
23+
@@ -1879,7 +1879,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
2424
goto notify_others;
2525
}
2626

2727
- if (inplace && make_backups > 0 && fnamecmp_type == FNAMECMP_FNAME) {
2828
+ if (inplace && make_backups > 1 && fnamecmp_type == FNAMECMP_FNAME) {
2929
if (!(backupptr = get_backup_name(fname))) {
30-
close(fd);
3130
goto cleanup;
32-
@@ -1997,7 +1997,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
31+
}
32+
@@ -1999,7 +1999,7 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const
3333
skip_atomic = 0;
3434

3535
if (del_for_flag) {
@@ -41,7 +41,7 @@ diff --git a/generator.c b/generator.c
4141
diff --git a/options.c b/options.c
4242
--- a/options.c
4343
+++ b/options.c
44-
@@ -770,7 +770,8 @@ static struct poptOption long_options[] = {
44+
@@ -772,7 +772,8 @@ static struct poptOption long_options[] = {
4545
{"no-i", 0, POPT_ARG_VAL, &itemize_changes, 0, 0, 0 },
4646
{"bwlimit", 0, POPT_ARG_STRING, &bwlimit_arg, OPT_BWLIMIT, 0, 0 },
4747
{"no-bwlimit", 0, POPT_ARG_VAL, &bwlimit, 0, 0, 0 },
@@ -51,7 +51,7 @@ diff --git a/options.c b/options.c
5151
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
5252
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
5353
{"suffix", 0, POPT_ARG_STRING, &backup_suffix, 0, 0, 0 },
54-
@@ -2756,6 +2757,10 @@ void server_options(char **args, int *argc_p)
54+
@@ -2760,6 +2761,10 @@ void server_options(char **args, int *argc_p)
5555
args[ac++] = safe_arg("--compress-choice", compress_choice);
5656

5757
if (am_sender) {
@@ -86,15 +86,15 @@ diff --git a/receiver.c b/receiver.c
8686
diff --git a/rsync.1.md b/rsync.1.md
8787
--- a/rsync.1.md
8888
+++ b/rsync.1.md
89-
@@ -348,6 +348,7 @@ has its own detailed description later in this man page.
89+
@@ -348,6 +348,7 @@ has its own detailed description later in this manpage.
9090
--relative, -R use relative path names
9191
--no-implied-dirs don't send implied dirs with --relative
9292
--backup, -b make backups (see --suffix & --backup-dir)
9393
+--backup-deleted make backups only of deleted files
9494
--backup-dir=DIR make backups into hierarchy based in DIR
9595
--suffix=SUFFIX backup suffix (default ~ w/o --backup-dir)
9696
--update, -u skip files that are newer on the receiver
97-
@@ -913,6 +914,13 @@ your home directory (remove the '=' for that).
97+
@@ -914,6 +915,13 @@ your home directory (remove the '=' for that).
9898
rules specify a trailing inclusion/exclusion of `*`, the auto-added rule
9999
would never be reached).
100100

backup-dir-dels.diff

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ diff --git a/delete.c b/delete.c
204204
diff --git a/options.c b/options.c
205205
--- a/options.c
206206
+++ b/options.c
207-
@@ -162,10 +162,14 @@ int no_detach
207+
@@ -163,10 +163,14 @@ int no_detach
208208
int write_batch = 0;
209209
int read_batch = 0;
210210
int backup_dir_len = 0;
@@ -219,7 +219,7 @@ diff --git a/options.c b/options.c
219219
char *tmpdir = NULL;
220220
char *partial_dir = NULL;
221221
char *basis_dir[MAX_BASIS_DIRS+1];
222-
@@ -178,7 +182,9 @@ char *password_file = NULL;
222+
@@ -179,7 +183,9 @@ char *password_file = NULL;
223223
char *early_input_file = NULL;
224224
char *rsync_path = RSYNC_PATH;
225225
char *backup_dir = NULL;
@@ -229,7 +229,7 @@ diff --git a/options.c b/options.c
229229
char *sockopts = NULL;
230230
char *usermap = NULL;
231231
char *groupmap = NULL;
232-
@@ -774,7 +780,9 @@ static struct poptOption long_options[] = {
232+
@@ -776,7 +782,9 @@ static struct poptOption long_options[] = {
233233
{"backup-deleted", 0, POPT_ARG_VAL, &make_backups, 1, 0, 0 },
234234
{"no-backup", 0, POPT_ARG_VAL, &make_backups, 0, 0, 0 },
235235
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
@@ -239,7 +239,7 @@ diff --git a/options.c b/options.c
239239
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
240240
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
241241
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
242-
@@ -2224,6 +2232,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
242+
@@ -2228,6 +2236,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
243243
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
244244
if (backup_dir)
245245
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
@@ -248,7 +248,7 @@ diff --git a/options.c b/options.c
248248
}
249249
if (daemon_filter_list.head && !am_sender) {
250250
filter_rule_list *elp = &daemon_filter_list;
251-
@@ -2245,6 +2255,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
251+
@@ -2249,6 +2259,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
252252
if (check_filter(elp, FLOG, dir, 1) < 0)
253253
goto options_rejected;
254254
}
@@ -263,7 +263,7 @@ diff --git a/options.c b/options.c
263263
}
264264

265265
if (!backup_suffix)
266-
@@ -2256,6 +2274,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
266+
@@ -2260,6 +2278,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
267267
backup_suffix);
268268
return 0;
269269
}
@@ -284,7 +284,7 @@ diff --git a/options.c b/options.c
284284
if (backup_dir) {
285285
size_t len;
286286
make_backups = 1; /* --backup-dir implies --backup */
287-
@@ -2292,6 +2324,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
287+
@@ -2296,6 +2328,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
288288
"P *%s", backup_suffix);
289289
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
290290
}
@@ -319,7 +319,7 @@ diff --git a/options.c b/options.c
319319

320320
if (make_backups && !backup_dir)
321321
omit_dir_times = -1; /* Implied, so avoid -O to sender. */
322-
@@ -2741,11 +2801,20 @@ void server_options(char **args, int *argc_p)
322+
@@ -2745,11 +2805,20 @@ void server_options(char **args, int *argc_p)
323323
args[ac++] = "--backup-dir";
324324
args[ac++] = safe_arg("", backup_dir);
325325
}
@@ -343,7 +343,7 @@ diff --git a/options.c b/options.c
343343
diff --git a/rsync.1.md b/rsync.1.md
344344
--- a/rsync.1.md
345345
+++ b/rsync.1.md
346-
@@ -350,7 +350,9 @@ has its own detailed description later in this man page.
346+
@@ -350,7 +350,9 @@ has its own detailed description later in this manpage.
347347
--backup, -b make backups (see --suffix & --backup-dir)
348348
--backup-deleted make backups only of deleted files
349349
--backup-dir=DIR make backups into hierarchy based in DIR
@@ -353,7 +353,7 @@ diff --git a/rsync.1.md b/rsync.1.md
353353
--update, -u skip files that are newer on the receiver
354354
--inplace update destination files in-place
355355
--append append data onto shorter files
356-
@@ -935,6 +937,11 @@ your home directory (remove the '=' for that).
356+
@@ -936,6 +938,11 @@ your home directory (remove the '=' for that).
357357
daemon is the receiver, the backup dir cannot go outside the module's path
358358
hierarchy, so take extra care not to delete it or copy into it.
359359

catch_crash_signals.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To use this patch, run these commands for a successful build:
2525
./configure (optional if already run)
2626
make
2727

28-
based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
28+
based-on: d821e4cbfbc66848cdf91a336af26fdb89dd9a8f
2929
diff --git a/errcode.h b/errcode.h
3030
--- a/errcode.h
3131
+++ b/errcode.h

checksum-reading.diff

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To use this patch, run these commands for a successful build:
1616
./configure (optional if already run)
1717
make
1818

19-
based-on: 55b2a06812e39f15f52e92b979600cb82be210cb
19+
based-on: d821e4cbfbc66848cdf91a336af26fdb89dd9a8f
2020
diff --git a/clientserver.c b/clientserver.c
2121
--- a/clientserver.c
2222
+++ b/clientserver.c
@@ -69,23 +69,23 @@ diff --git a/flist.c b/flist.c
6969
extern int checksum_type;
7070
extern int module_id;
7171
extern int ignore_errors;
72-
@@ -62,6 +64,7 @@ extern int implied_dirs;
72+
@@ -63,6 +65,7 @@ extern int implied_dirs;
7373
extern int ignore_perishable;
7474
extern int non_perishable_cnt;
7575
extern int prune_empty_dirs;
7676
+extern int checksum_files;
7777
extern int copy_links;
7878
extern int copy_unsafe_links;
7979
extern int protocol_version;
80-
@@ -73,6 +76,7 @@ extern int sender_symlink_iconv;
80+
@@ -74,6 +77,7 @@ extern int sender_symlink_iconv;
8181
extern int output_needs_newline;
8282
extern int sender_keeps_checksum;
8383
extern int unsort_ndx;
8484
+extern char *basis_dir[];
8585
extern uid_t our_uid;
8686
extern struct stats stats;
8787
extern char *filesfrom_host;
88-
@@ -90,6 +94,20 @@ extern int filesfrom_convert;
88+
@@ -91,6 +95,20 @@ extern int filesfrom_convert;
8989
extern iconv_t ic_send, ic_recv;
9090
#endif
9191

@@ -106,7 +106,7 @@ diff --git a/flist.c b/flist.c
106106
#define PTR_SIZE (sizeof (struct file_struct *))
107107

108108
int io_error;
109-
@@ -134,8 +152,12 @@ static char empty_sum[MAX_DIGEST_LEN];
109+
@@ -135,8 +153,12 @@ static char empty_sum[MAX_DIGEST_LEN];
110110
static int flist_count_offset; /* for --delete --progress */
111111
static int show_filelist_progress;
112112

@@ -120,7 +120,7 @@ diff --git a/flist.c b/flist.c
120120
static void output_flist(struct file_list *flist);
121121

122122
void init_flist(void)
123-
@@ -326,6 +348,235 @@ static void flist_done_allocating(struct file_list *flist)
123+
@@ -327,6 +349,235 @@ static void flist_done_allocating(struct file_list *flist)
124124
flist->pool_boundary = ptr;
125125
}
126126

@@ -356,7 +356,7 @@ diff --git a/flist.c b/flist.c
356356
/* Call this with EITHER (1) "file, NULL, 0" to chdir() to the file's
357357
* F_PATHNAME(), or (2) "NULL, dir, dirlen" to chdir() to the supplied dir,
358358
* with dir == NULL taken to be the starting directory, and dirlen < 0
359-
@@ -1203,7 +1454,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
359+
@@ -1216,7 +1467,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
360360
STRUCT_STAT *stp, int flags, int filter_level)
361361
{
362362
static char *lastdir;
@@ -365,7 +365,7 @@ diff --git a/flist.c b/flist.c
365365
struct file_struct *file;
366366
char thisname[MAXPATHLEN];
367367
char linkname[MAXPATHLEN];
368-
@@ -1349,9 +1600,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
368+
@@ -1362,9 +1613,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
369369
memcpy(lastdir, thisname, len);
370370
lastdir[len] = '\0';
371371
lastdir_len = len;
@@ -383,7 +383,7 @@ diff --git a/flist.c b/flist.c
383383
basename_len = strlen(basename) + 1; /* count the '\0' */
384384

385385
#ifdef SUPPORT_LINKS
386-
@@ -1369,11 +1627,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
386+
@@ -1394,11 +1652,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
387387
extra_len += EXTRA_LEN;
388388
#endif
389389

@@ -397,7 +397,7 @@ diff --git a/flist.c b/flist.c
397397

398398
#if EXTRA_ROUNDING > 0
399399
if (extra_len & (EXTRA_ROUNDING * EXTRA_LEN))
400-
@@ -1462,8 +1717,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
400+
@@ -1487,8 +1742,14 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
401401
return NULL;
402402
}
403403

@@ -414,7 +414,7 @@ diff --git a/flist.c b/flist.c
414414

415415
if (unsort_ndx)
416416
F_NDX(file) = stats.num_dirs;
417-
@@ -2680,7 +2941,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
417+
@@ -2705,7 +2966,7 @@ struct file_list *recv_file_list(int f, int dir_ndx)
418418
/* The --relative option sends paths with a leading slash, so we need
419419
* to specify the strip_root option here. We rejected leading slashes
420420
* for a non-relative transfer in recv_file_entry(). */
@@ -423,7 +423,7 @@ diff --git a/flist.c b/flist.c
423423

424424
if (protocol_version < 30) {
425425
/* Recv the io_error flag */
426-
@@ -2925,7 +3186,7 @@ void flist_free(struct file_list *flist)
426+
@@ -2950,7 +3211,7 @@ void flist_free(struct file_list *flist)
427427

428428
/* This routine ensures we don't have any duplicate names in our file list.
429429
* duplicate names can cause corruption because of the pipelining. */
@@ -432,7 +432,7 @@ diff --git a/flist.c b/flist.c
432432
{
433433
char fbuf[MAXPATHLEN];
434434
int i, prev_i;
435-
@@ -2976,7 +3237,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
435+
@@ -3001,7 +3262,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
436436
/* If one is a dir and the other is not, we want to
437437
* keep the dir because it might have contents in the
438438
* list. Otherwise keep the first one. */
@@ -441,7 +441,7 @@ diff --git a/flist.c b/flist.c
441441
struct file_struct *fp = flist->sorted[j];
442442
if (!S_ISDIR(fp->mode))
443443
keep = i, drop = j;
444-
@@ -2992,8 +3253,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
444+
@@ -3017,8 +3278,8 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
445445
} else
446446
keep = j, drop = i;
447447

@@ -452,7 +452,7 @@ diff --git a/flist.c b/flist.c
452452
rprintf(FINFO,
453453
"removing duplicate name %s from file list (%d)\n",
454454
f_name(file, fbuf), drop + flist->ndx_start);
455-
@@ -3015,7 +3276,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
455+
@@ -3040,7 +3301,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
456456
}
457457
flist->high = prev_i;
458458

@@ -607,7 +607,7 @@ diff --git a/generator.c b/generator.c
607607
/* Sets fnamecmp_type to FNAMECMP_FUZZY or above. */
608608
fuzzy_file = find_fuzzy(file, fuzzy_dirlist, &fnamecmp_type);
609609
if (fuzzy_file) {
610-
@@ -1797,7 +1804,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
610+
@@ -1803,7 +1810,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
611611
;
612612
else if (fnamecmp_type >= FNAMECMP_FUZZY)
613613
;
@@ -648,15 +648,15 @@ diff --git a/loadparm.c b/loadparm.c
648648
diff --git a/options.c b/options.c
649649
--- a/options.c
650650
+++ b/options.c
651-
@@ -122,6 +122,7 @@ size_t bwlimit_writemax = 0;
651+
@@ -123,6 +123,7 @@ size_t bwlimit_writemax = 0;
652652
int ignore_existing = 0;
653653
int ignore_non_existing = 0;
654654
int need_messages_from_generator = 0;
655655
+int checksum_files = CSF_IGNORE_FILES;
656656
int max_delete = INT_MIN;
657657
OFF_T max_size = -1;
658658
OFF_T min_size = -1;
659-
@@ -577,7 +578,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
659+
@@ -578,7 +579,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
660660
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
661661
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
662662
OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
@@ -665,15 +665,15 @@ diff --git a/options.c b/options.c
665665
OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
666666
OPT_STOP_AFTER, OPT_STOP_AT,
667667
OPT_REFUSED_BASE = 9000};
668-
@@ -733,6 +734,7 @@ static struct poptOption long_options[] = {
668+
@@ -735,6 +736,7 @@ static struct poptOption long_options[] = {
669669
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
670670
{"checksum-choice", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
671671
{"cc", 0, POPT_ARG_STRING, &checksum_choice, 0, 0, 0 },
672672
+ {"sumfiles", 0, POPT_ARG_STRING, 0, OPT_SUMFILES, 0, 0 },
673673
{"block-size", 'B', POPT_ARG_STRING, 0, OPT_BLOCK_SIZE, 0, 0 },
674674
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
675675
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
676-
@@ -1736,6 +1738,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
676+
@@ -1740,6 +1742,23 @@ int parse_arguments(int *argc_p, const char ***argv_p)
677677
}
678678
break;
679679

@@ -697,7 +697,7 @@ diff --git a/options.c b/options.c
697697
case OPT_INFO:
698698
arg = poptGetOptArg(pc);
699699
parse_output_words(info_words, info_levels, arg, USER_PRIORITY);
700-
@@ -2089,6 +2108,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
700+
@@ -2093,6 +2112,9 @@ int parse_arguments(int *argc_p, const char ***argv_p)
701701
}
702702
#endif
703703

@@ -710,15 +710,15 @@ diff --git a/options.c b/options.c
710710
diff --git a/rsync.1.md b/rsync.1.md
711711
--- a/rsync.1.md
712712
+++ b/rsync.1.md
713-
@@ -342,6 +342,7 @@ has its own detailed description later in this man page.
713+
@@ -342,6 +342,7 @@ has its own detailed description later in this manpage.
714714
--quiet, -q suppress non-error messages
715715
--no-motd suppress daemon-mode MOTD
716716
--checksum, -c skip based on checksum, not mod-time & size
717717
+--sumfiles=MODE use .rsyncsums to speedup --checksum mode
718718
--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
719719
--no-OPTION turn off an implied OPTION (e.g. --no-D)
720720
--recursive, -r recurse into directories
721-
@@ -721,6 +722,8 @@ your home directory (remove the '=' for that).
721+
@@ -722,6 +723,8 @@ your home directory (remove the '=' for that).
722722
file that has the same size as the corresponding sender's file: files with
723723
either a changed size or a changed checksum are selected for transfer.
724724

@@ -727,7 +727,7 @@ diff --git a/rsync.1.md b/rsync.1.md
727727
Note that rsync always verifies that each _transferred_ file was correctly
728728
reconstructed on the receiving side by checking a whole-file checksum that
729729
is generated as the file is transferred, but that automatic
730-
@@ -732,6 +735,38 @@ your home directory (remove the '=' for that).
730+
@@ -733,6 +736,38 @@ your home directory (remove the '=' for that).
731731
option or an environment variable that is discussed in that option's
732732
section.
733733

0 commit comments

Comments
 (0)