Skip to content

Commit bee5ee1

Browse files
authored
Merge pull request #1129 from kenyon/ubuntu-backport-gpg-key
backports: don't hardcode an old gpg key for Ubuntu
2 parents 782a790 + f867561 commit bee5ee1

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

REFERENCE.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,7 @@ Default value: `undef`
470470
Data type: `Optional[Variant[String, Hash]]`
471471

472472
Specifies a key to authenticate the backports. Valid options: a string to be passed to the id parameter of the apt::key defined type, or a
473-
hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
474-
for Debian and Ubuntu varies:
475-
476-
- Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
477-
478-
- Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
473+
hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters.
479474

480475
Default value: `undef`
481476

manifests/backports.pp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@
3434
#
3535
# @param key
3636
# Specifies a key to authenticate the backports. Valid options: a string to be passed to the id parameter of the apt::key defined type, or a
37-
# hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters. Default value
38-
# for Debian and Ubuntu varies:
39-
#
40-
# - Debian: 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
41-
#
42-
# - Ubuntu: '630239CC130E1A7FD81A27B140976EAF437D05B5'
37+
# hash of parameter => value pairs to be passed to apt::key's id, server, content, source, and/or options parameters.
4338
#
4439
# @param pin
4540
# Specifies a pin priority for the backports. Valid options: a number or string to be passed to the `id` parameter of the `apt::pin` defined
@@ -67,9 +62,7 @@
6762
if $repos {
6863
$_repos = $repos
6964
}
70-
if $key {
71-
$_key = $key
72-
}
65+
7366
if (!($facts['os']['name'] == 'Debian' or $facts['os']['name'] == 'Ubuntu')) {
7467
unless $location and $release and $repos and $key {
7568
fail('If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key')
@@ -88,9 +81,6 @@
8881
unless $repos {
8982
$_repos = $apt::backports['repos']
9083
}
91-
unless $key {
92-
$_key = $apt::backports['key']
93-
}
9484

9585
if $pin =~ Hash {
9686
$_pin = $pin
@@ -110,7 +100,7 @@
110100
release => $_release,
111101
repos => $_repos,
112102
include => $include,
113-
key => $_key,
103+
key => $key,
114104
pin => $_pin,
115105
}
116106
}

manifests/params.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
'Ubuntu': {
8989
$backports = {
9090
'location' => 'http://archive.ubuntu.com/ubuntu',
91-
'key' => '630239CC130E1A7FD81A27B140976EAF437D05B5',
9291
'repos' => 'main universe multiverse restricted',
9392
}
9493
$ppa_options = ['-y']

spec/classes/apt_backports_spec.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
full: '18.04'
4444
},
4545
distro: {
46-
codename: 'bionac',
46+
codename: 'bionic',
4747
id: 'Ubuntu'
4848
}
4949
}
@@ -52,10 +52,9 @@
5252

5353
it {
5454
expect(subject).to contain_apt__source('backports').with(location: 'http://archive.ubuntu.com/ubuntu',
55-
key: '630239CC130E1A7FD81A27B140976EAF437D05B5',
5655
repos: 'main universe multiverse restricted',
57-
release: 'bionac-backports',
58-
pin: { 'priority' => 200, 'release' => 'bionac-backports' })
56+
release: 'bionic-backports',
57+
pin: { 'priority' => 200, 'release' => 'bionic-backports' })
5958
}
6059
end
6160

@@ -70,7 +69,7 @@
7069
full: '18.04'
7170
},
7271
distro: {
73-
codename: 'bionac',
72+
codename: 'bionic',
7473
id: 'Ubuntu'
7574
}
7675
}
@@ -106,7 +105,7 @@
106105
full: '18.04'
107106
},
108107
distro: {
109-
codename: 'bionac',
108+
codename: 'bionic',
110109
id: 'Ubuntu'
111110
}
112111
}
@@ -235,7 +234,7 @@
235234
full: '18.04'
236235
},
237236
distro: {
238-
codename: 'bionac',
237+
codename: 'bionic',
239238
id: 'Ubuntu'
240239
}
241240
}

0 commit comments

Comments
 (0)