From 3c6131632c4c265909f6a04244f727698aac6f76 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 30 Jun 2022 12:45:55 +0200 Subject: [PATCH] Not forwarded Ubuntu changes Signed-off-by: Benjamin Drung --- bin/sbuild | 5 +---- debian/tests/control | 9 +++++++-- debian/tests/unshare | 5 +++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bin/sbuild b/bin/sbuild index 28c1df01..b68ecd98 100755 --- a/bin/sbuild +++ b/bin/sbuild @@ -86,10 +86,6 @@ sub main () { my $jobname = $ARGV[0]; my $source_dir = 0; - if (-e $jobname) { - $jobname = abs_path($jobname); - } - if (-d $jobname) { $jobname = create_source_package($jobname); if ($jobname eq '.') { @@ -173,6 +169,7 @@ sub main () { sub create_source_package ($) { my $dsc = shift; + $dsc = abs_path($dsc); open(my $pipe, '-|', 'dpkg-parsechangelog', '-l' . $dsc . '/debian/changelog') diff --git a/debian/tests/control b/debian/tests/control index c0739b28..91a2426e 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,6 +1,6 @@ Tests: build-procenv Depends: apt (>= 1.1~exp2), apt-utils, debootstrap, distro-info, lsb-release, @ -Restrictions: needs-root +Restrictions: needs-root, isolation-machine Tests: unshare-qemuwrapper Architecture: amd64 @@ -11,4 +11,9 @@ Depends: grep-dctrl, openssh-client, qemu-system-x86, sleepenh -Restrictions: allow-stderr needs-root +Restrictions: allow-stderr needs-root skip-not-installable + +Tests: unshare +Architecture: amd64 +Depends: gnupg, sbuild, mmdebstrap, build-essential, uidmap, fakeroot, diffoscope, devscripts +Restrictions: allow-stderr skippable isolation-machine diff --git a/debian/tests/unshare b/debian/tests/unshare index cdf555d6..f18f4e48 100755 --- a/debian/tests/unshare +++ b/debian/tests/unshare @@ -13,6 +13,11 @@ if [ -z ${AUTOPKGTEST_TMP+x} ]; then exit 1 fi +if ! grep -q '^1$' /proc/sys/kernel/unprivileged_userns_clone 2> /dev/null; then + echo "User namespace support is not enabled" >&2; + exit 77 +fi + . /etc/os-release release=${VERSION_CODENAME:-unstable} nativearch=$(dpkg --print-architecture) -- 2.34.1