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

Allow hkp:// style URLs for repo_keyserver URL #102

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

hp197
Copy link

@hp197 hp197 commented Mar 30, 2021

Fixes #101

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

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

Would be good to also add a test for this so that it doesn't get changed back.

@hp197
Copy link
Author

hp197 commented Mar 31, 2021

Added test case, will need to test it offline though, travis isn't playing nice.

@hp197
Copy link
Author

hp197 commented Mar 31, 2021

👍

test case made and passes:

with manage_repo => true and repo_keyserver => hkp://keys.gnupg.net:80
is expected to compile into a catalogue without dependency cycles
is expected to contain Class[gitlab_ci_runner::repo]
is expected to contain Apt::Source[apt_gitlabci] with key => {"id"=>"F6403F6544A38863DAA0B6E03F01618A51312F3F", "server"=>"hkp://keys.gnupg.net:80"}

Please also note the apt::key regex: https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/key.pp#L43

Maybe it should be converted to something like that?

@kenyon
Copy link
Member

kenyon commented Apr 3, 2021

Please also note the apt::key regex: https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/key.pp#L43

Maybe it should be converted to something like that?

Sure, I think that would be an improvement, so if you want to do that, go ahead. 😃

@kenyon
Copy link
Member

kenyon commented Apr 3, 2021

We need to get #93 done to get the tests to pass.

@hp197
Copy link
Author

hp197 commented Apr 3, 2021

with manage_repo => true and repo_keyserver => keys.gnupg.net
  is expected to compile into a catalogue without dependency cycles
  is expected to contain Class[gitlab_ci_runner::repo]
  is expected to contain Apt::Source[apt_gitlabci] with key => {"id"=>"F6403F6544A38863DAA0B6E03F01618A51312F3F", "server"=>"keys.gnupg.net"}
with manage_repo => true and repo_keyserver => hkp://keys.gnupg.net:80
  is expected to compile into a catalogue without dependency cycles
  is expected to contain Class[gitlab_ci_runner::repo]
  is expected to contain Apt::Source[apt_gitlabci] with key => {"id"=>"F6403F6544A38863DAA0B6E03F01618A51312F3F", "server"=>"hkp://keys.gnupg.net:80"}
with manage_repo => true and repo_keyserver => https://keys.gnupg.net:88
  is expected to compile into a catalogue without dependency cycles
  is expected to contain Class[gitlab_ci_runner::repo]
  is expected to contain Apt::Source[apt_gitlabci] with key => {"id"=>"F6403F6544A38863DAA0B6E03F01618A51312F3F", "server"=>"https://keys.gnupg.net:88"}

Added custom keyserver type with the regex. This is in my opinion cleaner then add the whole regex to init.pp.
Existing functionality still works as before.

@hp197
Copy link
Author

hp197 commented Apr 3, 2021

ready to merge ❤️

@alexjfisher
Copy link
Member

@hp197 Sorry for the delay. Would you be able to rebase, so that we could get this change in?

@hp197
Copy link
Author

hp197 commented Aug 9, 2021 via email

Fixes voxpupuli#101

(squashed)
- Added test
- Added custom keyserver type.
  Reasoning:
    Otherwise the parameters in the init.pp file would have been completly
    unaligned. Existing functionality is not changed.
@hp197
Copy link
Author

hp197 commented Aug 18, 2021

rebased, squashed and ready to merge (if tests pass) ❤️

@hp197
Copy link
Author

hp197 commented Aug 18, 2021

@alexjfisher ready and tests passed

@alexjfisher alexjfisher changed the title Stdlib::Fqdn doesn't allow for hkp:// keyserver url Allow hkp:// style URLs for repo_keyserver URL Aug 18, 2021
@alexjfisher alexjfisher added enhancement New feature or request and removed tests-fail labels Aug 18, 2021
@alexjfisher
Copy link
Member

@hp197 Thanks!

@alexjfisher alexjfisher merged commit 11c2d0a into voxpupuli:master Aug 18, 2021
@hp197 hp197 deleted the fix-repourl branch August 18, 2021 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

repo_keyserver does not allow hkp://
4 participants