Package: autopkgtest Version: 2.10 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu trusty ubuntu-patch
The adt-virt-schroot manpage says: adt-virt-schroot reads the schroot configuration (root-users/root- groups) to determine whether it can enter the schroot as root user; if so, it sets the root-on-testbed capability and you can run tests which require building or running as root. If your user is not allowed to do that, you need to run adt-run as root instead. However, running adt-run as root still does not set the root-on-testbed capability, which means that trying to run a test that requires this capability still fails if I run e.g., 'sudo adt-run'. The attached patch makes adt-virt-schroot consistent with the manpage. Possible changelog entry: [ Steve Langasek ] * Fix adt-virt-schroot to correctly return root-on-testbed when we're running adt-run as root. Thanks for considering the patch. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
=== modified file 'virt-subproc/adt-virt-schroot' --- virt-subproc/adt-virt-schroot 2014-02-24 10:12:48 +0000 +++ virt-subproc/adt-virt-schroot 2014-03-05 17:00:08 +0000 @@ -97,7 +97,8 @@ capabilities.append('revert') if (match(cfg['root-users'], [os.getuid()], pw_uid) or - match(cfg['root-groups'], [os.getgid()] + os.getgroups(), gr_gid)): + match(cfg['root-groups'], [os.getgid()] + os.getgroups(), gr_gid) or + os.getuid() == 0): VirtSubproc.debug('have "root-on-testbed" capability') capabilities.append('root-on-testbed')