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>
Thu, 19 Sep 2024 12:43:40 +0000 (14:43 +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 2206e102b35bea566b2ec04a26bf293748ec4f3b..3b4bf56319bbf8655c1a75f487836ff3293ac0e4 100644 (file)
@@ -442,7 +442,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"