From 0dc8321094be5ae04696bb6ba3dce040c3d6c899 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 6 Jan 2021 11:19:15 +0100 Subject: [PATCH] coverage.sh: the output of getcap differs depending on the version --- coverage.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/coverage.sh b/coverage.sh index be99558..b2cbab2 100755 --- a/coverage.sh +++ b/coverage.sh @@ -268,14 +268,18 @@ if [ "$variant" = "-" ]; then rm /tmp/debian-$dist-mm/var/lib/systemd/catalog/database cap=\$(chroot /tmp/debian-$dist-debootstrap /sbin/getcap /bin/ping) - if [ "\$cap" != "/bin/ping = cap_net_raw+ep" ]; then - echo "expected bin/ping to have capabilities cap_net_raw+ep" >&2 + expected="/bin/ping cap_net_raw=ep" + if [ "$dist" = stable ]; then + expected="/bin/ping = cap_net_raw+ep" + fi + if [ "\$cap" != "\$expected" ]; then + echo "expected bin/ping to have capabilities \$expected" >&2 echo "but debootstrap produced: \$cap" >&2 exit 1 fi cap=\$(chroot /tmp/debian-$dist-mm /sbin/getcap /bin/ping) - if [ "\$cap" != "/bin/ping = cap_net_raw+ep" ]; then - echo "expected bin/ping to have capabilities cap_net_raw+ep" >&2 + if [ "\$cap" != "\$expected" ]; then + echo "expected bin/ping to have capabilities \$expected" >&2 echo "but mmdebstrap produced: \$cap" >&2 exit 1 fi