Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libostree for openSUSE:Factory 
checked in at 2024-09-27 08:09:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libostree (Old)
 and      /work/SRC/openSUSE:Factory/.libostree.new.29891 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libostree"

Fri Sep 27 08:09:57 2024 rev:40 rq:1204036 version:2024.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/libostree/libostree.changes      2024-07-25 
11:56:05.442828705 +0200
+++ /work/SRC/openSUSE:Factory/.libostree.new.29891/libostree.changes   
2024-09-27 08:09:57.607244031 +0200
@@ -1,0 +2,8 @@
+Fri Sep 27 06:01:32 UTC 2024 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Update to version 2024.8:
+  + Adapt to a change in libcurl 8.10.1 that caused ostree to start
+    crashing.
+  + switchroot: Stop making /sysroot mount private.
+
+-------------------------------------------------------------------

Old:
----
  libostree-2024.7.tar.xz

New:
----
  libostree-2024.8.tar.xz

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

Other differences:
------------------
++++++ libostree.spec ++++++
--- /var/tmp/diff_new_pack.VO9CBF/_old  2024-09-27 08:09:58.175267612 +0200
+++ /var/tmp/diff_new_pack.VO9CBF/_new  2024-09-27 08:09:58.175267612 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libostree
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 # Copyright (c) 2024 Andreas Stieger <andreas.stie...@gmx.de>
 #
 # All modifications and additions to the file contributed by third parties
@@ -24,7 +24,7 @@
 %bcond_without     ed25519
 %bcond_with        tests
 Name:           libostree
-Version:        2024.7
+Version:        2024.8
 Release:        0
 Summary:        Git for operating system binaries
 License:        LGPL-2.0-or-later

++++++ libostree-2024.7.tar.xz -> libostree-2024.8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/Makefile-tests.am 
new/libostree-2024.8/Makefile-tests.am
--- old/libostree-2024.7/Makefile-tests.am      2024-06-03 17:08:17.000000000 
+0200
+++ new/libostree-2024.8/Makefile-tests.am      2024-08-15 17:24:12.000000000 
+0200
@@ -73,6 +73,7 @@
        tests/test-remote-headers.sh \
        tests/test-remote-refs.sh \
        tests/test-composefs.sh \
+       tests/test-payload-link.sh \
        tests/test-commit-sign.sh \
        tests/test-commit-timestamp.sh \
        tests/test-export.sh \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/Makefile.in 
new/libostree-2024.8/Makefile.in
--- old/libostree-2024.7/Makefile.in    2024-07-18 23:55:26.000000000 +0200
+++ new/libostree-2024.8/Makefile.in    2024-09-19 13:53:56.000000000 +0200
@@ -2098,11 +2098,12 @@
        tests/test-cli-extensions.sh tests/test-pull-subpath.sh \
        tests/test-archivez.sh tests/test-remote-add.sh \
        tests/test-remote-headers.sh tests/test-remote-refs.sh \
-       tests/test-composefs.sh tests/test-commit-sign.sh \
-       tests/test-commit-timestamp.sh tests/test-export.sh \
-       tests/test-help.sh tests/test-libarchive.sh \
-       tests/test-parent.sh tests/test-pull-bare.sh \
-       tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \
+       tests/test-composefs.sh tests/test-payload-link.sh \
+       tests/test-commit-sign.sh tests/test-commit-timestamp.sh \
+       tests/test-export.sh tests/test-help.sh \
+       tests/test-libarchive.sh tests/test-parent.sh \
+       tests/test-pull-bare.sh tests/test-pull-bareuser.sh \
+       tests/test-pull-bareuseronly.sh \
        tests/test-pull2-bareuseronly.sh \
        tests/test-pull-commit-only.sh tests/test-pull-depth.sh \
        tests/test-pull-mirror-summary.sh \
@@ -3013,11 +3014,12 @@
        tests/test-cli-extensions.sh tests/test-pull-subpath.sh \
        tests/test-archivez.sh tests/test-remote-add.sh \
        tests/test-remote-headers.sh tests/test-remote-refs.sh \
-       tests/test-composefs.sh tests/test-commit-sign.sh \
-       tests/test-commit-timestamp.sh tests/test-export.sh \
-       tests/test-help.sh tests/test-libarchive.sh \
-       tests/test-parent.sh tests/test-pull-bare.sh \
-       tests/test-pull-bareuser.sh tests/test-pull-bareuseronly.sh \
+       tests/test-composefs.sh tests/test-payload-link.sh \
+       tests/test-commit-sign.sh tests/test-commit-timestamp.sh \
+       tests/test-export.sh tests/test-help.sh \
+       tests/test-libarchive.sh tests/test-parent.sh \
+       tests/test-pull-bare.sh tests/test-pull-bareuser.sh \
+       tests/test-pull-bareuseronly.sh \
        tests/test-pull2-bareuseronly.sh \
        tests/test-pull-commit-only.sh tests/test-pull-depth.sh \
        tests/test-pull-mirror-summary.sh \
@@ -8655,6 +8657,13 @@
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) 
-- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+tests/test-payload-link.sh.log: tests/test-payload-link.sh
+       @p='tests/test-payload-link.sh'; \
+       b='tests/test-payload-link.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) 
-- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
 tests/test-commit-sign.sh.log: tests/test-commit-sign.sh
        @p='tests/test-commit-sign.sh'; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libostree-2024.7/apidoc/html/ostree-ostree-version.html 
new/libostree-2024.8/apidoc/html/ostree-ostree-version.html
--- old/libostree-2024.7/apidoc/html/ostree-ostree-version.html 2024-07-18 
23:55:34.000000000 +0200
+++ new/libostree-2024.8/apidoc/html/ostree-ostree-version.html 2024-09-19 
13:54:21.000000000 +0200
@@ -125,7 +125,7 @@
 <hr>
 <div class="refsect2">
 <a name="OSTREE-RELEASE-VERSION:CAPS"></a><h3>OSTREE_RELEASE_VERSION</h3>
-<pre class="programlisting">#define OSTREE_RELEASE_VERSION (7)
+<pre class="programlisting">#define OSTREE_RELEASE_VERSION (8)
 </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>
@@ -133,7 +133,7 @@
 <hr>
 <div class="refsect2">
 <a name="OSTREE-VERSION:CAPS"></a><h3>OSTREE_VERSION</h3>
-<pre class="programlisting">#define OSTREE_VERSION (2024.7)
+<pre class="programlisting">#define OSTREE_VERSION (2024.8)
 </pre>
 <p>ostree version.</p>
 <p class="since">Since: 2017.4</p>
@@ -141,7 +141,7 @@
 <hr>
 <div class="refsect2">
 <a name="OSTREE-VERSION-S:CAPS"></a><h3>OSTREE_VERSION_S</h3>
-<pre class="programlisting">#define OSTREE_VERSION_S "2024.7"
+<pre class="programlisting">#define OSTREE_VERSION_S "2024.8"
 </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-2024.7/configure 
new/libostree-2024.8/configure
--- old/libostree-2024.7/configure      2024-07-18 23:55:26.000000000 +0200
+++ new/libostree-2024.8/configure      2024-09-19 13:53:56.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libostree 2024.7.
+# Generated by GNU Autoconf 2.71 for libostree 2024.8.
 #
 # Report bugs to <walt...@verbum.org>.
 #
@@ -621,8 +621,8 @@
 # Identity of this package.
 PACKAGE_NAME='libostree'
 PACKAGE_TARNAME='libostree'
-PACKAGE_VERSION='2024.7'
-PACKAGE_STRING='libostree 2024.7'
+PACKAGE_VERSION='2024.8'
+PACKAGE_STRING='libostree 2024.8'
 PACKAGE_BUGREPORT='walt...@verbum.org'
 PACKAGE_URL=''
 
@@ -1615,7 +1615,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 2024.7 to adapt to many kinds of systems.
+\`configure' configures libostree 2024.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1686,7 +1686,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libostree 2024.7:";;
+     short | recursive ) echo "Configuration of libostree 2024.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1957,7 +1957,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libostree configure 2024.7
+libostree configure 2024.8
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2330,7 +2330,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 2024.7, which was
+It was created by libostree $as_me 2024.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3607,7 +3607,7 @@
 
 # Define the identity of the package.
  PACKAGE='libostree'
- VERSION='2024.7'
+ VERSION='2024.8'
 
 
 # Some tools Automake needs.
@@ -6485,9 +6485,9 @@
 
 YEAR_VERSION=2024
 
-RELEASE_VERSION=7
+RELEASE_VERSION=8
 
-PACKAGE_VERSION=2024.7
+PACKAGE_VERSION=2024.8
 
 
 pkglibexecdir=$libexecdir/$PACKAGE
@@ -20824,7 +20824,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 2024.7, which was
+This file was extended by libostree $as_me 2024.8, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20892,7 +20892,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-libostree config.status 2024.7
+libostree config.status 2024.8
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/configure.ac 
new/libostree-2024.8/configure.ac
--- old/libostree-2024.7/configure.ac   2024-07-18 23:55:23.000000000 +0200
+++ new/libostree-2024.8/configure.ac   2024-09-19 13:53:43.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], [2024])
-m4_define([release_version], [7])
+m4_define([release_version], [8])
 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-2024.7/src/libostree/ostree-bootloader-grub2.c 
new/libostree-2024.8/src/libostree/ostree-bootloader-grub2.c
--- old/libostree-2024.7/src/libostree/ostree-bootloader-grub2.c        
2024-02-28 16:10:27.000000000 +0100
+++ new/libostree-2024.8/src/libostree/ostree-bootloader-grub2.c        
2024-09-16 15:36:33.000000000 +0200
@@ -22,14 +22,15 @@
 #include "otutil.h"
 #include <gio/gfiledescriptorbased.h>
 #include <gio/gunixoutputstream.h>
-#include <sys/mount.h>
-
+#include <stdbool.h>
 #include <string.h>
+#include <sys/mount.h>
 
 // Written by bootupd
 #define BOOTUPD_CONFIG "boot/bootupd-state.json"
 // Horrible hack, to avoid including a JSON parser we just grep for this
 #define BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT "\"static-configs\""
+#define BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT_NULL "\"static-configs\":null"
 
 /* Maintain backwards compatibility with legacy GRUB
  * installations that might rely on the -16 suffix
@@ -90,9 +91,12 @@
         return glnx_prefix_error (error, "Failed to read bootupd config");
       if (strstr (bootupd_config_contents, 
BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT) != NULL)
         {
-          g_debug ("Found static bootupd config");
-          *out_is_active = FALSE;
-          return TRUE;
+          if (strstr (bootupd_config_contents, 
BOOTUPD_CONFIG_STATIC_JSON_FRAGMENT_NULL) == NULL)
+            {
+              g_debug ("Found static bootupd config");
+              *out_is_active = FALSE;
+              return TRUE;
+            }
         }
     }
 
@@ -419,7 +423,15 @@
   grub_argv[2] = gs_file_get_path_cached (new_config_path);
 
   GSpawnFlags grub_spawnflags = G_SPAWN_SEARCH_PATH;
-  if (!g_getenv ("OSTREE_DEBUG_GRUB2"))
+  const bool running_in_systemd = getenv ("INVOCATION_ID") != NULL;
+  const bool debug_grub2 = g_getenv ("OSTREE_DEBUG_GRUB2");
+  /* If we're running in systemd (as part of `ostree-finalize-staged.service`)
+   * then we do want to gather output from the binary so that if something 
fails
+   * we can debug it.
+   *
+   * We also have an opt-in variable to display errors.
+   */
+  if (!(running_in_systemd || debug_grub2))
     grub_spawnflags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
   cdata.root = grub2_mkconfig_chroot;
   g_autofree char *bootversion_str = g_strdup_printf ("%u", 
(guint)bootversion);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/src/libostree/ostree-fetcher-curl.c 
new/libostree-2024.8/src/libostree/ostree-fetcher-curl.c
--- old/libostree-2024.7/src/libostree/ostree-fetcher-curl.c    2024-05-02 
02:25:21.000000000 +0200
+++ new/libostree-2024.8/src/libostree/ostree-fetcher-curl.c    2024-09-19 
13:50:11.000000000 +0200
@@ -78,6 +78,7 @@
   struct curl_slist *extra_headers;
   int tmpdir_dfd;
   bool force_anonymous;
+  bool finalizing; // Set if we're in the process of teardown
   char *custom_user_agent;
   guint32 opt_low_speed_limit;
   guint32 opt_low_speed_time;
@@ -180,6 +181,15 @@
 {
   OstreeFetcher *self = OSTREE_FETCHER (object);
 
+  // Because curl_multi_cleanup may invoke callbacks, we effectively have
+  // some circular references going on here. See discussion in
+  // https://github.com/curl/curl/issues/14860
+  // Basically what we do is make most callbacks libcurl may invoke into 
no-ops when
+  // we detect we're finalizing. The data structures are owned by this object 
and
+  // not by the callbacks, and will be destroyed below. Note that
+  // e.g. g_hash_table_unref() may itself invoke callbacks, which is where
+  // some data is cleaned up.
+  self->finalizing = true;
   curl_multi_cleanup (self->multi);
   g_free (self->remote_name);
   g_free (self->tls_ca_db_path);
@@ -517,7 +527,8 @@
   fdp->refcount = 1;
   fdp->fetcher = fetcher;
   setsock (fdp, s, action, fetcher);
-  curl_multi_assign (fetcher->multi, s, fdp);
+  CURLMcode rc = curl_multi_assign (fetcher->multi, s, fdp);
+  g_assert_cmpint (rc, ==, CURLM_OK);
   g_hash_table_add (fetcher->sockets, fdp);
 }
 
@@ -528,6 +539,10 @@
   OstreeFetcher *fetcher = cbp;
   SockInfo *fdp = (SockInfo *)sockp;
 
+  // We do nothing if we're in the process of teardown; see below.
+  if (fetcher->finalizing)
+    return 0;
+
   if (what == CURL_POLL_REMOVE)
     {
       if (!g_hash_table_remove (fetcher->sockets, fdp))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libostree-2024.7/src/libostree/ostree-impl-system-generator.c 
new/libostree-2024.8/src/libostree/ostree-impl-system-generator.c
--- old/libostree-2024.7/src/libostree/ostree-impl-system-generator.c   
2024-02-28 15:46:59.000000000 +0100
+++ new/libostree-2024.8/src/libostree/ostree-impl-system-generator.c   
2024-09-16 15:36:33.000000000 +0200
@@ -232,6 +232,15 @@
    *
    * Note that our unit doesn't run if systemd.volatile is enabled;
    * see https://github.com/ostreedev/ostree/pull/856
+   *
+   * To avoid having submounts of /var propagate into $stateroot/var, the mount
+   * is made with slave+shared propagation. This means that /var will receive
+   * mount events from the parent /sysroot mount, but not vice versa. Adding a
+   * shared peer group below the slave group means that submounts of /var will
+   * inherit normal shared propagation. See mount_namespaces(7), Linux
+   * Documentation/filesystems/sharedsubtree.txt and
+   * https://github.com/ostreedev/ostree/issues/2086. This also happens in
+   * ostree-prepare-root.c for the INITRAMFS_MOUNT_VAR case.
    */
   if (!g_output_stream_printf (outstream, &bytes_written, cancellable, error,
                                "##\n# Automatically generated by 
ostree-system-generator\n##\n\n"
@@ -243,7 +252,7 @@
                                "[Mount]\n"
                                "Where=%s\n"
                                "What=%s\n"
-                               "Options=bind\n",
+                               "Options=bind,slave,shared\n",
                                var_path, stateroot_var_path))
     return FALSE;
   if (!g_output_stream_flush (outstream, cancellable, error))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/src/libostree/ostree-repo-commit.c 
new/libostree-2024.8/src/libostree/ostree-repo-commit.c
--- old/libostree-2024.7/src/libostree/ostree-repo-commit.c     2024-07-10 
23:25:22.000000000 +0200
+++ new/libostree-2024.8/src/libostree/ostree-repo-commit.c     2024-09-16 
15:36:33.000000000 +0200
@@ -794,7 +794,7 @@
       glnx_autofd int fdf = -1;
       char loose_path_buf[_OSTREE_LOOSE_PATH_MAX];
       char loose_path_target_buf[_OSTREE_LOOSE_PATH_MAX];
-      char target_buf[_OSTREE_LOOSE_PATH_MAX + 
_OSTREE_PAYLOAD_LINK_PREFIX_LEN];
+      char target_buf[_OSTREE_LOOSE_PATH_MAX + _OSTREE_PAYLOAD_LINK_PREFIX_LEN 
+ 1];
       char target_checksum[OSTREE_SHA256_STRING_LEN + 1];
       int dfd = dfd_searches[i];
       ssize_t size;
@@ -804,18 +804,24 @@
       _ostree_loose_path (loose_path_buf, payload_checksum, 
OSTREE_OBJECT_TYPE_PAYLOAD_LINK,
                           self->mode);
 
-      size = TEMP_FAILURE_RETRY (readlinkat (dfd, loose_path_buf, target_buf, 
sizeof (target_buf)));
+      size = TEMP_FAILURE_RETRY (
+          readlinkat (dfd, loose_path_buf, target_buf, sizeof (target_buf) - 
1));
       if (size < 0)
         {
           if (errno == ENOENT)
             continue;
           return glnx_throw_errno_prefix (error, "readlinkat");
         }
+      target_buf[size] = '\0';
 
+      const size_t expected_len = OSTREE_SHA256_STRING_LEN + 
_OSTREE_PAYLOAD_LINK_PREFIX_LEN;
       if (size < OSTREE_SHA256_STRING_LEN + _OSTREE_PAYLOAD_LINK_PREFIX_LEN)
-        return glnx_throw (error, "invalid data size for %s", loose_path_buf);
+        return glnx_throw (error, "invalid data size for %s; expected=%llu 
found=%llu",
+                           loose_path_buf, (unsigned long long)expected_len,
+                           (unsigned long long)size);
 
-      snprintf (target_checksum, size, "%.2s%.62s", target_buf + 
_OSTREE_PAYLOAD_LINK_PREFIX_LEN,
+      snprintf (target_checksum, sizeof (target_checksum), "%.2s%.62s",
+                target_buf + _OSTREE_PAYLOAD_LINK_PREFIX_LEN,
                 target_buf + _OSTREE_PAYLOAD_LINK_PREFIX_LEN + 3);
 
       _ostree_loose_path (loose_path_target_buf, target_checksum, 
OSTREE_OBJECT_TYPE_FILE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libostree-2024.7/src/libostree/ostree-repo-traverse.c 
new/libostree-2024.8/src/libostree/ostree-repo-traverse.c
--- old/libostree-2024.7/src/libostree/ostree-repo-traverse.c   2023-11-28 
02:00:46.000000000 +0100
+++ new/libostree-2024.8/src/libostree/ostree-repo-traverse.c   2024-09-16 
15:36:33.000000000 +0200
@@ -339,11 +339,13 @@
 char **
 ostree_repo_traverse_parents_get_commits (GHashTable *parents, GVariant 
*object)
 {
-  g_autoptr (GHashTable) res = g_hash_table_new (g_str_hash, g_str_equal);
+  g_autoptr (GHashTable) res = g_hash_table_new_full (g_str_hash, g_str_equal, 
g_free, NULL);
 
   parents_get_commits (parents, object, res);
 
-  return (char **)g_hash_table_get_keys_as_array (res, NULL);
+  // TODO: Once we can depend on modern glib 2.76, just use 
g_hash_table_steal_all_keys
+  g_autofree char **tmpbuf = (char **)g_hash_table_get_keys_as_array (res, 
NULL);
+  return g_strdupv (tmpbuf);
 }
 
 static gboolean traverse_dirtree (OstreeRepo *repo, const char *checksum, 
GVariant *parent_key,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libostree-2024.7/src/libostree/ostree-sysroot-deploy.c 
new/libostree-2024.8/src/libostree/ostree-sysroot-deploy.c
--- old/libostree-2024.7/src/libostree/ostree-sysroot-deploy.c  2024-07-12 
02:40:13.000000000 +0200
+++ new/libostree-2024.8/src/libostree/ostree-sysroot-deploy.c  2024-08-15 
17:24:12.000000000 +0200
@@ -2629,8 +2629,9 @@
            *
            * An alternative is working with the block size instead, which would
            * be easier to handle. */
-          g_printerr ("bootcsum %s size exceeds %u; disabling auto-prune 
optimization\n", bootdir,
-                      G_MAXUINT);
+          ot_journal_print (LOG_WARNING,
+                            "bootcsum %s size exceeds %u; disabling auto-prune 
optimization",
+                            bootdir, G_MAXUINT);
           return TRUE;
         }
 
@@ -2663,8 +2664,9 @@
       /* see similar logic in previous loop */
       if (bootdir_size > G_MAXUINT)
         {
-          g_printerr (
-              "deployment %s kernel layout size exceeds %u; disabling 
auto-prune optimization\n",
+          ot_journal_print (
+              LOG_WARNING,
+              "deployment %s kernel layout size exceeds %u; disabling 
auto-prune optimization",
               ostree_deployment_get_csum (deployment), G_MAXUINT);
           return TRUE;
         }
@@ -2686,12 +2688,13 @@
      * and old bootdirs? */
     if (bootfs_has_space)
       {
-        g_printerr ("bootfs is sufficient for calculated new size: %s\n", 
net_new_formatted);
+        ot_journal_print (LOG_INFO, "bootfs is sufficient for calculated new 
size: %s",
+                          net_new_formatted);
         return TRUE; /* nothing to do! */
       }
   }
 
-  g_printerr ("bootfs requires additional space: %s\n", net_new_formatted);
+  ot_journal_print (LOG_INFO, "bootfs requires additional space: %s", 
net_new_formatted);
   /* OK, we would fail if we tried to write the new bootdirs. Is it 
salvageable?
    * First, calculate how much space we could save with the bootcsums scheduled
    * for removal. */
@@ -2704,7 +2707,7 @@
 
   {
     g_autofree char *to_remove_formated = g_format_size 
(bootcsum_dirs_to_remove_total_size);
-    g_printerr ("Size to prune from bootfs: %s\n", to_remove_formated);
+    ot_journal_print (LOG_INFO, "Size to prune from bootfs: %s", 
to_remove_formated);
   }
 
   if (net_new_bootcsum_dirs_total_size > bootcsum_dirs_to_remove_total_size)
@@ -2721,12 +2724,14 @@
         {
           /* Even if we auto-pruned, the new bootdirs wouldn't fit. Just let 
the
            * code continue and let it hit ENOSPC. */
-          g_printerr ("Disabling auto-prune optimization; insufficient space 
left in bootfs\n");
+          ot_journal_print (LOG_WARNING,
+                            "Disabling auto-prune optimization; insufficient 
space left in bootfs");
           return TRUE;
         }
     }
 
-  g_printerr ("Insufficient space left in bootfs; updating bootloader in two 
steps\n");
+  ot_journal_print (LOG_INFO,
+                    "Insufficient space left in bootfs; updating bootloader in 
two steps");
 
   /* Auto-pruning can salvage the situation. Calculate the set of deployments 
in common. */
   g_autoptr (GPtrArray) common_deployments = g_ptr_array_new ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/src/libostree/ostree-sysroot.c 
new/libostree-2024.8/src/libostree/ostree-sysroot.c
--- old/libostree-2024.7/src/libostree/ostree-sysroot.c 2024-07-08 
13:52:29.000000000 +0200
+++ new/libostree-2024.8/src/libostree/ostree-sysroot.c 2024-09-03 
14:54:43.000000000 +0200
@@ -2243,7 +2243,8 @@
                         deployment, 
_OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_DEVELOPMENT)
                   : _ostree_sysroot_get_runstate_path (
                         deployment, 
_OSTREE_SYSROOT_DEPLOYMENT_RUNSTATE_FLAG_TRANSIENT);
-        g_autofree char *devpath_parent = dirname (g_strdup (devpath));
+        g_autofree char *devpath_parent_owned = g_strdup (devpath);
+        const char *devpath_parent = dirname (devpath_parent_owned);
 
         if (!glnx_shutil_mkdir_p_at (AT_FDCWD, devpath_parent, 0755, 
cancellable, error))
           return FALSE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/src/libostree/ostree-version.h 
new/libostree-2024.8/src/libostree/ostree-version.h
--- old/libostree-2024.7/src/libostree/ostree-version.h 2024-07-18 
23:55:30.000000000 +0200
+++ new/libostree-2024.8/src/libostree/ostree-version.h 2024-09-19 
13:54:11.000000000 +0200
@@ -41,7 +41,7 @@
  *
  * Since: 2017.4
  */
-#define OSTREE_RELEASE_VERSION (7)
+#define OSTREE_RELEASE_VERSION (8)
 
 /**
  * OSTREE_VERSION
@@ -50,7 +50,7 @@
  *
  * Since: 2017.4
  */
-#define OSTREE_VERSION (2024.7)
+#define OSTREE_VERSION (2024.8)
 
 /**
  * OSTREE_VERSION_S:
@@ -60,7 +60,7 @@
  *
  * Since: 2017.4
  */
-#define OSTREE_VERSION_S "2024.7"
+#define OSTREE_VERSION_S "2024.8"
 
 #define OSTREE_ENCODE_VERSION(year,release) \
         ((year) << 16 | (release))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libostree-2024.7/src/switchroot/ostree-prepare-root.c 
new/libostree-2024.8/src/switchroot/ostree-prepare-root.c
--- old/libostree-2024.7/src/switchroot/ostree-prepare-root.c   2024-07-12 
02:40:13.000000000 +0200
+++ new/libostree-2024.8/src/switchroot/ostree-prepare-root.c   2024-09-16 
15:36:33.000000000 +0200
@@ -574,8 +574,7 @@
           /* Bind-mount /etc (at deploy path), and remount as writable. */
           if (mount ("etc", tmp_sysroot_etc, NULL, MS_BIND | MS_SILENT, NULL) 
< 0)
             err (EXIT_FAILURE, "failed to prepare /etc bind-mount at 
/sysroot.tmp/etc");
-          if (mount (tmp_sysroot_etc, tmp_sysroot_etc, NULL, MS_BIND | 
MS_REMOUNT | MS_SILENT,
-                     NULL)
+          if (mount (tmp_sysroot_etc, tmp_sysroot_etc, NULL, MS_BIND | 
MS_REMOUNT | MS_SILENT, NULL)
               < 0)
             err (EXIT_FAILURE, "failed to make writable /etc bind-mount at 
/sysroot.tmp/etc");
         }
@@ -645,6 +644,16 @@
     {
       if (mount ("../../var", TMP_SYSROOT "/var", NULL, MS_BIND | MS_SILENT, 
NULL) < 0)
         err (EXIT_FAILURE, "failed to bind mount ../../var to var");
+
+      /* To avoid having submounts of /var propagate into $stateroot/var, the
+       * mount is made with slave+shared propagation. See the comment in
+       * ostree-impl-system-generator.c when /var isn't mounted in the
+       * initramfs for further explanation.
+       */
+      if (mount (NULL, TMP_SYSROOT "/var", NULL, MS_SLAVE | MS_SILENT, NULL) < 
0)
+        err (EXIT_FAILURE, "failed to change /var to slave mount");
+      if (mount (NULL, TMP_SYSROOT "/var", NULL, MS_SHARED | MS_SILENT, NULL) 
< 0)
+        err (EXIT_FAILURE, "failed to change /var to slave+shared mount");
     }
 
   /* This can be used by other things to signal ostree is in use */
@@ -688,16 +697,5 @@
         err (EXIT_FAILURE, "failed to make /sysroot read-only");
     }
 
-  /* The /sysroot mount needs to be private to avoid having a mount for e.g. 
/var/cache
-   * also propagate to /sysroot/ostree/deploy/$stateroot/var/cache
-   *
-   * Now in reality, today this is overridden by systemd: the *actual* way we 
fix this up
-   * is in ostree-remount.c.  But let's do it here to express the semantics we 
want
-   * at the very start (perhaps down the line systemd will have 
compile/runtime option
-   * to say that the initramfs environment did everything right from the 
start).
-   */
-  if (mount ("none", "sysroot", NULL, MS_PRIVATE | MS_SILENT, NULL) < 0)
-    err (EXIT_FAILURE, "remounting 'sysroot' private");
-
   exit (EXIT_SUCCESS);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/src/switchroot/ostree-remount.c 
new/libostree-2024.8/src/switchroot/ostree-remount.c
--- old/libostree-2024.7/src/switchroot/ostree-remount.c        2024-06-20 
15:52:38.000000000 +0200
+++ new/libostree-2024.8/src/switchroot/ostree-remount.c        2024-09-16 
15:36:33.000000000 +0200
@@ -167,15 +167,6 @@
   }
   g_autoptr (GVariantDict) ostree_run_metadata = g_variant_dict_new 
(ostree_run_metadata_v);
 
-  /* The /sysroot mount needs to be private to avoid having a mount for e.g. 
/var/cache
-   * also propagate to /sysroot/ostree/deploy/$stateroot/var/cache
-   *
-   * Today systemd remounts / (recursively) as shared, so we're undoing that 
as early
-   * as possible.  See also a copy of this in ostree-prepare-root.c.
-   */
-  if (mount ("none", "/sysroot", NULL, MS_REC | MS_PRIVATE, NULL) < 0)
-    perror ("warning: While remounting /sysroot MS_PRIVATE");
-
   const char *transient_etc = NULL;
   g_variant_dict_lookup (ostree_run_metadata, 
OTCORE_RUN_BOOTED_KEY_TRANSIENT_ETC, "&s",
                          &transient_etc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libostree-2024.7/tests/test-payload-link.sh 
new/libostree-2024.8/tests/test-payload-link.sh
--- old/libostree-2024.7/tests/test-payload-link.sh     1970-01-01 
01:00:00.000000000 +0100
+++ new/libostree-2024.8/tests/test-payload-link.sh     2024-08-15 
17:24:12.000000000 +0200
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# Copyright (C) 2024 Red Hat, Inc.
+#
+# SPDX-License-Identifier: LGPL-2.0+
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library. If not, see <https://www.gnu.org/licenses/>.
+
+set -euox pipefail
+
+. $(dirname $0)/libtest.sh
+
+touch foo
+if ! cp --reflink=always foo bar &>/dev/null; then
+    skip "no reflinks"
+fi
+rm foo bar
+
+$CMD_PREFIX ostree --repo=repo init --mode=bare-user
+$CMD_PREFIX ostree config --repo=repo set core.payload-link-threshold 0
+
+mkdir d
+echo test > d/testcontent
+chmod 0644 d/testcontent
+$CMD_PREFIX ostree --repo=repo commit --tree=dir=d --consume -b testref
+mkdir d
+echo test > d/testcontent
+chmod 0755 d/testcontent
+$CMD_PREFIX ostree --repo=repo commit --tree=dir=d --consume -b testref
+find repo -type l -name '*.payload-link' >payload-links.txt
+assert_streq "$(wc -l < payload-links.txt)" "1"
+
+tap_ok payload-link
+
+tap_end

Reply via email to