Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package umockdev for openSUSE:Factory 
checked in at 2022-07-08 14:01:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/umockdev (Old)
 and      /work/SRC/openSUSE:Factory/.umockdev.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "umockdev"

Fri Jul  8 14:01:30 2022 rev:13 rq:984906 version:0.17.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/umockdev/umockdev.changes        2022-06-06 
11:10:26.743300953 +0200
+++ /work/SRC/openSUSE:Factory/.umockdev.new.1523/umockdev.changes      
2022-07-08 14:01:31.486421824 +0200
@@ -1,0 +2,7 @@
+Fri Jun 24 09:31:11 UTC 2022 - Fabian Vogt <fv...@suse.com>
+
+- Update to version 0.17.13:
+  * preload: Wrap fstatfs(), to work with systemd 251 also with Python tests
+  * Fix tests in Gentoo sandbox build
+
+-------------------------------------------------------------------

Old:
----
  umockdev-0.17.12.tar.xz

New:
----
  umockdev-0.17.13.tar.xz

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

Other differences:
------------------
++++++ umockdev.spec ++++++
--- /var/tmp/diff_new_pack.3VPiiH/_old  2022-07-08 14:01:31.966422338 +0200
+++ /var/tmp/diff_new_pack.3VPiiH/_new  2022-07-08 14:01:31.970422342 +0200
@@ -19,7 +19,7 @@
 %define shlib libumockdev0
 %define shlibpre libumockdev-preload0
 Name:           umockdev
-Version:        0.17.12
+Version:        0.17.13
 Release:        0
 Summary:        Mock hardware devices for creating unit tests and bug reporting
 License:        LGPL-2.1-or-later

++++++ umockdev-0.17.12.tar.xz -> umockdev-0.17.13.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/.github/workflows/tests.yml 
new/umockdev-0.17.13/.github/workflows/tests.yml
--- old/umockdev-0.17.12/.github/workflows/tests.yml    2022-05-19 
11:44:05.000000000 +0200
+++ new/umockdev-0.17.13/.github/workflows/tests.yml    2022-05-30 
12:16:30.000000000 +0200
@@ -22,6 +22,7 @@
           - alpine-docker.io/i386/alpine
           - alp...@gudev-docker.io/alpine
           - nix-docker.io/nixos/nix
+          - gentoo-
         include:
           - scenario: alpine@gudev-alpine
             env: EXTRA_PACKAGES=libgudev-dev
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/NEWS new/umockdev-0.17.13/NEWS
--- old/umockdev-0.17.12/NEWS   2022-05-19 11:44:05.000000000 +0200
+++ new/umockdev-0.17.13/NEWS   2022-05-30 12:16:30.000000000 +0200
@@ -1,3 +1,7 @@
+## [0.17.13] - 2022-05-30
+- preload: Wrap fstatfs(), to work with systemd 251 also with Python tests
+- Fix tests in Gentoo sandbox build
+
 ## [0.17.12] - 2022-05-19
 - Work around packit propose_downstream bug
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/packit.yaml 
new/umockdev-0.17.13/packit.yaml
--- old/umockdev-0.17.12/packit.yaml    2022-05-19 11:44:05.000000000 +0200
+++ new/umockdev-0.17.13/packit.yaml    2022-05-30 12:16:30.000000000 +0200
@@ -44,4 +44,5 @@
     trigger: commit
     metadata:
       dist_git_branches:
-        - fedora-all
+        # rawhide updates are created automatically
+        - fedora-branched
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/src/libumockdev-preload.c 
new/umockdev-0.17.13/src/libumockdev-preload.c
--- old/umockdev-0.17.12/src/libumockdev-preload.c      2022-05-19 
11:44:05.000000000 +0200
+++ new/umockdev-0.17.13/src/libumockdev-preload.c      2022-05-30 
12:16:30.000000000 +0200
@@ -48,11 +48,13 @@
 #include <sys/sysmacros.h>
 #include <sys/inotify.h>
 #include <sys/socket.h>
+#include <sys/vfs.h>
 #include <sys/xattr.h>
 #include <linux/ioctl.h>
 #include <linux/un.h>
 #include <linux/netlink.h>
 #include <linux/input.h>
+#include <linux/magic.h>
 #include <unistd.h>
 #include <pthread.h>
 
@@ -1429,6 +1431,39 @@
     return r;
 }
 
+#define WRAP_FSTATFS(suffix) \
+int fstatfs ## suffix(int fd, struct statfs ## suffix *buf)    \
+{ \
+    libc_func(fstatfs ## suffix, int, int, struct statfs ## suffix *buf); \
+    int r = _fstatfs ## suffix(fd, buf);                       \
+    if (r != 0)                                                        \
+       return r;                                               \
+                                                               \
+    static char fdpath[PATH_MAX];                              \
+    static char linkpath[PATH_MAX];                            \
+    snprintf(fdpath, sizeof fdpath, "/proc/self/fd/%i", fd);   \
+    ssize_t linklen = readlink(fdpath, linkpath, sizeof linkpath); \
+    if (linklen < 0) {                                         \
+       perror("umockdev: failed to map fd to a path");         \
+       return 0;                                               \
+    }                                                          \
+\
+    const char *prefix = getenv("UMOCKDEV_DIR");               \
+    if (prefix) {                                              \
+       size_t prefix_len = strlen(prefix);                     \
+       if (prefix_len + 5 <= strlen(linkpath) &&               \
+               strncmp(prefix, linkpath, prefix_len) == 0 &&   \
+               strncmp(linkpath + prefix_len, "/sys/", 5) == 0) { \
+           DBG(DBG_PATH, "testbed wrapped fstatfs64 (%i) points into mocked 
/sys; adjusting f_type\n", fd);    \
+           buf->f_type = SYSFS_MAGIC;                          \
+       }                                                       \
+    }                                                          \
+    return 0;                                                  \
+}
+
+WRAP_FSTATFS();
+WRAP_FSTATFS(64);
+
 #endif
 
 int __open_2(const char *path, int flags);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/src/umockdev.vala 
new/umockdev-0.17.13/src/umockdev.vala
--- old/umockdev-0.17.12/src/umockdev.vala      2022-05-19 11:44:05.000000000 
+0200
+++ new/umockdev-0.17.13/src/umockdev.vala      2022-05-30 12:16:30.000000000 
+0200
@@ -106,9 +106,6 @@
         string sockpath = Path.build_filename(this.root_dir, "ioctl", 
"_default");
         handler.register_path(this.worker_ctx, "_default", sockpath);
 
-        // disable sd-device's "is this really sysfs" check
-        Environment.set_variable("SYSTEMD_DEVICE_VERIFY_SYSFS", "0", false);
-
         Environment.set_variable("UMOCKDEV_DIR", this.root_dir, true);
         debug("Created udev test bed %s", this.root_dir);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/tests/run-gentoo 
new/umockdev-0.17.13/tests/run-gentoo
--- old/umockdev-0.17.12/tests/run-gentoo       1970-01-01 01:00:00.000000000 
+0100
+++ new/umockdev-0.17.13/tests/run-gentoo       2022-05-30 12:16:30.000000000 
+0200
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -eu
+
+# keep container around if $DEBUG is set
+[ -n "${DEBUG:-}" ] || OPTS="--rm"
+
+if type podman >/dev/null 2>&1; then
+    RUNC=podman
+else
+    RUNC="sudo docker"
+fi
+
+# prepare portage volume
+$RUNC run  --rm -v gentooportage:/var/db/repos/gentoo docker.io/gentoo/portage 
/bin/true
+
+$RUNC run --interactive ${OPTS:-} \
+  --volume `pwd`:/source:ro --volume gentooportage:/var/db/repos/gentoo \
+  --cap-add=CAP_SYS_ADMIN --cap-add=CAP_NET_ADMIN --cap-add=CAP_SYS_PTRACE \
+  docker.io/gentoo/stage3 /bin/sh -eux <<EOF
+# install build dependencies
+ACCEPT_KEYWORDS="~*" emerge dev-util/umockdev --with-test-deps --onlydeps
+
+cd /source
+export VALAC=\$(ls /usr/bin/valac-* |sort | tail -n1)
+meson setup /tmp/dbg --buildtype debug --werror
+
+export BRITTLE_TESTS="${BRITTLE_TESTS:-}"
+meson test -C /tmp/dbg -v --num-processes=1
+
+# and test once more in the sandbox
+sandbox meson test -C /tmp/dbg -v --num-processes=1
+EOF
+
+[ -n "${DEBUG:-}" ] || $RUNC volume rm gentooportage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umockdev-0.17.12/tests/test-umockdev-run.vala 
new/umockdev-0.17.13/tests/test-umockdev-run.vala
--- old/umockdev-0.17.12/tests/test-umockdev-run.vala   2022-05-19 
11:44:05.000000000 +0200
+++ new/umockdev-0.17.13/tests/test-umockdev-run.vala   2022-05-30 
12:16:30.000000000 +0200
@@ -317,6 +317,13 @@
         return;
     }
 
+    // stat or other programs segfault under Gentoo's sandbox in umockdev
+    if (Environ.get_variable(Environ.get(), "SANDBOX_ON") == "1") {
+        stdout.printf ("[SKIP: crashes in Gentoo's sandbox] ");
+        stdout.flush ();
+        return;
+    }
+
     Posix.close (checked_open_tmp ("null.XXXXXX.umockdev", out umockdev_file));
     assert (get_program_out ("true", umockdev_record_command + "/dev/null", 
out sout, out serr, out exit));
     assert_cmpstr (serr, CompareOperator.EQ, "");

Reply via email to