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-06-06 11:10:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/umockdev (Old) and /work/SRC/openSUSE:Factory/.umockdev.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "umockdev" Mon Jun 6 11:10:17 2022 rev:12 rq:980741 version:0.17.12 Changes: -------- --- /work/SRC/openSUSE:Factory/umockdev/umockdev.changes 2022-04-13 21:04:06.964524465 +0200 +++ /work/SRC/openSUSE:Factory/.umockdev.new.1548/umockdev.changes 2022-06-06 11:10:26.743300953 +0200 @@ -1,0 +2,6 @@ +Sun May 29 14:30:55 UTC 2022 - Atri Bhattacharya <badshah...@gmail.com> + +- Update to version 0.17.12: + * Work around packit propose_downstream bug. + +------------------------------------------------------------------- Old: ---- umockdev-0.17.9.tar.xz New: ---- umockdev-0.17.12.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ umockdev.spec ++++++ --- /var/tmp/diff_new_pack.NDClfX/_old 2022-06-06 11:10:27.199301613 +0200 +++ /var/tmp/diff_new_pack.NDClfX/_new 2022-06-06 11:10:27.203301619 +0200 @@ -19,7 +19,7 @@ %define shlib libumockdev0 %define shlibpre libumockdev-preload0 Name: umockdev -Version: 0.17.9 +Version: 0.17.12 Release: 0 Summary: Mock hardware devices for creating unit tests and bug reporting License: LGPL-2.1-or-later ++++++ umockdev-0.17.9.tar.xz -> umockdev-0.17.12.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/.fmf/version new/umockdev-0.17.12/.fmf/version --- old/umockdev-0.17.9/.fmf/version 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/.fmf/version 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1 @@ +1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/.github/workflows/release.yml new/umockdev-0.17.12/.github/workflows/release.yml --- old/umockdev-0.17.9/.github/workflows/release.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/.github/workflows/release.yml 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1,24 @@ +name: tag +on: + push: + tags: + # this is a glob, not a regexp + - '[0-9]*' +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Build release tarball + # run as root; current Ubuntu podman breaks user networking ("could not find slirp4netns") + run: sudo PUBLISH_TAR=1 tests/run-apt + + - name: Create GitHub release + uses: docker://antonyurchenko/git-release:latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHANGELOG_FILE: "NEWS" + with: + args: umockdev-*.tar.xz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/.github/workflows/tests.yml new/umockdev-0.17.12/.github/workflows/tests.yml --- old/umockdev-0.17.9/.github/workflows/tests.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/.github/workflows/tests.yml 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1,42 @@ +name: unit-tests +on: + push: + pull_request: + schedule: + - cron: 0 4 * * MON,FRI +jobs: + OS: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + scenario: + - apt-docker.io/amd64/ubuntu:devel + - apt-docker.io/amd64/ubuntu:latest + - apt-docker.io/amd64/ubuntu:rolling + - apt-docker.io/i386/debian:testing + - apt-docker.io/amd64/debian:testing + - dnf-registry.fedoraproject.org/fedora:latest + - dnf-registry.fedoraproject.org/fedora:rawhide + - alpine-docker.io/alpine + - alpine-docker.io/i386/alpine + - alp...@gudev-docker.io/alpine + - nix-docker.io/nixos/nix + include: + - scenario: alpine@gudev-alpine + env: EXTRA_PACKAGES=libgudev-dev + + timeout-minutes: 30 + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run unit tests + run: | + set -eux + scenario=${{ matrix.scenario }} + script=${scenario%-*} + script=${script%@*} + image=${scenario#*-} + + ${{ matrix.env }} BRITTLE_TESTS=1 tests/run-${script} $image diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/.gitignore new/umockdev-0.17.12/.gitignore --- old/umockdev-0.17.9/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/.gitignore 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1,52 @@ +.*.swp +.deps +.dirstamp +.libs +*.la +*.lo +*.o +*.pc +*.gir +*.typelib +*.stamp +*.stamp-t +*.log +*.trs +*.gcda +*.gcno +*-coverage +*-coverage.info +aminclude_static.am +stamp-* +Makefile.in +Makefile +config.h +config.h.in +config.log +config.status +gtk-doc.make +version.xml +/m4 +/autom4te.cache +/build-aux +/aclocal.m4 +/configure +/libtool +src/umockdev-1.0.vapi +src/umockdev.h +src/umockdev.c +src/umockdev-run +src/umockdev-run.c +src/umockdev-record +src/umockdev-record.c +tests/chatter +tests/chatter-socket-stream +tests/readbyte +tests/test-ioctl-tree +tests/test-umockdev-vala.c +tests/test-umockdev +tests/test-umockdev-vala +tests/test-umockdev-run +tests/test-umockdev-run.c +tests/test-umockdev-record +tests/test-umockdev-record.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/NEWS new/umockdev-0.17.12/NEWS --- old/umockdev-0.17.9/NEWS 2022-04-10 18:03:26.643428800 +0200 +++ new/umockdev-0.17.12/NEWS 2022-05-19 11:44:05.000000000 +0200 @@ -1,3 +1,12 @@ +## [0.17.12] - 2022-05-19 +- Work around packit propose_downstream bug + +## [0.17.11] - 2022-05-19 +- Fix documentation build (thanks Benjamin Berg) + +## [0.17.10] - 2022-05-10 +- Adjust to systemd 251-rc2: Set $SYSTEMD_DEVICE_VERIFY_SYSFS, parse new udevadm format, update tests + ## [0.17.9] - 2022-04-10 - preload: Wrap fortified version of readlinkat (thanks Martin Liska) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/docs/reference/meson.build new/umockdev-0.17.12/docs/reference/meson.build --- old/umockdev-0.17.9/docs/reference/meson.build 2022-04-10 18:03:26.651429200 +0200 +++ new/umockdev-0.17.12/docs/reference/meson.build 2022-05-19 11:44:05.000000000 +0200 @@ -9,6 +9,7 @@ src_dir: [meson.build_root()], content_files: [version_xml], gobject_typesfile: 'umockdev.types', + scan_args: ['--ignore-decorators', 'VALA_EXTERN'], ignore_headers: ['uevent_sender.h', 'ioctl_tree.h', 'debug.h'], dependencies: [glib, gobject, declare_dependency(link_with : [umockdev_lib])], install: true, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/packit.yaml new/umockdev-0.17.12/packit.yaml --- old/umockdev-0.17.9/packit.yaml 2022-04-10 18:03:26.655429100 +0200 +++ new/umockdev-0.17.12/packit.yaml 2022-05-19 11:44:05.000000000 +0200 @@ -1,16 +1,13 @@ # See the documentation for more information: # https://packit.dev/docs/configuration/ -specfile_path: packaging/umockdev.spec upstream_project_url: https://github.com/martinpitt/umockdev issue_repository: https://github.com/martinpitt/umockdev copy_upstream_release_description: true upstream_package_name: umockdev downstream_package_name: umockdev - -files_to_sync: - - packit.yaml - - src: packaging/umockdev.spec - dest: umockdev.spec +# HACK: should be implied, but fails propose_downstream: https://github.com/packit/packit-service/issues/1511 +specfile_path: packaging/umockdev.spec +srpm_build_deps: [] jobs: - job: copr_build @@ -24,6 +21,12 @@ - fedora-development-s390x - fedora-development-armhfp + - job: tests + trigger: pull_request + metadata: + targets: + - fedora-latest + - job: propose_downstream trigger: release metadata: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/plans/all.fmf new/umockdev-0.17.12/plans/all.fmf --- old/umockdev-0.17.9/plans/all.fmf 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/plans/all.fmf 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1,6 @@ +summary: + Run all tests +discover: + how: fmf +execute: + how: tmt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/src/libumockdev-preload.c new/umockdev-0.17.12/src/libumockdev-preload.c --- old/umockdev-0.17.9/src/libumockdev-preload.c 2022-04-10 18:03:26.655429100 +0200 +++ new/umockdev-0.17.12/src/libumockdev-preload.c 2022-05-19 11:44:05.000000000 +0200 @@ -203,6 +203,7 @@ static char link[PATH_MAX]; int name_offset; int orig_errno; + libc_func(readlink, ssize_t, const char*, char*, size_t); name_offset = snprintf(buf, sizeof(buf), "%s/dev/.node/", getenv("UMOCKDEV_DIR")); buf[sizeof(buf) - 1] = 0; @@ -215,7 +216,7 @@ /* read major:minor */ orig_errno = errno; - ssize_t link_len = readlink(buf, link, sizeof(link)); + ssize_t link_len = _readlink(buf, link, sizeof(link)); if (link_len < 0) { DBG(DBG_PATH, "get_rdev %s: cannot read link %s: %m\n", nodename, buf); errno = orig_errno; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/src/umockdev-ioctl.vala new/umockdev-0.17.12/src/umockdev-ioctl.vala --- old/umockdev-0.17.9/src/umockdev-ioctl.vala 2022-04-10 18:03:26.655429100 +0200 +++ new/umockdev-0.17.12/src/umockdev-ioctl.vala 2022-05-19 11:44:05.000000000 +0200 @@ -80,7 +80,7 @@ * You may call this multiple times on the same pointer in order to fetch * the existing information. * - * Returns: #IoctlData, or #NULL on error + * Returns: #UMockdevIoctlData, or #NULL on error * Since: 0.16 */ public IoctlData? resolve(size_t offset, size_t len) throws IOError { @@ -149,7 +149,7 @@ /** * umockdev_ioctl_data_reload: - * @self: A #UmockdevIoctlData + * @self: A #UMockdevIoctlData * @error: return location for a GError, or %NULL * * This function allows reloading the data from the client side in case @@ -158,8 +158,8 @@ * It is very unlikely that such an explicit reload is needed. * * Doing this unresolves any resolved pointers. Take care to re-resolve - * them and use the newly resolved #IoctlData in case you need to access - * the data. + * them and use the newly resolved #UMockdevIoctlData in case you need to + * access the data. * * Returns: #TRUE on success, #FALSE otherwise * Since: 0.16 @@ -615,7 +615,7 @@ * * Called when an ioctl is requested by the client. * - * Access the #UMockdevIoctlClient::arg property of @client to retrieve the + * Access the #UMockdevIoctlClient:arg property of @client to retrieve the * argument of the ioctl. This is a pointer sized buffer initially with the * original argument passed to the ioctl. If this is pointing to a struct, use * umockdev_ioctl_data_resolve() to retrieve the underlying memory and update @@ -645,7 +645,7 @@ * * Called when a read is requested by the client. * - * The result buffer is represented by #UMockdevIoctlClient::arg of @client. + * The result buffer is represented by #UMockdevIoctlClient:arg of @client. * Retrieve its length to find out the requested read length. The content of * the buffer has already been retrieved, and you can freely use and update it. * @@ -661,7 +661,7 @@ * * Called when a write is requested by the client. * - * The written buffer is represented by #UMockdevIoctlClient::arg of @client. + * The written buffer is represented by #UMockdevIoctlClient:arg of @client. * Retrieve its length to find out the requested write length. The content of * the buffer has already been retrieved, and you can freely use it. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/src/umockdev-record.vala new/umockdev-0.17.12/src/umockdev-record.vala --- old/umockdev-0.17.9/src/umockdev-record.vala 2022-04-10 18:03:26.655429100 +0200 +++ new/umockdev-0.17.12/src/umockdev-record.vala 2022-05-19 11:44:05.000000000 +0200 @@ -241,6 +241,7 @@ exit_error("Cannot call udevadm: %s", e.message); } + var properties = new List<string>(); foreach (string line in u_out.split("\n")) { // filter out redundant/uninteresting properties and link priority if (line.length == 0 || line.has_prefix("E: DEVPATH=") || @@ -248,6 +249,15 @@ line.has_prefix("L: ")) continue; + if (line.has_prefix("E: ")) { + properties.append(line); + continue; + } + + // only pass through field types that we can recognize; keep this in sync with add_dev_from_string() + if (!line.has_prefix("P:") && !line.has_prefix("A:") && !line.has_prefix("N:") && !line.has_prefix("S:")) + continue; + if (line.has_prefix("N: ")) { line = line + dev_contents("/dev/" + line.substring(3).chomp()); } @@ -255,6 +265,13 @@ stdout.putc('\n'); } + // print sorted properties + properties.sort(strcmp); + foreach (var prop in properties) { + stdout.puts(prop); + stdout.putc('\n'); + } + // work around kernel crash, skip reading attributes for Tegra stuff (LP #1190225) if (dev.contains("tegra")) { stdout.putc('\n'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/src/umockdev.vala new/umockdev-0.17.12/src/umockdev.vala --- old/umockdev-0.17.9/src/umockdev.vala 2022-04-10 18:03:26.655429100 +0200 +++ new/umockdev-0.17.12/src/umockdev.vala 2022-05-19 11:44:05.000000000 +0200 @@ -106,6 +106,9 @@ 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); } @@ -2046,7 +2049,7 @@ * @title: global functions * @short_description: Global functions * - * These work independently from #Testbed objects. + * These work independently from #UMockdevTestbed objects. */ /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/tests/main.fmf new/umockdev-0.17.12/tests/main.fmf --- old/umockdev-0.17.9/tests/main.fmf 1970-01-01 01:00:00.000000000 +0100 +++ new/umockdev-0.17.12/tests/main.fmf 2022-05-19 11:44:05.000000000 +0200 @@ -0,0 +1,10 @@ +summary: smoke test +duration: 10m +require: + - umockdev +test: | + set -eux + umockdev-record /dev/null > /tmp/null.umockdev + sed -i 's/MINOR=3/MINOR=4/; s/dev=1:3/dev=1:4/' /tmp/null.umockdev + OUT=$(umockdev-run --device /tmp/null.umockdev -- stat -c '%n %F %t %T' /dev/null) + echo "$OUT" | grep '^/dev/null character special file 1 4$' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/tests/run-apt new/umockdev-0.17.12/tests/run-apt --- old/umockdev-0.17.9/tests/run-apt 2022-04-10 18:03:26.659429300 +0200 +++ new/umockdev-0.17.12/tests/run-apt 2022-05-19 11:44:05.000000000 +0200 @@ -31,15 +31,21 @@ eatmydata apt-get install -y --no-install-recommends meson git pkg-config valac libglib2.0-dev libudev-dev libgudev-1.0-dev libpcap-dev python3-gi gobject-introspection libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-gudev-1.0 gtk-doc-tools udev xserver-xorg-video-dummy xserver-xorg-input-evdev xserver-xorg-input-synaptics xinput procps usbutils evtest gphoto2 valgrind # run build as user -useradd build +useradd --create-home build su -s /bin/sh - build << EOG set -ex +git config --global safe.directory /source export BRITTLE_TESTS="${BRITTLE_TESTS:-}" cd /source meson setup /tmp/dbg --buildtype debug --prefix /usr -Dgtk_doc=true --werror cd /tmp/dbg if meson dist --help | grep -q no-tests; then - meson dist --no-test + if meson --version | grep -q "^0.62"; then + # HACK: --allow-dirty workaround for https://github.com/mesonbuild/meson/issues/10329 + meson dist --no-test --allow-dirty + else + meson dist --no-test + fi else # HACK: force gtk-doc build for older meson releases DESTDIR=/tmp/inst meson install diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/tests/test-umockdev-record.vala new/umockdev-0.17.12/tests/test-umockdev-record.vala --- old/umockdev-0.17.9/tests/test-umockdev-record.vala 2022-04-10 18:03:26.659429300 +0200 +++ new/umockdev-0.17.12/tests/test-umockdev-record.vala 2022-05-19 11:44:05.000000000 +0200 @@ -106,6 +106,8 @@ spawn ("umockdev-record" + " --all", out sout, out serr, out exit); assert_cmpstr (serr, CompareOperator.EQ, ""); assert_cmpint (exit, CompareOperator.EQ, 0); + // udevadm 251-rc2 adds this extra synthetic property + sout = sout.replace("E: DRIVER=foo\n", ""); assert_cmpstr (sout, CompareOperator.EQ, """P: /devices/dev1 E: SIMPLE_PROP=1 E: SUBSYSTEM=pci diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/tests/test-umockdev-run.vala new/umockdev-0.17.12/tests/test-umockdev-run.vala --- old/umockdev-0.17.9/tests/test-umockdev-run.vala 2022-04-10 18:03:26.659429300 +0200 +++ new/umockdev-0.17.12/tests/test-umockdev-run.vala 2022-05-19 11:44:05.000000000 +0200 @@ -21,6 +21,7 @@ using Assertions; const string umockdev_run_command = "env LC_ALL=C umockdev-run "; +const string umockdev_record_command = "env LC_ALL=C umockdev-record "; string rootdir; string tests_dir; @@ -101,8 +102,8 @@ if (!get_program_out (program, umockdev_run_command + run_command, out sout, out serr, out exit)) return; - assert_cmpstr (sout, CompareOperator.EQ, expected_out); assert_cmpstr (serr, CompareOperator.EQ, ""); + assert_cmpstr (sout, CompareOperator.EQ, expected_out); assert_cmpint (exit, CompareOperator.EQ, 0); } @@ -130,7 +131,7 @@ int exit; // normal exit, zero - check_program_out ("true", umockdev_run_command + "true", ""); + check_program_out ("true", "true", ""); // normal exit, nonzero get_program_out ("ls", umockdev_run_command + "ls /nonexisting", out sout, out serr, out exit); @@ -303,6 +304,32 @@ } static void +t_run_record_null () +{ + string umockdev_file; + string sout; + string serr; + int exit; + + if (!FileUtils.test("/sys/dev/char/1:3", FileTest.EXISTS)) { + stdout.printf ("[SKIP: no real /sys on this system] "); + 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, ""); + assert_cmpint (exit, CompareOperator.EQ, 0); + checked_file_set_contents (umockdev_file, sout); + + check_program_out("true", "-d " + umockdev_file + " -- stat -c '%n %F %t %T' /dev/null", + "/dev/null character special file 1 3\n"); + + FileUtils.remove (umockdev_file); +} + +static void t_run_script_chatter () { string umockdev_file, script_file; @@ -766,6 +793,9 @@ Test.add_func ("/umockdev-run/invalid-script", t_run_invalid_script); Test.add_func ("/umockdev-run/invalid-program", t_run_invalid_program); + // udevadm-record interaction + Test.add_func ("/umockdev-run/umockdev-record-null-roundtrip", t_run_record_null); + // script replay Test.add_func ("/umockdev-run/script-chatter", t_run_script_chatter); Test.add_func ("/umockdev-run/script-chatter-socket-stream", t_run_script_chatter_socket_stream); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umockdev-0.17.9/tests/test-umockdev.c new/umockdev-0.17.12/tests/test-umockdev.c --- old/umockdev-0.17.9/tests/test-umockdev.c 2022-04-10 18:03:26.659429300 +0200 +++ new/umockdev-0.17.12/tests/test-umockdev.c 2022-05-19 11:44:05.000000000 +0200 @@ -1496,12 +1496,14 @@ g_assert(umockdev_testbed_add_from_string(fixture->testbed, "P: /devices/stream\nN: stream\n" "E: SUBSYSTEM=foo\nE: DEVNAME=/dev/stream\n" + "E: MAJOR=4\nE: MINOR=1\n" "A: dev=4:1\n", &error)); g_assert_no_error(error); g_assert(umockdev_testbed_add_from_string(fixture->testbed, "P: /devices/block/disk\nN: disk\n" "E: SUBSYSTEM=block\nE: DEVNAME=/dev/disk\n" + "E: MAJOR=8\nE: MINOR=1\n" "A: dev=8:1\n", &error)); g_assert_no_error(error);