Running adt-run without root installs the click for all users

Bug #1384417 reported by Carla Sella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

If you run:

adt-run ubuntu-clock-app/ --click com.ubuntu.clock_3.2.158_armhf.click --- ssh -s adb

for instance, you get this error:

Cannot install /tmp/adt-run.ixZeib/com.ubuntu.clock_3.2.158_armhf.click: Cannot acquire permission to write to /opt/click.ubuntu.com; either run as root with --user, or use "pkcon install-local" instead
adt-run [21:18:00]: ERROR: unexpected error: click install failed with status 1

adt-run must be run with "-- -p password" to allow the click to be installed, instead.
If we don't have root the click shouldn't be installed for all users.

Revision history for this message
Martin Pitt (pitti) wrote :

Since we dropped autopilot from the images, you *need* to specify your sudo password (unless it's "0000" which the runner tries by default). Without having root on the phone there is no way that we can adjust the AppArmor policy for enabling autopilot to work.

But I fixed it up to the point that the test at least doesn't crash with this error: The click now installs, and AppArmor rule adjustment is just skipped, instead you get a warning

   adt-run: WARNING: Cannot adjust AppArmor rules without root/sudo privileges; Autopilot tests will fail and test dependencies will not be available!

http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=0180f8b0

Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.8.1

---------------
autopkgtest (3.8.1) unstable; urgency=medium

  * If the testbed does not have root privileges (e. g. missing sudo
    password), install click packages with pkcon and skip the AppArmor rule
    adjustment. This makes non-root click tests at least work for
    non-Autopilot cases. (LP: #1384417)
  * Make --shell-fail also apply to test dependency installation failure.
  * Run root tests through "su" as well (if possible), to ensure that these
    also get a proper PAM/logind session with all runners. (LP: #1393474)
  * Skip the test_tmp_install tests if apt-get download does not work. This
    might happen in some build environments which completely disable
    networking or don't have working apt-get download for some reason.
    (Closes: #769687)
  * Don't put the log FIFO into the output directory. This avoids keeping it
    in --output-dir, which fails if the output dir happens to be in the tested
    tree itself. (LP: #1393426)
  * adt-setup-vm: Don't purge man-db. It uninstalls way too much on images
    which aren't just minimal environments.
  * adt-setup-vm: Drop bogus "X-Start-Before" line in generated init.d script.
    (Closes: #770517)
  * Respect DEB_BUILD_OPTIONS=nocheck (side issue in #769687)

 -- Martin Pitt <email address hidden> Thu, 27 Nov 2014 10:54:02 +0100

Changed in autopkgtest (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.