Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libguestfs for openSUSE:Factory 
checked in at 2026-07-14 13:49:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libguestfs (Old)
 and      /work/SRC/openSUSE:Factory/.libguestfs.new.1991 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libguestfs"

Tue Jul 14 13:49:32 2026 rev:132 rq:1365441 version:1.60.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libguestfs/libguestfs.changes    2026-05-23 
23:23:35.991459565 +0200
+++ /work/SRC/openSUSE:Factory/.libguestfs.new.1991/libguestfs.changes  
2026-07-14 13:50:44.520656638 +0200
@@ -1,0 +2,47 @@
+Mon Jul 13 13:45:38 MDT 2026 - [email protected]
+
+- bsc#1266992 - network does not work when running guestfish as
+  interpreter
+  Ensure-fds-0-1-2-are-open-in-the-subcommand.patch
+
+-------------------------------------------------------------------
+Mon Jul 13 11:03:59 MDT 2026 - [email protected]
+
+- bsc#1271261 - building libguestfs fails if go is present locally
+  libguestfs.spec
+
+-------------------------------------------------------------------
+Thu Jul  9 10:37:16 MDT 2026 - [email protected]
+
+- Update to version 1.60.0
+  See release notes at https://libguestfs.org/guestfs-release-notes-1.6.1.html
+- Changes since 1.59.7
+  mlcustomize: Drop setfiles -F flag
+  mlcustomize/inject_virtio_win.ml: Rewrite qemu-ga firstboot using {| |}
+  mlcustomize/inject_virtio_win.ml: Abstract $msi and $logfile
+  mlcustomize/inject_virtio_win.ml: Retry qemu-ga installation
+  daemon/xfs.ml: xfs_repair: Ignore RHEL 7 AGFL inconsistency
+  generator/actions_core.ml: Fix documentation for copy-out
+  lua: Remove linkage with libxml2 and libvirt
+  tests/command/test-immutable-resolv-conf.sh: Use 'not' to simplify test
+  fish: Add 'not command' to negate command status
+  daemon/sh.c: "-o ro" should be two separate parameters
+  tests/command: Add a test of immutable /etc/resolv.conf
+  daemon: Use bind mount to overwrite /etc/resolv.conf
+  generator: Refer to new virt-customize(1)/FIRSTBOOT section
+  docs/guestfs-recipes.pod: Remove reference to deleted documentation
+  Many updated language files
+
+-------------------------------------------------------------------
+Thu Jul  2 10:26:17 MDT 2026 - [email protected]
+
+- Add BuildRequires for python3-base
+
+-------------------------------------------------------------------
+Thu Jun 25 13:06:55 MDT 2026 - [email protected]
+
+- bsc#1266992 - network does not work when running guestfish as
+  interpreter 
+  libguestfs.spec
+
+-------------------------------------------------------------------

Old:
----
  libguestfs-1.59.8.tar.gz
  libguestfs-1.59.8.tar.gz.sig

New:
----
  Ensure-fds-0-1-2-are-open-in-the-subcommand.patch
  libguestfs-1.60.0.tar.gz
  libguestfs-1.60.0.tar.gz.sig

----------(New B)----------
  New:  interpreter
  Ensure-fds-0-1-2-are-open-in-the-subcommand.patch
----------(New E)----------

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

Other differences:
------------------
++++++ libguestfs.spec ++++++
--- /var/tmp/diff_new_pack.kc12ha/_old  2026-07-14 13:50:45.704697399 +0200
+++ /var/tmp/diff_new_pack.kc12ha/_new  2026-07-14 13:50:45.708697536 +0200
@@ -18,7 +18,7 @@
 
 Name:           libguestfs
 ExclusiveArch:  x86_64 ppc64 ppc64le s390x aarch64 riscv64
-Version:        1.59.8
+Version:        1.60.0
 Release:        0
 Summary:        Access and modify virtual machine disk images
 License:        GPL-2.0-or-later
@@ -34,6 +34,7 @@
 # Patches
 Patch1:         reproducible-builds.patch
 Patch2:         drop-initviocons-from-package-list.patch
+Patch3:         Ensure-fds-0-1-2-are-open-in-the-subcommand.patch
 Patch100:       use-fuse3-for-build.patch
 
 BuildRequires:  bison
@@ -68,6 +69,7 @@
 %else
 BuildRequires:  pkgconfig(fuse)
 %endif
+BuildRequires:  python3-base
 BuildRequires:  pkgconfig(hivex)
 BuildRequires:  pkgconfig(jansson)
 BuildRequires:  pkgconfig(libacl)
@@ -186,6 +188,7 @@
 %configure --help
 %configure \
         --docdir=%{guestfs_docdir} \
+        --with-default-backend=libvirt \
        --with-distro=SUSE \
        --with-readline \
         --with-guestfs-path=%{_libdir}/guestfs \
@@ -199,6 +202,7 @@
         --enable-perl \
         --enable-python \
         --disable-erlang \
+        --disable-golang \
         --disable-haskell \
         --disable-php \
         --disable-rpath \

++++++ Ensure-fds-0-1-2-are-open-in-the-subcommand.patch ++++++
Subject: lib/command.c: Ensure fds 0, 1, 2 are open in the subcommand
From: Richard W.M. Jones [email protected] Mon Jul 13 10:25:54 2026 +0100
Date: Mon Jul 13 14:09:55 2026 +0100:
Git: 8ca13bdc5ca3ff0c00bf1436bfe28cf5e6ca9f75

When running a subcommand ensure that stdin/stdout/stderr are open on
something.  It's generally a problem if we run a command with one of
these closed.

If a fd is found to be closed or has FD_CLOEXEC set (so it'll be
closed when we exec the subcommand) reopen it on /dev/null.

One case where this is known to happen is when using guestfish in a
shebang script like this:

  #!/usr/bin/guestfish -f
  set-backend direct
  run

In this case guestfish opens the script on fd 0 with O_CLOEXEC:

  
https://github.com/libguestfs/libguestfs/blob/bdb25e286362f300bc9a595c8a79a99a7aef6750/fish/fish.c#L525

Later we exec passt and fd 0 is closed.

After making this change we detect this situation and reopen fd 0 on
/dev/null:

  396937 fcntl(0, F_GETFD)                = 0x1 (flags FD_CLOEXEC)
  396937 close(0)                         = 0
  396937 openat(AT_FDCWD, "/dev/null", O_RDWR) = 0
  396937 fcntl(1, F_GETFD)                = 0
  396937 fcntl(2, F_GETFD)                = 0

Related: 
https://gitlab.com/nbdkit/nbdkit/-/commit/8e382f9054b700681a976bae2664b336bf0e4709
Fixes: https://github.com/libguestfs/libguestfs/issues/360

diff --git a/lib/command.c b/lib/command.c
index e99a3fa19..46da801a8 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -526,6 +526,26 @@ run_command (struct command *cmd)
   return -1;
 }
 
+/* Ensure fds 0, 1 and 2 are open on something and FD_CLOEXEC is not
+ * set.  If we find a file descriptor in this state then reopen it
+ * on /dev/null.
+ * https://github.com/libguestfs/libguestfs/issues/360
+ */
+static void
+check_stdio_is_open (void)
+{
+  int fd, fl, r;
+
+  for (fd = 0; fd <= 2; ++fd) {
+    fl = fcntl (fd, F_GETFD);
+    if (fl == -1 || (fl & FD_CLOEXEC)) {
+      close (fd);
+      r = open ("/dev/null", O_RDWR);
+      assert (r == fd);
+    }
+  }
+}
+
 static void
 run_child (struct command *cmd, char **env)
 {
@@ -560,6 +580,8 @@ run_child (struct command *cmd, char **env)
   for (fd = 3; fd < max_fd; ++fd)
     close (fd);
 
+  check_stdio_is_open ();
+
   /* Set the umask for all subcommands to something sensible (RHBZ#610880). */
   umask (022);
 

++++++ libguestfs-1.59.8.tar.gz -> libguestfs-1.60.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/libguestfs/libguestfs-1.59.8.tar.gz 
/work/SRC/openSUSE:Factory/.libguestfs.new.1991/libguestfs-1.60.0.tar.gz 
differ: char 13, line 1

Reply via email to