public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Ruprich <mruprich@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rsync] rawhide: Adding a fix for a regression in 3.5.2
Date: Fri, 06 Nov 2026 18:07:46 GMT	[thread overview]
Message-ID: <179398846627.1.16480760239945742870.rpms-rsync-337c62dc45a9@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rsync
Branch : rawhide
Commit : 337c62dc45a9a2ce5ae6378a7b7cdf6b01b20f82
Author : Michal Ruprich <mruprich@redhat.com>
Date   : 2026-11-06T17:34:18+01:00
Stats  : +80/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rsync/c/337c62dc45a9a2ce5ae6378a7b7cdf6b01b20f82?branch=rawhide

Log:
Adding a fix for a regression in 3.5.2

---
diff --git a/0001-rsync-skip-unsupported-symlink-chmod.patch b/0001-rsync-skip-unsupported-symlink-chmod.patch
new file mode 100644
index 0000000..f790a18
--- /dev/null
+++ b/0001-rsync-skip-unsupported-symlink-chmod.patch
@@ -0,0 +1,71 @@
+From ea645201fefbba7f6b6b22b621856dba3c01cdd3 Mon Sep 17 00:00:00 2001
+From: Zen Dodd <mail@steadytao.com>
+Date: Fri, 6 Nov 2026 20:51:34 +1000
+Subject: [PATCH] syscall: skip unsupported symlink chmod (#1148)
+
+---
+ syscall.c                                |  2 ++
+ testsuite/symlink-receiver-perms_test.py | 41 ++++++++++++++++++++++++
+ 2 files changed, 43 insertions(+)
+ create mode 100644 testsuite/symlink-receiver-perms_test.py
+
+diff --git a/syscall.c b/syscall.c
+index dd41da845..e0bae3807 100644
+--- a/syscall.c
++++ b/syscall.c
+@@ -1806,6 +1806,8 @@ int do_chmod(const char *path, mode_t mode)
+ 				code = 1;
+ # elif defined AT_FDCWD && defined AT_SYMLINK_NOFOLLOW
+ 			code = fchmodat(AT_FDCWD, path, mode & CHMOD_BITS, AT_SYMLINK_NOFOLLOW);
++			if (code < 0 && (errno == ENOTSUP || errno == EOPNOTSUPP || errno == ENOSYS))
++				code = 1;
+ # else
+ 			code = 1;
+ # endif
+diff --git a/testsuite/symlink-receiver-perms_test.py b/testsuite/symlink-receiver-perms_test.py
+new file mode 100644
+index 000000000..45b1fb6b4
+--- /dev/null
++++ b/testsuite/symlink-receiver-perms_test.py
+@@ -0,0 +1,41 @@
++#!/usr/bin/env python3
++
++import os
++import stat
++import struct
++
++from rsyncfns import SCRATCHDIR, makepath, run_rsync, test_fail
++
++source = SCRATCHDIR / 'source'
++destination = SCRATCHDIR / 'destination'
++makepath(source)
++makepath(destination)
++target = destination / 'target'
++target.write_text('target contents\n')
++target.chmod(0o640)
++links = [('link', 'target'), ('dangling', 'missing')]
++for name, link in links:
++    os.symlink(link, source / name)
++
++batch = SCRATCHDIR / 'symlinks.batch'
++run_rsync('-rlp', '--checksum-seed=1', f'--only-write-batch={batch}',
++          f'{source}/', f'{destination}/')
++
++# Supply BSD-style link modes without relying on the source filesystem
++mode = stat.S_IMODE((source / 'link').lstat().st_mode)
++wanted = 0o400 if mode != 0o400 else 0o755
++encoded_mode = struct.pack('<I', 0o120000 | mode)
++data = batch.read_bytes()
++if data.count(encoded_mode) != 1:
++    test_fail('expected one shared symlink mode in the batch')
++batch.write_bytes(data.replace(encoded_mode, struct.pack('<I', 0o120000 | wanted)))
++
++for _ in range(2):
++    run_rsync('-rlp', f'--read-batch={batch}', f'{destination}/')
++    for name, link in links:
++        if not (destination / name).is_symlink() or os.readlink(destination / name) != link:
++            test_fail(f'{name}: symlink was not preserved')
++    if stat.S_IMODE(target.stat().st_mode) != 0o640 or target.read_text() != 'target contents\n':
++        test_fail('symlink chmod changed the target')
++    if (destination / 'missing').exists():
++        test_fail('dangling symlink target was created')

diff --git a/rsync.spec b/rsync.spec
index 943c2f4..db08a54 100644
--- a/rsync.spec
+++ b/rsync.spec
@@ -6,7 +6,7 @@
 Summary: A program for synchronizing files over a network
 Name: rsync
 Version: 3.5.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: https://rsync.samba.org/
 
 Source0: https://download.samba.org/pub/rsync/src/rsync-%{version}%{?prerelease}.tar.gz
@@ -44,6 +44,11 @@ Provides: bundled(zlib) = 1.2.8
 #mentioned here as well.
 License: GPL-3.0-or-later
 
+# https://github.com/RsyncProject/rsync/commit/ea645201
+# Regression addressed in the following PR:
+# https://github.com/RsyncProject/rsync/pull/1148
+Patch1: 0001-rsync-skip-unsupported-symlink-chmod.patch
+
 %description
 Rsync uses a reliable algorithm to bring remote and host files into
 sync very quickly. Rsync is fast because it just sends the differences
@@ -140,6 +145,9 @@ install -D -m644 %{SOURCE6} $RPM_BUILD_ROOT/%{_unitdir}/rsyncd@.service
 %systemd_postun_with_restart rsyncd.service
 
 %changelog
+* Fri Nov 06 2026 Michal Ruprich <mruprich@redhat.com> - 3.5.2-2
+- Adding a fix for a regression in 3.5.2
+
 * Thu Nov 05 2026 Michal Ruprich <mruprich@redhat.com> - 3.5.2-1
 - New version 3.5.2
 

                 reply	other threads:[~2026-11-06 18:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179398846627.1.16480760239945742870.rpms-rsync-337c62dc45a9@fedoraproject.org \
    --to=mruprich@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox