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-07 18:29:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/borgbackup (Old)
 and      /work/SRC/openSUSE:Factory/.borgbackup.new.11973 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "borgbackup"

Tue Oct  7 18:29:26 2025 rev:52 rq:1309631 version:1.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/borgbackup/borgbackup.changes    2025-07-20 
15:30:07.402679806 +0200
+++ /work/SRC/openSUSE:Factory/.borgbackup.new.11973/borgbackup.changes 
2025-10-07 18:31:47.266125780 +0200
@@ -1,0 +2,6 @@
+Tue Oct  7 04:53:42 UTC 2025 - Jiri Slaby <[email protected]>
+
+- add 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch
+  (bsc#1251048)
+
+-------------------------------------------------------------------

New:
----
  0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch

----------(New B)----------
  New:
- add 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch
  (bsc#1251048)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ borgbackup.spec ++++++
--- /var/tmp/diff_new_pack.nyVnwN/_old  2025-10-07 18:31:47.922153422 +0200
+++ /var/tmp/diff_new_pack.nyVnwN/_new  2025-10-07 18:31:47.926153591 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package borgbackup
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 # Copyright (c) 2016-2024 LISA GmbH, Bingen, Germany.
 #
 # All modifications and additions to the file contributed by third parties
@@ -59,6 +59,8 @@
 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
 # SECTION build dependencies
 BuildRequires:  bash
 BuildRequires:  fdupes
@@ -191,6 +193,7 @@
 %patch -P 0 -p1
 %endif
 %patch -P 1 -p1
+%patch -P 2 -p1
 
 %ifnarch %ix86 %arm
   # https://github.com/borgbackup/borg/issues/6996

++++++ 0001-platform-linux-fetch-flags-before-FS_IOC_SETFLAGS.patch ++++++
>From f0be6704da2b9e4f025401caedc85a89d7280470 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <[email protected]>
Date: Tue, 7 Oct 2025 06:39:36 +0200
Subject: [PATCH] platform/linux: fetch flags before FS_IOC_SETFLAGS
References: #9039 bsc#1251048
Patch-mainline: Submitted #9040

FS_IOC_SETFLAGS called without fetching flags first can remove for
example an ext4 flag like EXT4_EXTENTS_FL which results in EOPNOTSUPP.
That one is indeed handled in the code, but this is still incorrect. The
flags should be fetched with FS_IOC_GETFLAGS, updated and only then
stored back with FS_IOC_SETFLAGS.

Fixes #9039.
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1251048
---
 src/borg/platform/linux.pyx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/borg/platform/linux.pyx b/src/borg/platform/linux.pyx
index 5ea9370cb5fe..c8f9f9e978cd 100644
--- a/src/borg/platform/linux.pyx
+++ b/src/borg/platform/linux.pyx
@@ -135,13 +135,16 @@ def set_flags(path, bsd_flags, fd=None):
             # see comment in get_flags()
             return
     cdef int flags = 0
-    for bsd_flag, linux_flag in BSD_TO_LINUX_FLAGS.items():
-        if bsd_flags & bsd_flag:
-            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:
+        if ioctl(fd, FS_IOC_GETFLAGS, &flags) == -1:
+            error_number = errno.errno
+            raise OSError(error_number, strerror(error_number).decode(), path)
+        for bsd_flag, linux_flag in BSD_TO_LINUX_FLAGS.items():
+            if bsd_flags & bsd_flag:
+                flags |= linux_flag
         if ioctl(fd, FS_IOC_SETFLAGS, &flags) == -1:
             error_number = errno.errno
             if error_number != errno.EOPNOTSUPP:
-- 
2.51.0

Reply via email to