Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package systemd for openSUSE:Factory checked 
in at 2025-07-08 15:28:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/systemd (Old)
 and      /work/SRC/openSUSE:Factory/.systemd.new.7373 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "systemd"

Tue Jul  8 15:28:13 2025 rev:451 rq:1291008 version:257.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/systemd/systemd.changes  2025-07-03 
12:11:49.041075988 +0200
+++ /work/SRC/openSUSE:Factory/.systemd.new.7373/systemd.changes        
2025-07-08 15:28:44.321491391 +0200
@@ -1,0 +2,22 @@
+Fri Jul  4 14:57:26 UTC 2025 - Franck Bui <f...@suse.com>
+
+- Move the workaround which consists in converting /var/lib/machines as a
+  separate subvolume in cases where it was incorrectly created inside a
+  snapshot.
+
+  Relocating the workaround from the systemd-container sub-package to the main
+  package ensures it's applied on old systems where it's still needed [1] even
+  if the systemd-container sub-package is not installed.
+
+  This change should allow us to eventually drop the workaround in the future.
+
+  [1] The workaround is required on legacy installations (those made more than
+  eight years ago) where /var was not a separate subvolume.
+
+-------------------------------------------------------------------
+Fri Jul  4 12:43:24 UTC 2025 - Franck Bui <f...@suse.com>
+
+- triggers.systemd: skip update of hwdb, journal-catalog if executed during
+  an offline update.
+
+-------------------------------------------------------------------

Old:
----
  fixlet-container-post.sh

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

Other differences:
------------------
++++++ systemd.spec ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.377535511 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.381535678 +0200
@@ -198,7 +198,6 @@
 Source9:        pam.systemd-run0
 Source14:       kbd-model-map.legacy
 
-Source100:      fixlet-container-post.sh
 Source101:      fixlet-systemd-post.sh
 
 Source200:      files.systemd
@@ -924,9 +923,6 @@
 
 # Install the fixlets
 mkdir -p %{buildroot}%{_systemd_util_dir}/rpm
-%if %{with machined}
-install -m0755 %{SOURCE100} %{buildroot}%{_systemd_util_dir}/rpm/
-%endif
 install -m0755 %{SOURCE101} %{buildroot}%{_systemd_util_dir}/rpm/
 
 # Make sure /usr/lib/modules-load.d exists in udev(-mini)?, so other
@@ -1259,7 +1255,6 @@
 %systemd_post systemd-mountfsd.socket
 %systemd_post systemd-nsresourced.socket
 %systemd_post machines.target
-%{_systemd_util_dir}/rpm/fixlet-container-post.sh $1 || :
 %endif
 
 %if %{with journal_remote}

++++++ files.container ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.461539021 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.465539188 +0200
@@ -62,7 +62,6 @@
 %{_mandir}/man5/org.freedesktop.machine1.5.gz
 %{_mandir}/man8/systemd-machined.8.gz
 %{_mandir}/man8/systemd-machined.service.8.gz
-%{_systemd_util_dir}/rpm/fixlet-container-post.sh
 %{_systemd_util_dir}/systemd-machined
 %{_tmpfilesdir}/systemd-nspawn.conf
 %{_unitdir}/dbus-org.freedesktop.machine1.service

++++++ files.experimental ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.513541193 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.517541360 +0200
@@ -56,6 +56,9 @@
 %{_mandir}/man1/systemd-pty-forward.1.gz
 %endif
 %{_mandir}/man1/systemd-sbsign.1.gz
+%if %{with upstream}
+%{_mandir}/man1/systemd-ssh-issue.1.gz
+%endif
 %{_mandir}/man1/systemd-ssh-proxy.1.gz
 %{_mandir}/man1/systemd-vmspawn.1.gz
 %if %{with sd_boot}
@@ -154,6 +157,9 @@
 %endif
 %{_systemd_util_dir}/systemd-pcrlock
 %{_systemd_util_dir}/systemd-sbsign
+%if %{with upstream}
+%{_systemd_util_dir}/systemd-ssh-issue
+%endif
 %{_systemd_util_dir}/systemd-ssh-proxy
 %{_systemd_util_dir}/systemd-storagetm
 %{_systemd_util_dir}/systemd-sysupdate

++++++ files.networkd ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.581544034 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.585544202 +0200
@@ -46,6 +46,9 @@
 %{_sysusersdir}/systemd-network.conf
 %{_tmpfilesdir}/systemd-network.conf
 %{_unitdir}/systemd-networkd-persistent-storage.service
+%if %{with upstream}
+%{_unitdir}/systemd-networkd-varlink.socket
+%endif
 %{_unitdir}/systemd-networkd-wait-online.service
 %{_unitdir}/systemd-networkd-wait-online@.service
 %{_unitdir}/systemd-networkd.service

++++++ files.systemd ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.637546374 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.645546708 +0200
@@ -47,6 +47,9 @@
 %dir %{_systemd_system_env_generator_dir}
 %dir %{_systemd_user_env_generator_dir}
 %dir %{_systemd_util_dir}
+%if %{with upstream}
+%dir %{_systemd_util_dir}/initrd-preset
+%endif
 %dir %{_systemd_util_dir}/ntp-units.d
 %dir %{_systemd_util_dir}/rpm
 %dir %{_systemd_util_dir}/system-preset
@@ -463,6 +466,10 @@
 %if %{without bootstrap}
 %{_systemd_util_dir}/coredump.conf
 %endif
+%if %{with upstream}
+%{_systemd_util_dir}/initrd-preset/90-systemd.preset
+%{_systemd_util_dir}/initrd-preset/99-default.preset
+%endif
 %{_systemd_util_dir}/journald.conf
 %{_systemd_util_dir}/logind.conf
 %{_systemd_util_dir}/rpm/fixlet-systemd-post.sh
@@ -650,6 +657,9 @@
 %{_unitdir}/sockets.target.wants/systemd-hostnamed.socket
 %{_unitdir}/sockets.target.wants/systemd-journald-dev-log.socket
 %{_unitdir}/sockets.target.wants/systemd-journald.socket
+%if %{with upstream}
+%{_unitdir}/sockets.target.wants/systemd-logind-varlink.socket
+%endif
 %{_unitdir}/sockets.target.wants/systemd-sysext.socket
 %{_unitdir}/soft-reboot.target
 %{_unitdir}/sound.target
@@ -726,6 +736,7 @@
 %{_unitdir}/systemd-localed.service
 %{_unitdir}/systemd-logind.service
 %if %{with upstream}
+%{_unitdir}/systemd-logind-varlink.socket
 %{_unitdir}/systemd-loop@.service
 %endif
 %{_unitdir}/systemd-machine-id-commit.service

++++++ fixlet-systemd-post.sh ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.701549048 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.705549215 +0200
@@ -4,6 +4,10 @@
 # updated.
 #
 
+warn() {
+       echo >&2 "warning: $@"
+}
+
 # /etc/sysconfig/console   | /etc/vconsole.conf
 # -------------------------+---------------------
 # CONSOLE_FONT             | FONT
@@ -301,6 +305,140 @@
        done
 }
 
+# On systems using the old btrfs layout, where /var was not a separate
+# subvolume, convert /var/lib/machines into a subvolume suitable for snapper to
+# perform snapshots, rollbacks, see bsc#992573.
+#
+# The conversion might only be problematic for openSUSE distros (TW/Factory)
+# where the subvolume was created at the wrong place (via tmpfiles for example)
+# and it got populated before we had time to fix it. In this case we'll let the
+# user fix it manually.
+#
+# On SLE12 this subvolume was only introduced during the upgrade from v210 to
+# v228 (ie SLE12-SP[01] -> SLE12-SP2+ when we added this workaround hence no
+# user should had time to populate it. Note that the subvolume is still created
+# at the wrong place due to the call to tmpfiles_create macro in the %post
+# section however it's empty so again we shouldn't face any issue to convert 
it.
+#
+# In order to avoid ugly dependencies added in systemd package, this function
+# should only be called during package updates when mksubvolume(8) is
+# available. During installation, /var/lib/machines is supposed to be created 
by
+# the installer now.
+#
+# See bsc#992573.
+#
+is_btrfs_subvolume() {
+       # On btrfs subvolumes always have the inode 256
+       test $(stat --format=%i "$1") -eq 256
+}
+
+# This assumes the directory/subvol to remove is empty.
+rm_subvolume_or_directory() {
+       is_btrfs_subvolume "$1" && {
+               btrfs subvolume delete "$1"
+               return
+       }
+       rmdir "$1"
+}
+
+fix_machines_subvol() {
+       local tagfile=/var/lib/systemd/rpm/container-machines_subvol
+
+       #
+       # This test is probably redundant with the ones below but we don't want
+       # to run this on transactional systems since /var has always been a
+       # separate subvolume on such systems.
+       #
+       if [ -n "${TRANSACTIONAL_UPDATE}" ]; then
+               return 0
+       fi
+
+       if [ -e $tagfile ]; then
+               return 0
+       fi
+       touch $tagfile
+
+       #
+       # If there's already an entry in fstab for /var/lib/machines, it
+       # means that:
+       #
+       #   - the installer initialized /var/lib/machines correctly (default)
+       #   - we already fixed it
+       #   - the sysadmin added it manually
+       #
+       # In any cases we should return.
+       #
+       # Note: we can't simply check if /var/lib/machines has been mounted
+       # because an offline update might be in progress (see bsc#1030290).
+       #
+       if mount --fake /var/lib/machines 2>/dev/null; then
+               return
+       fi
+
+       #
+       # If there is already an entry in fstab for /var, it means that:
+       #
+       #   - the system has a seperate /var subvolume (default from Feb 2018)
+       #   - the system has a seperate /var partition
+       #
+       # In any case we should return.
+       #
+       if mount --fake /var 2>/dev/null; then
+               return
+       fi
+
+       #
+       # If something is already mounted don't try to fix anything, it's been
+       # done manually by the sysadmin.
+       #
+       if mountpoint -q /var/lib/machines; then
+               return
+       fi
+
+       #
+       # Let's try to figure out if the current filesystem uses a Snapper
+       # BTRFS specific layout. Note that TW uses a different layout than
+       # SLE...
+       #
+       # FIXME: not sure if it's correct, reliable or optimal.
+       #
+       case $(findmnt -nr -t btrfs -o FSROOT / 2>/dev/null) in
+       *.snapshots/*/snapshot*)
+               ;;
+       *)
+               return 0
+       esac
+
+       if test -d /var/lib/machines; then
+               #
+               # Ok, we're on a system supporting rollbacks and
+               # /var/lib/machines is not a subvolume remotely mounted so it
+               # cannot be suitable for systems supporting rollback. Fix it.
+               #
+               echo "Making /var/lib/machines suitable for rollbacks..."
+
+               type mksubvolume >/dev/null 2>&1 || {
+                       warn "mksubvolume(8) is not installed, aborting."
+                       return 1
+               }
+               test "$(ls -A /var/lib/machines/)" && {
+                       warn "/var/lib/machines is not empty, aborting."
+                       return 1
+               }
+
+               echo "Deleting empty /var/lib/machines directory/subvolume"
+               rm_subvolume_or_directory /var/lib/machines || {
+                       warn "fail to delete /var/lib/machines"
+                       return 1
+               }
+       fi
+
+       # At this point /var/lib/machines shouldn't exist.
+       echo "Creating /var/lib/machines subvolume suitable for rollbacks."
+       mksubvolume /var/lib/machines
+}
+
+
 r=0
 fix_machine_id_perms || r=1
 fix_pre_210 || r=1
@@ -309,5 +447,13 @@
 fix_issue_11329 || r=1
 drop_after_local_support || r=1
 
+if [ $1 -gt 1 ]; then
+       # During upgrade
+       fix_machines_subvol || {
+               warn "Please fix the initialization of /var/lib/machines 
manually."
+               r=1
+       }
+fi
+
 exit $r
 

++++++ triggers.systemd ++++++
--- /var/tmp/diff_new_pack.It8RGp/_old  2025-07-08 15:28:45.817553894 +0200
+++ /var/tmp/diff_new_pack.It8RGp/_new  2025-07-08 15:28:45.821554062 +0200
@@ -42,7 +42,7 @@
 -- This script will process files installed in /usr/lib/sysusers.d to create
 -- specified users automatically. The priority is set such that it
 -- will run before the tmpfiles file trigger.
--- Note: /run is never mounted during transactional updates.
+-- Note: this should be skipped during offline updates.
 if posix.access("/run/systemd/system") then
     assert(rpm.execute("systemd-sysusers"))
 end
@@ -51,13 +51,19 @@
 %transfiletriggerin -P 1000700 -n udev -p <lua> -- /usr/lib/udev/hwdb.d
 -- This script will automatically invoke hwdb update if files have been
 -- installed or updated in /usr/lib/udev/hwdb.d.
-assert(rpm.execute("systemd-hwdb", "update"))
+-- Note: this should be skipped during offline updates.
+if posix.access("/run/systemd/system") then
+    assert(rpm.execute("systemd-hwdb", "update"))
+end
 %endif
 
 %transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/systemd/catalog
 -- This script will automatically invoke journal catalog update if files
 -- have been installed or updated in /usr/lib/systemd/catalog.
-assert(rpm.execute("journalctl", "--update-catalog"))
+-- Note: this should be skipped during offline updates.
+if posix.access("/run/systemd/system") then
+    assert(rpm.execute("journalctl", "--update-catalog"))
+end
 
 %transfiletriggerin -P 1000700 -p <lua> -- /usr/lib/binfmt.d
 -- This script will automatically apply binfmt rules if files have been
@@ -70,7 +76,7 @@
 -- This script will process files installed in /usr/lib/tmpfiles.d to create
 -- tmpfiles automatically. The priority is set such that it will run
 -- after the sysusers file trigger, but before any other triggers.
--- Note: /run is never mounted during transactional updates.
+-- Note: this should be skipped during offline updates.
 if posix.access("/run/systemd/system") then
     assert(rpm.execute("systemd-tmpfiles", "--create"))
 end
@@ -87,6 +93,7 @@
 %transfiletriggerin -P 1000500 -p <lua> -- /usr/lib/sysctl.d
 -- This script will automatically apply sysctl rules if files have been
 -- installed or updated in /usr/lib/sysctl.d.
+-- Note: this should be skipped if executed in a chroot environment.
 if posix.access("/run/systemd/system") then
     assert(rpm.execute("/usr/lib/systemd/systemd-sysctl"))
 end

Reply via email to