adt-run could export the SUDO_ASKPASS variable to the testbed
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | autopkgtest (Ubuntu) |
Wishlist
|
Martin Pitt | ||
Bug Description
It would be good to store the location of the SUDO_ASKPASS script on the testbed, so that specific commands can be run as root even though the rest of the test is running as the user.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: autopkgtest 3.11.1
ProcVersionSign
Uname: Linux 3.19.0-7-generic x86_64
ApportVersion: 2.16.2-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 12 15:26:53 2015
InstallationDate: Installed on 2013-11-30 (467 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitec
SourcePackage: autopkgtest
SystemImageInfo:
current build number: 0
device name:
channel: daily
last update: Unknown
UpgradeStatus: Upgraded to vivid on 2015-02-10 (30 days ago)
| Brendan Donegan (brendan-donegan) wrote : | #1 |
| Martin Pitt (pitti) wrote : | #2 |
| Changed in autopkgtest (Ubuntu): | |
| status: | New → Fix Committed |
| importance: | Undecided → Wishlist |
| assignee: | nobody → Martin Pitt (pitti) |
| Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package autopkgtest - 3.12
---------------
autopkgtest (3.12) unstable; urgency=medium
* ssh-setup/adb: Re-enable ssh after reboot, in case an upgrade disables it.
* ssh-setup/adb: Try to create /userdata/
rebooting without human interaction.
* Fix apt-get install --simulate version parsing with third-party sources.
(LP: #1430017)
* ssh-setup-nova: Add --security-groups option. (LP: #1429862)
* adt-buildvm-
verbose mode, this sometimes causes hangs. Go back to blocking reads, but
don't wait between them.
* Fix UnicodeDecodeError on .deb package name reading. (LP: #1430773)
* adt-virt-ssh: Export $SUDO_ASKPASS to tests if sudo is available.
(LP: #1431421)
-- Martin Pitt <email address hidden> Fri, 13 Mar 2015 12:52:49 +0100
| Changed in autopkgtest (Ubuntu): | |
| status: | Fix Committed → Fix Released |


Done in http:// anonscm. debian. org/cgit/ autopkgtest/ autopkgtest. git/commit/ ?id=67e6d01f .
The whole sudo handling could probably be generalized to all virt runners at some point, but for now this works with the ssh runner. Tests can now just do "sudo -A". But note that it's not always a given that sudo is available, so either test [ -n $SUDO_ASKPASS ] or be prepared that sudo -A fails, and skip tests accordingly.