Using core24 fails due to change in apt sources
Metadata
Current evaluation
Fixed by snapcore/snapcraft#4551, which bumped craft-providers to 1.22.0; the reporter confirmed the fix on latest/edge.
Resolution: closed resolved
Reason: Snapcraft PR #4551 merged as commit 7e6149fcf and upgraded craft-providers to 1.22.0, incorporating the handling needed for Ubuntu's deb822 APT sources. The reporter confirmed that Snapcraft 8.0.2.post14+git89961cfc resolved the failure.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I recently (2024-01-26) noticed that using `core24` base images to build snaps fails with following error:
Building the snap
Starting Snapcraft 8.0.2
Logging execution to '/root/.local/state/snapcraft/log/snapcraft-20240129-145704.016210.log'
Running on amd64 for amd64
Running snapcraft with a devel instance is for testing purposes only.
Launching instance...
Creating new instance from remote
Creating new base instance from remote
craft-providers error: Failed to update '/etc/apt/sources.list'.
* Command that failed: 'lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v40--6ab3ba8465d03a3bbf7b -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin SNAPCRAFT_MANAGED_MODE=1 sed -i s/noble/devel/g /etc/apt/sources.list'
* Command exit code: 2
* Command standard error output: b"sed: can't read /etc/apt/sources.list: No such file or directory\n"
The base build instance is using following lxc image:
image.os: ubuntu
image.release: noble
image.serial: "20240129"
image.type: squashfs
image.version: "24.04"
It seems that the file `/etc/apt/sources.list` was replaced with `/etc/apt/sources.list.d/ubuntu.sources` in the latest noble image build.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#4551, which bumped craft-providers to 1.22.0; the reporter confirmed the fix on latest/edge. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#4551, which bumped craft-providers to 1.22.0 (skipping APT source updates on Ubuntu devel images), released in 8.0.2.post14; reporter confirmed fix on latest/edge. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by craft-providers PR #504 (commit 468126c), merged for version 1.23.0: devel/core24 builds no longer attempt to rewrite missing /etc/apt/sources.list. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft failed to build core24 snaps because Ubuntu Noble replaced /etc/apt/sources.list with ubuntu.sources, but no fix was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft core24 builds failed because Ubuntu Noble replaced /etc/apt/sources.list with /etc/apt/sources.list.d/ubuntu.sources, causing an expected sed command to fail. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The failure occurs because Ubuntu 24.04 replaced /etc/apt/sources.list with ubuntu.sources, likely superseded by upstream image updates. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. Snapcraft core24 builds failed because Ubuntu Noble replaced /etc/apt/sources.list with /etc/apt/sources.list.d/ubuntu.sources, causing the apt update command to error out. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#4551
(confidence 100%)
Merged as commit 7e6149fcf, bumping craft-providers to 1.22.0.
-
Likely Fixed By:
canonical/craft-providers#501
(confidence 98%)
Underlying craft-providers fix for changing Ubuntu APT source handling.
-
Related To:
canonical/craft-providers#503
(confidence 98%)
Upstream tracking issue referenced by the Snapcraft maintainer.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4576 edge/components out of date | snapcraft | closed | latest/edge/components snap revision 10646 restored core24 provider support; the reporter confirmed that core24 builds worked after the release. | |
| #3583 build providers: snapcraft's new base is core20 (CRAFT-544) | snapcraft | merged | Merged PR #3583 via 2b2d7dbcf, replacing build providers' injected core18 base with core20 to match Snapcraft's new base. | |
| #4693 feat: core24 using Craft Application and core22 components | snapcraft | merged | Merged as commit ab1c86df3: snaps with base core24 are now built using Craft Application and core22 components, a large change (284 files, +10487/-1939) in snapcraft. | |
| #4938 build(deps): bump craft-providers to 1.25.0 | snapcraft | closed | PR closed unmerged and superseded by canonical/snapcraft#5006 (merged as commit 96140ad2a), which bumped craft-providers to 1.24.2 and required Multipass >=1.14.1 for core24 builds instead of 1.25.0. | |
| #1976221 Missing linker base while building with core22 base | snapcraft (launchpad) | closed | Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded. | |
| #5234 Changing to Core24 breaks docker setup | snapcraft | closed | PR #5136 (commit 2e7f5c3b9) migrated Snapcraft to core24, breaking Ubuntu 22.04 Docker hosts; #5234 was closed after acknowledgment with no recorded compatibility fix. | |
| #6336 Snapcraft 9: snapcraftctl errors in core22 snaps | snapcraft | closed | Fixed a validator bug preventing core22/core24 snaps without a `base` key from using `snapcraftctl`. Merged as #6499, resolving #6336. | |
| #1819 build(snap): update snap to core24 | charmcraft | closed | Closed unmerged; the core24 migration was later completed by charmcraft#2412 in commit 5d8ea0e4. | |
| #767 build(snap): update snap to core24 | rockcraft | merged | Merged as a95c94fe: bumped the Rockcraft snap from core22 to core24 in snap/snapcraft.yaml (+29/-107 across 7 files), closing issue #750. Noted in the 1.7 release notes. | |
| #4740 `package-repositories` fail with the core24 base due to missing packages | snapcraft | closed | Fixed in merged PR #4754 (commit 712626448) and released in Snapcraft 8.2.1: core24 remote builds now install GPG/dirmngr before configuring package repositories. |