lb chroot_archives eats apt preferences files

Bug #1855354 reported by Michael Hudson-Doyle
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Michael Hudson-Doyle
Trusty
Fix Released
Undecided
Michael Hudson-Doyle
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[impact]
This breaks apt update in a trusty docker image that does not have ESM enabled.

[test case]
for trusty:

Build a livefs with image_format=plain, project=ubuntu-base. Unpack it, do the usual pre-chroot setup dance (copy resolv.conf, bind mount proc and dev) chroot into it and run apt update.

for the newer releases:
We have no seeded package that create apt preferences in their postinst yet, so let's just check the autopkgtest results.

[regression potential]
The change could conceivably leave apt preference files we want deleted in an image. But this seems very unlikely.

Related branches

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted livecd-rootfs into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.208.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed verification-needed-trusty
Changed in livecd-rootfs (Ubuntu):
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Changed in livecd-rootfs (Ubuntu Trusty):
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.635

---------------
livecd-rootfs (2.635) focal; urgency=medium

  * Preserve apt preferences created by any package we install (i.e.
    ubuntu-advantage-tools) against live-build's attempt to delete them.
    (LP: #1855354)

 -- Michael Hudson-Doyle <email address hidden> Sat, 14 Dec 2019 21:00:45 +1300

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Verification complete on trusty:

1) I started two trusty ubuntu-base livefs builds:

$ start-livefs-build --livefs=~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests --pocket Updates --metadata project='"ubuntu-base"' --metadata image_format='"plain"'
https://launchpad.net/~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests/+build/195865
$ start-livefs-build --livefs=~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests --pocket Proposed --metadata project='"ubuntu-base"' --metadata image_format='"plain"'
https://launchpad.net/~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests/+build/195866

2) When they'd built, I downloaded the artifacts:

$ wget -O ubuntu-base-trusty-updates.tar.gz https://launchpad.net/~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests/+build/195865/+files/livecd.ubuntu-base.rootfs.tar.gz
$ wget -O ubuntu-base-trusty-proposed.tar.gz https://launchpad.net/~mwhudson/+livefs/ubuntu/trusty/docker-ubuntu-core-tests/+build/195866/+files/livecd.ubuntu-base.rootfs.tar.gz

3) I tested them using this silly script:

mwhudson@anduril:~/tmp/trusty-test$ cat test.sh
#!/bin/bash -eux

cleanup () {
    for m in dev/pts dev proc sys; do
        umount chroot/$m
    done
    rm -rf chroot
}
trap cleanup EXIT

mkdir chroot
tar -C chroot -xf "$1"
for m in dev dev/pts proc sys; do
    mount --bind /$m chroot/$m
done
cp /etc/resolv.conf chroot/etc
chroot chroot apt update
chroot chroot apt install -y socat
$

The output is rather verbose so it's here: https://paste.ubuntu.com/p/Mgf6qh2RGx/ but the upshot is that the attempt to install socat failed with the -updates tarball and succeeded with the -proposed tarball.

tags: added: verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.208.18

---------------
livecd-rootfs (2.208.18) trusty; urgency=medium

  * Preserve ubuntu-advantage-tools' apt preferences against live-build's
    attempt to delete them. (LP: #1855354)

 -- Michael Hudson-Doyle <email address hidden> Fri, 06 Dec 2019 14:03:11 +1300

Changed in livecd-rootfs (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted livecd-rootfs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.36 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in livecd-rootfs (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Michael, or anyone else affected,

Accepted livecd-rootfs into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.408.57 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

The autopkgtests for the update in both xenial and bionic passed, which is all the verification we can sensibly do at this stage.

tags: added: verification-done-bionic verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-xenial
tags: added: id-5de5ca6eb07b3c125672fe4e
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.525.36

---------------
livecd-rootfs (2.525.36) bionic; urgency=medium

  * Preserve apt preferences created by any package we install (i.e.
    ubuntu-advantage-tools) against live-build's attempt to delete them.
    (LP: #1855354)

 -- Michael Hudson-Doyle <email address hidden> Thu, 19 Dec 2019 22:43:33 +1300

Changed in livecd-rootfs (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.408.57

---------------
livecd-rootfs (2.408.57) xenial; urgency=medium

  * Preserve apt preferences created by any package we install (i.e.
    ubuntu-advantage-tools) against live-build's attempt to delete them.
    (LP: #1855354)

 -- Michael Hudson-Doyle <email address hidden> Thu, 19 Dec 2019 22:42:12 +1300

Changed in livecd-rootfs (Ubuntu Xenial):
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.