packaging 0.99.61 → 0.99.62

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad27ca2f1724bfea741b3e69538fdb238acc76ea1662a6e40a44f433eb66e457
4
- data.tar.gz: 87aad9c6e3f8e13abcaf437fbe1fceb113ee596073d04a3e997f4d12c38d6edc
3
+ metadata.gz: 51f93e35b2b4e64053f41aef02546deaa59b2ef0f5ee2c84839f1caf5f5a678c
4
+ data.tar.gz: f5d99ceffa53426ff02533f901cc80080fb4202b0c53ccc34094e2c5cd2a6049
5
5
  SHA512:
6
- metadata.gz: d6af0709a72179d3489e2ea6c3940be0f69d715e34c81cd19e5378badd136d7ec6db068d18d610cbb8448ba4053aa04f5fdda4708e273d27b38ffb786cd55da2
7
- data.tar.gz: 22f8aab7c11a57fa87f836047b5ee441a1cfbaf04df579b00b3cb15d8eeec2a7c32500ec56d9c2edf86e2c4e4b267076cc345e2bd8731962a904046b2d4219fd
6
+ metadata.gz: f1dbac744ef49d74eeb5c7cbf0e5afa2b4cf8d23d1984ca79a5af78a78165044ebc9008e3ad747bb7205156b7dae22e0b366a7cb50fcf50393133ef4316759d1
7
+ data.tar.gz: d8338b79efa5280c0a72d33b6a1b4de28b0ee25d265e2ea33f786786c33c3ce97aa4238d8bdc90ed726f2acef4231e918ba451207616d3261aa4e865df5a1a4c
@@ -2,67 +2,7 @@ require 'artifactory'
2
2
  require 'uri'
3
3
  require 'open-uri'
4
4
  require 'digest'
5
-
6
- #
7
- # [eric.griswold] This is unfortunate. The 'pattern_search' class method really does belong in
8
- # the Artifactory gem. However, because of some of Chef's social policies,
9
- # I am unwilling to contribute this code there. If that changes, I'll submit a PR. Until
10
- # then, it'll live here.
11
- #
12
- module Artifactory
13
- class Resource::Artifact
14
- #
15
- # Search for an artifact in a repo using an Ant-like pattern.
16
- # Unlike many Artifactory searches, this one is restricted to a single
17
- # repository.
18
- #
19
- # @example Search in a repository named 'foo_local' for an artifact in a directory containing
20
- # the word "recent", named "artifact[0-9].txt"
21
- # Artifact.pattern_search(pattern: '*recent*/artifact[0-9].txt',
22
- # repo: 'foo_local')
23
- #
24
- # @param [Hash] options
25
- # A hash of options, as follows:
26
- #
27
- # @option options [Artifactory::Client] :client
28
- # the client object to make the request with
29
- # @option options [String] :pattern
30
- # the Ant-like pattern to use for finding artifacts within the repos. Note that the
31
- # Ant pattern '**' is barred in this case by JFrog.
32
- # @option options [String] :repo
33
- # the repo to search
34
- #
35
- # @return [Array<Resource::Artifact>]
36
- # a list of artifacts that match the query
37
- #
38
- def self.pattern_search(options = {})
39
- client = extract_client!(options)
40
- params = Util.slice(options, :pattern, :repo)
41
- pattern_search_parameter = { :pattern => "#{params[:repo]}:#{params[:pattern]}" }
42
- response = client.get('/api/search/pattern', pattern_search_parameter)
43
- return [] if response['files'].nil? || response['files'].empty?
44
-
45
- # A typical response:
46
- # {
47
- # "repoUri"=>"https:<artifactory endpoint>/<repo>",
48
- # "sourcePattern"=>"<repo>:<provided search pattern>",
49
- # "files"=>[<filename that matched pattern>, ...]
50
- # }
51
- #
52
- # Inserting '/api/storage' before the repo makes the 'from_url' call work correctly.
53
- #
54
- repo_uri = response['repoUri']
55
- unless repo_uri.include?('/api/storage/')
56
- # rubocop:disable Style/PercentLiteralDelimiters
57
- repo_uri.sub!(%r(/#{params[:repo]}$), "/api/storage/#{params[:repo]}")
58
- end
59
- response['files'].map do |file_path|
60
- from_url("#{repo_uri}/#{file_path}", client: client)
61
- end
62
- end
63
- end
64
- end
65
-
5
+ require 'packaging/artifactory/extensions'
66
6
 
67
7
  module Pkg
68
8
 
@@ -111,7 +51,6 @@ module Pkg
111
51
  def location_for(platform_tag)
112
52
  toplevel_repo = DEFAULT_REPO_TYPE
113
53
  repo_subdirectories = File.join(@repo_base, @project, @project_version)
114
- alternate_subdirectories = repo_subdirectories
115
54
 
116
55
  unless platform_tag == DEFAULT_REPO_TYPE
117
56
  format = Pkg::Platforms.package_format_for_tag(platform_tag)
@@ -122,20 +61,16 @@ module Pkg
122
61
  when 'rpm'
123
62
  toplevel_repo = 'rpm'
124
63
  repo_subdirectories = File.join(repo_subdirectories, "#{platform}-#{version}-#{architecture}")
125
- alternate_subdirectories = repo_subdirectories
126
64
  when 'deb'
127
65
  toplevel_repo = 'debian__local'
128
66
  repo_subdirectories = File.join(repo_subdirectories, "#{platform}-#{version}")
129
- alternate_subdirectories = File.join('pool', repo_subdirectories)
130
67
  when 'swix', 'dmg', 'svr4', 'ips'
131
68
  repo_subdirectories = File.join(repo_subdirectories, "#{platform}-#{version}-#{architecture}")
132
- alternate_subdirectories = repo_subdirectories
133
69
  when 'msi'
134
70
  repo_subdirectories = File.join(repo_subdirectories, "#{platform}-#{architecture}")
135
- alternate_subdirectories = repo_subdirectories
136
71
  end
137
72
 
138
- [toplevel_repo, repo_subdirectories, alternate_subdirectories]
73
+ [toplevel_repo, repo_subdirectories]
139
74
  end
140
75
 
141
76
  # @param platform_tag [String] The platform tag specific to the information
@@ -150,8 +85,8 @@ module Pkg
150
85
  end
151
86
  end
152
87
 
153
- repo_name, repo_subdirectories, alternate_subdirectories = location_for(platform_tag)
154
- full_artifactory_path = File.join(repo_name, alternate_subdirectories)
88
+ repo_name, repo_subdirectories = location_for(platform_tag)
89
+ full_artifactory_path = File.join(repo_name, repo_subdirectories)
155
90
 
156
91
  {
157
92
  platform: platform,
@@ -161,7 +96,6 @@ module Pkg
161
96
  package_format: package_format,
162
97
  repo_name: repo_name,
163
98
  repo_subdirectories: repo_subdirectories,
164
- alternate_subdirectories: alternate_subdirectories,
165
99
  full_artifactory_path: full_artifactory_path
166
100
  }
167
101
  end
@@ -286,7 +220,7 @@ module Pkg
286
220
  headers = { "X-Checksum-Md5" => artifact_md5 }
287
221
  artifact.upload(
288
222
  data[:repo_name],
289
- File.join(data[:alternate_subdirectories], File.basename(package)),
223
+ File.join(data[:repo_subdirectories], File.basename(package)),
290
224
  deploy_properties(platform_tag, File.basename(package)),
291
225
  headers
292
226
  )
@@ -420,21 +354,20 @@ module Pkg
420
354
  manifest.each do |dist, packages|
421
355
  puts "Grabbing the #{dist} packages from artifactory"
422
356
  packages.each do |name, info|
423
- artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"])
357
+ filename = info['filename']
358
+ artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"], name: filename)
424
359
  artifact_to_download = artifacts.select { |artifact| artifact.download_uri.include? remote_path }.first
425
360
  # If we found matching artifacts, but not in the correct path, copy the artifact to the correct path
426
361
  # This should help us keep repos up to date with the packages we are expecting to be there
427
362
  # while helping us avoid 'what the hell, could not find package' errors
428
363
  if artifact_to_download.nil? && !artifacts.empty?
429
364
  artifact_to_copy = artifacts.first
430
- filename = info['filename'] || File.basename(artifact_to_copy.download_uri)
431
365
  copy_artifact(artifact_to_copy, artifact_to_copy.repo, "#{remote_path}/#{dist}/#{filename}")
432
- artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"])
366
+ artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"], name: filename)
433
367
  artifact_to_download = artifacts.select { |artifact| artifact.download_uri.include? remote_path }.first
434
368
  end
435
369
 
436
370
  if artifact_to_download.nil?
437
- filename = info["filename"] || name
438
371
  message = "Error: what the hell, could not find package #{filename} with md5sum #{info["md5"]}"
439
372
  unless remote_path.empty?
440
373
  message += " in #{remote_path}"
@@ -442,7 +375,6 @@ module Pkg
442
375
  raise message
443
376
  else
444
377
  full_staging_path = "#{staging_directory}/#{dist}"
445
- filename = info['filename'] || File.basename(artifact_to_download.download_uri)
446
378
  puts "downloading #{artifact_to_download.download_uri} to #{File.join(full_staging_path, filename)}"
447
379
  artifact_to_download.download(full_staging_path, filename: filename)
448
380
  end
@@ -646,12 +578,11 @@ module Pkg
646
578
  manifest.each do |dist, packages|
647
579
  puts "Copying #{dist} packages..."
648
580
  packages.each do |name, info|
649
- artifact = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"]).first
581
+ filename = info["filename"]
582
+ artifact = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: ["rpm_enterprise__local", "debian_enterprise__local"], name: filename).first
650
583
  if artifact.nil?
651
- filename = info["filename"] || name
652
584
  raise "Error: what the hell, could not find package #{filename} with md5sum #{info["md5"]}"
653
585
  end
654
- filename = info["filename"] || File.basename(artifact.download_uri)
655
586
  copy_artifact(artifact, artifact.repo, "#{target_path}/#{dist}/#{filename}")
656
587
  end
657
588
  end
@@ -681,7 +612,8 @@ module Pkg
681
612
  manifest.each do |dist, packages|
682
613
  packages.each do |package_name, info|
683
614
  next unless package_name == package
684
- artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: repos)
615
+ filename = info["filename"]
616
+ artifacts = Artifactory::Resource::Artifact.checksum_search(md5: "#{info["md5"]}", repos: repos, name: filename)
685
617
  artifacts.each do |artifact|
686
618
  next unless artifact.download_uri.include? remote_path
687
619
  puts "Removing reverted package #{artifact.download_uri}"
@@ -701,7 +633,7 @@ module Pkg
701
633
  Dir.foreach("#{tarball_path}/") do |pe_tarball|
702
634
  next if pe_tarball == '.' || pe_tarball == ".."
703
635
  md5 = Digest::MD5.file("#{tarball_path}/#{pe_tarball}").hexdigest
704
- artifacts_to_delete = Artifactory::Resource::Artifact.checksum_search(md5: md5, repos: pe_repo)
636
+ artifacts_to_delete = Artifactory::Resource::Artifact.checksum_search(md5: md5, repos: pe_repo, name: pe_tarball)
705
637
  next if artifacts_to_delete.nil?
706
638
  begin
707
639
  artifacts_to_delete.each do |artifact|
@@ -0,0 +1,94 @@
1
+ require 'artifactory'
2
+
3
+ module ArtifactoryExtensions
4
+ module ClassMethods
5
+ #
6
+ # Search for an artifact in a repo using an Ant-like pattern.
7
+ # Unlike many Artifactory searches, this one is restricted to a single
8
+ # repository.
9
+ #
10
+ # @example Search in a repository named 'foo_local' for an artifact in a directory containing
11
+ # the word "recent", named "artifact[0-9].txt"
12
+ # Artifact.pattern_search(pattern: '*recent*/artifact[0-9].txt',
13
+ # repo: 'foo_local')
14
+ #
15
+ # @param [Hash] options
16
+ # A hash of options, as follows:
17
+ #
18
+ # @option options [Artifactory::Client] :client
19
+ # the client object to make the request with
20
+ # @option options [String] :pattern
21
+ # the Ant-like pattern to use for finding artifacts within the repos. Note that the
22
+ # Ant pattern '**' is barred in this case by JFrog.
23
+ # @option options [String] :repo
24
+ # the repo to search
25
+ #
26
+ # @return [Array<Resource::Artifact>]
27
+ # a list of artifacts that match the query
28
+ #
29
+ def pattern_search(options = {})
30
+ client = extract_client!(options)
31
+ params = Util.slice(options, :pattern, :repo)
32
+ pattern_search_parameter = { :pattern => "#{params[:repo]}:#{params[:pattern]}" }
33
+ response = client.get('/api/search/pattern', pattern_search_parameter)
34
+ return [] if response['files'].nil? || response['files'].empty?
35
+
36
+ # A typical response:
37
+ # {
38
+ # "repoUri"=>"https:<artifactory endpoint>/<repo>",
39
+ # "sourcePattern"=>"<repo>:<provided search pattern>",
40
+ # "files"=>[<filename that matched pattern>, ...]
41
+ # }
42
+ #
43
+ # Inserting '/api/storage' before the repo makes the 'from_url' call work correctly.
44
+ #
45
+ repo_uri = response['repoUri']
46
+ unless repo_uri.include?('/api/storage/')
47
+ # rubocop:disable Style/PercentLiteralDelimiters
48
+ repo_uri.sub!(%r(/#{params[:repo]}$), "/api/storage/#{params[:repo]}")
49
+ end
50
+ response['files'].map do |file_path|
51
+ from_url("#{repo_uri}/#{file_path}", client: client)
52
+ end
53
+ end
54
+
55
+ # This adds the `exact_match` option to artifactory search, and defaults it
56
+ # to true. With `exact_match` set to `true` the artifact will only be
57
+ # returned if the name in the download uri matches the name we're trying to
58
+ # download
59
+ def search(options = {})
60
+ exact_match = options[:exact_match].nil? ? true : options[:exact_match]
61
+ artifacts = super
62
+
63
+ if exact_match
64
+ artifacts.select! { |artifact| File.basename(artifact.download_uri) == options[:name] }
65
+ end
66
+ artifacts
67
+ end
68
+
69
+ # This adds the `name` option to artifactory checksum search. It defaults to
70
+ # unset. If set, the artifact is only returned if the download uri matches
71
+ # the passed name
72
+ def checksum_search(options = {})
73
+ artifacts = super
74
+ if options[:name]
75
+ artifacts.select! { |artifact| File.basename(artifact.download_uri) == options[:name] }
76
+ end
77
+ artifacts
78
+ end
79
+ end
80
+
81
+ # needed to prepend class methods, see https://stackoverflow.com/questions/18683750/how-to-prepend-classmethods
82
+ def self.prepended(base)
83
+ class << base
84
+ prepend ClassMethods
85
+ end
86
+ end
87
+ end
88
+
89
+ module Artifactory
90
+ class Resource::Artifact
91
+ # use prepend instead of monkeypatching so we can call `super`
92
+ prepend ArtifactoryExtensions
93
+ end
94
+ end
@@ -70,15 +70,6 @@ module Pkg::Paths
70
70
  end
71
71
  end
72
72
 
73
- # Method to determine if files should be shipped to legacy or current path
74
- # structures. Any repo name matching /^puppet/ is a current repo, everything
75
- # else is should be shipped to legacy paths.
76
- #
77
- # @param repo_name The repo name to check
78
- def is_legacy_repo?(repo_name)
79
- repo_name !~ /^puppet/
80
- end
81
-
82
73
  # Method to determine the yum repo name. Maintains compatibility with legacy
83
74
  # projects, where `Pkg::Config.yum_repo_name` is set instead of
84
75
  # `Pkg::Config.repo_name`. Defaults to 'products' if nothing is set.
@@ -110,65 +101,83 @@ module Pkg::Paths
110
101
  return Pkg::Config.repo_link_target
111
102
  end
112
103
 
113
- # TODO: please please please clean this up
114
- # This is so terrible. I really dislike it. But in order to maintain backward
115
- # compatibility, we need to maintain these path differences between PC1 and
116
- # everything else. Once we stop shipping things to PC1, we can remove all the
117
- # PC1 specific cases. That's likely to not happen until the current LTS
118
- # (2016.4) is EOL'd. Hopefully also we do not choose to further change these
119
- # path structures, as it is no bueno.
120
- # --MAS 2017-08-16
121
- def artifacts_base_path_and_link_path(platform_tag, path_prefix = 'artifacts', nonfinal = false)
122
- platform, version, architecture = Pkg::Platforms.parse_platform_tag(platform_tag)
123
- package_format = Pkg::Platforms.package_format_for_tag(platform_tag)
104
+ # Construct a platform-dependent symlink target path.
105
+ def construct_base_path(path_data)
106
+ package_format = path_data[:package_format]
107
+ prefix = path_data[:prefix]
108
+ is_nonfinal = path_data[:is_nonfinal]
109
+ platform_name = path_data[:platform_name]
110
+ platform_tag = path_data[:platform_tag]
124
111
 
125
112
  case package_format
113
+ when 'deb'
114
+ debian_code_name = Pkg::Platforms.get_attribute(platform_tag, :codename)
115
+ return File.join(prefix, debian_code_name, apt_repo_name(is_nonfinal))
116
+ when 'dmg'
117
+ return File.join(prefix, 'mac', repo_name(is_nonfinal))
118
+ when 'msi'
119
+ return File.join(prefix, platform_name, repo_name(is_nonfinal))
126
120
  when 'rpm'
127
- if is_legacy_repo?(yum_repo_name(nonfinal))
128
- [File.join(path_prefix, platform, version, yum_repo_name(nonfinal)), nil]
129
- else
130
- [File.join(path_prefix, yum_repo_name(nonfinal)), link_name(nonfinal).nil? ? nil : File.join(path_prefix, link_name(nonfinal))]
131
- end
121
+ return File.join(prefix, yum_repo_name(is_nonfinal))
132
122
  when 'swix'
133
- if is_legacy_repo?(repo_name(nonfinal))
134
- [File.join(path_prefix, platform, version, repo_name(nonfinal)), nil]
135
- else
136
- [File.join(path_prefix, platform, repo_name(nonfinal)), link_name(nonfinal).nil? ? nil : File.join(path_prefix, platform, link_name(nonfinal))]
137
- end
123
+ return File.join(prefix, platform_name, repo_name(is_nonfinal))
124
+ when 'svr4', 'ips'
125
+ return File.join(prefix, 'solaris', repo_name(is_nonfinal))
126
+ else
127
+ raise "Error: Unknown package format '#{package_format}'"
128
+ end
129
+ end
130
+
131
+ # Construct a platform-dependent link path
132
+ def construct_link_path(path_data)
133
+ package_format = path_data[:package_format]
134
+ prefix = path_data[:prefix]
135
+ platform_name = path_data[:platform_name]
136
+ platform_tag = path_data[:platform_tag]
137
+ link = path_data[:link]
138
+
139
+ return nil if link.nil?
140
+
141
+ case package_format
142
+ when 'rpm'
143
+ return File.join(prefix, link)
144
+ when 'swix'
145
+ return File.join(prefix, platform_name, link)
138
146
  when 'deb'
139
- [File.join(path_prefix, Pkg::Platforms.get_attribute(platform_tag, :codename), apt_repo_name(nonfinal)),
140
- link_name(nonfinal).nil? ? nil : File.join(path_prefix, Pkg::Platforms.get_attribute(platform_tag, :codename), link_name(nonfinal))]
147
+ debian_code_name = Pkg::Platforms.get_attribute(platform_tag, :codename)
148
+ return File.join(prefix, debian_code_name, link)
141
149
  when 'svr4', 'ips'
142
- if is_legacy_repo?(repo_name(nonfinal))
143
- [File.join(path_prefix, 'solaris', repo_name(nonfinal), version), nil]
144
- else
145
- [File.join(path_prefix, 'solaris', repo_name(nonfinal)), link_name(nonfinal).nil? ? nil : File.join(path_prefix, 'solaris', link_name(nonfinal))]
146
- end
150
+ return File.join(prefix, 'solaris', link)
147
151
  when 'dmg'
148
- if is_legacy_repo?(repo_name(nonfinal))
149
- [File.join(path_prefix, 'mac', version, repo_name(nonfinal)), nil]
150
- else
151
- [File.join(path_prefix, 'mac', repo_name(nonfinal)), link_name(nonfinal).nil? ? nil : File.join(path_prefix, 'mac', link_name(nonfinal))]
152
- end
152
+ return File.join(prefix, 'mac', link)
153
153
  when 'msi'
154
- if is_legacy_repo?(repo_name(nonfinal))
155
- [File.join(path_prefix, 'windows'), nil]
156
- else
157
- [File.join(path_prefix, platform, repo_name(nonfinal)), link_name(nonfinal).nil? ? nil : File.join(path_prefix, platform, link_name(nonfinal))]
158
- end
154
+ return File.join(prefix, platform, link)
159
155
  else
160
- raise "Not sure where to find packages with a package format of '#{package_format}'"
156
+ raise "Error: Unknown package format '#{package_format}'"
161
157
  end
162
158
  end
163
159
 
164
- # TODO: please please please clean this up
165
- # This is so terrible. I really dislike it. But in order to maintain backward
166
- # compatibility, we need to maintain these path differences between PC1 and
167
- # everything else. Once we stop shipping things to PC1, we can remove all the
168
- # PC1 specific cases. That's likely to not happen until the current LTS
169
- # (2016.4) is EOL'd. Hopefully also we do not choose to further change these
170
- # path structures, as it is no bueno.
171
- # --MAS 2017-08-16
160
+ # Given platform information, create symlink target (base_path) and link path in the
161
+ # form of a 2-element array
162
+ def artifacts_base_path_and_link_path(platform_tag, prefix = 'artifacts', is_nonfinal = false)
163
+ platform_name, _ = Pkg::Platforms.parse_platform_tag(platform_tag)
164
+ package_format = Pkg::Platforms.package_format_for_tag(platform_tag)
165
+
166
+ path_data = {
167
+ is_nonfinal: is_nonfinal,
168
+ link: link_name(is_nonfinal),
169
+ package_format: package_format,
170
+ platform_name: platform_name,
171
+ platform_tag: platform_tag,
172
+ prefix: prefix
173
+ }
174
+
175
+ return [
176
+ construct_base_path(path_data),
177
+ construct_link_path(path_data)
178
+ ]
179
+ end
180
+
172
181
  def artifacts_path(platform_tag, path_prefix = 'artifacts', nonfinal = false)
173
182
  base_path, _ = artifacts_base_path_and_link_path(platform_tag, path_prefix, nonfinal)
174
183
  platform, version, architecture = Pkg::Platforms.parse_platform_tag(platform_tag)
@@ -176,31 +185,15 @@ module Pkg::Paths
176
185
 
177
186
  case package_format
178
187
  when 'rpm'
179
- if is_legacy_repo?(yum_repo_name(nonfinal))
180
- File.join(base_path, architecture)
181
- else
182
- File.join(base_path, platform, version, architecture)
183
- end
188
+ File.join(base_path, platform, version, architecture)
184
189
  when 'swix'
185
- if is_legacy_repo?(repo_name(nonfinal))
186
- File.join(base_path, architecture)
187
- else
188
- File.join(base_path, version, architecture)
189
- end
190
+ File.join(base_path, version, architecture)
190
191
  when 'deb'
191
192
  base_path
192
193
  when 'svr4', 'ips'
193
- if is_legacy_repo?(repo_name(nonfinal))
194
- base_path
195
- else
196
- File.join(base_path, version)
197
- end
194
+ File.join(base_path, version)
198
195
  when 'dmg'
199
- if is_legacy_repo?(repo_name(nonfinal))
200
- File.join(base_path, architecture)
201
- else
202
- File.join(base_path, version, architecture)
203
- end
196
+ File.join(base_path, version, architecture)
204
197
  when 'msi'
205
198
  base_path
206
199
  else
@@ -47,26 +47,7 @@ module Pkg
47
47
  },
48
48
  },
49
49
 
50
- 'cumulus' => {
51
- '2.2' => {
52
- codename: 'cumulus',
53
- architectures: ['amd64'],
54
- source_architecture: 'source',
55
- package_format: 'deb',
56
- source_package_formats: DEBIAN_SOURCE_FORMATS,
57
- repo: true,
58
- },
59
- },
60
-
61
50
  'debian' => {
62
- '7' => {
63
- codename: 'wheezy',
64
- architectures: ['amd64', 'i386'],
65
- source_architecture: 'source',
66
- package_format: 'deb',
67
- source_package_formats: DEBIAN_SOURCE_FORMATS,
68
- repo: true,
69
- },
70
51
  '8' => {
71
52
  codename: 'jessie',
72
53
  architectures: ['amd64', 'i386', 'powerpc'],
@@ -103,7 +84,7 @@ module Pkg
103
84
  repo: true,
104
85
  },
105
86
  '6' => {
106
- architectures: ['x86_64', 'i386', 's390x'],
87
+ architectures: ['x86_64', 'i386'],
107
88
  source_architecture: 'SRPMS',
108
89
  package_format: 'rpm',
109
90
  source_package_formats: ['src.rpm'],
@@ -111,7 +92,7 @@ module Pkg
111
92
  repo: true,
112
93
  },
113
94
  '7' => {
114
- architectures: ['x86_64', 's390x', 'ppc64le', 'aarch64'],
95
+ architectures: ['x86_64', 'ppc64le', 'aarch64'],
115
96
  source_architecture: 'SRPMS',
116
97
  package_format: 'rpm',
117
98
  source_package_formats: ['src.rpm'],
@@ -137,78 +118,6 @@ module Pkg
137
118
  },
138
119
 
139
120
  'fedora' => {
140
- 'f25' => {
141
- architectures: ['x86_64', 'i386'],
142
- source_architecture: 'SRPMS',
143
- package_format: 'rpm',
144
- source_package_formats: ['src.rpm'],
145
- signature_format: 'v4',
146
- repo: true,
147
- },
148
- 'f26' => {
149
- architectures: ['x86_64'],
150
- source_architecture: 'SRPMS',
151
- package_format: 'rpm',
152
- source_package_formats: ['src.rpm'],
153
- signature_format: 'v4',
154
- repo: true,
155
- },
156
- 'f27' => {
157
- architectures: ['x86_64'],
158
- source_architecture: 'SRPMS',
159
- package_format: 'rpm',
160
- source_package_formats: ['src.rpm'],
161
- signature_format: 'v4',
162
- repo: true,
163
- },
164
- 'f28' => {
165
- architectures: ['x86_64'],
166
- source_architecture: 'SRPMS',
167
- package_format: 'rpm',
168
- source_package_formats: ['src.rpm'],
169
- signature_format: 'v4',
170
- repo: true,
171
- },
172
- '25' => {
173
- architectures: ['x86_64', 'i386'],
174
- source_architecture: 'SRPMS',
175
- package_format: 'rpm',
176
- source_package_formats: ['src.rpm'],
177
- signature_format: 'v4',
178
- repo: true,
179
- },
180
- '26' => {
181
- architectures: ['x86_64'],
182
- source_architecture: 'SRPMS',
183
- package_format: 'rpm',
184
- source_package_formats: ['src.rpm'],
185
- signature_format: 'v4',
186
- repo: true,
187
- },
188
- '27' => {
189
- architectures: ['x86_64'],
190
- source_architecture: 'SRPMS',
191
- package_format: 'rpm',
192
- source_package_formats: ['src.rpm'],
193
- signature_format: 'v4',
194
- repo: true,
195
- },
196
- '28' => {
197
- architectures: ['x86_64'],
198
- source_architecture: 'SRPMS',
199
- package_format: 'rpm',
200
- source_package_formats: ['src.rpm'],
201
- signature_format: 'v4',
202
- repo: true,
203
- },
204
- '29' => {
205
- architectures: ['x86_64'],
206
- source_architecture: 'SRPMS',
207
- package_format: 'rpm',
208
- source_package_formats: ['src.rpm'],
209
- signature_format: 'v4',
210
- repo: true,
211
- },
212
121
  '30' => {
213
122
  architectures: ['x86_64'],
214
123
  source_architecture: 'SRPMS',
@@ -228,26 +137,6 @@ module Pkg
228
137
  },
229
138
 
230
139
  'osx' => {
231
- '10.10' => {
232
- architectures: ['x86_64'],
233
- package_format: 'dmg',
234
- repo: false,
235
- },
236
- '10.11' => {
237
- architectures: ['x86_64'],
238
- package_format: 'dmg',
239
- repo: false,
240
- },
241
- '10.12' => {
242
- architectures: ['x86_64'],
243
- package_format: 'dmg',
244
- repo: false,
245
- },
246
- '10.13' => {
247
- architectures: ['x86_64'],
248
- package_format: 'dmg',
249
- repo: false,
250
- },
251
140
  '10.14' => {
252
141
  architectures: ['x86_64'],
253
142
  package_format: 'dmg',
@@ -273,7 +162,7 @@ module Pkg
273
162
 
274
163
  'sles' => {
275
164
  '11' => {
276
- architectures: ['x86_64', 'i386', 's390x'],
165
+ architectures: ['x86_64', 'i386'],
277
166
  source_architecture: 'SRPMS',
278
167
  package_format: 'rpm',
279
168
  source_package_formats: ['src.rpm'],
@@ -281,7 +170,7 @@ module Pkg
281
170
  repo: true,
282
171
  },
283
172
  '12' => {
284
- architectures: ['x86_64', 's390x', 'ppc64le'],
173
+ architectures: ['x86_64', 'ppc64le'],
285
174
  source_architecture: 'SRPMS',
286
175
  package_format: 'rpm',
287
176
  source_package_formats: ['src.rpm'],
@@ -41,10 +41,10 @@ describe 'artifactory.rb' do
41
41
  :repo_config => '',
42
42
  :additional_artifacts => ["./eos/4/PC1/i386/puppet-agent-extras-5.3.1.34.gf65f9ef-1.eos4.i386.swix"],
43
43
  },
44
- 'osx-10.12-x86_64' => {
45
- :artifact => "./apple/10.12/PC1/x86_64/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.12.dmg",
44
+ 'osx-10.15-x86_64' => {
45
+ :artifact => "./apple/10.15/PC1/x86_64/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg",
46
46
  :repo_config => '',
47
- :additional_artifacts => ["./apple/10.12/PC1/x86_64/puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.12.dmg"],
47
+ :additional_artifacts => ["./apple/10.15/PC1/x86_64/puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.15.dmg"],
48
48
  },
49
49
  'solaris-10-sparc' => {
50
50
  :artifact => "./solaris/10/PC1/puppet-agent-5.3.1.34.gf65f9ef-1.sparc.pkg.gz",
@@ -77,7 +77,7 @@ describe 'artifactory.rb' do
77
77
  :package_name => 'path/to/a/buster/package/puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb',
78
78
  :all_package_names => ['puppetdb_5.3.1.34.gf65f9ef-1buster_all.deb', 'puppetdb-termini_5.3.1.34.gf65f9ef-1buster_all.deb']
79
79
  },
80
- 'windows-2012-x86' => {
80
+ 'windows-2012-x86' => {
81
81
  :toplevel_repo => 'generic',
82
82
  :repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/windows-x86",
83
83
  :package_name => 'path/to/a/windows/package/puppet-agent-5.3.1.34-x86.msi',
@@ -95,11 +95,11 @@ describe 'artifactory.rb' do
95
95
  :package_name => 'path/to/an/eos/4/package/puppet-agent-5.3.1.34.gf65f9ef-1.eos4.i386.swix',
96
96
  :all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.eos4.i386.swix', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.eos4.i386.swix']
97
97
  },
98
- 'osx-10.12-x86_64' => {
98
+ 'osx-10.15-x86_64' => {
99
99
  :toplevel_repo => 'generic',
100
- :repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/osx-10.12-x86_64",
101
- :package_name => 'path/to/an/osx/10.12/package/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.12.dmg',
102
- :all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.osx10.12.dmg', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.12.dmg']
100
+ :repo_subdirectories => "#{default_repo_name}/#{project}/#{project_version}/osx-10.15-x86_64",
101
+ :package_name => 'path/to/an/osx/10.15/package/puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg',
102
+ :all_package_names => ['puppet-agent-5.3.1.34.gf65f9ef-1.osx10.15.dmg', 'puppet-agent-extras-5.3.1.34.gf65f9ef-1.osx10.15.dmg']
103
103
  },
104
104
  'solaris-10-sparc' => {
105
105
  :toplevel_repo => 'generic',
@@ -125,7 +125,6 @@ describe 'artifactory.rb' do
125
125
  expect(artifact.location_for(platform_tag)).to match_array([
126
126
  platform_tag_data[:toplevel_repo],
127
127
  platform_tag_data[:repo_subdirectories],
128
- File.join('pool', platform_tag_data[:repo_subdirectories])
129
128
  ])
130
129
  end
131
130
  else
@@ -133,7 +132,6 @@ describe 'artifactory.rb' do
133
132
  expect(artifact.location_for(platform_tag)).to match_array([
134
133
  platform_tag_data[:toplevel_repo],
135
134
  platform_tag_data[:repo_subdirectories],
136
- platform_tag_data[:repo_subdirectories]
137
135
  ])
138
136
  end
139
137
  end
@@ -142,7 +140,6 @@ describe 'artifactory.rb' do
142
140
  expect(artifact.location_for('generic')).to match_array([
143
141
  'generic',
144
142
  File.join(default_repo_name, project, project_version),
145
- File.join(default_repo_name, project, project_version)
146
143
  ])
147
144
  end
148
145
  end
@@ -203,22 +203,20 @@ describe "Pkg::Config" do
203
203
  describe "#platform_data" do
204
204
  platform_tags = [
205
205
  'eos-4-i386',
206
- 'osx-10.12-x86_64',
206
+ 'osx-10.15-x86_64',
207
207
  'cisco-wrlinux-7-x86_64',
208
208
  'ubuntu-16.04-i386',
209
- 'cumulus-2.2-amd64',
210
- 'el-6-s390x',
209
+ 'el-6-x86_64',
211
210
  'el-7-ppc64le',
212
211
  'sles-12-x86_64',
213
212
  ]
214
213
 
215
214
  artifacts = \
216
215
  "./artifacts/eos/4/PC1/i386/puppet-agent-5.3.2-1.eos4.i386.swix\n" \
217
- "./artifacts/apple/10.12/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx10.12.dmg\n" \
216
+ "./artifacts/apple/10.15/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.osx10.15.dmg\n" \
218
217
  "./artifacts/cisco-wrlinux/7/PC1/x86_64/puppet-agent-5.3.2-1.cisco_wrlinux7.x86_64.rpm\n" \
219
218
  "./artifacts/deb/xenial/PC1/puppet-agent_5.3.2-1xenial_i386.deb\n" \
220
- "./artifacts/deb/cumulus/PC1/puppet-agent_5.3.2-1cumulus_amd64.deb\n" \
221
- "./artifacts/el/6/PC1/s390x/puppet-agent-5.3.2.658.gc79ef9a-1.el6.s390x.rpm\n" \
219
+ "./artifacts/el/6/PC1/x86_64/puppet-agent-5.3.2.658.gc79ef9a-1.el6.x86_64.rpm\n" \
222
220
  "./artifacts/el/7/PC1/ppc64le/puppet-agent-5.3.2-1.el7.ppc64le.rpm\n" \
223
221
  "./artifacts/sles/12/PC1/x86_64/puppet-agent-5.3.2-1.sles12.x86_64.rpm"
224
222
 
@@ -226,7 +224,7 @@ describe "Pkg::Config" do
226
224
  "./artifacts/aix/6.1/PC1/ppc/puppet-agent-5.3.2-1.aix6.1.ppc.rpm"
227
225
 
228
226
  fedora_artifacts = \
229
- "./artifacts/fedora/f25/PC1/x86_64/puppet-agent-5.3.2-1.fedoraf25.x86_64.rpm"
227
+ "./artifacts/fedora/31/PC1/x86_64/puppet-agent-5.3.2-1.fc31.x86_64.rpm"
230
228
 
231
229
  windows_artifacts = \
232
230
  "./artifacts/windows/puppet-agent-x64.msi\n" \
@@ -283,8 +281,8 @@ describe "Pkg::Config" do
283
281
  it "should not use 'f' in fedora platform tags" do
284
282
  allow(Pkg::Util::Net).to receive(:remote_ssh_cmd).and_return(fedora_artifacts, nil)
285
283
  data = Pkg::Config.platform_data
286
- expect(data).to include('fedora-25-x86_64')
287
- expect(data).not_to include('fedora-f25-x86_64')
284
+ expect(data).to include('fedora-31-x86_64')
285
+ expect(data).not_to include('fedora-f31-x86_64')
288
286
  end
289
287
 
290
288
  it "should collect packages whose extname differ from package_format" do
@@ -25,17 +25,15 @@ describe 'Pkg::Paths' do
25
25
  'pkg/ubuntu-16.04-amd64/puppet-agent_4.99.0-1xenial_amd64.deb' => 'ubuntu-16.04-amd64',
26
26
  'pkg/windows-x64/puppet-agent-4.99.0-x64.msi' => 'windows-2012-x64',
27
27
  'artifacts/el/6/products/x86_64/pe-r10k-2.5.4.3-1.el6.x86_64.rpm' => 'el-6-x86_64',
28
- 'pkg/deb/trusty/pe-r10k_2.5.4.3-1trusty_amd64.deb' => 'ubuntu-14.04-amd64',
29
28
  'pkg/pe/rpm/el-6-i386/pe-puppetserver-2017.3.0.3-1.el6.noarch.rpm' => 'el-6-i386',
30
29
  'pkg/deb/trusty/pe-r10k_2.5.4.3-1trusty_amd64.deb' => 'ubuntu-14.04-amd64',
31
30
  'pkg/pe/deb/xenial/pe-puppetserver_2017.3.0.3-1puppet1_all.deb' => 'ubuntu-16.04-amd64',
32
31
  'pkg/pe/deb/xenial/super-trusty-package_1.0.0-1puppet1_all.deb' => 'ubuntu-16.04-amd64',
33
- 'artifacts/deb/wheezy/PC1/puppetdb_4.3.1-1puppetlabs1_all.deb' => 'debian-7-amd64',
32
+ 'artifacts/deb/stretch/PC1/puppetdb_4.3.1-1puppetlabs1_all.deb' => 'debian-9-amd64',
34
33
  'pkg/el/7/PC1/x86_64/puppetdb-4.3.1-1.el7.noarch.rpm' => 'el-7-x86_64',
35
- 'pkg/apple/10.11/PC1/x86_64/puppet-agent-1.9.0-1.osx10.11.dmg' => 'osx-10.11-x86_64',
36
- 'artifacts/mac/10.11/PC1/x86_64/puppet-agent-1.9.0-1.osx10.11.dmg' => 'osx-10.11-x86_64',
34
+ 'pkg/apple/10.14/PC1/x86_64/puppet-agent-1.9.0-1.osx10.14.dmg' => 'osx-10.14-x86_64',
35
+ 'artifacts/mac/10.15/PC1/x86_64/puppet-agent-1.9.0-1.osx10.15.dmg' => 'osx-10.15-x86_64',
37
36
  'artifacts/eos/4/PC1/i386/puppet-agent-1.9.0-1.eos4.i386.swix' => 'eos-4-i386',
38
- 'pkg/deb/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb' => 'cumulus-2.2-amd64',
39
37
  'pkg/windows/puppet-agent-1.9.0-x86.msi' => 'windows-2012-x86',
40
38
  'artifacts/ubuntu-16.04-i386/puppetserver_5.0.1-0.1SNAPSHOT.2017.07.27T2346puppetlabs1.debian.tar.gz' => 'ubuntu-16.04-source',
41
39
  'http://saturn.puppetlabs.net/deb_repos/1234abcd/repos/apt/xenial' => 'ubuntu-16.04-amd64',
@@ -97,8 +95,8 @@ describe 'Pkg::Paths' do
97
95
  expect(Pkg::Paths.artifacts_path('el-7-x86_64')).to eq('artifacts/puppet5/el/7/x86_64')
98
96
  end
99
97
 
100
- it 'should be correct for trusty' do
101
- expect(Pkg::Paths.artifacts_path('ubuntu-14.04-amd64')).to eq('artifacts/trusty/puppet5')
98
+ it 'should be correct for bionic' do
99
+ expect(Pkg::Paths.artifacts_path('ubuntu-18.04-amd64')).to eq('artifacts/bionic/puppet5')
102
100
  end
103
101
 
104
102
  it 'should be correct for solaris 11' do
@@ -106,7 +104,7 @@ describe 'Pkg::Paths' do
106
104
  end
107
105
 
108
106
  it 'should be correct for osx' do
109
- expect(Pkg::Paths.artifacts_path('osx-10.10-x86_64')).to eq('artifacts/mac/puppet5/10.10/x86_64')
107
+ expect(Pkg::Paths.artifacts_path('osx-10.15-x86_64')).to eq('artifacts/mac/puppet5/10.15/x86_64')
110
108
  end
111
109
 
112
110
  it 'should be correct for windows' do
@@ -211,32 +209,6 @@ describe 'Pkg::Paths' do
211
209
  end
212
210
  end
213
211
 
214
- describe '#is_legacy_repo?' do
215
- it 'returns true for empty strings' do
216
- expect(Pkg::Paths.is_legacy_repo?('')).to be_true
217
- end
218
-
219
- it 'returns true for PC1' do
220
- expect(Pkg::Paths.is_legacy_repo?('PC1')).to be_true
221
- end
222
-
223
- it 'returns true for foopuppetbar' do
224
- expect(Pkg::Paths.is_legacy_repo?('foopuppetbar')).to be_true
225
- end
226
-
227
- it 'returns false for puppet5' do
228
- expect(Pkg::Paths.is_legacy_repo?('puppet5')).to be_false
229
- end
230
-
231
- it 'returns false for puppet8-nightly' do
232
- expect(Pkg::Paths.is_legacy_repo?('puppet8-nightly')).to be_false
233
- end
234
-
235
- it 'returns false for puppet' do
236
- expect(Pkg::Paths.is_legacy_repo?('puppet')).to be_false
237
- end
238
- end
239
-
240
212
  describe '#remote_repo_base' do
241
213
  before :each do
242
214
  allow(Pkg::Config).to receive(:yum_repo_path).and_return('foo')
@@ -251,7 +223,7 @@ describe 'Pkg::Paths' do
251
223
  expect(Pkg::Paths.remote_repo_base('ubuntu-18.04-amd64')).to eq('bar')
252
224
  end
253
225
  it 'returns nonfinal_yum_repo_path for nonfinal rpms' do
254
- expect(Pkg::Paths.remote_repo_base('fedora-29-x86_64', true)).to eq('foo-nightly')
226
+ expect(Pkg::Paths.remote_repo_base('fedora-31-x86_64', true)).to eq('foo-nightly')
255
227
  end
256
228
  it 'returns nonfinal_apt_repo_path for nonfinal debs' do
257
229
  expect(Pkg::Paths.remote_repo_base('debian-9-amd64', true)).to eq('bar-nightly')
@@ -305,7 +277,7 @@ describe 'Pkg::Paths' do
305
277
  expect(Pkg::Paths.release_package_link_path('debian-9-i386', true)).to eq("#{nonfinal_apt_repo_path}/#{nonfinal_repo_name}-release-stretch.deb")
306
278
  end
307
279
  it 'returns nil for package formats that do not have release packages' do
308
- expect(Pkg::Paths.release_package_link_path('osx-10.13-x86_64')).to eq(nil)
280
+ expect(Pkg::Paths.release_package_link_path('osx-10.15-x86_64')).to eq(nil)
309
281
  expect(Pkg::Paths.release_package_link_path('windows-2012-x86')).to eq(nil)
310
282
  end
311
283
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe 'Pkg::Platforms' do
4
4
  describe '#by_package_format' do
5
5
  it 'should return an array of platforms that use a given format' do
6
- deb_platforms = ['cumulus', 'debian', 'ubuntu']
6
+ deb_platforms = ['debian', 'ubuntu']
7
7
  rpm_platforms = ['aix', 'cisco-wrlinux', 'el', 'fedora', 'redhatfips', 'sles']
8
8
  expect(Pkg::Platforms.by_package_format('deb')).to match_array(deb_platforms)
9
9
  expect(Pkg::Platforms.by_package_format('rpm')).to match_array(rpm_platforms)
@@ -19,7 +19,7 @@ describe 'Pkg::Platforms' do
19
19
 
20
20
  describe '#supported_platforms' do
21
21
  it 'should return all supported platforms' do
22
- platforms = ['aix', 'cisco-wrlinux', 'cumulus', 'debian', 'el', 'eos', 'fedora', 'osx', 'redhatfips', 'sles', 'solaris', 'ubuntu', 'windows', 'windowsfips']
22
+ platforms = ['aix', 'cisco-wrlinux', 'debian', 'el', 'eos', 'fedora', 'osx', 'redhatfips', 'sles', 'solaris', 'ubuntu', 'windows', 'windowsfips']
23
23
  expect(Pkg::Platforms.supported_platforms).to match_array(platforms)
24
24
  end
25
25
  end
@@ -36,7 +36,7 @@ describe 'Pkg::Platforms' do
36
36
 
37
37
  describe '#codenames' do
38
38
  it 'should return all codenames for a given platform' do
39
- codenames = ['focal', 'bionic', 'buster', 'cosmic', 'cumulus', 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial']
39
+ codenames = ['focal', 'bionic', 'buster', 'cosmic', 'jessie', 'stretch', 'trusty', 'xenial']
40
40
  expect(Pkg::Platforms.codenames).to match_array(codenames)
41
41
  end
42
42
  end
@@ -59,27 +59,27 @@ describe 'Pkg::Platforms' do
59
59
 
60
60
  describe '#arches_for_codename' do
61
61
  it 'should return an array of arches corresponding to a given codename' do
62
- expect(Pkg::Platforms.arches_for_codename('trusty')).to match_array(['i386', 'amd64'])
62
+ expect(Pkg::Platforms.arches_for_codename('xenial')).to match_array(['amd64', 'i386', 'ppc64el'])
63
63
  end
64
64
 
65
65
  it 'should be able to include source archietectures' do
66
- expect(Pkg::Platforms.arches_for_codename('trusty', true)).to match_array(['i386', 'amd64', 'source'])
66
+ expect(Pkg::Platforms.arches_for_codename('xenial', true)).to match_array(["amd64", "i386", "ppc64el", "source"])
67
67
  end
68
68
  end
69
69
 
70
70
  describe '#codename_to_tags' do
71
71
  it 'should return an array of platform tags corresponding to a given codename' do
72
- expect(Pkg::Platforms.codename_to_tags('trusty')).to match_array(['ubuntu-14.04-i386', 'ubuntu-14.04-amd64'])
72
+ expect(Pkg::Platforms.codename_to_tags('xenial')).to match_array(['ubuntu-16.04-i386', 'ubuntu-16.04-amd64', "ubuntu-16.04-ppc64el"])
73
73
  end
74
74
  end
75
75
 
76
76
  describe '#arches_for_platform_version' do
77
77
  it 'should return an array of arches for a given platform and version' do
78
- expect(Pkg::Platforms.arches_for_platform_version('sles', '11')).to match_array(['i386', 'x86_64', 's390x'])
78
+ expect(Pkg::Platforms.arches_for_platform_version('sles', '12')).to match_array(['x86_64', 'ppc64le'])
79
79
  end
80
80
 
81
81
  it 'should be able to include source architectures' do
82
- expect(Pkg::Platforms.arches_for_platform_version('sles', '11', true)).to match_array(['i386', 'x86_64', 's390x', 'SRPMS'])
82
+ expect(Pkg::Platforms.arches_for_platform_version('sles', '12', true)).to match_array(["SRPMS", "ppc64le", "x86_64"])
83
83
  end
84
84
  end
85
85
 
@@ -98,12 +98,12 @@ describe 'Pkg::Platforms' do
98
98
 
99
99
  describe '#platform_lookup' do
100
100
  it 'should return a hash of platform info' do
101
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64')).to be_instance_of(Hash)
101
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64')).to be_instance_of(Hash)
102
102
  end
103
103
 
104
104
  it 'should include at least arch and package format keys' do
105
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64').keys).to include(:architectures)
106
- expect(Pkg::Platforms.platform_lookup('osx-10.10-x86_64').keys).to include(:package_format)
105
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:architectures)
106
+ expect(Pkg::Platforms.platform_lookup('osx-10.15-x86_64').keys).to include(:package_format)
107
107
  end
108
108
  end
109
109
 
@@ -137,7 +137,7 @@ describe 'Pkg::Platforms' do
137
137
  'windows-2012' => ['windows', '2012', ''],
138
138
  'redhatfips-7-x86_64' => ['redhatfips', '7', 'x86_64'],
139
139
  'el-7-SRPMS' => ['el', '7', 'SRPMS'],
140
- 'ubuntu-14.04-source' => ['ubuntu', '14.04', 'source'],
140
+ 'ubuntu-16.04-source' => ['ubuntu', '16.04', 'source'],
141
141
  }
142
142
 
143
143
  fail_cases = [
@@ -12,7 +12,7 @@ describe 'Pkg::Retrieve' do
12
12
  'aix-6.1-power' => {:artifact => './aix/6.1/PC1/ppc/puppet-agent-5.3.2.155.gb25e649-1.aix6.1.ppc.rpm'},
13
13
  'el-7-x86_64' => {:artifact => './el/7/PC1/x86_64/puppet-agent-5.3.2.155.gb25e649-1.el7.x86_64.rpm'},
14
14
  'osx-10.11-x86_64' => {:artifact => './apple/10.11/PC1/x86_64/puppet-agent-5.3.2.155.gb25e649-1.osx10.11.dmg'},
15
- 'sles-11-s390x' => {:artifact => './sles/11/PC1/s390x/puppet-agent-5.3.2.155.gb25e649-1.sles11.s390x.rpm'},
15
+ 'sles-11-i386' => {:artifact => './sles/11/PC1/i386/puppet-agent-5.3.2.155.gb25e649-1.sles11.i386.rpm'},
16
16
  'solaris-10-sparc' => {:artifact => './solaris/10/PC1/puppet-agent-5.3.2.155.gb25e649-1.sparc.pkg.gz'},
17
17
  'ubuntu-16.04-amd64' => {:artifact => './deb/xenial/PC1/puppet-agent_5.3.2.155.gb25e649-1xenial_amd64.deb'},
18
18
  'windows-2012-x64' => {:artifact => './windows/puppet-agent-x64.msi'},
@@ -74,7 +74,6 @@ DOC
74
74
  ] }
75
75
  let(:v4_rpms) { [
76
76
  "#{rpm_directory}/el/7/PC1/aarch64/puppet-agent-5.5.3-1.el7.aarch64.rpm",
77
- "#{rpm_directory}/sles/12/PC1/s390x/puppet-agent-5.5.3-1.sles12.s390x.rpm",
78
77
  ] }
79
78
  let(:rpms) { rpms_not_to_sign + v3_rpms + v4_rpms }
80
79
  let(:already_signed_rpms) { [
@@ -43,25 +43,21 @@ describe '#Pkg::Util::Ship' do
43
43
  end
44
44
 
45
45
  local_pkgs = [
46
- 'pkg/deb/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb',
47
- 'pkg/deb/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
46
+ 'pkg/deb/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
48
47
  'pkg/el/5/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
49
48
  'pkg/sles/11/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
50
49
  'pkg/sles/12/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
51
50
  'pkg/mac/10.15/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
52
- 'pkg/mac/10.10/puppet5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.10.dmg',
53
51
  'pkg/eos/4/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix',
54
52
  'pkg/eos/4/puppet5/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
55
53
  'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
56
54
  ]
57
55
  new_pkgs = [
58
- 'pkg/cumulus/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1cumulus_amd64.deb',
59
- 'pkg/wheezy/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1wheezy_i386.deb',
56
+ 'pkg/stretch/puppet5/puppet-agent_1.4.1.2904.g8023dd1-1stretch_i386.deb',
60
57
  'pkg/puppet5/el/5/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.el5.x86_64.rpm',
61
58
  'pkg/puppet5/sles/11/i386/puppet-agent-1.4.1.2904.g8023dd1-1.sles11.i386.rpm',
62
59
  'pkg/puppet5/sles/12/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.sles12.x86_64.rpm',
63
60
  'pkg/mac/puppet5/10.15/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.15.dmg',
64
- 'pkg/mac/puppet5/10.10/x86_64/puppet-agent-1.4.1.2904.g8023dd1-1.osx10.10.dmg',
65
61
  'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix',
66
62
  'pkg/eos/puppet5/4/i386/puppet-agent-1.4.1.2904.g8023dd1-1.eos4.i386.swix.asc',
67
63
  'pkg/windows/puppet5/puppet-agent-1.4.1.2904.g8023dd1-x86.msi',
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.61
4
+ version: 0.99.62
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-04-02 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -107,6 +107,7 @@ files:
107
107
  - lib/packaging.rb
108
108
  - lib/packaging/archive.rb
109
109
  - lib/packaging/artifactory.rb
110
+ - lib/packaging/artifactory/extensions.rb
110
111
  - lib/packaging/config.rb
111
112
  - lib/packaging/config/params.rb
112
113
  - lib/packaging/deb.rb
@@ -245,27 +246,27 @@ specification_version: 4
245
246
  summary: Puppet Labs' packaging automation
246
247
  test_files:
247
248
  - spec/lib/packaging_spec.rb
249
+ - spec/lib/packaging/sign_spec.rb
250
+ - spec/lib/packaging/artifactory_spec.rb
251
+ - spec/lib/packaging/deb_spec.rb
252
+ - spec/lib/packaging/platforms_spec.rb
253
+ - spec/lib/packaging/gem_spec.rb
248
254
  - spec/lib/packaging/config_spec.rb
249
255
  - spec/lib/packaging/retrieve_spec.rb
250
- - spec/lib/packaging/repo_spec.rb
251
- - spec/lib/packaging/tar_spec.rb
252
- - spec/lib/packaging/rpm/repo_spec.rb
253
- - spec/lib/packaging/deb_spec.rb
254
- - spec/lib/packaging/sign_spec.rb
255
- - spec/lib/packaging/deb/repo_spec.rb
256
+ - spec/lib/packaging/util/rake_utils_spec.rb
257
+ - spec/lib/packaging/util/misc_spec.rb
258
+ - spec/lib/packaging/util/jenkins_spec.rb
256
259
  - spec/lib/packaging/util/net_spec.rb
257
- - spec/lib/packaging/util/ship_spec.rb
258
- - spec/lib/packaging/util/gpg_spec.rb
259
260
  - spec/lib/packaging/util/file_spec.rb
260
- - spec/lib/packaging/util/os_spec.rb
261
- - spec/lib/packaging/util/git_spec.rb
262
261
  - spec/lib/packaging/util/git_tag_spec.rb
263
- - spec/lib/packaging/util/rake_utils_spec.rb
264
- - spec/lib/packaging/util/jenkins_spec.rb
265
262
  - spec/lib/packaging/util/execution_spec.rb
263
+ - spec/lib/packaging/util/gpg_spec.rb
264
+ - spec/lib/packaging/util/git_spec.rb
265
+ - spec/lib/packaging/util/ship_spec.rb
266
266
  - spec/lib/packaging/util/version_spec.rb
267
- - spec/lib/packaging/util/misc_spec.rb
268
- - spec/lib/packaging/platforms_spec.rb
269
- - spec/lib/packaging/gem_spec.rb
267
+ - spec/lib/packaging/util/os_spec.rb
268
+ - spec/lib/packaging/repo_spec.rb
269
+ - spec/lib/packaging/deb/repo_spec.rb
270
+ - spec/lib/packaging/tar_spec.rb
270
271
  - spec/lib/packaging/paths_spec.rb
271
- - spec/lib/packaging/artifactory_spec.rb
272
+ - spec/lib/packaging/rpm/repo_spec.rb