Skip to content

Commit

Permalink
Fix security origins on Debian releases past bullseye
Browse files Browse the repository at this point in the history
Debian 11 (bullseye) changed the codename in the security Release file
to specify <codename>-security instead of just <security>.

For bullseye this was already correctly handled, but for later releases
this module would fall back to the earlier style.

Fix origins to add -security for all releases >= bullseye and not just
for exactly bullseye.
  • Loading branch information
Peter Palfrader committed Oct 29, 2023
1 parent 76e8314 commit 77e95c2
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@

case downcase($facts['os']['name']) {
'debian', 'raspbian': {
case fact('os.distro.codename') {
'bullseye': {
$origins = [
'origin=Debian,codename=${distro_codename},label=Debian', #lint:ignore:single_quote_string_with_variables
'origin=Debian,codename=${distro_codename}-security,label=Debian-Security', #lint:ignore:single_quote_string_with_variables
]
}
default: {
$origins = [
'origin=Debian,codename=${distro_codename},label=Debian', #lint:ignore:single_quote_string_with_variables
'origin=Debian,codename=${distro_codename},label=Debian-Security', #lint:ignore:single_quote_string_with_variables
]
}
if Integer($facts['os']['release']['major']) >= 11 {
$origins = [
'origin=Debian,codename=${distro_codename},label=Debian', #lint:ignore:single_quote_string_with_variables
'origin=Debian,codename=${distro_codename}-security,label=Debian-Security', #lint:ignore:single_quote_string_with_variables
]
} else {
$origins = [
'origin=Debian,codename=${distro_codename},label=Debian', #lint:ignore:single_quote_string_with_variables
'origin=Debian,codename=${distro_codename},label=Debian-Security', #lint:ignore:single_quote_string_with_variables
]
}
}
'ubuntu', 'neon': {
Expand Down

0 comments on commit 77e95c2

Please sign in to comment.