Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libostree for openSUSE:Factory checked in at 2025-09-08 13:05:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libostree (Old) and /work/SRC/openSUSE:Factory/.libostree.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libostree" Mon Sep 8 13:05:08 2025 rev:51 rq:1303126 version:2025.6 Changes: -------- --- /work/SRC/openSUSE:Factory/libostree/libostree.changes 2025-09-01 17:16:36.206909653 +0200 +++ /work/SRC/openSUSE:Factory/.libostree.new.1977/libostree.changes 2025-09-08 13:05:18.268665140 +0200 @@ -1,0 +2,12 @@ +Sun Sep 7 13:13:05 UTC 2025 - Andreas Stieger <andreas.stie...@gmx.de> + +- Update to version 2025.6: + + Deduplicate repo+sysroot syncfs logic + + libostree: remove OSTREE_SUPPRESS_SYNCFS + + ostree-finalize-staged.service: RequiresMountsFor=/etc + + fix: double free in checkout_tree_at_recurse + + Add ostree-shutdown.service: hide /sysroot and make /etc read-only + + Move dracut module from 98 ordering to the recommended 50 ordering + + Rework mounts to fix sysroot.mount umount + +------------------------------------------------------------------- @@ -5,3 +17,3 @@ - * Fix ostree boot links getting out of sync - * soft-reboot: Also handle /boot - * Fix path to aboot.cfg in BLS files + + Fix ostree boot links getting out of sync + + soft-reboot: Also handle /boot + + Fix path to aboot.cfg in BLS files Old: ---- libostree-2025.5.tar.xz New: ---- libostree-2025.6.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libostree.spec ++++++ --- /var/tmp/diff_new_pack.XUQAPv/_old 2025-09-08 13:05:19.756727675 +0200 +++ /var/tmp/diff_new_pack.XUQAPv/_new 2025-09-08 13:05:19.780728685 +0200 @@ -24,7 +24,7 @@ %bcond_without ed25519 %bcond_with tests Name: libostree -Version: 2025.5 +Version: 2025.6 Release: 0 Summary: Git for operating system binaries License: LGPL-2.0-or-later @@ -201,7 +201,7 @@ %dir %{_libexecdir}/libostree %{_prefix}/lib/ostree/ostree-prepare-root %{_prefix}/lib/ostree/ostree-remount -%{_dracutmodulesdir}/98ostree/ +%{_dracutmodulesdir}/50ostree/ %{_unitdir}/ostree-prepare-root.service %{_unitdir}/ostree-remount.service %{_unitdir}/ostree-finalize-staged.service ++++++ libostree-2025.5.tar.xz -> libostree-2025.6.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/Makefile-boot.am new/libostree-2025.6/Makefile-boot.am --- old/libostree-2025.5/Makefile-boot.am 2025-06-30 15:15:07.000000000 +0200 +++ new/libostree-2025.6/Makefile-boot.am 2025-09-05 21:17:47.000000000 +0200 @@ -19,7 +19,7 @@ if BUILDOPT_DRACUT # Not using $(libdir) here is intentional, dracut modules go in prefix/lib -dracutmoddir = $(prefix)/lib/dracut/modules.d/98ostree +dracutmoddir = $(prefix)/lib/dracut/modules.d/50ostree dracutmod_SCRIPTS = src/boot/dracut/module-setup.sh endif if BUILDOPT_DRACUT_CONF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/Makefile.in new/libostree-2025.6/Makefile.in --- old/libostree-2025.5/Makefile.in 2025-08-25 14:48:43.000000000 +0200 +++ new/libostree-2025.6/Makefile.in 2025-09-05 21:20:01.000000000 +0200 @@ -3370,7 +3370,7 @@ @ENABLE_INSTALLED_TESTS_EXCLUSIVE_TRUE@installed_test_programs = $(_installed_or_uninstalled_test_programs) # Not using $(libdir) here is intentional, dracut modules go in prefix/lib -@BUILDOPT_DRACUT_TRUE@dracutmoddir = $(prefix)/lib/dracut/modules.d/98ostree +@BUILDOPT_DRACUT_TRUE@dracutmoddir = $(prefix)/lib/dracut/modules.d/50ostree @BUILDOPT_DRACUT_TRUE@dracutmod_SCRIPTS = src/boot/dracut/module-setup.sh @BUILDOPT_DRACUT_CONF_TRUE@dracutconfdir = $(sysconfdir)/dracut.conf.d @BUILDOPT_DRACUT_CONF_TRUE@dracutconf_DATA = src/boot/dracut/ostree.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/apidoc/html/ostree-ostree-version.html new/libostree-2025.6/apidoc/html/ostree-ostree-version.html --- old/libostree-2025.5/apidoc/html/ostree-ostree-version.html 2025-08-25 14:49:03.000000000 +0200 +++ new/libostree-2025.6/apidoc/html/ostree-ostree-version.html 2025-09-05 21:20:09.000000000 +0200 @@ -126,7 +126,7 @@ <hr> <div class="refsect2"> <a name="OSTREE-RELEASE-VERSION:CAPS"></a><h3>OSTREE_RELEASE_VERSION</h3> -<pre class="programlisting">#define OSTREE_RELEASE_VERSION (5) +<pre class="programlisting">#define OSTREE_RELEASE_VERSION (6) </pre> <p>ostree release version component (e.g. 2 if <a class="link" href="ostree-ostree-version.html#OSTREE-VERSION:CAPS" title="OSTREE_VERSION"><code class="literal">OSTREE_VERSION</code></a> is 2017.2)</p> <p class="since">Since: 2017.4</p> @@ -134,7 +134,7 @@ <hr> <div class="refsect2"> <a name="OSTREE-VERSION:CAPS"></a><h3>OSTREE_VERSION</h3> -<pre class="programlisting">#define OSTREE_VERSION (2025.5) +<pre class="programlisting">#define OSTREE_VERSION (2025.6) </pre> <p>ostree version.</p> <p class="since">Since: 2017.4</p> @@ -142,7 +142,7 @@ <hr> <div class="refsect2"> <a name="OSTREE-VERSION-S:CAPS"></a><h3>OSTREE_VERSION_S</h3> -<pre class="programlisting">#define OSTREE_VERSION_S "2025.5" +<pre class="programlisting">#define OSTREE_VERSION_S "2025.6" </pre> <p>ostree version, encoded as a string, useful for printing and concatenation.</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/configure new/libostree-2025.6/configure --- old/libostree-2025.5/configure 2025-08-25 14:48:43.000000000 +0200 +++ new/libostree-2025.6/configure 2025-09-05 21:20:01.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libostree 2025.5. +# Generated by GNU Autoconf 2.72 for libostree 2025.6. # # Report bugs to <walt...@verbum.org>. # @@ -614,8 +614,8 @@ # Identity of this package. PACKAGE_NAME='libostree' PACKAGE_TARNAME='libostree' -PACKAGE_VERSION='2025.5' -PACKAGE_STRING='libostree 2025.5' +PACKAGE_VERSION='2025.6' +PACKAGE_STRING='libostree 2025.6' PACKAGE_BUGREPORT='walt...@verbum.org' PACKAGE_URL='' @@ -1622,7 +1622,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libostree 2025.5 to adapt to many kinds of systems. +'configure' configures libostree 2025.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1693,7 +1693,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libostree 2025.5:";; + short | recursive ) echo "Configuration of libostree 2025.6:";; esac cat <<\_ACEOF @@ -1965,7 +1965,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libostree configure 2025.5 +libostree configure 2025.6 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2350,7 +2350,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libostree $as_me 2025.5, which was +It was created by libostree $as_me 2025.6, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3831,7 +3831,7 @@ # Define the identity of the package. PACKAGE='libostree' - VERSION='2025.5' + VERSION='2025.6' # Some tools Automake needs. @@ -6675,9 +6675,9 @@ YEAR_VERSION=2025 -RELEASE_VERSION=5 +RELEASE_VERSION=6 -PACKAGE_VERSION=2025.5 +PACKAGE_VERSION=2025.6 pkglibexecdir=$libexecdir/$PACKAGE @@ -21992,7 +21992,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libostree $as_me 2025.5, which was +This file was extended by libostree $as_me 2025.6, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22060,7 +22060,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libostree config.status 2025.5 +libostree config.status 2025.6 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/configure.ac new/libostree-2025.6/configure.ac --- old/libostree-2025.5/configure.ac 2025-08-25 14:46:36.000000000 +0200 +++ new/libostree-2025.6/configure.ac 2025-09-05 21:19:11.000000000 +0200 @@ -1,7 +1,7 @@ AC_PREREQ([2.63]) dnl To perform a release, follow the instructions in `docs/CONTRIBUTING.md`. m4_define([year_version], [2025]) -m4_define([release_version], [5]) +m4_define([release_version], [6]) m4_define([package_version], [year_version.release_version]) AC_INIT([libostree], [package_version], [walt...@verbum.org]) is_release_build=yes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/boot/ostree-finalize-staged.service new/libostree-2025.6/src/boot/ostree-finalize-staged.service --- old/libostree-2025.5/src/boot/ostree-finalize-staged.service 2025-06-30 15:15:07.000000000 +0200 +++ new/libostree-2025.6/src/boot/ostree-finalize-staged.service 2025-08-29 20:06:51.000000000 +0200 @@ -21,7 +21,7 @@ ConditionPathExists=/run/ostree-booted DefaultDependencies=no -RequiresMountsFor=/sysroot /boot +RequiresMountsFor=/sysroot /boot /etc After=local-fs.target Before=basic.target final.target # We want to make sure the transaction logs are persisted to disk: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-repo-checkout.c new/libostree-2025.6/src/libostree/ostree-repo-checkout.c --- old/libostree-2025.5/src/libostree/ostree-repo-checkout.c 2025-06-30 15:15:07.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-repo-checkout.c 2025-08-30 14:40:34.000000000 +0200 @@ -997,7 +997,6 @@ g_autoptr (GVariant) dirtree = NULL; g_autoptr (GVariant) dirmeta = NULL; g_autoptr (GVariant) xattrs = NULL; - g_autoptr (GVariant) modified_xattrs = NULL; if (!ostree_repo_load_variant (self, OSTREE_OBJECT_TYPE_DIR_TREE, dirtree_checksum, &dirtree, error)) @@ -1055,8 +1054,8 @@ if (sepolicy_enabled && _ostree_sepolicy_host_enabled (options->sepolicy)) { /* We'll set the xattr via setfscreatecon(), so don't do it via generic xattrs below. */ - modified_xattrs = _ostree_filter_selinux_xattr (xattrs); - xattrs = modified_xattrs; + g_autoptr (GVariant) old_xattrs = g_steal_pointer (&xattrs); + xattrs = _ostree_filter_selinux_xattr (old_xattrs); if (!_ostree_sepolicy_preparefscreatecon (&fscreatecon, options->sepolicy, state->selabel_path_buf->str, mode, error)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-repo-commit.c new/libostree-2025.6/src/libostree/ostree-repo-commit.c --- old/libostree-2025.5/src/libostree/ostree-repo-commit.c 2025-06-30 15:15:07.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-repo-commit.c 2025-08-29 20:06:51.000000000 +0200 @@ -2227,14 +2227,8 @@ if ((self->test_error_flags & OSTREE_REPO_TEST_ERROR_PRE_COMMIT) > 0) return glnx_throw (error, "OSTREE_REPO_TEST_ERROR_PRE_COMMIT specified"); - /* FIXME: Added OSTREE_SUPPRESS_SYNCFS since valgrind in el7 doesn't know - * about `syncfs`...we should delete this later. - */ - if (!self->disable_fsync && g_getenv ("OSTREE_SUPPRESS_SYNCFS") == NULL) - { - if (syncfs (self->tmp_dir_fd) < 0) - return glnx_throw_errno_prefix (error, "syncfs(repo/tmp)"); - } + if (!_ostree_repo_syncfs (self, error)) + return FALSE; if (!rename_pending_loose_objects (self, cancellable, error)) return FALSE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-repo-private.h new/libostree-2025.6/src/libostree/ostree-repo-private.h --- old/libostree-2025.5/src/libostree/ostree-repo-private.h 2025-07-15 23:10:43.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-repo-private.h 2025-08-29 20:06:51.000000000 +0200 @@ -394,6 +394,7 @@ GError **error); gboolean _ostree_repo_update_mtime (OstreeRepo *self, GError **error); +gboolean _ostree_repo_syncfs (OstreeRepo *self, GError **error); gboolean _ostree_repo_add_remote (OstreeRepo *self, OstreeRemote *remote); gboolean _ostree_repo_remove_remote (OstreeRepo *self, OstreeRemote *remote); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-repo.c new/libostree-2025.6/src/libostree/ostree-repo.c --- old/libostree-2025.5/src/libostree/ostree-repo.c 2025-07-15 23:10:43.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-repo.c 2025-08-29 20:06:51.000000000 +0200 @@ -1521,6 +1521,27 @@ return TRUE; } +gboolean +_ostree_repo_syncfs (OstreeRepo *self, GError **error) +{ + + if (self->disable_fsync) + return TRUE; + + gboolean is_system = ostree_repo_is_system (self); + if (is_system) + ot_journal_print (LOG_INFO, "Starting syncfs for system repo"); + guint64 start_msec = g_get_monotonic_time () / 1000; + int repo_dfd = ostree_repo_get_dfd (self); + if (syncfs (repo_dfd) != 0) + return glnx_throw_errno_prefix (error, "syncfs(repo)"); + guint64 end_msec = g_get_monotonic_time () / 1000; + if (is_system) + ot_journal_print (LOG_INFO, "Completed syncfs() for system repo in %" G_GUINT64_FORMAT " ms", + end_msec - start_msec); + return TRUE; +} + /** * ostree_repo_get_config: * @self: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-soft-reboot.c new/libostree-2025.6/src/libostree/ostree-soft-reboot.c --- old/libostree-2025.5/src/libostree/ostree-soft-reboot.c 2025-07-24 20:36:18.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-soft-reboot.c 2025-09-05 21:17:47.000000000 +0200 @@ -63,6 +63,22 @@ if (!glnx_shutil_mkdir_p_at (AT_FDCWD, OTCORE_RUN_NEXTROOT, 0755, NULL, error)) return FALSE; + /* Bind-mount /sysroot on itself. + * The composefs mount at /run/nextboot is going to use /sysroot, + * causing systemd to fail to umount sysroot.mount during soft-reboot. + * Create a temporary bind-mount, and MNT_DETACH it when we are done + */ + if (mount (sysroot_path, sysroot_path, NULL, MS_BIND | MS_SILENT, NULL) < 0) + err (EXIT_FAILURE, "failed to MS_BIND '%s'", sysroot_path); + + /* Our curent working directory is in the old /sysroot, + * ie we are under the bind mount, so run 'cd $PWD' + * to move to the new /sysroot + */ + g_autofree char *cwd = g_get_current_dir (); + if (chdir (cwd) < 0) + err (EXIT_FAILURE, "failed to chdir to '%s'", cwd); + // Tracks if we did successfully enable it at runtime bool using_composefs = false; if (!otcore_mount_rootfs (rootfs_config, &metadata_builder, sysroot_path, target_deployment, @@ -78,6 +94,14 @@ if (!otcore_mount_etc (config, &metadata_builder, OTCORE_RUN_NEXTROOT, error)) return FALSE; + // detach the temporary /sysroot bind-mount + if (umount2 (sysroot_path, MNT_DETACH) < 0) + err (EXIT_FAILURE, "failed to MS_DETACH '%s'", sysroot_path); + + // run 'cd $PWD' again to go back to the old /sysroot + if (chdir (cwd) < 0) + err (EXIT_FAILURE, "failed to chdir to '%s'", cwd); + // And set up /sysroot. Here since we hardcode composefs, we also hardcode // having a read-only /sysroot. g_variant_builder_add (&metadata_builder, "{sv}", OTCORE_RUN_BOOTED_KEY_SYSROOT_RO, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-sysroot-deploy.c new/libostree-2025.6/src/libostree/ostree-sysroot-deploy.c --- old/libostree-2025.5/src/libostree/ostree-sysroot-deploy.c 2025-08-25 14:45:28.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-sysroot-deploy.c 2025-08-29 20:06:51.000000000 +0200 @@ -1628,44 +1628,31 @@ return TRUE; } -typedef struct -{ - guint64 root_syncfs_msec; - guint64 boot_syncfs_msec; -} SyncStats; - /* sync /ostree and /boot which may be separate mount points. */ static gboolean -full_system_sync (OstreeSysroot *self, SyncStats *out_stats, GCancellable *cancellable, - GError **error) +full_system_sync (OstreeSysroot *self, GCancellable *cancellable, GError **error) { GLNX_AUTO_PREFIX_ERROR ("Full sync", error); - ot_journal_print (LOG_INFO, "Starting syncfs() for /ostree"); - guint64 start_msec = g_get_monotonic_time () / 1000; - glnx_autofd int ostree_dfd = -1; - if (!glnx_opendirat (self->sysroot_fd, "ostree", TRUE, &ostree_dfd, error)) - return glnx_throw_errno_prefix (error, "glnx_opendirat(/ostree)"); - if (syncfs (ostree_dfd) != 0) - return glnx_throw_errno_prefix (error, "syncfs(/ostree)"); - guint64 end_msec = g_get_monotonic_time () / 1000; - ot_journal_print (LOG_INFO, "Completed syncfs() for /ostree in %" G_GUINT64_FORMAT " ms", - end_msec - start_msec); - - out_stats->root_syncfs_msec = (end_msec - start_msec); if (!_ostree_sysroot_ensure_boot_fd (self, error)) return FALSE; - g_assert_cmpint (self->boot_fd, !=, -1); + + // Must have been initialized + g_assert (self->repo); + // Because we require that /ostree is on the same fs as /ostree/repo, reuse + // the logic to syncfs the repo fd. + if (!_ostree_repo_syncfs (self->repo, error)) + return FALSE; + ot_journal_print (LOG_INFO, "Starting freeze/thaw cycle for boot"); - start_msec = g_get_monotonic_time () / 1000; + guint64 start_msec = g_get_monotonic_time () / 1000; if (!fsfreeze_thaw_cycle (self, self->boot_fd, cancellable, error)) return FALSE; - end_msec = g_get_monotonic_time () / 1000; + guint64 end_msec = g_get_monotonic_time () / 1000; ot_journal_print (LOG_INFO, "Completed freeze/thaw cycle for boot in %" G_GUINT64_FORMAT " ms", end_msec - start_msec); - out_stats->boot_syncfs_msec = (end_msec - start_msec); return TRUE; } @@ -2410,8 +2397,7 @@ static gboolean write_deployments_bootswap (OstreeSysroot *self, GPtrArray *new_deployments, OstreeSysrootWriteDeploymentsOpts *opts, OstreeBootloader *bootloader, - SyncStats *out_syncstats, char **out_subbootdir, - GCancellable *cancellable, GError **error) + char **out_subbootdir, GCancellable *cancellable, GError **error) { const int new_bootversion = self->bootversion ? 0 : 1; @@ -2464,7 +2450,7 @@ if (!prepare_new_bootloader_link (self, self->bootversion, new_bootversion, cancellable, error)) return FALSE; - if (!full_system_sync (self, out_syncstats, cancellable, error)) + if (!full_system_sync (self, cancellable, error)) return FALSE; if (!swap_bootloader (self, bootloader, self->bootversion, new_bootversion, cancellable, error)) @@ -2994,9 +2980,6 @@ return glnx_throw (error, "Attempting to remove booted deployment"); gboolean bootloader_is_atomic = FALSE; - SyncStats syncstats = { - 0, - }; g_autoptr (OstreeBootloader) bootloader = NULL; g_autofree char *new_subbootdir = NULL; if (!requires_new_bootversion) @@ -3004,7 +2987,7 @@ if (!create_new_bootlinks (self, self->bootversion, new_deployments, cancellable, error)) return FALSE; - if (!full_system_sync (self, &syncstats, cancellable, error)) + if (!full_system_sync (self, cancellable, error)) return FALSE; if (!swap_bootlinks (self, self->bootversion, new_deployments, &new_subbootdir, cancellable, @@ -3020,8 +3003,8 @@ bootloader_is_atomic = bootloader != NULL && _ostree_bootloader_is_atomic (bootloader); - if (!write_deployments_bootswap (self, new_deployments, opts, bootloader, &syncstats, - &new_subbootdir, cancellable, error)) + if (!write_deployments_bootswap (self, new_deployments, opts, bootloader, &new_subbootdir, + cancellable, error)) return FALSE; } @@ -3032,15 +3015,14 @@ requires_new_bootversion ? "yes" : "no", new_subbootdir, new_deployments->len - self->deployments->len); const gchar *bootloader_config = ostree_repo_get_bootloader (ostree_sysroot_repo (self)); - ot_journal_send ( - "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL (OSTREE_DEPLOYMENT_COMPLETE_ID), - "MESSAGE=%s", msg, "OSTREE_BOOTLOADER=%s", - bootloader ? _ostree_bootloader_get_name (bootloader) : "none", - "OSTREE_BOOTLOADER_CONFIG=%s", bootloader_config, "OSTREE_BOOTLOADER_ATOMIC=%s", - bootloader_is_atomic ? "yes" : "no", "OSTREE_DID_BOOTSWAP=%s", - requires_new_bootversion ? "yes" : "no", "OSTREE_N_DEPLOYMENTS=%u", new_deployments->len, - "OSTREE_SYNCFS_ROOT_MSEC=%" G_GUINT64_FORMAT, syncstats.root_syncfs_msec, - "OSTREE_SYNCFS_BOOT_MSEC=%" G_GUINT64_FORMAT, syncstats.boot_syncfs_msec, NULL); + ot_journal_send ("MESSAGE_ID=" SD_ID128_FORMAT_STR, + SD_ID128_FORMAT_VAL (OSTREE_DEPLOYMENT_COMPLETE_ID), "MESSAGE=%s", msg, + "OSTREE_BOOTLOADER=%s", + bootloader ? _ostree_bootloader_get_name (bootloader) : "none", + "OSTREE_BOOTLOADER_CONFIG=%s", bootloader_config, + "OSTREE_BOOTLOADER_ATOMIC=%s", bootloader_is_atomic ? "yes" : "no", + "OSTREE_DID_BOOTSWAP=%s", requires_new_bootversion ? "yes" : "no", + "OSTREE_N_DEPLOYMENTS=%u", new_deployments->len, NULL); _ostree_sysroot_emit_journal_msg (self, msg); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-sysroot.c new/libostree-2025.6/src/libostree/ostree-sysroot.c --- old/libostree-2025.5/src/libostree/ostree-sysroot.c 2025-07-16 15:20:22.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-sysroot.c 2025-08-29 20:06:51.000000000 +0200 @@ -1076,10 +1076,30 @@ return TRUE; if (!ensure_sysroot_fd (self, error)) return FALSE; + // TODO: Consider if we can use openat2 with RESOLVE_NO_XDEV self->repo = ostree_repo_open_at (self->sysroot_fd, "ostree/repo", NULL, error); if (!self->repo) return FALSE; + // Because the ostree model requires hardlinks, ensure up front + // here that /ostree is on the same filesystem as /ostree/repo. + // See `full_system_sync` which also requires this. + { + struct stat repo_stat, ostree_stat; + glnx_autofd int ostree_fd = -1; + if (!glnx_opendirat (self->sysroot_fd, "ostree", TRUE, &ostree_fd, error)) + return FALSE; + if (!glnx_fstat (ostree_fd, &ostree_stat, error)) + return FALSE; + if (!glnx_fstat (ostree_repo_get_dfd (self->repo), &repo_stat, error)) + return FALSE; + if (ostree_stat.st_dev != repo_stat.st_dev) + return glnx_throw (error, + "Unexpected state: ostree/ on device %" G_GUINT64_FORMAT + " but ostree/repo on device %" G_GUINT64_FORMAT, + (guint64)ostree_stat.st_dev, (guint64)repo_stat.st_dev); + } + /* Flag it as having been created via ostree_sysroot_get_repo(), and hold a * weak ref for the remote-add handling. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/libostree/ostree-version.h new/libostree-2025.6/src/libostree/ostree-version.h --- old/libostree-2025.5/src/libostree/ostree-version.h 2025-08-25 14:48:56.000000000 +0200 +++ new/libostree-2025.6/src/libostree/ostree-version.h 2025-09-05 21:20:05.000000000 +0200 @@ -41,7 +41,7 @@ * * Since: 2017.4 */ -#define OSTREE_RELEASE_VERSION (5) +#define OSTREE_RELEASE_VERSION (6) /** * OSTREE_VERSION @@ -50,7 +50,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION (2025.5) +#define OSTREE_VERSION (2025.6) /** * OSTREE_VERSION_S: @@ -60,7 +60,7 @@ * * Since: 2017.4 */ -#define OSTREE_VERSION_S "2025.5" +#define OSTREE_VERSION_S "2025.6" #define OSTREE_ENCODE_VERSION(year,release) \ ((year) << 16 | (release)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/src/switchroot/ostree-prepare-root.c new/libostree-2025.6/src/switchroot/ostree-prepare-root.c --- old/libostree-2025.5/src/switchroot/ostree-prepare-root.c 2025-07-24 20:36:18.000000000 +0200 +++ new/libostree-2025.6/src/switchroot/ostree-prepare-root.c 2025-09-05 21:17:47.000000000 +0200 @@ -325,6 +325,25 @@ err (EXIT_FAILURE, "failed to bind mount (class:readonly) /usr"); } + /* Prepare /sysroot. + * The future / (currently at /sysroot.tmp) is an overlayfs or composefs that uses + * the physical root (currently at /sysroot), and we want to mount the physical root + * on top of the future / (at /sysroot.tmp/sysroot). + * If we MS_MOVE /sysroot to /sysroot.tmp/sysroot, we end up with a mount cycle, + * and systemd fails to unmount sysroot.mount. + * To avoid the mount cycle, bind-mount the physical root and then detach it. + */ + if (mount (root_mountpoint, TMP_SYSROOT "/sysroot", NULL, MS_BIND | MS_SILENT, NULL) < 0) + err (EXIT_FAILURE, "failed to MS_BIND '%s' to 'sysroot'", root_mountpoint); + + if (umount2 (root_mountpoint, MNT_DETACH) < 0) + err (EXIT_FAILURE, "failed to MS_DETACH '%s'", root_mountpoint); + + /* Resolve deploy path again so we can use paths relative to the physical root bind-mount */ + g_autofree char *deploy_path2 = resolve_deploy_path (kernel_cmdline, TMP_SYSROOT "/sysroot"); + if (chdir (deploy_path2) < 0) + err (EXIT_FAILURE, "failed to chdir to deploy_path2"); + /* Prepare /var. * When a read-only sysroot is configured, this adds a dedicated bind-mount (to itself) * so that the stateroot location stays writable. */ @@ -377,20 +396,12 @@ errx (EXIT_FAILURE, "Writing %s: %s", OTCORE_RUN_BOOTED, error->message); } - if (chdir (TMP_SYSROOT) < 0) - err (EXIT_FAILURE, "failed to chdir to " TMP_SYSROOT); - - /* Now we have our ready made-up up root at - * /sysroot.tmp and the physical root at /sysroot (root_mountpoint). - * We want to end up with our deploy root at /sysroot/ and the physical - * root under /sysroot/sysroot as systemd will be responsible for - * moving /sysroot to /. + /* Now we have our ready made-up deploy root at /sysroot.tmp, + * we just need to move it to /sysroot (root_mountpoint). + * systemd will be responsible for moving /sysroot to /. */ - if (mount (root_mountpoint, "sysroot", NULL, MS_MOVE | MS_SILENT, NULL) < 0) - err (EXIT_FAILURE, "failed to MS_MOVE '%s' to 'sysroot'", root_mountpoint); - - if (mount (".", root_mountpoint, NULL, MS_MOVE | MS_SILENT, NULL) < 0) - err (EXIT_FAILURE, "failed to MS_MOVE %s to %s", ".", root_mountpoint); + if (mount (TMP_SYSROOT, root_mountpoint, NULL, MS_MOVE | MS_SILENT, NULL) < 0) + err (EXIT_FAILURE, "failed to MS_MOVE %s to %s", TMP_SYSROOT, root_mountpoint); if (chdir (root_mountpoint) < 0) err (EXIT_FAILURE, "failed to chdir to %s", root_mountpoint); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libostree-2025.5/tests/libtest.sh new/libostree-2025.6/tests/libtest.sh --- old/libostree-2025.5/tests/libtest.sh 2025-07-15 23:10:43.000000000 +0200 +++ new/libostree-2025.6/tests/libtest.sh 2025-08-29 20:06:51.000000000 +0200 @@ -180,7 +180,7 @@ CMD_PREFIX="" if test -n "${OT_TESTS_VALGRIND:-}"; then - CMD_PREFIX="env G_SLICE=always-malloc OSTREE_SUPPRESS_SYNCFS=1 valgrind -q --error-exitcode=1 --leak-check=full --num-callers=30 --suppressions=${test_srcdir}/glib.supp --suppressions=${test_srcdir}/ostree.supp" + CMD_PREFIX="env G_SLICE=always-malloc valgrind -q --error-exitcode=1 --leak-check=full --num-callers=30 --suppressions=${test_srcdir}/glib.supp --suppressions=${test_srcdir}/ostree.supp" fi if test -z "${OSTREE_HTTPD:-}"; then