many: add GPG key resolving and source#2206
Open
lzap wants to merge 7 commits into
Open
Conversation
Simplify GPGKeysForPackages by using slices.Compact to remove duplicates.
Ignore key strings which are not valid ASCII armored GPG keys. When a custom repository contains an URL with a key, this gets passed to the RPM stage to import which ultimately fails.
Refactor the Add method to accept multiple URLs instead of a single URL. This allows a bit cleaner code.
Use the remotefile package to resolve URL shasums in the CurlSource.
Separate test helpers with import cycles by moving the helpers to the internal/testarch and internal/testdistro packages. This now allows using the helpers in other packages, specifically in the osbuild package.
Add GPG key URLs to the sources. Invalid URLs are ignored therefore all the keys can be passed in.
Member
|
Adding an unused source to a manifest is IMHO a bug, so maybe let's hold off with this PR until the source is actually used in the manifest by a stage? |
|
This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days. |
|
This PR was closed because it has been stalled for 30+7 days with no activity. |
Contributor
|
This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes. This is simply a notice. It will not block this PR from being merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses the recently refactored
remotefilepackage and adds a bit of code that can be used to resolve and add any URLs to the sources. Then, it uses this for custom repo GPG keys which are URLs to resolve them.This by itself does not do anything but adds a new curl source and stops actually trying to import URLs in the RPM stage which fixes the bugreport. I added NVidia GPG key to validate the functionality, here is the diff:
I will continue on integrating this with osbuild/osbuild#2326 which adds ability to pull GPG key from sources. This could be merged as well as a standalone patch if we want but I think I will add the functionality on top.
Fixes: https://issues.redhat.com/browse/HMS-10216