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

Enable yum repository repo_gpgcheck option for Red Hat platforms by default #789

Merged
merged 4 commits into from
Apr 26, 2021

Conversation

bkabrda
Copy link
Contributor

@bkabrda bkabrda commented Apr 26, 2021

I'm wondering whether we should document this - there doesn't seem to be any section in README.md that explicitly deals with gpg keys, repository URLs etc - I'm assuming because the users never really hit issues with these and so they didn't need documenting?

@bkabrda bkabrda requested a review from a team as a code owner April 26, 2021 09:29
@@ -160,6 +160,13 @@
default['datadog']['aptrepo_use_backup_keyserver'] = false
default['datadog']['aptrepo_keyserver'] = 'hkp://keyserver.ubuntu.com:80'
default['datadog']['aptrepo_backup_keyserver'] = 'hkp://pool.sks-keyservers.net:80'
# repo_gpgcheck on RHEL 5 requires additional packages (e.g. pygpgme) that might not
# always be installed/available in enabled repositories
default['datadog']['yumrepo_repo_gpgcheck'] = if platform_family?('rhel') && node['platform_version'].to_i < 6
Copy link
Contributor

Choose a reason for hiding this comment

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

If a user has defined their own yumrepo URL pointing to a custom repo which isn't signed, this would be a breaking change for them. We can check that and default to false in that case. For example, we could make yumrepo_repo_gpgcheck default to nil, and then at runtime calculate the actual default (true or false) based on:

  • the existing logic for rhel5.
  • whether yumrepo is nil (default repo) or not (custom repo).
    Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I'll fix this.

Copy link
Contributor

@albertvaka albertvaka left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@bkabrda bkabrda merged commit d49b76e into master Apr 26, 2021
@bkabrda bkabrda deleted the slavek.kabrda/repo-gpgcheck branch April 26, 2021 12:50
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.

2 participants