[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>
Wed, 5 Jun 2024 08:16:06 +0000 (10:16 +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 f7f6093d9e9fc873fb1dda79705a26888d89568e..bfab7a1b2f7fa9dda1c1f6a69787095a299ccd7e 100644 (file)
@@ -398,7 +398,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"