Can't use local deb binaries on a readonly testbed

Bug #1434163 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

In the ubuntu-ota-tests project, the debian/control defines a python package python3-ubuntu-ota-tests. We need this package to be in the PYTHONPATH for it to be found by the upgrade hook.

If we run
$ adt-run --unbuilt-tree . --- ssh -s adb

We will get:
dpkg-buildpackage: error: fakeroot not found, either install the fakeroot
package, specify a command with the -r option, or run this as root
blame: .
badpkg: rules build failed with exit code 2
adt-run [09:57:07]: ERROR: erroneous package: rules build failed with exit code 2
Exit request sent.

If we run:
$ bzr bd --result-dir=/tmp -- -uc -us
$ adt-run --binary /tmp/python3-ubuntu-ota-tests*.deb --built-tree . --- ssh -s ./adb-reboot-to-recovery

We will get:
sh: 1: cannot create /etc/apt/preferences.d/90autopkgtest: Read-only file system
Exit request sent.
<VirtSubproc>: failure: copydown destination failed, status 2
adt-run [09:49:48]: ERROR: testbed failed: cannot send to testbed: ['BrokenPipeError: [Errno 32] Broken pipe\n']

I think the right solution for this case is the second one, using a built-tree, and send the deb to the testbed. So what we are missing is to install those debs in the tmp directory just as the rest of dependencies.

Revision history for this message
Leo Arias (elopio) wrote :

We can use some workarounds, like hack the PYTHONPATH, or cd into the directory that has the python package, so it will be found in the cwd. We might need both things for some tests.
What will make the tests easier is just to have it installed.

Revision history for this message
Barry Warsaw (barry) wrote :

Of course, when we reuse python3-ubuntu-ota-tests in other packages, it will have to be installed. I think we'd like this package's own tests to run the same way (i.e. not fiddle with sys.path or cd).

Revision history for this message
Leo Arias (elopio) wrote :

Another possible workaround is to make the device writable, install fakeroot, and then make it read-only again. This is not ideal of course, as we want to keep the device read-only. I'm just mentioning it, but don't try it at home.

Revision history for this message
Leo Arias (elopio) wrote :

Making the device writable and installing all the packages required for the build is not an option either. In the end we get the same error as when we build the package on the host:

sh: 1: cannot create /etc/apt/preferences.d/90autopkgtest: Read-only file system

Martin Pitt (pitti)
summary: - Can't run tests that require build in a readonly testbed
+ Can't use local deb binaries on a readonly testbed
Changed in autopkgtest (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Martin Pitt (pitti)
Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in autopkgtest (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
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.