chown fails on root-owned files with "rw-build-tree"

Bug #1535234 reported by Martin Pitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

The ubuntu-make tests currently tmpfail on xenial due to this:

adt-run [15:33:32]: test large: [-----------------------
chown: changing ownership of ‘/tmp/adt-run.0gWOMN/build.oq7/ubuntu-make/tests/tools/__pycache__/local_server.cpython-34.pyc’:
+Operation not permitted
chown: changing ownership of ‘/tmp/adt-run.0gWOMN/build.oq7/ubuntu-make/tests/tools/__pycache__/__init__.cpython-34.pyc’:
+Operation not permitted
adt-run [15:33:32]: test large: -----------------------]
sh: 1: cannot open /tmp/adt-run.0gWOMN/large-stdout: No such file
Exit request sent.
<VirtSubproc>: failure: copyup source failed, status 2
adt-run [15:33:40]: ERROR: testbed failure: unexpected eof from the testbed

This test has "Restrictions: rw-build-tree", but does not run as root, thus this code in run_tests() gets run:

        if self.user and 'rw-build-tree' in test.restrictions:
            script += 'chown -R %s "$buildtree"; ' % self.user

this is bogus as chown as user will fail on any file which is not already owned by that user. Thus the test wrapper shell script fails before it even gets to starting "tee" for -stdout/-stderr and it fails in the above manner.

Martin Pitt (pitti)
Changed in autopkgtest (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

Reproduced in test case and fixed in http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=b2148a.

@Didier: Please re-run the ubuntu-make tests against xenial, this should fix it.

Changed in autopkgtest (Ubuntu):
importance: Medium → Undecided
status: In Progress → Fix Committed
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Started right now, let's see :) Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.19.2

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

  * Fix "apt-get source" version detection:
    - Ignore source record "Binary:" entries which are not actually binaries
      of that source.
    - Take the highest source version of all encountered binaries. In other
      words, as soon as apt pinning uses one package from -proposed, use the
      tests from -proposed too.
    - Only consider binaries which exist in all releases. This avoids newly
      introduced binaries (library transitions, new kernel versions) to skew
      the intended apt pinning as they would always win the "highest version"
      check from above.
  * Install /usr/share/autopkgtest/setup-commands/* scripts as executable, to
    make them work for vmdebootstrap --customize. (Closes: #810862)
  * ssh-setup/nova: Use extended RE for matching --image pattern.
  * setup-commands/setup-testbed: Fix handling of options in sources.list.
  * tools/adt-build-lxd: Fix parsing of release name from apt sources with
    options if lsb_release is not available.
  * setup-commands/setup-testbed: Regenerate initramfs when adding udev rule
    for disabling ifnames (for chroots).
  * adt-buildvm-ubuntu-cloud: Drop duplicate sed of cloud-init.prerm.
  * adt-buildvm-ubuntu-cloud: Don't try to run "None" if --post-command is not
    given.
  * adt-virt-lxc: Add timeouts to all LXC operations.
  * Fix chowning for "rw-build-tree" restriction: run it as root if available,
    and otherwise ignore it entirely. (LP: #1535234)
  * Drop apt-cache showsrc --only-source option, as this is not yet understood
    by Ubuntu 12.04's apt.
  * VirtSubproc.py, execute_timeout(): Avoid UnicodeDecodeErrors when called
    programs send gibberish. Decode manually with "replace" error mode
    instead. (LP: #1535741)
  * adt-virt-lxc: Avoid unnecessary reading and decoding of program outputs if
    we don't actually use it.
  * ssh-setup/nova: Use the image with the latest "created" time, instead of
    the last lexicographic name.

 -- Martin Pitt <email address hidden> Thu, 21 Jan 2016 13:30:40 +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.