Skip to content

add checksum support to apt::keyring - #1291

Open
milad-zanganeh wants to merge 2 commits into
puppetlabs:mainfrom
milad-zanganeh:feature/apt-keyring-checksum-support
Open

add checksum support to apt::keyring#1291
milad-zanganeh wants to merge 2 commits into
puppetlabs:mainfrom
milad-zanganeh:feature/apt-keyring-checksum-support

Conversation

@milad-zanganeh

@milad-zanganeh milad-zanganeh commented Jul 27, 2026

Copy link
Copy Markdown

Summary

This PR adds support for the checksum and checksum_value parameters to the apt::keyring defined type and passes them through to the underlying file resource.

The changes include:

  • Adding checksum and checksum_value parameters.
  • Documenting the new parameters.
  • Passing both parameters to the managed file resource.
  • Adding unit tests for the default behavior, custom values, and parameter validation.

Additional Context

This change allows users to specify a checksum when managing keyring files. This is useful in cases where the remote key is republished without any content changes, causing Puppet to replace the file on every run.

  • Root cause and the steps to reproduce. (If applicable)
    • Some repositories republish their keyring files without changing the content, but with different metadata. As a result, Puppet continuously detects changes and replaces the file on every run.
  • Thought process behind the implementation.
    • Expose Puppet's existing checksum and checksum_value parameters through apt::keyring instead of introducing custom logic, keeping the implementation simple and consistent with the underlying file resource.

Related Issues (if any)

Fixes: #1196

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@milad-zanganeh
milad-zanganeh requested review from a team, bastelfreak and smortex as code owners July 27, 2026 11:11
@jst-cyr

jst-cyr commented Jul 29, 2026

Copy link
Copy Markdown
Member

Thank you @milad-zanganeh for the PR! I have approved the CI to run. It will run the unit tests, but acceptance testing will require the engineering team to do a fork. I'll make sure this gets on the list of work to be reviewed by engineering.

@skyamgarp skyamgarp added the ok-to-test Creates a test PR against main from a fork's commits label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Creates a test PR against main from a fork's commits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyring File Modification Date Incorrectly Updated

3 participants