canonical / craft-archives

A library for handling archives/repositories in Craft applications
https://canonical-craft-archives.readthedocs-hosted.com
GNU Lesser General Public License v3.0
0 stars 8 forks source link

Key conflicts when using the official (or ports) archives in Noble #129

Open tigarmo opened 5 days ago

tigarmo commented 5 days ago

Bug Description

Since Noble, the default Apt installation lists the official archives in deb822 format with a Signed-By key pointing to the /usr/share/keyrings/ubuntu-archive-keyring.gpg included in the installation. This conflicts with craft-archives' handling in cases where the archives are listed as package-repositories (to, for example, add an architecture).

Reference: https://bugs.launchpad.net/snapcraft/+bug/2083013

To Reproduce

Run an ubuntu@24.04 build on amd64 using the package-repositories listed below.

part yaml

package-repositories:
  - type: apt
    url: http://archive.ubuntu.com/ubuntu
    suites: [noble]
    components: [main, universe]
    architectures: [i386]
    key-id: F6ECB3762474EDA9D21B7022871920D1991BC93C
    key-server: keyserver.ubuntu.com

Relevant log output

apt_pkg.Error: 
E:Conflicting values set for option Signed-By regarding source http://archive.ubuntu.com/ubuntu/ noble: /etc/apt/keyrings/craft-991BC93C.gpg != /usr/share/keyrings/ubuntu-archive-keyring.gpg, 
E:The list of sources could not be read.
syncronize-issues-to-jira[bot] commented 5 days ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3538.

This message was autogenerated