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

Implement .repo file for RPM repositories #1687

Merged
merged 4 commits into from May 8, 2020

Conversation

pieterlexis
Copy link

Closes #5356
https://pulp.plan.io/issues/5356

Opened early for review, this needs tests and docs.

Basically, this PR makes the content server serve config.repo files at $CONTENT_PATH_PREFIX/rpm/$BASE_PATH/config.repo that look something like this:

[foo]
enabled=1
baseurl=http://localhost:24816/pulp/content/base_path
gpgcheck=0
gpgrepocheck=0

Or, when a metadata signing service is enabled:

[bar]
enabled=1
baseurl=http://localhost:24816/pulp/content/bar
gpgcheck=0
gpgrepocheck=1
gpgkey=http://localhost:24816/pulp/content/rpm/bar/public.key

Additionally, when the signing service is enabled, theres also a public key served at $CONTENT_PATH_PREFIX/rpm/$BASE_PATH/public.key.

@dkliban mentions in the issue:

the new handler should handle a route that looks like this: settings.RPM_CONTENT_PATH_PREFIX + '{path:.+}'. This is a slight variation on what pulpcore already provides[1].

However, the RPM repos did not have this prefix yet. Should the content for RPM always be prefixed with this or shall I remove it from this PR, pending a discussion on this?

@pulpbot
Copy link
Member

pulpbot commented Apr 24, 2020

Can one of the admins verify this patch?

1 similar comment
@pulpbot
Copy link
Member

pulpbot commented Apr 24, 2020

Can one of the admins verify this patch?

pulp_rpm/app/handler.py Outdated Show resolved Hide resolved
@mdellweg
Copy link
Member

mdellweg commented Apr 24, 2020

Wouldn't it be easier to generate this file as part of a publication making it a PublishedArtifact instead of creating it on the fly in the content app?

EDIT: No, that's impossible (see https://pulp.plan.io/issues/5356#note-4)
Leaving the note here to prevent me from asking the same question again.

@dkliban
Copy link
Member

dkliban commented Apr 24, 2020

@mdellweg Yes it would be, but then users would have regenerate a publication each time they want to use it with a new Distribution.

@pep8speaks
Copy link

pep8speaks commented Apr 29, 2020

Hello @pieterlexis! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-08 09:20:34 UTC

@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch 2 times, most recently from 7c1cafe to f1898e5 Compare April 29, 2020 11:28
CHANGES/5356.feature Outdated Show resolved Hide resolved
@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch 7 times, most recently from 0cefd62 to 405a8f4 Compare April 29, 2020 15:46
@bmbouter
Copy link
Member

I read through the code and it all looks sane to me.

@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch 3 times, most recently from b2e06fc to 5ca3782 Compare April 30, 2020 08:21
@pieterlexis pieterlexis marked this pull request as ready for review April 30, 2020 08:43
@pieterlexis pieterlexis requested a review from a team April 30, 2020 08:43
@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch 4 times, most recently from d34dcca to 4ca05db Compare May 8, 2020 07:16
@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch from 4ca05db to ca26ebf Compare May 8, 2020 07:56
@pieterlexis pieterlexis force-pushed the issue-5356-repo-file-for-rpm branch from ca26ebf to 6b3b149 Compare May 8, 2020 09:20
Copy link
Member

@dkliban dkliban left a comment

Choose a reason for hiding this comment

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

Thank you! This is a great feature.

@dkliban dkliban merged commit 46c9320 into pulp:master May 8, 2020
@pieterlexis pieterlexis deleted the issue-5356-repo-file-for-rpm branch May 13, 2020 11:59
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

Successfully merging this pull request may close these issues.

None yet

6 participants