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

Import repository keys in container build #936

Open
tacerus opened this issue Jun 5, 2023 · 0 comments
Open

Import repository keys in container build #936

tacerus opened this issue Jun 5, 2023 · 0 comments

Comments

@tacerus
Copy link
Member

tacerus commented Jun 5, 2023

Hello,

in Dockerfile builds outside of OBS it is possible to install additional repositories and import the associated keys at build time using, for example:

RUN zypper ar -f -p 100 http://download.opensuse.org/repositories/openSUSE:infrastructure/15.4/ "openSUSE:infrastructure"
RUN zypper -n --gpg-auto-import-keys ref

In https://github.com/openSUSE/obs-build/blob/master/obs-docker-support#L65, all refresh activity is cancelled out - this makes sense, as repositories do not need to refreshed in the build environment, however it does not offer an alternative to import signing keys.

A workaround is to use the download_assets service:

#!RemoteAssetUrl: https://download.opensuse.org/repositories/openSUSE:/infrastructure/15.4/repodata/repomd.xml.key
COPY repomd.xml.key /tmp/
RUN rpm --import /tmp/repomd.xml.key ; rm /tmp/repomd.xml.key

Needless to say, that route is a bit ugly.

It would be nice if there was a native way to import signing keys of additional OBS repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant