Merge ~ahasenack/ubuntu/+source/sbuild:disco-fix-dep8-issues into ubuntu/+source/sbuild:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: Andreas Hasenack
Approved revision: f94bf6f470726de1792abaf4c2249c28f1f9b806
Merged at revision: 63b0c8667bf8f6964bccfa680fc47d4db81d59eb
Proposed branch: ~ahasenack/ubuntu/+source/sbuild:disco-fix-dep8-issues
Merge into: ubuntu/+source/sbuild:ubuntu/devel
Diff against target: 41 lines (+10/-5)
3 files modified
debian/changelog (+8/-0)
debian/tests/build-procenv (+1/-4)
debian/tests/control (+1/-1)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Core Reviewers Pending
Review via email: mp+360079@code.launchpad.net

Description of the change

Bileto ticket, associated ppa, and dep8 tests:

https://bileto.ubuntu.com/#/ticket/3549

This addresses the following issues in the sbuild DEP8 tests:

a) armhf tests
The armhf tests have been failing forever[1] because debootstrap is told to use a directory in /tmp, and the way /tmp is handled in lxd containers prevents device nodes from being created there. I changed d/t/control to require a vm for these tests. Another option would be to tell debootstrap to use another directory, perhaps something in /var/lib. This could also be a follow-up branch.

b) host release versus chroot release
The way the tests are run means their result is only valid in the development version of ubuntu at any given time. That's because they create a chroot for the development version of ubuntu, build procenv (a package) in there, and then try to install it on the *host*. This only makes sense if the host is also running the development version of ubuntu; all other cases are void and might fail. This test is a sort of time bomb as it is, because it's valid for devel, but will likely fail when SRUs start to kick in.
This is what is failing the i386 sbuild tests on bionic currently[2]
The change I made is to basically uncomment the original code that checked for this situation.

Better fixes can be made for both (a) and (b). The first one I outlined earlier, and a better fix for the second case would be to build the test package on both releases of ubuntu (host and -devel), and try to install the correct one, instead of always the devel one. I decided to leave that for another time and focus on fixing the existing test instead of adding a new one. But let me know your thoughts.

1. http://autopkgtest.ubuntu.com/packages/sbuild/
2. http://autopkgtest.ubuntu.com/packages/sbuild/bionic/i386

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ack to isolation-machine and it might even work that way.
But to be safe against future "strictness" [1] defines it as comma separated.
So I'd think we should do so on upload.

No need to overengineer (b), ack to re-install the old check for now.

+1 under the constraint to fix up or explain-why-not the comma in the Restrictions line.

[1]: https://people.debian.org/~mpitt/autopkgtest/README.package-tests.html

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I grepped d/t/control in other packages and saw a mix (whitespace vs comma). I'll use a comma, since it's in that spec.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

fixed and force-pushed.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Tag pushed and uploaded

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 6426799..206a3f1 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+sbuild (0.77.1-2ubuntu2) disco; urgency=medium
7+
8+ * d/t/control: add isolation-machine to the test flags (LP: #1806389)
9+ * d/t/build-procenv: only install the built package if the chroot it was
10+ built in matches the release of the host system (LP: #1806388)
11+
12+ -- Andreas Hasenack <andreas@canonical.com> Mon, 03 Dec 2018 11:47:38 -0200
13+
14 sbuild (0.77.1-2ubuntu1) disco; urgency=low
15
16 * Merge from Debian unstable. Remaining changes:
17diff --git a/debian/tests/build-procenv b/debian/tests/build-procenv
18index 7121c71..dd19ebc 100644
19--- a/debian/tests/build-procenv
20+++ b/debian/tests/build-procenv
21@@ -129,10 +129,7 @@ extract="$ADTTMP/extract"
22 echo "INFO: Extracting '$deb' to '$extract'"
23 dpkg --extract "$deb" "$extract"
24
25-# We should probably only attempt to install and run procenv if the release of
26-# the build chroot is equal to the host, but lets be brave and try anyway
27-if true
28-#if [ "$release" = "$host_release" ]
29+if [ "$release" = "$host_release" ]
30 then
31 echo "INFO: Installing package '$pkg' from '$deb'"
32 apt -o Apt::Cmd::Disable-Script-Warning=1 -o APT::Get::Assume-Yes=1 install "$(pwd)/$deb"
33diff --git a/debian/tests/control b/debian/tests/control
34index aaa57ce..654ae44 100644
35--- a/debian/tests/control
36+++ b/debian/tests/control
37@@ -1,3 +1,3 @@
38 Tests: build-procenv
39 Depends: @, debootstrap, distro-info, lsb-release, apt (>= 1.1~exp2), apt-utils
40-Restrictions: needs-root
41+Restrictions: needs-root, isolation-machine

Subscribers

People subscribed via source and target branches