Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key conflict on noble due to http vs https #139

Closed
tigarmo opened this issue Nov 22, 2024 · 1 comment · Fixed by #140
Closed

Key conflict on noble due to http vs https #139

tigarmo opened this issue Nov 22, 2024 · 1 comment · Fixed by #140
Labels
bug Something isn't working triaged

Comments

@tigarmo
Copy link
Collaborator

tigarmo commented Nov 22, 2024

Bug Description

Related to #129 , the following specification on noble:

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

... fails with:

2024-11-22 10:00:27.608 Refreshing repositories
2024-11-22 10:00:27.608 Executing: ['apt-get', 'update']
2024-11-22 10:00:27.615 :: E: Conflicting values set for option Signed-By regarding source https://archive.ubuntu.com/ubuntu/ noble: /etc/apt/keyrings/craft-991BC93C.gpg != /usr/share/keyrings/ubuntu-archive-keyring.gpg
2024-11-22 10:00:27.615 :: E: The list of sources could not be read.

From the logs, it looks like craft-archives is reading the existing sources but ignoring them because their url is http and not https:

2024-11-22 10:00:27.601 Looking for existing sources files for url 'https://archive.ubuntu.com/ubuntu' and suites ['noble']
2024-11-22 10:00:27.601 Reading sources in '/etc/apt/sources.list.d/ubuntu.sources' looking for 'https://archive.ubuntu.com/ubuntu/'
2024-11-22 10:00:27.602 Source does not have a matching url: http://archive.ubuntu.com/ubuntu/
2024-11-22 10:00:27.602 Source does not have a matching url: http://security.ubuntu.com/ubuntu/
2024-11-22 10:00:27.602 No existing sources found

To Reproduce

.

part yaml

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

Relevant log output

.
@tigarmo tigarmo added bug Something isn't working triaged labels Nov 22, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

tigarmo added a commit that referenced this issue Dec 4, 2024
Apt does not take the scheme (e.g. http vs https) into account when parsing
sources, which means that, for the purposes of finding existing keys,
'https://archive.ubuntu.com' and 'http://archive.ubuntu.com' should be
considered the same.

Fixes #139
lengau pushed a commit that referenced this issue Dec 5, 2024
Apt does not take the scheme (e.g. http vs https) into account when parsing
sources, which means that, for the purposes of finding existing keys,
'https://archive.ubuntu.com' and 'http://archive.ubuntu.com' should be
considered the same.

Fixes #139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant