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

(GH-1038) add support for check-valid-until configuration #1042

Merged

Conversation

david22swan
Copy link
Member

Add's additional configuration to apt::source to allow the user to specify whether or not to check if the repository that they are accessing has a valid release ate.
Defaults to True

@david22swan david22swan requested a review from a team as a code owner July 28, 2022 10:30
@puppet-community-rangefinder
Copy link

apt::source is a type

Breaking changes to this file WILL impact these 338 modules (exact match):
Breaking changes to this file MAY impact these 88 modules (near match):

This module is declared in 234 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@david22swan
Copy link
Member Author

@fitzy101 Could you have a look at this and see if it was what you had in mind?

manifests/source.pp Outdated Show resolved Hide resolved
bastelfreak
bastelfreak previously approved these changes Jul 28, 2022
Copy link

@fitzy101 fitzy101 left a comment

Choose a reason for hiding this comment

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

Hi @david22swan apologies for the delayed response. Thanks for looking at this configuration option. The current implementation doesn't quite address the problem, as the syntax isn't correct for setting the check-valid-until option inline.

If I manually set the value like in the commit, you can see the apt update command fails.

~ # cat /etc/apt/sources.list.d/debian-security-snapshot.list
deb [Acquire::Check-Valid-Until=false] https://snapshot.debian.org/archive/debian-security/20220612T175238Z/ bullseye-security main
~ # apt update
# ...
Hit:4 https://snapshot.debian.org/archive/debian-security/20220612T175238Z bullseye-security InRelease
Reading package lists... Done
E: Release file for https://snapshot.debian.org/archive/debian-security/20220612T175238Z/dists/bullseye-security/InRelease is expired (invalid since 44d 8h 26min 50s). Updates for this repository will not be applied.
# ...

The format should be [check-valid-until=no], which you can see in the example below.

~ # cat /etc/apt/sources.list.d/debian-security-snapshot.list
deb [check-valid-until=no] https://snapshot.debian.org/archive/debian-security/20220612T175238Z/ bullseye-security main
~ # apt update
#...
Hit:4 https://snapshot.debian.org/archive/debian-security/20220612T175238Z bullseye-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.

manifests/source.pp Outdated Show resolved Hide resolved
Add's additional configuration to `apt::source` to allow the user to specify whether or not to check if  the repository that they are accessing has a valid release ate.
Defaults to `True`
@david22swan
Copy link
Member Author

@fitzy101 That's the update made, thanks for getting back to me on it

@fitzy101
Copy link

fitzy101 commented Aug 3, 2022

@fitzy101 That's the update made, thanks for getting back to me on it

That’s great, thanks.

@LukasAud LukasAud merged commit 9c4f71d into puppetlabs:main Aug 3, 2022
@david22swan david22swan deleted the GH-1038/main/check_valid_until branch August 3, 2022 10:07
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