[Bug 2009871] Re: snapcraft images contain backports repo by default
Simon Poirier
2009871 at bugs.launchpad.net
Wed Feb 7 15:33:24 UTC 2024
** Description changed:
+ [ Impact ]
+
+ * buildd images historically pinned backports at 500, thus installing
+ available backports. This is undesirable when using a buildd image
+ to build non-backport (e.g. snapcraft).
+
+ [ Test Plan ]
+
+ * `apt-cache policy` from within a buildd VM should return the default
+ low (100) priority for backports suites (where InRelease is set to
+ NotAutomatic).
+
+ [ Where problems could occur ]
+
+ * Unless there is some unknown build mechanism at play, Lauchpad builds
+ should remain unaffected as launchpad takes care of this itself. See [1].
+
+ * Any build using buildd implicitly depending on backports by default
+ will see its default change.
+
+ [ Other Info ]
+
+ * [1] https://git.launchpad.net/launchpad-buildd/commit?id=c2ebcb6752
+ Launchpad buildd handling of backports for reference.
+
+ [ Original Description ]
+
It seems some snapcraft images contain the backports repo by default. Verified for current version of snapcraft:core20 at least.
This causes issues at snapcraft build time, as a new repo config is installed when snapcraft runs which doesn't include backports. [ probably by snapcraft itself ].
There is a bug about it here:
https://bugs.launchpad.net/snapcraft/+bug/1982420
I thought I would log an issue here too to discuss, as including
backpacks by default seems like a slightly odd decision, and could even
be a mistake.
Ideally, /etc/apt/preferences.d/backports would not be included in the
image setup process at all by default, so backport packages are never
included by default. Or, if it's there to help fix an issue, perhaps
the apt pinning config with lower priority and take care the required
package installation specifically.
-
## Test ##
multipass launch -n test-20 -d 10g snapcraft:core20
root at test-20:~# dpkg -l |grep devmapper
ii libdevmapper1.02.1:amd64 2:1.02.175-2ubuntu4~ubuntu20.04.1 amd64 Linux Kernel Device Mapper userspace library
root at test-20:~# apt-get update
- root at test-20:~# cat /etc/apt/preferences.d/backports
+ root at test-20:~# cat /etc/apt/preferences.d/backports
Package: *
Pin: release a=*-backports
Pin-Priority: 500
root at test-20:~# apt-cache policy libdevmapper1.02.1
libdevmapper1.02.1:
- Installed: 2:1.02.175-2ubuntu4~ubuntu20.04.1
- Candidate: 2:1.02.175-2ubuntu4~ubuntu20.04.1
- Version table:
- *** 2:1.02.175-2ubuntu4~ubuntu20.04.1 500
- 500 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages
- 100 /var/lib/dpkg/status
- 2:1.02.167-1ubuntu1 500
- 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
-
-
+ Installed: 2:1.02.175-2ubuntu4~ubuntu20.04.1
+ Candidate: 2:1.02.175-2ubuntu4~ubuntu20.04.1
+ Version table:
+ *** 2:1.02.175-2ubuntu4~ubuntu20.04.1 500
+ 500 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages
+ 100 /var/lib/dpkg/status
+ 2:1.02.167-1ubuntu1 500
+ 500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Cheers,
Just
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/2009871
Title:
snapcraft images contain backports repo by default
Status in cloud-images:
New
Status in livecd-rootfs package in Ubuntu:
New
Bug description:
[ Impact ]
* buildd images historically pinned backports at 500, thus installing
available backports. This is undesirable when using a buildd image
to build non-backport (e.g. snapcraft).
[ Test Plan ]
* `apt-cache policy` from within a buildd VM should return the default
low (100) priority for backports suites (where InRelease is set to
NotAutomatic).
[ Where problems could occur ]
* Unless there is some unknown build mechanism at play, Lauchpad builds
should remain unaffected as launchpad takes care of this itself. See [1].
* Any build using buildd implicitly depending on backports by default
will see its default change.
[ Other Info ]
* [1] https://git.launchpad.net/launchpad-buildd/commit?id=c2ebcb6752
Launchpad buildd handling of backports for reference.
[ Original Description ]
It seems some snapcraft images contain the backports repo by default. Verified for current version of snapcraft:core20 at least.
This causes issues at snapcraft build time, as a new repo config is installed when snapcraft runs which doesn't include backports. [ probably by snapcraft itself ].
There is a bug about it here:
https://bugs.launchpad.net/snapcraft/+bug/1982420
I thought I would log an issue here too to discuss, as including
backpacks by default seems like a slightly odd decision, and could
even be a mistake.
Ideally, /etc/apt/preferences.d/backports would not be included in the
image setup process at all by default, so backport packages are never
included by default. Or, if it's there to help fix an issue, perhaps
the apt pinning config with lower priority and take care the required
package installation specifically.
## Test ##
multipass launch -n test-20 -d 10g snapcraft:core20
root at test-20:~# dpkg -l |grep devmapper
ii libdevmapper1.02.1:amd64 2:1.02.175-2ubuntu4~ubuntu20.04.1 amd64 Linux Kernel Device Mapper userspace library
root at test-20:~# apt-get update
root at test-20:~# cat /etc/apt/preferences.d/backports
Package: *
Pin: release a=*-backports
Pin-Priority: 500
root at test-20:~# apt-cache policy libdevmapper1.02.1
libdevmapper1.02.1:
Installed: 2:1.02.175-2ubuntu4~ubuntu20.04.1
Candidate: 2:1.02.175-2ubuntu4~ubuntu20.04.1
Version table:
*** 2:1.02.175-2ubuntu4~ubuntu20.04.1 500
500 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages
100 /var/lib/dpkg/status
2:1.02.167-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Cheers,
Just
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2009871/+subscriptions
More information about the foundations-bugs
mailing list