diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-04-18 00:19:21 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-04-18 00:19:21 -0400 |
commit | 867009193d04369c4ca3d9f0af26c72c8ca9b82f (patch) | |
tree | d7f435cb90597df79579a4cb0e280dccbd544f0a /sys-apps/systemd | |
parent | app-containers/podman: remove 5.0.0 (diff) | |
download | gentoo-867009193d04369c4ca3d9f0af26c72c8ca9b82f.tar.gz gentoo-867009193d04369c4ca3d9f0af26c72c8ca9b82f.tar.bz2 gentoo-867009193d04369c4ca3d9f0af26c72c8ca9b82f.zip |
sys-apps/systemd: make test-process-util work with pid-sandbox
Closes: https://bugs.gentoo.org/674458
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-apps/systemd')
-rw-r--r-- | sys-apps/systemd/files/systemd-test-process-util.patch | 30 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-254.10.ebuild | 6 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-255.4.ebuild | 8 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-9999.ebuild | 6 |
4 files changed, 34 insertions, 16 deletions
diff --git a/sys-apps/systemd/files/systemd-test-process-util.patch b/sys-apps/systemd/files/systemd-test-process-util.patch new file mode 100644 index 000000000000..ec1a766764ee --- /dev/null +++ b/sys-apps/systemd/files/systemd-test-process-util.patch @@ -0,0 +1,30 @@ +From 1d3404701bf0c27600dd44b2814cd6caffca877a Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Thu, 18 Apr 2024 00:04:44 -0400 +Subject: [PATCH] test-process-util: remove assert that fails under pid-sandbox + +Upstream refuses to fix this. + +Bug: https://bugs.gentoo.org/674458 +Bug: https://github.com/systemd/systemd/issues/25015 +--- + src/test/test-process-util.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c +index c96bd4341b..4009cf96e2 100644 +--- a/src/test/test-process-util.c ++++ b/src/test/test-process-util.c +@@ -92,9 +92,6 @@ static void test_pid_get_comm_one(pid_t pid) { + assert_se(r >= 0 || r == -EACCES); + log_info("PID"PID_FMT" strlen(environ): %zi", pid, env ? (ssize_t)strlen(env) : (ssize_t)-errno); + +- if (!detect_container()) +- assert_se(get_ctty_devnr(pid, &h) == -ENXIO || pid != 1); +- + (void) getenv_for_pid(pid, "PATH", &i); + log_info("PID"PID_FMT" $PATH: '%s'", pid, strna(i)); + } +-- +2.44.0 + diff --git a/sys-apps/systemd/systemd-254.10.ebuild b/sys-apps/systemd/systemd-254.10.ebuild index 3428d3abc74f..c85a0b31b907 100644 --- a/sys-apps/systemd/systemd-254.10.ebuild +++ b/sys-apps/systemd/systemd-254.10.ebuild @@ -182,11 +182,6 @@ QA_EXECSTACK="usr/lib/systemd/boot/efi/*" pkg_pretend() { if [[ ${MERGE_TYPE} != buildonly ]]; then - if use test && has pid-sandbox ${FEATURES}; then - ewarn "Tests are known to fail with PID sandboxing enabled." - ewarn "See https://bugs.gentoo.org/674458." - fi - local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS @@ -240,6 +235,7 @@ src_unpack() { src_prepare() { local PATCHES=( + "${FILESDIR}/systemd-test-process-util.patch" "${FILESDIR}/systemd-253-initrd-generators.patch" "${FILESDIR}/254-PrivateDevices-userdbd.patch" ) diff --git a/sys-apps/systemd/systemd-255.4.ebuild b/sys-apps/systemd/systemd-255.4.ebuild index de47dde183cf..03c7008aa486 100644 --- a/sys-apps/systemd/systemd-255.4.ebuild +++ b/sys-apps/systemd/systemd-255.4.ebuild @@ -190,11 +190,6 @@ pkg_pretend() { die "systemd no longer supports split-usr" fi if [[ ${MERGE_TYPE} != buildonly ]]; then - if use test && has pid-sandbox ${FEATURES}; then - ewarn "Tests are known to fail with PID sandboxing enabled." - ewarn "See https://bugs.gentoo.org/674458." - fi - local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS @@ -248,7 +243,8 @@ src_unpack() { src_prepare() { local PATCHES=( - "${FILESDIR}"/255-install-format-overflow.patch + "${FILESDIR}/systemd-test-process-util.patch" + "${FILESDIR}/255-install-format-overflow.patch" ) if ! use vanilla; then diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index c035b9a2cfde..9ebc6c14fa23 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -190,11 +190,6 @@ pkg_pretend() { die "systemd no longer supports split-usr" fi if [[ ${MERGE_TYPE} != buildonly ]]; then - if use test && has pid-sandbox ${FEATURES}; then - ewarn "Tests are known to fail with PID sandboxing enabled." - ewarn "See https://bugs.gentoo.org/674458." - fi - local CONFIG_CHECK="~BLK_DEV_BSG ~CGROUPS ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS @@ -248,6 +243,7 @@ src_unpack() { src_prepare() { local PATCHES=( + "${FILESDIR}/systemd-test-process-util.patch" ) if ! use vanilla; then |