[Bug 1079358] Re: 'needs-root' in combination with 'build-needed' unpacks code and runs build as root

Dmitrijs Ledkovs launchpad at surgut.co.uk
Wed Nov 28 20:03:58 UTC 2012


*** This bug is a duplicate of bug 1084116 ***
    https://bugs.launchpad.net/bugs/1084116

** This bug has been marked a duplicate of bug 1084116
   adt-run fails with permission denied with option --user

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1079358

Title:
  'needs-root' in combination with 'build-needed' unpacks code and runs
  build as root

Status in “autopkgtest” package in Ubuntu:
  New

Bug description:
  If a DEP-8 package contains a debian/tests/control file which
  specifies:

    Restrictions: needs-root build-needed

  ... autopkgtest will:

  - unpack the source as the root user
  - run the build as the root user

  This is unnecessary and places a burden on the test script to handle
  this scenario since if a test drops root privileges:

  - it find that the directory tree is not writeable
  - autopkgtest may well end up running the tests as root. This happens for Upstart since it has a 'make check' rule and dh calls dh_auto_test by default. However, it is not valid to run the Upstart tests as root.

  I believe the behaviour of autopkgtest should be modified to:

  1) Unpack the source as the user the tests would be run as if 'needs-root' were not specified.
  2) Run the build as the same non-privileged user.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1079358/+subscriptions




More information about the foundations-bugs mailing list