packaging 0.99.72 → 0.99.73
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/packaging/paths.rb +6 -3
- data/spec/lib/packaging/paths_spec.rb +23 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 677398c044776b06ec554da49b2f87826fe5f6dbf322506e4801e05a758a387d
|
4
|
+
data.tar.gz: ff6818a73e27e693cbcc2609fda3eb5447d5d1e52ec44f008155af19dd95eb5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f60c129d9f5ad5e5f8d052cfee9062242b540147b71c82eccfa3b2e1ab4694a303aceaa1c5afe482c87d80e6e3ddc0f4985c2e5d4abcb2749890857a36a3384a
|
7
|
+
data.tar.gz: d25c77758997edbea89aa83a64dad382987f832bfc406ad6b5bd7cd49ebd2fae087e9a923fefd456c87868287c7dbc231d5a40685fc2c52d90939f7f353de2b1
|
data/lib/packaging/paths.rb
CHANGED
@@ -117,7 +117,7 @@ module Pkg::Paths
|
|
117
117
|
|
118
118
|
# In puppet7 and beyond, we moved the repo_name to the top to allow each
|
119
119
|
# puppet major release to have its own apt repo.
|
120
|
-
if %w(puppet7 puppet7-nightly).include? repo_name
|
120
|
+
if %w(FUTURE-puppet7 FUTURE-puppet7-nightly).include? repo_name
|
121
121
|
return File.join(prefix, apt_repo_name(is_nonfinal), debian_code_name)
|
122
122
|
end
|
123
123
|
|
@@ -313,13 +313,16 @@ module Pkg::Paths
|
|
313
313
|
# In puppet7 and beyond, we moved the puppet major version to near the top to allow each
|
314
314
|
# puppet major release to have its own apt repo, for example:
|
315
315
|
# /opt/repository/apt/puppet7/pool/bionic/p/puppet-agent
|
316
|
-
if %w(puppet7 puppet7-nightly).include? repo_name
|
316
|
+
if %w(FUTURE-puppet7 FUTURE-puppet7-nightly).include? repo_name
|
317
317
|
return File.join(remote_repo_path, repo_name, 'pool', code_name, project[0], project)
|
318
318
|
end
|
319
319
|
|
320
320
|
# For repos prior to puppet7, the puppet version was part of the repository
|
321
321
|
# For example: /opt/repository/apt/pool/bionic/puppet6/p/puppet-agent
|
322
|
-
if %w(
|
322
|
+
if %w(puppet7 puppet7-nightly
|
323
|
+
puppet6 puppet6-nightly
|
324
|
+
puppet5 puppet5-nightly
|
325
|
+
puppet).include? repo_name
|
323
326
|
return File.join(remote_repo_path, 'pool', code_name, repo_name, project[0], project)
|
324
327
|
end
|
325
328
|
|
@@ -64,8 +64,8 @@ describe 'Pkg::Paths' do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
it 'should return repo_name for final version' do
|
67
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
68
|
-
expect(Pkg::Paths.repo_name).to eq('puppet7')
|
67
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
68
|
+
expect(Pkg::Paths.repo_name).to eq('FUTURE-puppet7')
|
69
69
|
end
|
70
70
|
|
71
71
|
it 'should be empty string if repo_name is not set for final version' do
|
@@ -131,16 +131,16 @@ describe 'Pkg::Paths' do
|
|
131
131
|
|
132
132
|
context 'after puppet 7 apt changes' do
|
133
133
|
before :each do
|
134
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
134
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
135
135
|
end
|
136
136
|
|
137
137
|
it 'should be correct for bionic' do
|
138
138
|
expect(Pkg::Paths.artifacts_path('ubuntu-18.04-amd64'))
|
139
|
-
.to eq('artifacts/puppet7/bionic')
|
139
|
+
.to eq('artifacts/FUTURE-puppet7/bionic')
|
140
140
|
end
|
141
141
|
it 'should be correct for focal' do
|
142
142
|
expect(Pkg::Paths.artifacts_path('ubuntu-20.04-amd64'))
|
143
|
-
.to eq('artifacts/puppet7/focal')
|
143
|
+
.to eq('artifacts/FUTURE-puppet7/focal')
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
@@ -201,13 +201,13 @@ describe 'Pkg::Paths' do
|
|
201
201
|
end
|
202
202
|
|
203
203
|
it 'should return nonfinal_repo_name for nonfinal version' do
|
204
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
205
|
-
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return('puppet7-nightly')
|
206
|
-
expect(Pkg::Paths.apt_repo_name(true)).to eq('puppet7-nightly')
|
204
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
205
|
+
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return('FUTURE-puppet7-nightly')
|
206
|
+
expect(Pkg::Paths.apt_repo_name(true)).to eq('FUTURE-puppet7-nightly')
|
207
207
|
end
|
208
208
|
|
209
209
|
it 'should fail if nonfinal_repo_name is not set for non-final version' do
|
210
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
210
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
211
211
|
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return(nil)
|
212
212
|
expect { Pkg::Paths.apt_repo_name(true) }.to raise_error
|
213
213
|
end
|
@@ -222,8 +222,8 @@ describe 'Pkg::Paths' do
|
|
222
222
|
|
223
223
|
it 'should return `Pkg::Config.yum_repo_name` if `Pkg::Config.repo_name` is not set' do
|
224
224
|
allow(Pkg::Config).to receive(:repo_name).and_return(nil)
|
225
|
-
allow(Pkg::Config).to receive(:yum_repo_name).and_return('puppet7')
|
226
|
-
expect(Pkg::Paths.yum_repo_name).to eq('puppet7')
|
225
|
+
allow(Pkg::Config).to receive(:yum_repo_name).and_return('FUTURE-puppet7')
|
226
|
+
expect(Pkg::Paths.yum_repo_name).to eq('FUTURE-puppet7')
|
227
227
|
end
|
228
228
|
|
229
229
|
it 'should return \'products\' if nothing is set' do
|
@@ -233,13 +233,13 @@ describe 'Pkg::Paths' do
|
|
233
233
|
end
|
234
234
|
|
235
235
|
it 'should return nonfinal_repo_name for nonfinal version' do
|
236
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
237
|
-
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return('puppet7-nightly')
|
238
|
-
expect(Pkg::Paths.yum_repo_name(true)).to eq('puppet7-nightly')
|
236
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
237
|
+
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return('FUTURE-puppet7-nightly')
|
238
|
+
expect(Pkg::Paths.yum_repo_name(true)).to eq('FUTURE-puppet7-nightly')
|
239
239
|
end
|
240
240
|
|
241
241
|
it 'should fail if nonfinal_repo_name is not set for non-final version' do
|
242
|
-
allow(Pkg::Config).to receive(:repo_name).and_return('puppet7')
|
242
|
+
allow(Pkg::Config).to receive(:repo_name).and_return('FUTURE-puppet7')
|
243
243
|
allow(Pkg::Config).to receive(:nonfinal_repo_name).and_return(nil)
|
244
244
|
expect { Pkg::Paths.yum_repo_name(true) }.to raise_error
|
245
245
|
end
|
@@ -319,15 +319,15 @@ describe 'Pkg::Paths' do
|
|
319
319
|
context 'for puppet 7 and after' do
|
320
320
|
it 'returns the approprate apt repo path' do
|
321
321
|
allow(Pkg::Paths).to receive(:remote_repo_base).and_return('/opt/repository/apt')
|
322
|
-
expect(Pkg::Paths.apt_package_base_path('ubuntu-18.04-amd64', 'puppet7', 'puppet-agent'))
|
323
|
-
.to eq('/opt/repository/apt/puppet7/pool/bionic/p/puppet-agent')
|
324
|
-
expect(Pkg::Paths.apt_package_base_path('ubuntu-20.04-amd64', 'puppet7', 'puppet-agent'))
|
325
|
-
.to eq('/opt/repository/apt/puppet7/pool/focal/p/puppet-agent')
|
322
|
+
expect(Pkg::Paths.apt_package_base_path('ubuntu-18.04-amd64', 'FUTURE-puppet7', 'puppet-agent'))
|
323
|
+
.to eq('/opt/repository/apt/FUTURE-puppet7/pool/bionic/p/puppet-agent')
|
324
|
+
expect(Pkg::Paths.apt_package_base_path('ubuntu-20.04-amd64', 'FUTURE-puppet7', 'puppet-agent'))
|
325
|
+
.to eq('/opt/repository/apt/FUTURE-puppet7/pool/focal/p/puppet-agent')
|
326
326
|
end
|
327
327
|
it 'returns the appropriate nonfinal repo path' do
|
328
328
|
allow(Pkg::Paths).to receive(:remote_repo_base).and_return('/opt/repository-nightlies/apt')
|
329
|
-
expect(Pkg::Paths.apt_package_base_path('debian-10-amd64', 'puppet7-nightly', 'pdk', true))
|
330
|
-
.to eq('/opt/repository-nightlies/apt/puppet7-nightly/pool/buster/p/pdk')
|
329
|
+
expect(Pkg::Paths.apt_package_base_path('debian-10-amd64', 'FUTURE-puppet7-nightly', 'pdk', true))
|
330
|
+
.to eq('/opt/repository-nightlies/apt/FUTURE-puppet7-nightly/pool/buster/p/pdk')
|
331
331
|
end
|
332
332
|
end
|
333
333
|
end
|
@@ -371,8 +371,8 @@ describe 'Pkg::Paths' do
|
|
371
371
|
end
|
372
372
|
|
373
373
|
context 'for puppet 7' do
|
374
|
-
repo_name = 'puppet7'
|
375
|
-
nonfinal_repo_name = 'puppet7-nightly'
|
374
|
+
repo_name = 'FUTURE-puppet7'
|
375
|
+
nonfinal_repo_name = 'FUTURE-puppet7-nightly'
|
376
376
|
yum_repo_path = '/opt/repository/yum'
|
377
377
|
apt_repo_path = '/opt/repository/apt'
|
378
378
|
nonfinal_yum_repo_path = '/opt/repository-nightlies/yum'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.99.
|
4
|
+
version: 0.99.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|