[PATCH 11/18] packaging,spread.yaml: use needs-sudo to setup sudo
authorZygmunt Krynicki <zygmunt.krynicki@canonical.com>
Fri, 26 Jan 2024 00:11:46 +0000 (01:11 +0100)
committerZygmunt Krynicki <me@zygoon.pl>
Fri, 19 Jul 2024 05:15:23 +0000 (07:15 +0200)
Sudo access is managed by the "needs-sudo" flag. We can drop our custom logic
and associated manipulation. This also ensures the testbed is correctly
selected, and incompatible systems are rejected.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Gbp-Pq: Name 0012-PATCH-11-18-packaging-spread.yaml-use-needs-sudo-to-.patch

packaging/debian-sid/tests/control
spread.yaml

index 9b2b367a6ba67dadb860c45cfee146db71199ba4..724473db9e29a6d6900f482be8432869c1c0eb51 100644 (file)
@@ -1,5 +1,5 @@
 Tests: integrationtests
-Restrictions: allow-stderr, rw-build-tree, needs-root, breaks-testbed, isolation-machine
+Restrictions: allow-stderr, rw-build-tree, needs-root, breaks-testbed, isolation-machine, needs-sudo
 Depends: bzr,
          ca-certificates,
          git,
index 21726413fe93bcf3b549331da8cbd0000c1a0553..849f9c40618fb41566353f2d2b10c8a242ccf144 100644 (file)
@@ -403,7 +403,6 @@ backends:
                 FATAL "adhoc only works inside autopkgtest"
                 exit 1
             fi
-            echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/99-spread-users
             ADDRESS localhost:22
         discard: |
             echo "Discarding ad-hoc $SPREAD_SYSTEM"