SHA256
1
0
forked from pool/umockdev

46 Commits

Author SHA256 Message Date
77898bf1c5 Accepting request 1223400 from hardware
- Add 0001-t_system_single-handle-missing-selinux-context.patch:
  * tests: umockdev-record: t_system_single: handle missing
    SELinux context on /dev/null (Cherry-picked from commit
    f5c3a2e4ecbb2ab733b19b0bf84c8334cedd8ba2)
  * Fixes testsuite failure in SLFO.
- Move to the %autosetup macro

OBS-URL: https://build.opensuse.org/request/show/1223400
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=22
2024-11-12 18:19:53 +00:00
80c6fd1ed8 OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=39 2024-11-11 16:18:35 +00:00
3a330b525f - Add 0001-t_system_single-handle-missing-selinux-context.patch:
* tests: umockdev-record: t_system_single: handle missing
    SELinux context on /dev/null (Cherry-picked from commit
    f5c3a2e4ecbb2ab733b19b0bf84c8334cedd8ba2)
  * Fixes testsuite failure in SLFO.
- Move to the %autosetup macro

OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=38
2024-11-11 16:18:01 +00:00
7e36860d4d Accepting request 1207590 from hardware
OBS-URL: https://build.opensuse.org/request/show/1207590
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=21
2024-10-14 11:06:22 +00:00
8d51a13190 Update to version 0.18.4
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=36
2024-10-13 15:47:47 +00:00
12c6308986 Accepting request 1188808 from hardware
OBS-URL: https://build.opensuse.org/request/show/1188808
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=20
2024-07-22 15:14:02 +00:00
df7113f4f9 Accepting request 1167664 from hardware
OBS-URL: https://build.opensuse.org/request/show/1167664
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=19
2024-04-16 18:02:52 +00:00
fc165f4c72 Accepting request 1166698 from home:badshah400:branches:hardware
Update to version 0.18.1.

OBS-URL: https://build.opensuse.org/request/show/1166698
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=32
2024-04-14 13:23:41 +00:00
f2abc23330 Accepting request 1158769 from hardware
OBS-URL: https://build.opensuse.org/request/show/1158769
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=18
2024-03-18 15:43:22 +00:00
60557d592d Accepting request 1158712 from home:dirkmueller:Factory
- update to 0.18.0:
  * Record and restore SELinux context for mocked /dev nodes
  * preload: wrap fstatfs() and statfs() on musl
  * Fix build with meson 1.4

OBS-URL: https://build.opensuse.org/request/show/1158712
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=30
2024-03-17 14:13:36 +00:00
e5babeb448 Accepting request 1110171 from hardware
OBS-URL: https://build.opensuse.org/request/show/1110171
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=17
2023-09-12 19:02:01 +00:00
44478ae438 Accepting request 1109617 from home:badshah400:branches:hardware
Update to version 0.17.18

OBS-URL: https://build.opensuse.org/request/show/1109617
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=28
2023-09-10 20:07:59 +00:00
f43f7782c3 Accepting request 1082888 from hardware
OBS-URL: https://build.opensuse.org/request/show/1082888
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=16
2023-04-27 17:59:03 +00:00
ca492d1962 Accepting request 1081066 from home:badshah400:branches:hardware
Update to version 0.17.17

OBS-URL: https://build.opensuse.org/request/show/1081066
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=26
2023-04-26 06:50:17 +00:00
39faf08713 Accepting request 1066775 from hardware
OBS-URL: https://build.opensuse.org/request/show/1066775
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=15
2023-02-21 14:35:36 +00:00
901a729f3d Accepting request 1065650 from home:badshah400:branches:hardware
Update to version 0.17.16

OBS-URL: https://build.opensuse.org/request/show/1065650
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=24
2023-02-20 10:15:41 +00:00
42ba0c900b Accepting request 1038920 from hardware
OBS-URL: https://build.opensuse.org/request/show/1038920
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=14
2022-11-30 15:07:49 +00:00
359775cb4e Accepting request 1038419 from home:badshah400:branches:hardware
Update to version 0.17.15

OBS-URL: https://build.opensuse.org/request/show/1038419
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=22
2022-11-29 15:03:27 +00:00
a2283beda9 Accepting request 984906 from hardware
OBS-URL: https://build.opensuse.org/request/show/984906
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=13
2022-07-08 12:01:30 +00:00
d5ab3dcce1 Accepting request 984854 from home:favogt:branches:hardware
- Update to version 0.17.13:
  * preload: Wrap fstatfs(), to work with systemd 251 also with Python tests
  * Fix tests in Gentoo sandbox build

OBS-URL: https://build.opensuse.org/request/show/984854
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=20
2022-06-24 14:19:02 +00:00
507060bb16 Accepting request 980741 from hardware
OBS-URL: https://build.opensuse.org/request/show/980741
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=12
2022-06-06 09:10:17 +00:00
54db675f5f Accepting request 979675 from home:badshah400:branches:hardware
Update to version 0.17.12

OBS-URL: https://build.opensuse.org/request/show/979675
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=18
2022-06-04 10:23:41 +00:00
dbf8d3013e Accepting request 969157 from hardware
Update to version 0.17.9

OBS-URL: https://build.opensuse.org/request/show/969157
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=11
2022-04-13 19:04:04 +00:00
7fce171b32 OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=16 2022-04-11 09:34:48 +00:00
5fe2c17376 Accepting request 968363 from home:marxin:branches:hardware
- Update to version 0.17.9:
  * preload: Wrap fortified version of readlinkat (thanks Martin Liska)

OBS-URL: https://build.opensuse.org/request/show/968363
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=15
2022-04-11 09:34:30 +00:00
a5f62905e4 Accepting request 965656 from hardware
OBS-URL: https://build.opensuse.org/request/show/965656
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=10
2022-04-02 16:20:27 +00:00
79ff518d9b Accepting request 965116 from home:badshah400:branches:hardware
Update to version 0.17.8

OBS-URL: https://build.opensuse.org/request/show/965116
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=13
2022-03-29 13:28:50 +00:00
15753c3aad Accepting request 953729 from hardware
OBS-URL: https://build.opensuse.org/request/show/953729
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=9
2022-02-11 22:06:49 +00:00
11abef1a1c Accepting request 952824 from home:badshah400:branches:hardware
Update to version 0.17.6

OBS-URL: https://build.opensuse.org/request/show/952824
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=12
2022-02-11 12:13:23 +00:00
b0ee49fe52 Accepting request 949863 from hardware
OBS-URL: https://build.opensuse.org/request/show/949863
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=8
2022-02-01 13:02:41 +00:00
e0a9960878 Accepting request 949858 from home:dimstar:Factory
- BuildRequire pkgconfig(udev) instead of udev: this allows OBS to
  properly shotcut through the -mini flavors.

OBS-URL: https://build.opensuse.org/request/show/949858
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=11
2022-01-29 10:12:14 +00:00
1bc022c5e1 Accepting request 947577 from home:badshah400:branches:hardware
- Update to version 0.17.5.
- Enable tests in a %check section; add BuildRequires: udev, required for tests.

OBS-URL: https://build.opensuse.org/request/show/947577
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=10
2022-01-27 22:19:36 +00:00
8d6c5c924e Accepting request 943063 from hardware
OBS-URL: https://build.opensuse.org/request/show/943063
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=7
2021-12-30 14:55:35 +00:00
af385f8452 Accepting request 942371 from home:badshah400:branches:hardware
Update to version 0.17.1.

OBS-URL: https://build.opensuse.org/request/show/942371
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=9
2021-12-29 13:44:05 +00:00
c2fa041c91 Accepting request 921377 from hardware
OBS-URL: https://build.opensuse.org/request/show/921377
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=6
2021-09-28 17:16:25 +00:00
887db6d077 Accepting request 921369 from home:iznogood:branches:hardware
- Add umocdev Requires to devel sub-package, packages using
  umockdev-devel during build expects the binaries to be available.

OBS-URL: https://build.opensuse.org/request/show/921369
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=8
2021-09-24 22:26:42 +00:00
a0213260bd Accepting request 920069 from hardware
OBS-URL: https://build.opensuse.org/request/show/920069
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=5
2021-09-20 21:32:57 +00:00
b6ce115ec6 Accepting request 919079 from home:badshah400:branches:hardware
Update to version 0.16.3

OBS-URL: https://build.opensuse.org/request/show/919079
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=7
2021-09-18 17:00:02 +00:00
e7363cd211 Accepting request 918729 from hardware
OBS-URL: https://build.opensuse.org/request/show/918729
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=4
2021-09-13 14:24:39 +00:00
df09c71504 Accepting request 918728 from home:badshah400:branches:hardware
Disable to avoid build cycle with gudev (it is recommended but not required for umockdev itself).

OBS-URL: https://build.opensuse.org/request/show/918728
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=6
2021-09-13 13:18:58 +00:00
8240ffaa0e Accepting request 915146 from hardware
OBS-URL: https://build.opensuse.org/request/show/915146
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=3
2021-08-31 17:55:31 +00:00
a66bbed9ab Accepting request 914435 from home:badshah400:branches:hardware
Update to version 0.16.2

OBS-URL: https://build.opensuse.org/request/show/914435
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=5
2021-08-30 23:25:52 +00:00
5710deaef0 Accepting request 892451 from hardware
OBS-URL: https://build.opensuse.org/request/show/892451
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=2
2021-05-12 17:32:28 +00:00
dce9d6c48d Accepting request 891465 from home:badshah400:branches:hardware
Update to version 0.15.5

OBS-URL: https://build.opensuse.org/request/show/891465
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=3
2021-05-12 11:16:11 +00:00
8d2e72a4c9 Accepting request 864070 from hardware
OBS-URL: https://build.opensuse.org/request/show/864070
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/umockdev?expand=0&rev=1
2021-01-18 14:22:02 +00:00
f40cb90898 Accepting request 860520 from home:badshah400:branches:hardware
(New dependency for updated switcheroo-control) umockdev: Mock hardware devices for creating unit tests and bug reporting

OBS-URL: https://build.opensuse.org/request/show/860520
OBS-URL: https://build.opensuse.org/package/show/hardware/umockdev?expand=0&rev=1
2021-01-18 12:56:05 +00:00
6 changed files with 86 additions and 8 deletions

View File

@@ -0,0 +1,60 @@
From f5c3a2e4ecbb2ab733b19b0bf84c8334cedd8ba2 Mon Sep 17 00:00:00 2001
From: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
Date: Wed, 30 Oct 2024 14:15:30 +0100
Subject: [PATCH] tests: umockdev-record: t_system_single: handle missing
SELinux context on /dev/null
/sys/fs/selinux might exist, yet the checked path might have no
context defined.
Drop the check for the selinux pseudo-fs, and check the eventual
errno if lgetfilecon() fails.
On ENODATA (context doesn't exist, or the process can't access it),
ENOTSUP (extended attributes not supported/disabled) and ENOSYS
(lgetxattr syscall used by lgetfilecon() not available), ensure
__DEVCONTEXT is not there and continue.
On every other error, fail the test case as before.
Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
---
tests/test-umockdev-record.vala | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/tests/test-umockdev-record.vala b/tests/test-umockdev-record.vala
index 8672ee1..2c362fa 100644
--- a/tests/test-umockdev-record.vala
+++ b/tests/test-umockdev-record.vala
@@ -201,13 +201,25 @@ t_system_single ()
assert_in("P: /devices/virtual/mem/null", sout);
assert_in("E: DEVNAME=/dev/zero", sout);
#if HAVE_SELINUX
- // we may run on a system without SELinux
- if (FileUtils.test("/sys/fs/selinux", FileTest.EXISTS)) {
- string context;
- assert_cmpint (Selinux.lgetfilecon ("/dev/null", out context), CompareOperator.GT, 0);
- assert_in("E: __DEVCONTEXT=" + context + "\n", sout);
+ string context;
+ int res = Selinux.lgetfilecon ("/dev/null", out context);
+ if (res > 0) {
+ assert_in ("E: __DEVCONTEXT=" + context + "\n", sout);
+ } else if (res == -1 && (Posix.errno == Posix.ENODATA ||
+ Posix.errno == Posix.ENOTSUP ||
+ Posix.errno == Posix.ENOSYS)) {
+ // If SELinux is not available, or is available but
+ // there is no context defined for /dev/null,
+ // we should skip this check as there is
+ // no context recorded.
+ //
+ // ENODATA: context doesn't exist, or the process
+ // can't access it
+ // ENOTSUP: extended attributes not supported/disabled
+ // ENOSYS: lgetxattr syscall not available
+ assert (!sout.contains("E: __DEVCONTEXT"));
} else {
- assert(!sout.contains("E: __DEVCONTEXT"));
+ assert_cmpint (res, CompareOperator.GT, 0);
}
#endif
}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:651b6869033bb1488136ed73c58e9245f5b01856261e1cea041030b83fb1ed7c
size 493816

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aba95c323037c842f1617931260231b8557d119aa2891cbca8b811fcc559294a
size 493724

BIN
umockdev-0.18.4.tar.xz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Thu Oct 31 14:19:29 UTC 2024 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
- Add 0001-t_system_single-handle-missing-selinux-context.patch:
* tests: umockdev-record: t_system_single: handle missing
SELinux context on /dev/null (Cherry-picked from commit
f5c3a2e4ecbb2ab733b19b0bf84c8334cedd8ba2)
* Fixes testsuite failure in SLFO.
- Move to the %autosetup macro
-------------------------------------------------------------------
Mon Oct 7 21:38:00 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 0.18.4:
* Add ioctls for Chromium OS EC devices.
* Generate "remove" uevent in umockdev_testbed_remove_device().
* Recursively remove children with uevents.
* preload: Fix sigmask block and restore race.
-------------------------------------------------------------------
Wed Jul 17 06:30:18 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>

View File

@@ -19,12 +19,14 @@
%define shlib libumockdev0
%define shlibpre libumockdev-preload0
Name: umockdev
Version: 0.18.3
Version: 0.18.4
Release: 0
Summary: Mock hardware devices for creating unit tests and bug reporting
License: LGPL-2.1-or-later
URL: https://github.com/martinpitt/umockdev/
Source: https://github.com/martinpitt/umockdev/releases/download/%{version}/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM 0001-t_system_single-handle-missing-selinux-context.patch gh#martinpitt/umockdev#256 eugenio.paolantonio@suse.com -- tests: umockdev-record: t_system_single: handle missing SELinux context on /dev/null
Patch1: 0001-t_system_single-handle-missing-selinux-context.patch
BuildRequires: cmake
BuildRequires: gtk-doc
BuildRequires: meson
@@ -90,7 +92,7 @@ This package provides the GObject Introspection bindings for the library
umockdev.
%prep
%setup -q
%autosetup -p1
%build
%meson