diff -Nru rsync-3.2.3/debian/changelog rsync-3.2.3/debian/changelog
--- rsync-3.2.3/debian/changelog 2021-02-02 23:08:54.000000000 +0000
+++ rsync-3.2.3/debian/changelog 2021-09-18 00:50:07.000000000 +0100
@@ -1,3 +1,22 @@
+rsync (3.2.3-4+deb11u1) bullseye; urgency=medium
+
+ * debian/patches:
+ - copy-devices: Re-add upstream patch for --copy-devices, the
+ --write-device option is not fully equivalent (closes: #992215).
+ - fix_delay_updates: New patch from upstream to fix regression
+ in option --delay-updates (closes: #992231).
+ - fix_mkpath.patch: New upstream patch to fix an edge case on --mkpath.
+ - fix_rsync-ssl_RSYNC_SSL_CERT_feature: New upstream patch to fix an edge
+ case on rsync-ssl.
+ - fix_sparse_inplace: New upstream patch to fix --sparse + --inplace
+ options.
+ - manpage_upstream_fixes: Import multiple upstream patches to fix
+ manpage.
+ - update_rrsync_options: New upstream patch to update rrsync options.
+ * d/rsync.docs: Add NEWS.md file (previously named NEWS) (closes: #993697).
+
+ -- Samuel Henrique Sat, 18 Sep 2021 00:50:07 +0100
+
rsync (3.2.3-4) unstable; urgency=medium
[ Helmut Grohne ]
diff -Nru rsync-3.2.3/debian/patches/copy-devices.diff rsync-3.2.3/debian/patches/copy-devices.diff
--- rsync-3.2.3/debian/patches/copy-devices.diff 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/copy-devices.diff 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,214 @@
+This patch adds the --copy-devices option, which will try to copy
+the data inside a device instead of duplicating the device node.
+
+To use this patch, run these commands for a successful build:
+
+ patch -p1 mode)) {
++ if (!(S_ISREG(file->mode) || (copy_devices && IS_DEVICE(file->mode)))) {
+ if (solo_file)
+ fname = f_name(file, NULL);
+ rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname);
+@@ -1900,6 +1901,9 @@ static void recv_generator(char *fname,
+ fnamecmp_type = FNAMECMP_BACKUP;
+ }
+
++ if (IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0)
++ sx.st.st_size = get_device_size(fd, fnamecmp);
++
+ if (DEBUG_GTE(DELTASUM, 3)) {
+ rprintf(FINFO, "gen mapped %s of size %s\n",
+ fnamecmp, big_num(sx.st.st_size));
+Index: rsync/options.c
+===================================================================
+--- rsync.orig/options.c
++++ rsync/options.c
+@@ -47,6 +47,7 @@ int append_mode = 0;
+ int keep_dirlinks = 0;
+ int copy_dirlinks = 0;
+ int copy_links = 0;
++int copy_devices = 0;
+ int write_devices = 0;
+ int preserve_links = 0;
+ int preserve_hard_links = 0;
+@@ -652,6 +653,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 },
++ {"copy-devices", 0, POPT_ARG_NONE, ©_devices, 0, 0, 0 },
+ {"write-devices", 0, POPT_ARG_VAL, &write_devices, 1, 0, 0 },
+ {"no-write-devices", 0, POPT_ARG_VAL, &write_devices, 0, 0, 0 },
+ {"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 },
+@@ -942,6 +944,7 @@ static void set_refuse_options(void)
+ || strcmp("iconv", longName) == 0
+ || strcmp("no-iconv", longName) == 0
+ || strcmp("checksum-seed", longName) == 0
++ || strcmp("copy-devices", longName) == 0 /* disable wild-match (it gets refused below) */
+ || strcmp("write-devices", longName) == 0 /* disable wild-match (it gets refused below) */
+ || strcmp("log-format", longName) == 0 /* aka out-format (NOT log-file-format) */
+ || strcmp("sender", longName) == 0
+@@ -953,6 +956,7 @@ static void set_refuse_options(void)
+ assert(list_end != NULL);
+
+ if (am_daemon) { /* Refused by default, but can be accepted via a negated exact match. */
++ parse_one_refuse_match(0, "copy-devices", list_end);
+ parse_one_refuse_match(0, "write-devices", list_end);
+ }
+
+@@ -2895,6 +2899,9 @@ void server_options(char **args, int *ar
+ else if (remove_source_files)
+ args[ac++] = "--remove-sent-files";
+
++ if (copy_devices)
++ args[ac++] = "--copy-devices";
++
+ if (preallocate_files && am_sender)
+ args[ac++] = "--preallocate";
+
+Index: rsync/rsync.1.md
+===================================================================
+--- rsync.orig/rsync.1.md
++++ rsync/rsync.1.md
+@@ -368,6 +368,7 @@ detailed description below for a complet
+ --owner, -o preserve owner (super-user only)
+ --group, -g preserve group
+ --devices preserve device files (super-user only)
++--copy-devices copy device contents as regular file
+ --specials preserve special files
+ -D same as --devices --specials
+ --times, -t preserve modification times
+Index: rsync/rsync.c
+===================================================================
+--- rsync.orig/rsync.c
++++ rsync/rsync.c
+@@ -33,6 +33,7 @@ extern int preserve_xattrs;
+ extern int preserve_perms;
+ extern int preserve_executability;
+ extern int preserve_times;
++extern int copy_devices;
+ extern int am_root;
+ extern int am_server;
+ extern int am_daemon;
+@@ -419,7 +420,8 @@ int read_ndx_and_attrs(int f_in, int f_o
+
+ if (iflags & ITEM_TRANSFER) {
+ int i = ndx - cur_flist->ndx_start;
+- if (i < 0 || !S_ISREG(cur_flist->files[i]->mode)) {
++ struct file_struct *file = cur_flist->files[i];
++ if (i < 0 || !(S_ISREG(file->mode) || (copy_devices && IS_DEVICE(file->mode)))) {
+ rprintf(FERROR,
+ "received request to transfer non-regular file: %d [%s]\n",
+ ndx, who_am_i());
+Index: rsync/rsyncd.conf.5.md
+===================================================================
+--- rsync.orig/rsyncd.conf.5.md
++++ rsync/rsyncd.conf.5.md
+@@ -930,9 +930,10 @@ the values of parameters. See the GLOBA
+ If you are un-refusing the compress option, you probably want to match
+ "`!compress*`" so that you also accept the `--compress-level` option.
+
+- Note that the "write-devices" option is refused by default, but can be
+- explicitly accepted with "`!write-devices`". The options "log-file" and
+- "log-file-format" are forcibly refused and cannot be accepted.
++ Note that the "copy-devices" & "write-devices" options are refused by
++ default, but they can be explicitly accepted with "`!copy-devices`" and/or
++ "`!write-devices`". The options "log-file" and "log-file-format" are
++ forcibly refused and cannot be accepted.
+
+ Here are all the options that are not matched by wild-cards:
+
+Index: rsync/sender.c
+===================================================================
+--- rsync.orig/sender.c
++++ rsync/sender.c
+@@ -362,6 +362,9 @@ void send_files(int f_in, int f_out)
+ exit_cleanup(RERR_FILEIO);
+ }
+
++ if (IS_DEVICE(st.st_mode) && st.st_size == 0)
++ st.st_size = get_device_size(fd, fname);
++
+ if (st.st_size) {
+ int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
+ mbuf = map_file(fd, st.st_size, read_size, s->blength);
+Index: rsync/rsync.1
+===================================================================
+--- rsync.orig/rsync.1
++++ rsync/rsync.1
+@@ -444,6 +444,7 @@ detailed description below for a complet
+ --owner, -o preserve owner (super-user only)
+ --group, -g preserve group
+ --devices preserve device files (super-user only)
++--copy-devices copy device contents as regular file
+ --specials preserve special files
+ -D same as --devices --specials
+ --times, -t preserve modification times
+Index: rsync/rsync.1.html
+===================================================================
+--- rsync.orig/rsync.1.html
++++ rsync/rsync.1.html
+@@ -359,6 +359,7 @@ detailed description below for a complet
+ --owner, -o preserve owner (super-user only)
+ --group, -g preserve group
+ --devices preserve device files (super-user only)
++--copy-devices copy device contents as regular file
+ --specials preserve special files
+ -D same as --devices --specials
+ --times, -t preserve modification times
+Index: rsync/rsyncd.conf.5
+===================================================================
+--- rsync.orig/rsyncd.conf.5
++++ rsync/rsyncd.conf.5
+@@ -918,9 +918,10 @@ option.
+ If you are un-refusing the compress option, you probably want to match
+ "\fB!compress*\fP" so that you also accept the \fB\-\-compress-level\fP option.
+ .IP
+-Note that the "write-devices" option is refused by default, but can be
+-explicitly accepted with "\fB!write-devices\fP". The options "log-file" and
+-"log-file-format" are forcibly refused and cannot be accepted.
++Note that the "copy-devices" & "write-devices" options are refused by
++default, but they can be explicitly accepted with "\fB!copy-devices\fP" and/or
++"\fB!write-devices\fP". The options "log-file" and "log-file-format" are
++forcibly refused and cannot be accepted.
+ .IP
+ Here are all the options that are not matched by wild-cards:
+ .IP
+Index: rsync/rsyncd.conf.5.html
+===================================================================
+--- rsync.orig/rsyncd.conf.5.html
++++ rsync/rsyncd.conf.5.html
+@@ -895,9 +895,10 @@ instead of returning an error that force
+ option.
+ If you are un-refusing the compress option, you probably want to match
+ "!compress*" so that you also accept the --compress-level option.
+-Note that the "write-devices" option is refused by default, but can be
+-explicitly accepted with "!write-devices". The options "log-file" and
+-"log-file-format" are forcibly refused and cannot be accepted.
++Note that the "copy-devices" & "write-devices" options are refused by
++default, but they can be explicitly accepted with "!copy-devices" and/or
++"!write-devices". The options "log-file" and "log-file-format" are
++forcibly refused and cannot be accepted.
+ Here are all the options that are not matched by wild-cards:
+
+ --server: Required for rsync to even work.
diff -Nru rsync-3.2.3/debian/patches/fix_delay_updates.patch rsync-3.2.3/debian/patches/fix_delay_updates.patch
--- rsync-3.2.3/debian/patches/fix_delay_updates.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/fix_delay_updates.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,53 @@
+From efc81c93a9fca45ba08119145a2d282f477f01b4 Mon Sep 17 00:00:00 2001
+From: Natanael Copa
+Date: Wed, 28 Jul 2021 18:10:55 +0200
+Subject: [PATCH] Add test and fix regression for --delay-updates (#192) (#204)
+
+Fixes regression introduced with commit 3a7bf54ad520 (A resumed
+partial-dir file is transferred in-place.)
+---
+ receiver.c | 2 +-
+ testsuite/delay-updates.test | 21 +++++++++++++++++++++
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+ create mode 100644 testsuite/delay-updates.test
+
+diff --git a/receiver.c b/receiver.c
+index e85c4779..b5020d07 100644
+--- a/receiver.c
++++ b/receiver.c
+@@ -881,7 +881,7 @@ int recv_files(int f_in, int f_out, char *local_name)
+ do_unlink(partialptr);
+ handle_partial_dir(partialptr, PDIR_DELETE);
+ }
+- } else if (keep_partial && partialptr && !one_inplace) {
++ } else if (keep_partial && partialptr && (!one_inplace || delay_updates)) {
+ if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
+ rprintf(FERROR,
+ "Unable to create partial-dir for %s -- discarding %s.\n",
+diff --git a/testsuite/delay-updates.test b/testsuite/delay-updates.test
+new file mode 100644
+index 00000000..5896a9c7
+--- /dev/null
++++ b/testsuite/delay-updates.test
+@@ -0,0 +1,21 @@
++#! /bin/sh
++
++# Test rsync --delay-updates
++
++. "$suitedir/rsync.fns"
++
++mkdir "$fromdir"
++
++echo 1 > "$fromdir/foo"
++
++checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
++
++mkdir "$todir/.~tmp~"
++echo 2 > "$todir/.~tmp~/foo"
++touch -r .. "$todir/.~tmp~/foo" "$todir/foo"
++echo 3 > "$fromdir/foo"
++
++checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
++
++# The script would have aborted on error, so getting here means we've won.
++exit 0
diff -Nru rsync-3.2.3/debian/patches/fix_mkpath.patch rsync-3.2.3/debian/patches/fix_mkpath.patch
--- rsync-3.2.3/debian/patches/fix_mkpath.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/fix_mkpath.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,55 @@
+From 2613c9d98aaef363e4cb1b8683f51af503264fde Mon Sep 17 00:00:00 2001
+From: Wayne Davison
+Date: Tue, 8 Sep 2020 10:53:29 -0700
+Subject: [PATCH] Handle a --mkpath failure
+
+Fixes bug #96 where --mkpath makes rsync complain when a dest path
+exists but the path contains an alt-dest name for the single file.
+---
+ main.c | 7 +++++--
+ testsuite/mkpath.test | 4 ++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/main.c b/main.c
+index 46b97b58..66e5f780 100644
+--- a/main.c
++++ b/main.c
+@@ -721,18 +721,21 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+ trailing_slash = cp && !cp[1];
+
+ if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
++ int save_errno = errno;
+ int ret = make_path(dest_path, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
+ if (ret < 0)
+ goto mkdir_error;
+- if (INFO_GTE(NAME, 1)) {
++ if (ret && INFO_GTE(NAME, 1)) {
+ if (file_total == 1 || trailing_slash)
+ *cp = '\0';
+ rprintf(FINFO, "created %d director%s for %s\n", ret, ret == 1 ? "y" : "ies", dest_path);
+ if (file_total == 1 || trailing_slash)
+ *cp = '/';
+ }
+- if (file_total > 1 || trailing_slash)
++ if (ret)
+ statret = do_stat(dest_path, &st);
++ else
++ errno = save_errno;
+ }
+
+ if (statret == 0) {
+diff --git a/testsuite/mkpath.test b/testsuite/mkpath.test
+index 6efb2105..80463454 100755
+--- a/testsuite/mkpath.test
++++ b/testsuite/mkpath.test
+@@ -25,6 +25,10 @@ rm $deep_dir/text
+ mkdir $deep_dir/new
+ $RSYNC -aiv --mkpath from/text $deep_dir/new
+ test -f $deep_dir/new/text || test_fail "'text' file not found in $deep_dir/new dir"
++
++# ... and an existing path when an alternate dest filename is specified
++$RSYNC -aiv --mkpath from/text $deep_dir/new/text2
++test -f $deep_dir/new/text2 || test_fail "'text2' file not found in $deep_dir/new dir"
+ rm -rf to/foo
+
+ # Try the tests again with multiple source args
diff -Nru rsync-3.2.3/debian/patches/fix_rsync-ssl_RSYNC_SSL_CERT_feature.patch rsync-3.2.3/debian/patches/fix_rsync-ssl_RSYNC_SSL_CERT_feature.patch
--- rsync-3.2.3/debian/patches/fix_rsync-ssl_RSYNC_SSL_CERT_feature.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/fix_rsync-ssl_RSYNC_SSL_CERT_feature.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,23 @@
+From 592c6bc3e5e93f36c2fdc0a491a9fb43a41cf688 Mon Sep 17 00:00:00 2001
+From: Fabian H
+Date: Tue, 17 Aug 2021 00:52:39 +0200
+Subject: [PATCH] add missing - in certopt (#210)
+
+otherwise openssl will give an error and not accept is as argument
+---
+ rsync-ssl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rsync-ssl b/rsync-ssl
+index 46701af1..8588eeb0 100755
+--- a/rsync-ssl
++++ b/rsync-ssl
+@@ -73,7 +73,7 @@ function rsync_ssl_helper {
+ certopt=""
+ gnutls_cert_opt=""
+ else
+- certopt="cert$optsep$RSYNC_SSL_CERT"
++ certopt="-cert$optsep$RSYNC_SSL_CERT"
+ gnutls_cert_opt="--x509keyfile=$RSYNC_SSL_CERT"
+ fi
+
diff -Nru rsync-3.2.3/debian/patches/fix_sparse_inplace.patch rsync-3.2.3/debian/patches/fix_sparse_inplace.patch
--- rsync-3.2.3/debian/patches/fix_sparse_inplace.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/fix_sparse_inplace.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,46 @@
+From dbb1c2d10c127b9a5f99e3e4ee5981f5222fc7e7 Mon Sep 17 00:00:00 2001
+From: Wayne Davison
+Date: Sun, 4 Jul 2021 12:15:16 -0700
+Subject: [PATCH] Set whole_file = 0 when whole_file < 0. Fixes issue 114.
+
+---
+ receiver.c | 3 +++
+ sender.c | 4 ++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/receiver.c b/receiver.c
+index 9c47ece3..e85c4779 100644
+--- a/receiver.c
++++ b/receiver.c
+@@ -539,6 +539,9 @@ int recv_files(int f_in, int f_out, char *local_name)
+ if (delay_updates)
+ delayed_bits = bitbag_create(cur_flist->used + 1);
+
++ if (whole_file < 0)
++ whole_file = 0;
++
+ progress_init();
+
+ while (1) {
+diff --git a/sender.c b/sender.c
+index 9cfca134..83603b99 100644
+--- a/sender.c
++++ b/sender.c
+@@ -35,6 +35,7 @@ extern int append_mode;
+ extern int copy_links;
+ extern int io_error;
+ extern int flist_eof;
++extern int whole_file;
+ extern int allowed_lull;
+ extern int preserve_xattrs;
+ extern int protocol_version;
+@@ -204,6 +205,9 @@ void send_files(int f_in, int f_out)
+ if (DEBUG_GTE(SEND, 1))
+ rprintf(FINFO, "send_files starting\n");
+
++ if (whole_file < 0)
++ whole_file = 0;
++
+ progress_init();
+
+ while (1) {
diff -Nru rsync-3.2.3/debian/patches/manpage_upstream_fixes.patch rsync-3.2.3/debian/patches/manpage_upstream_fixes.patch
--- rsync-3.2.3/debian/patches/manpage_upstream_fixes.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/manpage_upstream_fixes.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,362 @@
+Description: Multiple patches from upstream to fix manpage
+ https://github.com/WayneD/rsync/commit/9c59632d8b92a3bcc50482899e91f0bd065f1588
+ https://github.com/WayneD/rsync/commit/f8dcd7d452b137fa49b71e714512e7d619a4d0dd
+ https://github.com/WayneD/rsync/commit/2dfd48492e96a230e9cc1010df69f9616017b5f9
+ https://github.com/WayneD/rsync/commit/05540220a92dd06b62f240f6178921dde5697dd3
+ https://github.com/WayneD/rsync/commit/9dad3721a9535b6ae864cbc5f70eda92d3ac02ca
+Index: rsync/rsync.1.md
+===================================================================
+--- rsync.orig/rsync.1.md
++++ rsync/rsync.1.md
+@@ -338,7 +338,7 @@ detailed description below for a complet
+ --quiet, -q suppress non-error messages
+ --no-motd suppress daemon-mode MOTD
+ --checksum, -c skip based on checksum, not mod-time & size
+---archive, -a archive mode; equals -rlptgoD (no -H,-A,-X)
++--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
+ --no-OPTION turn off an implied OPTION (e.g. --no-D)
+ --recursive, -r recurse into directories
+ --relative, -R use relative path names
+@@ -614,8 +614,8 @@ your home directory (remove the '=' for
+ divide up the info and error messages by file handle. For those doing
+ debugging or using several levels of verbosity, this option can help to
+ avoid clogging up the transfer stream (which should prevent any chance of
+- a deadlock bug hanging things up). It also enables the outputting of some
+- I/O related debug messages.
++ a deadlock bug hanging things up). It also allows `--debug` to enable
++ some extra I/O related messages.
+
+ - `client` - causes all rsync messages to be sent to the client side
+ via the protocol stream. One client process outputs all messages, with
+@@ -712,12 +712,12 @@ your home directory (remove the '=' for
+ 0. `--archive`, `-a`
+
+ This is equivalent to `-rlptgoD`. It is a quick way of saying you want
+- recursion and want to preserve almost everything (with `-H` being a notable
+- omission). The only exception to the above equivalence is when
+- `--files-from` is specified, in which case `-r` is not implied.
++ recursion and want to preserve almost everything. Be aware that it does
++ **not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
++ crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
+
+- Note that `-a` **does not preserve hardlinks**, because finding
+- multiply-linked files is expensive. You must separately specify `-H`.
++ The only exception to the above equivalence is when
++ `--files-from` is specified, in which case `-r` is not implied.
+
+ 0. `--no-OPTION`
+
+@@ -950,7 +950,7 @@ your home directory (remove the '=' for
+ existing content in the file (it only verifies the content that it is
+ appending). Rsync skips any files that exist on the receiving side that
+ are not shorter than the associated file on the sending side (which means
+- that new files are trasnferred).
++ that new files are transferred).
+
+ This does not interfere with the updating of a file's non-content
+ attributes (e.g. permissions, ownership, etc.) when the file does not need
+@@ -1411,7 +1411,7 @@ your home directory (remove the '=' for
+ 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 `--owner` option, preserving all groups (not just
+- the current user's groups) via the `--groups` option, and copying devices
++ the current user's groups) via the `--group` option, and copying devices
+ via the `--devices` option. This is useful for systems that allow such
+ activities without being the super-user, and also for ensuring that you
+ will get errors if the receiving side isn't being run as the super-user.
+@@ -2038,9 +2038,11 @@ your home directory (remove the '=' for
+ 0. `--exclude-from=FILE`
+
+ This option is related to the `--exclude` option, but it specifies a FILE
+- that contains exclude patterns (one per line). Blank lines in the file and
+- lines starting with '`;`' or '`#`' are ignored. If _FILE_ is '`-`', the
+- list will be read from standard input.
++ that contains exclude patterns (one per line). Blank lines in the file are
++ ignored, as are whole-line comments that start with '`;`' or '`#`'
++ (filename rules that contain those characters are unaffected).
++
++ If _FILE_ is '`-`', the list will be read from standard input.
+
+ 0. `--include=PATTERN`
+
+@@ -2053,9 +2055,11 @@ your home directory (remove the '=' for
+ 0. `--include-from=FILE`
+
+ This option is related to the `--include` option, but it specifies a FILE
+- that contains include patterns (one per line). Blank lines in the file and
+- lines starting with '`;`' or '`#`' are ignored. If _FILE_ is '`-`', the
+- list will be read from standard input.
++ that contains include patterns (one per line). Blank lines in the file are
++ ignored, as are whole-line comments that start with '`;`' or '`#`'
++ (filename rules that contain those characters are unaffected).
++
++ If _FILE_ is '`-`', the list will be read from standard input.
+
+ 0. `--files-from=FILE`
+
+@@ -2619,7 +2623,7 @@ your home directory (remove the '=' for
+ For the `--usermap` option to have any effect, the `-o` (`--owner`) option
+ must be used (or implied), and the receiver will need to be running as a
+ super-user (see also the `--fake-super` option). For the `--groupmap`
+- option to have any effect, the `-g` (`--groups`) option must be used (or
++ option to have any effect, the `-g` (`--group`) option must be used (or
+ implied), and the receiver will need to have permissions to set that group.
+
+ If your shell complains about the wildcards, use `--protect-args` (`-s`).
+@@ -2841,7 +2845,7 @@ your home directory (remove the '=' for
+ sense) were created (as opposed to updated). The total count will be
+ followed by a list of counts by filetype (if the total is non-zero).
+ - `Number of deleted files` is the count of how many "files" (generic
+- sense) were created (as opposed to updated). The total count will be
++ sense) were deleted. The total count will be
+ followed by a list of counts by filetype (if the total is non-zero).
+ Note that this line is only output if deletions are in effect, and only
+ if protocol 31 is being used (the default for rsync 3.1.x).
+@@ -3490,8 +3494,9 @@ available rule prefixes:
+ 0. `risk, 'R'` files that match the pattern are not protected.
+ 0. `clear, '!'` clears the current include/exclude list (takes no arg)
+
+-When rules are being read from a file, empty lines are ignored, as are comment
+-lines that start with a "#".
++When rules are being read from a file, empty lines are ignored, as are
++whole-line comments that start with a '`#`' (filename rules that contain a hash
++are unaffected).
+
+ [comment]: # (Remember that markdown strips spaces from start/end of ` ... ` sequences!)
+ [comment]: # (Thus, the `x ` sequences below use a literal non-breakable space!)
+Index: rsync/rsync.1
+===================================================================
+--- rsync.orig/rsync.1
++++ rsync/rsync.1
+@@ -414,7 +414,7 @@ detailed description below for a complet
+ --quiet, -q suppress non-error messages
+ --no-motd suppress daemon-mode MOTD
+ --checksum, -c skip based on checksum, not mod-time & size
+---archive, -a archive mode; equals -rlptgoD (no -H,-A,-X)
++--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
+ --no-OPTION turn off an implied OPTION (e.g. --no-D)
+ --recursive, -r recurse into directories
+ --relative, -R use relative path names
+@@ -689,8 +689,8 @@ become line-buffered (instead of raw) an
+ divide up the info and error messages by file handle. For those doing
+ debugging or using several levels of verbosity, this option can help to
+ avoid clogging up the transfer stream (which should prevent any chance of
+-a deadlock bug hanging things up). It also enables the outputting of some
+-I/O related debug messages.
++a deadlock bug hanging things up). It also allows \fB\-\-debug\fP to enable
++some extra I/O related messages.
+ .IP o
+ \fBclient\fP \- causes all rsync messages to be sent to the client side
+ via the protocol stream. One client process outputs all messages, with
+@@ -778,12 +778,12 @@ can be overridden using either the \fB\-
+ environment variable that is discussed in that option's section.
+ .IP "\fB\-\-archive\fP, \fB\-a\fP"
+ This is equivalent to \fB\-rlptgoD\fP. It is a quick way of saying you want
+-recursion and want to preserve almost everything (with \fB\-H\fP being a notable
+-omission). The only exception to the above equivalence is when
+-\fB\-\-files-from\fP is specified, in which case \fB\-r\fP is not implied.
++recursion and want to preserve almost everything. Be aware that it does
++\fBnot\fP include preserving ACLs (\fB\-A\fP), xattrs (\fB\-X\fP), atimes (\fB\-U\fP),
++crtimes (\fB\-N\fP), nor the finding and preserving of hardlinks (\fB\-H\fP).
+ .IP
+-Note that \fB\-a\fP \fBdoes not preserve hardlinks\fP, because finding
+-multiply-linked files is expensive. You must separately specify \fB\-H\fP.
++The only exception to the above equivalence is when
++\fB\-\-files-from\fP is specified, in which case \fB\-r\fP is not implied.
+ .IP "\fB\-\-no-OPTION\fP"
+ You may turn off one or more implied options by prefixing the option name
+ with "no-". Not all options may be prefixed with a "no-": only options that
+@@ -1023,7 +1023,7 @@ Rsync updates these growing file in-plac
+ existing content in the file (it only verifies the content that it is
+ appending). Rsync skips any files that exist on the receiving side that
+ are not shorter than the associated file on the sending side (which means
+-that new files are trasnferred).
++that new files are transferred).
+ .IP
+ This does not interfere with the updating of a file's non-content
+ attributes (e.g. permissions, ownership, etc.) when the file does not need
+@@ -1478,7 +1478,7 @@ This tells rsync to omit symlinks when i
+ 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 \fB\-\-owner\fP option, preserving all groups (not just
+-the current user's groups) via the \fB\-\-groups\fP option, and copying devices
++the current user's groups) via the \fB\-\-group\fP option, and copying devices
+ via the \fB\-\-devices\fP option. This is useful for systems that allow such
+ activities without being the super-user, and also for ensuring that you
+ will get errors if the receiving side isn't being run as the super-user.
+@@ -2076,9 +2076,11 @@ filter rules.
+ See the FILTER RULES section for detailed information on this option.
+ .IP "\fB\-\-exclude-from=FILE\fP"
+ This option is related to the \fB\-\-exclude\fP option, but it specifies a FILE
+-that contains exclude patterns (one per line). Blank lines in the file and
+-lines starting with '\fB;\fP' or '\fB#\fP' are ignored. If \fIFILE\fP is '\fB\-\fP', the
+-list will be read from standard input.
++that contains exclude patterns (one per line). Blank lines in the file are
++ignored, as are whole-line comments that start with '\fB;\fP' or '\fB#\fP'
++(filename rules that contain those characters are unaffected).
++.IP
++If \fIFILE\fP is '\fB\-\fP', the list will be read from standard input.
+ .IP "\fB\-\-include=PATTERN\fP"
+ This option is a simplified form of the \fB\-\-filter\fP option that defaults to
+ an include rule and does not allow the full rule-parsing syntax of normal
+@@ -2087,9 +2089,11 @@ filter rules.
+ See the FILTER RULES section for detailed information on this option.
+ .IP "\fB\-\-include-from=FILE\fP"
+ This option is related to the \fB\-\-include\fP option, but it specifies a FILE
+-that contains include patterns (one per line). Blank lines in the file and
+-lines starting with '\fB;\fP' or '\fB#\fP' are ignored. If \fIFILE\fP is '\fB\-\fP', the
+-list will be read from standard input.
++that contains include patterns (one per line). Blank lines in the file are
++ignored, as are whole-line comments that start with '\fB;\fP' or '\fB#\fP'
++(filename rules that contain those characters are unaffected).
++.IP
++If \fIFILE\fP is '\fB\-\fP', the list will be read from standard input.
+ .IP "\fB\-\-files-from=FILE\fP"
+ Using this option allows you to specify the exact list of files to transfer
+ (as read from the specified FILE or '\fB\-\fP' for standard input). It also
+@@ -2672,7 +2676,7 @@ nameless IDs to different values.
+ For the \fB\-\-usermap\fP option to have any effect, the \fB\-o\fP (\fB\-\-owner\fP) option
+ must be used (or implied), and the receiver will need to be running as a
+ super-user (see also the \fB\-\-fake-super\fP option). For the \fB\-\-groupmap\fP
+-option to have any effect, the \fB\-g\fP (\fB\-\-groups\fP) option must be used (or
++option to have any effect, the \fB\-g\fP (\fB\-\-group\fP) option must be used (or
+ implied), and the receiver will need to have permissions to set that group.
+ .IP
+ If your shell complains about the wildcards, use \fB\-\-protect-args\fP (\fB\-s\fP).
+@@ -2902,7 +2906,7 @@ sense) were created (as opposed to updat
+ followed by a list of counts by filetype (if the total is non-zero).
+ .IP o
+ \fBNumber\ of\ deleted\ files\fP is the count of how many "files" (generic
+-sense) were created (as opposed to updated). The total count will be
++sense) were deleted. The total count will be
+ followed by a list of counts by filetype (if the total is non-zero).
+ Note that this line is only output if deletions are in effect, and only
+ if protocol 31 is being used (the default for rsync 3.1.x).
+@@ -3532,8 +3536,9 @@ files that match the pattern are not pro
+ .IP "\fBclear,\ '!'\fP"
+ clears the current include/exclude list (takes no arg)
+ .P
+-When rules are being read from a file, empty lines are ignored, as are comment
+-lines that start with a "#".
++When rules are being read from a file, empty lines are ignored, as are
++whole-line comments that start with a '\fB#\fP' (filename rules that contain a hash
++are unaffected).
+ .P
+ Note that the \fB\-\-include\fP & \fB\-\-exclude\fP command-line options do not allow the
+ full range of rule parsing as described above\ \-\- they only allow the
+Index: rsync/rsync.1.html
+===================================================================
+--- rsync.orig/rsync.1.html
++++ rsync/rsync.1.html
+@@ -329,7 +329,7 @@ detailed description below for a complet
+ --quiet, -q suppress non-error messages
+ --no-motd suppress daemon-mode MOTD
+ --checksum, -c skip based on checksum, not mod-time & size
+---archive, -a archive mode; equals -rlptgoD (no -H,-A,-X)
++--archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H)
+ --no-OPTION turn off an implied OPTION (e.g. --no-D)
+ --recursive, -r recurse into directories
+ --relative, -R use relative path names
+@@ -597,8 +597,8 @@ become line-buffered (instead of raw) an
+ divide up the info and error messages by file handle. For those doing
+ debugging or using several levels of verbosity, this option can help to
+ avoid clogging up the transfer stream (which should prevent any chance of
+-a deadlock bug hanging things up). It also enables the outputting of some
+-I/O related debug messages.
++a deadlock bug hanging things up). It also allows --debug to enable
++some extra I/O related messages.
+
+ -
+
client - causes all rsync messages to be sent to the client side
+@@ -694,11 +694,11 @@ environment variable that is discussed i
+
+
--archive, -a-
+
This is equivalent to -rlptgoD. It is a quick way of saying you want
+-recursion and want to preserve almost everything (with -H being a notable
+-omission). The only exception to the above equivalence is when
++recursion and want to preserve almost everything. Be aware that it does
++not include preserving ACLs (-A), xattrs (-X), atimes (-U),
++crtimes (-N), nor the finding and preserving of hardlinks (-H).
++The only exception to the above equivalence is when
+ --files-from is specified, in which case -r is not implied.
+-Note that -a does not preserve hardlinks, because finding
+-multiply-linked files is expensive. You must separately specify -H.
+
+
+ --no-OPTION-
+@@ -920,7 +920,7 @@ rules to ensure that you weed out any fi
+ existing content in the file (it only verifies the content that it is
+ appending). Rsync skips any files that exist on the receiving side that
+ are not shorter than the associated file on the sending side (which means
+-that new files are trasnferred).
++that new files are transferred).
+
This does not interfere with the updating of a file's non-content
+ attributes (e.g. permissions, ownership, etc.) when the file does not need
+ to be transferred, nor does it affect the updating of any directories or
+@@ -1359,7 +1359,7 @@ these partially-finished directories.
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 --owner option, preserving all groups (not just
+-the current user's groups) via the --groups option, and copying devices
++the current user's groups) via the --group option, and copying devices
+ via the --devices option. This is useful for systems that allow such
+ activities without being the super-user, and also for ensuring that you
+ will get errors if the receiving side isn't being run as the super-user.
+@@ -1936,9 +1936,10 @@ filter rules.
+
+ --exclude-from=FILE-
+
This option is related to the --exclude option, but it specifies a FILE
+-that contains exclude patterns (one per line). Blank lines in the file and
+-lines starting with ';' or '#' are ignored. If FILE is '-', the
+-list will be read from standard input.
++that contains exclude patterns (one per line). Blank lines in the file are
++ignored, as are whole-line comments that start with ';' or '#'
++(filename rules that contain those characters are unaffected).
++If FILE is '-', the list will be read from standard input.
+
+
+ --include=PATTERN-
+@@ -1950,9 +1951,10 @@ filter rules.
+
+
--include-from=FILE-
+
This option is related to the --include option, but it specifies a FILE
+-that contains include patterns (one per line). Blank lines in the file and
+-lines starting with ';' or '#' are ignored. If FILE is '-', the
+-list will be read from standard input.
++that contains include patterns (one per line). Blank lines in the file are
++ignored, as are whole-line comments that start with ';' or '#'
++(filename rules that contain those characters are unaffected).
++If FILE is '-', the list will be read from standard input.
+
+
+ --files-from=FILE-
+@@ -2476,7 +2478,7 @@ nameless IDs to different values.
+
For the --usermap option to have any effect, the -o (--owner) option
+ must be used (or implied), and the receiver will need to be running as a
+ super-user (see also the --fake-super option). For the --groupmap
+-option to have any effect, the -g (--groups) option must be used (or
++option to have any effect, the -g (--group) option must be used (or
+ implied), and the receiver will need to have permissions to set that group.
+ If your shell complains about the wildcards, use --protect-args (-s).
+
+@@ -2687,7 +2689,7 @@ any of value is 0, it is completely omit
+ sense) were created (as opposed to updated). The total count will be
+ followed by a list of counts by filetype (if the total is non-zero).
+ Number of deleted files is the count of how many "files" (generic
+-sense) were created (as opposed to updated). The total count will be
++sense) were deleted. The total count will be
+ followed by a list of counts by filetype (if the total is non-zero).
+ Note that this line is only output if deletions are in effect, and only
+ if protocol 31 is being used (the default for rsync 3.1.x).
+@@ -3295,8 +3297,9 @@ available rule prefixes:
+ risk, 'R'- files that match the pattern are not protected.
+ clear, '!'- clears the current include/exclude list (takes no arg)
+
+-When rules are being read from a file, empty lines are ignored, as are comment
+-lines that start with a "#".
++When rules are being read from a file, empty lines are ignored, as are
++whole-line comments that start with a '#' (filename rules that contain a hash
++are unaffected).
+ Note that the --include & --exclude command-line options do not allow the
+ full range of rule parsing as described above -- they only allow the
+ specification of include / exclude patterns plus a "!" token to clear the
diff -Nru rsync-3.2.3/debian/patches/series rsync-3.2.3/debian/patches/series
--- rsync-3.2.3/debian/patches/series 2021-02-02 23:08:54.000000000 +0000
+++ rsync-3.2.3/debian/patches/series 2021-09-18 00:50:07.000000000 +0100
@@ -3,3 +3,10 @@
perl_shebang.patch
CVE-2020-14387.patch
fix_ftcbfs_configure.patch
+fix_delay_updates.patch
+copy-devices.diff
+manpage_upstream_fixes.patch
+fix_mkpath.patch
+fix_sparse_inplace.patch
+update_rrsync_options.patch
+fix_rsync-ssl_RSYNC_SSL_CERT_feature.patch
diff -Nru rsync-3.2.3/debian/patches/update_rrsync_options.patch rsync-3.2.3/debian/patches/update_rrsync_options.patch
--- rsync-3.2.3/debian/patches/update_rrsync_options.patch 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/patches/update_rrsync_options.patch 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1,35 @@
+From 35d4f6737a57c88978b6e954506e9c73f8c10ccf Mon Sep 17 00:00:00 2001
+From: Wayne Davison
+Date: Fri, 9 Jul 2021 11:57:35 -0700
+Subject: [PATCH] Update the options in rrsync.
+
+---
+ support/rrsync | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/support/rrsync b/support/rrsync
+index eabec3dc..e9659919 100644
+--- a/support/rrsync
++++ b/support/rrsync
+@@ -62,7 +62,7 @@ die "$0 reading from write-only server not allowed\n" if $only eq 'w' && $am_sen
+ # To disable a short-named option, add its letter to this string:
+ our $short_disabled = 's';
+
+-our $short_no_arg = 'ACDEHIJKLORSUWXbcdgklmnopqrstuvxyz'; # DO NOT REMOVE ANY
++our $short_no_arg = 'ACDEHIJKLNORSUWXbcdgklmnopqrstuvxyz'; # DO NOT REMOVE ANY
+ our $short_with_num = '@B'; # DO NOT REMOVE ANY
+
+ # To disable a long-named option, change its value to a -1. The values mean:
+@@ -115,9 +115,12 @@ our %long_opt = (
+ 'max-delete' => 1,
+ 'max-size' => 1,
+ 'min-size' => 1,
++ 'mkpath' => 0,
+ 'modify-window' => 1,
++ 'msgs2stderr' => 0,
+ 'new-compress' => 0,
+ 'no-implied-dirs' => 0,
++ 'no-msgs2stderr' => 0,
+ 'no-r' => 0,
+ 'no-relative' => 0,
+ 'no-specials' => 0,
diff -Nru rsync-3.2.3/debian/rsync.docs rsync-3.2.3/debian/rsync.docs
--- rsync-3.2.3/debian/rsync.docs 1970-01-01 01:00:00.000000000 +0100
+++ rsync-3.2.3/debian/rsync.docs 2021-09-18 00:50:07.000000000 +0100
@@ -0,0 +1 @@
+NEWS.md
diff -Nru rsync-3.2.3/debian/rsync.NEWS rsync-3.2.3/debian/rsync.NEWS
--- rsync-3.2.3/debian/rsync.NEWS 2021-02-02 23:08:54.000000000 +0000
+++ rsync-3.2.3/debian/rsync.NEWS 2021-09-18 00:50:07.000000000 +0100
@@ -1,3 +1,19 @@
+rsync (3.2.3-4+deb11u1) bullseye; urgency=medium
+
+ The --copy-devices option has been reintroduced, it was previously removed in
+ favor of the new one --write-devices, but it turns out they are not equivalent
+ enough and upstream is providing the copy-devices patch on rsync-patches.
+
+ Please beware that although the --copy-devices option is provided by
+ upstream, it is not part of the official rsync package and it could be
+ dropped or changed in ways that are not backwards compatible, though this would
+ only happen between Debian releases.
+
+ That being said, we will not drop this option from the Debian packaging as
+ long as upstream keeps providing the patch under rsync-patches.
+
+ -- Samuel Henrique Sun, 12 Sep 2021 17:25:37 +0100
+
rsync (3.2.0-1) unstable; urgency=low
This latest release changed two parameters which used to be present on the