Public bug reported:

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.

** Affects: autopkgtest (Ubuntu)
     Importance: Undecided
         Status: New

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

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

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to