summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-09-03 19:51:01 +0100
committerSam James <sam@gentoo.org>2021-09-03 21:57:22 +0100
commit0653584024fa17597acc8a99039bd81080d02402 (patch)
treebe13fc39909db92182ed29768d3ca6a0c388b5bd /sys-apps
parentwww-client/microsoft-edge-beta: remove old (diff)
downloadgentoo-0653584024fa17597acc8a99039bd81080d02402.tar.gz
gentoo-0653584024fa17597acc8a99039bd81080d02402.tar.bz2
gentoo-0653584024fa17597acc8a99039bd81080d02402.zip
sys-apps/util-linux: add ioctl_ns test hang patch
Bug: https://bugs.gentoo.org/809491 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch37
-rw-r--r--sys-apps/util-linux/util-linux-2.37.2.ebuild1
2 files changed, 38 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch b/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
new file mode 100644
index 000000000000..73dc0b40a049
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.37.2-ioctl_ns-test-hang.patch
@@ -0,0 +1,37 @@
+https://github.com/karelzak/util-linux/commit/597ccb7bf564f65bb059bfe420224cab0fba46ac.patch
+
+From 597ccb7bf564f65bb059bfe420224cab0fba46ac Mon Sep 17 00:00:00 2001
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Fri, 20 Aug 2021 10:30:50 +0000
+Subject: [PATCH] tests: Skip lsns/ioctl_ns test if unshare fails
+
+Some parts of the Debian build infrastructure uses unshare to run the
+package build, and that appears to cause a "nested" unshare in the
+lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
+point.
+
+Try running unshare before the actual test, and skip the test if unshare
+already fails.
+
+[kzak@redhat.com: - add --fork to the test
+ - don't write to stdout/err]
+
+Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ tests/ts/lsns/ioctl_ns | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/ts/lsns/ioctl_ns b/tests/ts/lsns/ioctl_ns
+index ef6360607..fa626bfda 100755
+--- a/tests/ts/lsns/ioctl_ns
++++ b/tests/ts/lsns/ioctl_ns
+@@ -34,6 +34,8 @@ ts_check_prog "mkfifo"
+ ts_check_prog "touch"
+ ts_check_prog "uniq"
+
++$TS_CMD_UNSHARE --user --pid --mount-proc --fork true &> /dev/null || ts_skip "no namespace support"
++
+ ts_cd "$TS_OUTDIR"
+
+ # The parent process receives namespaces ids via FIFO_DATA from bash
diff --git a/sys-apps/util-linux/util-linux-2.37.2.ebuild b/sys-apps/util-linux/util-linux-2.37.2.ebuild
index 7d33348c15d8..83397becac55 100644
--- a/sys-apps/util-linux/util-linux-2.37.2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.37.2.ebuild
@@ -88,6 +88,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-2.37.1-agetty_ctrl-c_erase.patch #804972
+ "${FILESDIR}"/${P}-ioctl_ns-test-hang.patch # upstream test hang patch
)
src_prepare() {