From: Simon McVittie Date: Mon, 27 Feb 2023 12:42:41 +0000 (+0000) Subject: Add patch to ensure capsh is found in tests' PATH X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a303a41b7a05ef2fb2c518353f5722fb26bfa41f;p=ostree.git Add patch to ensure capsh is found in tests' PATH Closes: #1031353 --- diff --git a/debian/patches/series b/debian/patches/series index d9efcb28..72667ff8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +tests-Ensure-non-root-users-have-access-to-libcap-tools.patch debian/Skip-test-pull-repeated-during-CI.patch debian/test-sysroot-Skip-on-s390x-by-default.patch diff --git a/debian/patches/tests-Ensure-non-root-users-have-access-to-libcap-tools.patch b/debian/patches/tests-Ensure-non-root-users-have-access-to-libcap-tools.patch new file mode 100644 index 00000000..2907b071 --- /dev/null +++ b/debian/patches/tests-Ensure-non-root-users-have-access-to-libcap-tools.patch @@ -0,0 +1,26 @@ +From: Simon McVittie +Date: Mon, 27 Feb 2023 12:40:05 +0000 +Subject: tests: Ensure non-root users have access to libcap tools + +On Debian systems, by default only root has /{usr/,}sbin in PATH. + +Signed-off-by: Simon McVittie +Forwarded: https://github.com/ostreedev/ostree/pull/2821 +--- + tests/libtest.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/libtest.sh b/tests/libtest.sh +index 264094b..963bc92 100755 +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -32,6 +32,9 @@ else + fi + . ${test_srcdir}/libtest-core.sh + ++# Make sure /sbin/capsh etc. are in our PATH even if non-root ++PATH="$PATH:/usr/sbin:/sbin" ++ + # Array of expressions to execute when exiting. Each expression should + # be a single string (quoting if necessary) that will be eval'd. To add + # a command to run on exit, append to the libtest_exit_cmds array like