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

Check GPG key on Candlepin repository #10880

Open
wants to merge 3 commits into
base: rpm/develop
Choose a base branch
from

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Jun 3, 2024

We are using versioned and signed Candlepin repositories, so there is no reason to mark gpgcheck as 0 in rpm/develop. This will then make it easier when branching as no special actions are needed.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today we have candlepin_version set to 4.4 here, but also in forklift (https://github.com/theforeman/forklift/blob/649cb93a27f3d09365f8b9276bfe315822b6c8bb/vagrant/config/versions.yaml#L106). I thought we wanted to track the nightly version instead.

@dgoetz
Copy link
Member

dgoetz commented Jun 3, 2024

While on this would be this also a good time to look in the user request to have the key in the repository online in addition to the package?

@ehelms
Copy link
Member Author

ehelms commented Jun 3, 2024

I thought we wanted to track the nightly version instead.

I am more leaning towards nightly is more work than it's worth due to the slower update cycle, and ease of which it is to update Candlepin. And that it saves energy and time to just align on a version of Candlepin.

@ekohl
Copy link
Member

ekohl commented Jun 3, 2024

I think the biggest challenge is that you'd constantly need to change the default branch. We saw with pulpcore-packaging that people forget. Git clones also don't automatically pick that up either. It's kind of unfortunate.

I don't think GitHub support branch aliases.

@ehelms
Copy link
Member Author

ehelms commented Jun 6, 2024

I think the biggest challenge is that you'd constantly need to change the default branch. We saw with pulpcore-packaging that people forget. Git clones also don't automatically pick that up either. It's kind of unfortunate.

I don't think GitHub support branch aliases.

I'm not following how git and branches affect.

@evgeni
Copy link
Member

evgeni commented Jun 13, 2024

This would also require to be updated in https://github.com/theforeman/forklift/blob/a94af75f4d3ecbae54c407a3598dea427659438a/roles/candlepin_repositories/tasks/main.yml#L7 (and then that role have access to the key somehow, e.g. by it being reachable via an URL) as in the pipelines we do not use the release RPM.

@evgeni
Copy link
Member

evgeni commented Jun 14, 2024

theforeman/forklift#1829

@ehelms
Copy link
Member Author

ehelms commented Jun 14, 2024

Thanks for tackling that! I'll let you do the honors of updating https://community.theforeman.org/t/could-the-candlepin-gpg-keys-be-published-somewhere-http-reachable/38193 with the news

@@ -15,7 +15,7 @@ name=Candlepin: an open source entitlement management system.
baseurl=https://yum.theforeman.org/candlepin/@CANDLEPIN_VERSION@/@DIST@/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin
gpgkey=https://yum.theforeman.org/candlepin/@CANDLEPIN_VERSION@/RPM-GPG-KEY-candlepin

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still prefer to include the GPG keys in the file so it can validate offline. That's the whole point of this package. I now see we don't do it for Pulp either.

One problem with networked URLs is that yum/dnf never checks expiration. So if the keys expire, you must manually replace them. Now this probably isn't a big deal for us if users stay on supported releases, given how often we use new keys but still something to keep in mind.

It does mean more work in the release process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validate what offline? The RPMs that you need to be online to fetch?
(If you're mirroring the repo, that package is useless anyway and you can to mirror the key too)

To make that more viable, we'd need to ship separate packages for these things, like CentOS does:

# rpm -qa centos*
centos-gpg-keys-9.0-23.el9.noarch
centos-stream-repos-9.0-23.el9.noarch
centos-stream-release-9.0-23.el9.noarch

(This is not me volunteering to implement this)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to include the GPG key in this file. And I too thought about separate release files for each repo, but wasn't keen on implementing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented my preference in #11128.

@ehelms
Copy link
Member Author

ehelms commented Aug 13, 2024

@ekohl I think this should go in before branch

baseurl=https://yum.theforeman.org/candlepin/@REPO_VERSION@/@DIST@/source/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-candlepin
baseurl=https://yum.theforeman.org/candlepin/@CANDLEPIN_VERSION@/@DIST@/source/
gpgkey=https://yum.theforeman.org/candlepin/@CANDLEPIN_VERSION@/RPM-GPG-KEY-candlepin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you updated to the web url, but not above. seems inconsistent.

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

Successfully merging this pull request may close these issues.

4 participants