import CS rsync-3.2.3-20.el9

This commit is contained in:
eabdullin 2024-09-30 16:32:26 +00:00
parent 7c274c7687
commit a68cceb373
2 changed files with 102 additions and 1 deletions

View File

@ -0,0 +1,96 @@
From ce51c1b0ae4c0cc35fa14f69271776e3e3ae6354 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 21 Jul 2021 16:38:22 +0200
Subject: [PATCH 1/3] Add regression test for --delay-updates (#192)
to test https://github.com/WayneD/rsync/issues/192
---
testsuite/delay-updates.test | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 testsuite/delay-updates.test
diff --git a/testsuite/delay-updates.test b/testsuite/delay-updates.test
new file mode 100644
index 000000000..54961dfa9
--- /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 -avvv --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 -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0
From 5a4ea7e468ae53c09b98803da3519727becb48ad Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 22 Jul 2021 13:30:17 +0200
Subject: [PATCH 2/3] Fix regression with --delay-updates (#192)
Fixes regression introduced with commit 3a7bf54ad520 (A resumed
partial-dir file is transferred in-place.)
Fixes https://github.com/WayneD/rsync/issues/192
---
receiver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/receiver.c b/receiver.c
index e85c4779c..b5020d074 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",
From 15ec7de5503c57860fb73ea6e4a349f1e70b72db Mon Sep 17 00:00:00 2001
From: Wayne Davison <wayne@opencoder.net>
Date: Wed, 28 Jul 2021 09:03:10 -0700
Subject: [PATCH 3/3] Tweak rsync options.
---
testsuite/delay-updates.test | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testsuite/delay-updates.test b/testsuite/delay-updates.test
index 54961dfa9..5896a9c7c 100644
--- a/testsuite/delay-updates.test
+++ b/testsuite/delay-updates.test
@@ -8,14 +8,14 @@ mkdir "$fromdir"
echo 1 > "$fromdir/foo"
-checkit "$RSYNC -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+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 -avvv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+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

View File

@ -10,7 +10,7 @@
Summary: A program for synchronizing files over a network
Name: rsync
Version: 3.2.3
Release: 19%{?dist}
Release: 20%{?dist}
URL: https://rsync.samba.org/
Source0: https://download.samba.org/pub/rsync/src/rsync-%{version}%{?prerelease}.tar.gz
@ -42,6 +42,7 @@ Patch7: rsync-3.1.3-cve-2018-25032.patch
Patch8: rsync-3.2.3-cve-2022-37434.patch
Patch9: rsync-3.2.3-cve-2022-29154.patch
Patch10: rsync-3.2.3-filtering-rules.patch
Patch11: rsync-3.2.3-delay-updates.patch
%description
Rsync uses a reliable algorithm to bring remote and host files into
@ -86,6 +87,7 @@ patch -p1 -i patches/copy-devices.diff
%patch8 -p1 -b .cve-2022-37434
%patch9 -p1 -b .cve-2022-29154
%patch10 -p1 -b .filtering-rules
%patch11 -p1 -b .delay-updates
%build
%configure --disable-xxhash
@ -132,6 +134,9 @@ install -D -m644 %{SOURCE6} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd@.service
%systemd_postun_with_restart rsyncd.service
%changelog
* Thu Oct 19 2023 Alex Iribarren <Alex.Iribarren@cern.ch> - 3.2.3-20
- Resolves: RHEL-14228 - rsync regression with --delay-updates
* Wed Nov 02 2022 Michal Ruprich <mruprich@redhat.com> - 3.2.3-19
- Resolves: #2139349 - rsync error: protocol incompatibility when using rsync-3.2.3-18.el9