Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package borgbackup for openSUSE:Factory checked in at 2025-10-17 17:27:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/borgbackup (Old) and /work/SRC/openSUSE:Factory/.borgbackup.new.18484 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "borgbackup" Fri Oct 17 17:27:19 2025 rev:53 rq:1311962 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/borgbackup/borgbackup.changes 2025-10-07 18:31:47.266125780 +0200 +++ /work/SRC/openSUSE:Factory/.borgbackup.new.18484/borgbackup.changes 2025-10-17 17:29:50.784262880 +0200 @@ -1,0 +2,10 @@ +Thu Oct 9 06:27:26 UTC 2025 - Jiri Slaby <[email protected]> + +- replace 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch + by upstream patches: + * 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch + * 0002-set_flags-better-give-up-than-corrupt.patch + * 0003-set_flags-remove-compression-flag.patch + (bsc#1251048) + +------------------------------------------------------------------- Old: ---- 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch New: ---- 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch 0002-set_flags-better-give-up-than-corrupt.patch 0003-set_flags-remove-compression-flag.patch ----------(Old B)---------- Old: - replace 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch by upstream patches: ----------(Old E)---------- ----------(New B)---------- New: by upstream patches: * 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch * 0002-set_flags-better-give-up-than-corrupt.patch New: * 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch * 0002-set_flags-better-give-up-than-corrupt.patch * 0003-set_flags-remove-compression-flag.patch New: * 0002-set_flags-better-give-up-than-corrupt.patch * 0003-set_flags-remove-compression-flag.patch (bsc#1251048) ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ borgbackup.spec ++++++ --- /var/tmp/diff_new_pack.aymJ4G/_old 2025-10-17 17:29:51.448290844 +0200 +++ /var/tmp/diff_new_pack.aymJ4G/_new 2025-10-17 17:29:51.452291013 +0200 @@ -59,8 +59,12 @@ Patch0: borgbackup-1.1.4-sphinx-default-theme.patch # PATCH-FIX-UPSTREAM msgpack-allow-1.1.1.patch -- backport of commit f6724bfef Patch1: msgpack-allow-1.1.1.patch -# PATCH-FIX-UPSTREAM 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch -- #9039 -Patch2: 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch +# PATCH-FIX-UPSTREAM 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch #9039 +Patch2: 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch +# PATCH-FIX-UPSTREAM 0002-set_flags-better-give-up-than-corrupt.patch #9039 +Patch3: 0002-set_flags-better-give-up-than-corrupt.patch +# PATCH-FIX-UPSTREAM 0003-set_flags-remove-compression-flag.patch #9039 +Patch4: 0003-set_flags-remove-compression-flag.patch # SECTION build dependencies BuildRequires: bash BuildRequires: fdupes @@ -194,6 +198,8 @@ %endif %patch -P 1 -p1 %patch -P 2 -p1 +%patch -P 3 -p1 +%patch -P 4 -p1 %ifnarch %ix86 %arm # https://github.com/borgbackup/borg/issues/6996 ++++++ 0001-set_flags-use-get-set-to-only-influence-specific-fla.patch ++++++ From: Thomas Waldmann <[email protected]> Date: Thu, 16 Oct 2025 21:26:49 +0200 Subject: set_flags: use get/set to only influence specific flags, fixes #9039 References: bsc#1251048 Git-repo: https://github.com/ThomasWaldmann/borg#fix-set_flags-1.4 Git-commit: 9214197a2cd18796553f1d2cce6faf5ad7576a95 Patch-mainline: Queued in subsystem maintainer repository Linux platform only. Signed-off-by: Jiri Slaby <[email protected]> --- src/borg/platform/linux.pyx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx index 35ad1bde5ba0..7a913791fc50 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -128,6 +128,8 @@ BSD_TO_LINUX_FLAGS = { stat.UF_APPEND: FS_APPEND_FL, stat.UF_COMPRESSED: FS_COMPR_FL, } +# must be a bitwise OR of all values in BSD_TO_LINUX_FLAGS. +LINUX_MASK = FS_NODUMP_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | FS_COMPR_FL def set_flags(path, bsd_flags, fd=None): @@ -136,17 +138,31 @@ def set_flags(path, bsd_flags, fd=None): if stat.S_ISBLK(st.st_mode) or stat.S_ISCHR(st.st_mode) or stat.S_ISLNK(st.st_mode): # see comment in get_flags() return - cdef int flags = 0 + cdef int flags + cdef int mask = LINUX_MASK # 1 at positions we want to influence + cdef int new_flags = 0 for bsd_flag, linux_flag in BSD_TO_LINUX_FLAGS.items(): if bsd_flags & bsd_flag: - flags |= linux_flag + new_flags |= linux_flag + open_fd = fd is None if open_fd: fd = os.open(path, os.O_RDONLY|os.O_NONBLOCK|os.O_NOFOLLOW) try: + # Get current flags. If this fails, fall back to 0 so we can still attempt to set. + if ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1: + flags = 0 + + # Replace only the bits we actually want to influence, keep others. + # We can't just set all flags to the archived value, because we might + # reset flags that are not controllable from userspace, see #9039. + flags = (flags & ~mask) | (new_flags & mask) + if ioctl(fd, FS_IOC_SETFLAGS, &flags) == -1: error_number = errno.errno - if error_number != errno.EOPNOTSUPP: + # Usually we would only catch EOPNOTSUPP here, but Linux Kernel 6.17 + # has a bug where it returns ENOTTY instead of EOPNOTSUPP. + if error_number not in (errno.EOPNOTSUPP, errno.ENOTTY): raise OSError(error_number, strerror(error_number).decode(), path) finally: if open_fd: -- 2.51.0 ++++++ 0002-set_flags-better-give-up-than-corrupt.patch ++++++ From: Thomas Waldmann <[email protected]> Date: Fri, 17 Oct 2025 00:20:05 +0200 Subject: set_flags: better give up than corrupt References: bsc#1251048 Git-repo: https://github.com/ThomasWaldmann/borg#fix-set_flags-1.4 Git-commit: 9c600a95715ec22a5dd6cfba9bb1bee8238fc938 Patch-mainline: Queued in subsystem maintainer repository Thanks to Earnestly for the feedback on IRC. Signed-off-by: Jiri Slaby <[email protected]> --- src/borg/platform/linux.pyx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx index e849dbba32d1..d7680ccd62d2 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -149,9 +149,12 @@ def set_flags(path, bsd_flags, fd=None): if open_fd: fd = os.open(path, os.O_RDONLY|os.O_NONBLOCK|os.O_NOFOLLOW) try: - # Get current flags. If this fails, fall back to 0 so we can still attempt to set. + # Get current flags. if ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1: - flags = 0 + # If this fails, give up because it is either not supported by the fs + # or maybe not permitted? If we can't determine the current flags, + # we better not risk corrupting them by setflags, see the comment below. + return # give up silently # Replace only the bits we actually want to influence, keep others. # We can't just set all flags to the archived value, because we might -- 2.51.0 ++++++ 0003-set_flags-remove-compression-flag.patch ++++++ From: Thomas Waldmann <[email protected]> Date: Fri, 17 Oct 2025 02:41:53 +0200 Subject: set_flags: remove compression flag References: bsc#1251048 Git-repo: https://github.com/ThomasWaldmann/borg#fix-set_flags-1.4 Git-commit: 56dda841623f90556b37798e85f9371ebe4a3de2 Patch-mainline: Queued in subsystem maintainer repository This flag needs to be set BEFORE writing to the file. But "borg extract" sets the flags last (to support IMMUTABLE), thus the compression flag would not work as expected. Signed-off-by: Jiri Slaby <[email protected]> --- src/borg/platform/linux.pyx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx index d7680ccd62d2..1a8b7942cf8b 100644 --- a/src/borg/platform/linux.pyx +++ b/src/borg/platform/linux.pyx @@ -126,10 +126,9 @@ BSD_TO_LINUX_FLAGS = { stat.UF_NODUMP: FS_NODUMP_FL, stat.UF_IMMUTABLE: FS_IMMUTABLE_FL, stat.UF_APPEND: FS_APPEND_FL, - stat.UF_COMPRESSED: FS_COMPR_FL, } # must be a bitwise OR of all values in BSD_TO_LINUX_FLAGS. -LINUX_MASK = FS_NODUMP_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | FS_COMPR_FL +LINUX_MASK = FS_NODUMP_FL | FS_IMMUTABLE_FL | FS_APPEND_FL def set_flags(path, bsd_flags, fd=None): -- 2.51.0
