simp-rake-helpers 5.13.1 → 5.15.0

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: b6f0550abc4ac7ec968a8590bbc7003d0de2753ae072909396fce25c01a7edd3
4
- data.tar.gz: 4eb8efa7f00322290a3a45a6e304ac6b1798e3d47283e1ad525184ae95f9560f
3
+ metadata.gz: 0fc850ad07208e9cca1afe63b9ad29253c8e6dc2310290ad7c168faedd9ad0a7
4
+ data.tar.gz: 3bd521f05c66567b3478e675603be5c75a9b8a0ad9561322e43ad725e22f1d15
5
5
  SHA512:
6
- metadata.gz: e6eef279b4061c054908d69ab0408e5e850149bc92689db7b64f167d9815186af793a07c905bbf47d71763107088cdd4059da6f31e95f775410ab03803428b68
7
- data.tar.gz: 4bf2a7cfedbd8a9a711f9ba19e62ad16c0dcd593511ab21d249eda819b1ac67ba7ed0285a085057e7b68e31a700fdb185d57736a773734512821781096bad478
6
+ metadata.gz: f74eabacff77b22d46a168a1890fc0af3b97910e9aba213f72385e8bc349a0be59316158f14799dfc24d4b949d9c0342678767ce772181a0e1e938723bdad185
7
+ data.tar.gz: 61e13e8c60a02fe50481f5d19437e3d1ae9936cb28313d8a9e0a4a74041e243f63891872982b6695fcb26ffa5629237cb2d26b6777f4caba45a158e6d68fe571
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ### 5.15.0 / 2022-06-03
2
+ - Added
3
+ - Users now have the ability to set version limits in the `dependencies.yaml`
4
+ file that will override those in the `metadata.json`
5
+
6
+ ### 5.14.0 / 2022-05-14
7
+ - Added
8
+ - Run `implantisomd5` after the ISO has been created so that it can be
9
+ validated by the installer at runtime.
10
+
11
+ ### 5.13.3 / 2022-05-20
12
+ - Fixed:
13
+ - Changed default RPM installed file permissions to 0644/0755
14
+ - The tarball unpack exclusions were too aggressive. The `SIMP/GPGKEYS`
15
+ directory is now preserved properly.
16
+
17
+ ### 5.13.2 / 2022-05-13
18
+ - Fixed:
19
+ - SIMP_BUILD_reposync_only now properly unpacks the tarball
20
+
1
21
  ### 5.13.1 / 2022-05-01
2
22
  - Fixed:
3
23
  - Aligned wtih an API change in the `dirty?` method in `r10k`
@@ -5,6 +25,8 @@
5
25
  ### 5.13.0 / 2021-11-14
6
26
  - Added:
7
27
  - Output the full `mkisofs` command when building an ISO
28
+ - Added SIMP_BUILD_reposync_only to ignore the built tarball if a reposync
29
+ directory is present
8
30
 
9
31
  ### 5.12.7 / 2021-10-26
10
32
  - Added:
@@ -38,6 +38,7 @@ module Simp::Rake::Build
38
38
  'gpg',
39
39
  'grep',
40
40
  'gzip',
41
+ 'implantisomd5',
41
42
  'install',
42
43
  'isoinfo',
43
44
  'm4',
@@ -139,6 +140,7 @@ module Simp::Rake::Build
139
140
  :key_name => ENV['SIMP_BUILD_signing_key'] || 'dev'
140
141
  )
141
142
 
143
+ reposync_only = ENV.fetch('SIMP_BUILD_reposync_only', 'no') == 'yes'
142
144
  iso_paths = File.expand_path(args[:iso_paths])
143
145
  target_release = args[:release]
144
146
  do_checksum = (args.do_checksum = ~ /^$/ ? 'false' : args.do_checksum)
@@ -266,8 +266,11 @@ module Simp::Rake::Build
266
266
  puts
267
267
  puts '-'*80
268
268
  puts
269
+
270
+ # Only add the ISO modifications
271
+ system(%(tar --no-same-permissions --exclude="*.rpm" -C #{dir} -xzf #{tball}))
269
272
  else
270
- # Add the SIMP code
273
+ # Add the SIMP code and ISO modifications
271
274
  system("tar --no-same-permissions -C #{dir} -xzf #{tball}")
272
275
 
273
276
  # Pop the SIMP directory from the tarball into the correct spot
@@ -446,7 +449,10 @@ module Simp::Rake::Build
446
449
  end # End of tarfiles loop
447
450
 
448
451
  # If we got here and didn't generate any ISOs, something went horribly wrong
449
- fail('Error: No ISO was built!') unless @simp_output_iso
452
+ fail('Error: No ISO was built!') unless ( @simp_output_iso && File.exist?(@simp_output_iso) )
453
+
454
+ # Embed the validation checksum
455
+ system("implantisomd5 --supported-iso #{@simp_output_iso}")
450
456
  end
451
457
 
452
458
  =begin
@@ -89,12 +89,40 @@ module Simp::Rake::Build::RpmDeps
89
89
  #
90
90
  # +requires_list+:: list of package this module should require
91
91
  # from the 'dependencies.yaml'
92
+ #
93
+ # * If the entry is an Array, the second value will be treated as the
94
+ # minimum version and the third as the maximum version
95
+ # * If you specify your own limiters, it will put them in place verbatim
96
+ # * Examples:
97
+ # * ['rpm-name', '1.2.3']
98
+ # * Requires rpm-name >= 1.2.3
99
+ # * ['rpm-name', '1.2.3', '2.0.0']
100
+ # * Requires rpm-name >= 1.2.3
101
+ # * Requires rpm-name < 2.0.0
102
+ # * ['rpm-name', '> 1.2.3', '<= 2.0.0']
103
+ # * Requires rpm-name > 1.2.3
104
+ # * Requires rpm-name <= 2.0.0
92
105
  # +module_metadata+:: Hash containing the contents of the
93
106
  # module's 'metadata.json' file
94
107
  def self.generate_custom_rpm_requires(requires_list, module_metadata)
95
108
  rpm_metadata_content = []
96
109
 
97
- requires_list.each do |pkg|
110
+ requires_list.each do |pkg_to_modify|
111
+ pkg = pkg_to_modify
112
+ min_version = nil
113
+ max_version = nil
114
+
115
+ pkg, min_version, max_version = pkg if pkg.is_a?(Array)
116
+
117
+ rpm_version_chars = ['<','>','=']
118
+
119
+ if min_version && rpm_version_chars.none? { |x| min_version.include?(x) }
120
+ min_version = ">= #{min_version}"
121
+ end
122
+ if max_version && rpm_version_chars.none? { |x| max_version.include?(x) }
123
+ max_version = "< #{max_version}"
124
+ end
125
+
98
126
  pkg_parts = pkg.split(%r(-|/))[-2..-1]
99
127
 
100
128
  # Need to cover all base cases
@@ -118,12 +146,18 @@ module Simp::Rake::Build::RpmDeps
118
146
  dep_version = dep_info.first['version_requirement']
119
147
  end
120
148
 
121
- begin
122
- rpm_metadata_content << get_version_requires(pkg, dep_version)
123
- rescue SIMPRpmDepVersionException
124
- err_msg = "Unable to parse #{short_names.first} dependency" +
125
- " version '#{dep_version}'"
126
- raise SIMPRpmDepException.new(err_msg)
149
+ # Use the version specified in the config file if it exists
150
+ if min_version || max_version
151
+ rpm_metadata_content << "Requires: #{pkg} #{min_version}" if min_version
152
+ rpm_metadata_content << "Requires: #{pkg} #{max_version}" if max_version
153
+ else
154
+ begin
155
+ rpm_metadata_content << get_version_requires(pkg, dep_version)
156
+ rescue SIMPRpmDepVersionException
157
+ err_msg = "Unable to parse #{short_names.first} dependency" +
158
+ " version '#{dep_version}'"
159
+ raise SIMPRpmDepException.new(err_msg)
160
+ end
127
161
  end
128
162
  end
129
163
  rpm_metadata_content.flatten
@@ -587,7 +587,7 @@ mkdir -p %{buildroot}/%{prefix}
587
587
 
588
588
 
589
589
  %files
590
- %defattr(0640,root,root,0750)
590
+ %defattr(0644,root,root,0755)
591
591
  %{prefix}/%{module_name}
592
592
 
593
593
  %changelog
@@ -587,7 +587,7 @@ mkdir -p %{buildroot}/%{prefix}
587
587
 
588
588
 
589
589
  %files
590
- %defattr(0640,root,root,0750)
590
+ %defattr(0644,root,root,0755)
591
591
  %{prefix}/%{module_name}
592
592
 
593
593
  %changelog
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.13.1'
5
+ VERSION = '5.15.0'
6
6
  end
@@ -290,7 +290,7 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
290
290
  # That will give Travis a way of warning us if the changelog
291
291
  # will prevent the rpm from building.
292
292
  task :changelog_annotation, [:quiet] do |t,args|
293
- warning('DEPRECATED: use pkg:create_tag_changelog')
293
+ warn('DEPRECATED: use pkg:create_tag_changelog')
294
294
  quiet = true if args[:quiet].to_s == 'true'
295
295
  puts changelog_annotation( quiet )
296
296
  end
@@ -333,7 +333,7 @@ class Simp::Rake::Pupmod::Helpers < ::Rake::TaskLib
333
333
  - doc directory
334
334
  EOM
335
335
  task :compare_latest_tag, [:tags_source, :ignore_owner, :verbose] do |t,args|
336
- warning('DEPRECATED: use pkg:compare_latest_tag')
336
+ warn('DEPRECATED: use pkg:compare_latest_tag')
337
337
  require 'json'
338
338
 
339
339
  tags_source = args[:tags_source].nil? ? 'origin' : args[:tags_source]
@@ -20,7 +20,7 @@
20
20
  # does NOT include puppetlabs/apt
21
21
  - 'pupmod-puppetlabs-stdlib'
22
22
  - 'pupmod-ceritsc-yum'
23
- - 'pupmod-richardc-datacat'
23
+ - ['pupmod-richardc-datacat', '1.2.3', '<=3.4.5']
24
24
  :release: '2017.0'
25
25
  :external_dependencies:
26
26
  'rubygem-puppetserver-toml':
@@ -105,8 +105,8 @@ Requires: pupmod-puppetlabs-stdlib >= 3.2.0
105
105
  Requires: pupmod-puppetlabs-stdlib < 5.0.0
106
106
  Requires: pupmod-ceritsc-yum >= 0.9.6
107
107
  Requires: pupmod-ceritsc-yum < 1.0.0
108
- Requires: pupmod-richardc-datacat >= 0.6.2
109
- Requires: pupmod-richardc-datacat < 1.0.0
108
+ Requires: pupmod-richardc-datacat >= 1.2.3
109
+ Requires: pupmod-richardc-datacat <=3.4.5
110
110
  Requires: rubygem-puppetserver-toml >= 0.1.2
111
111
  Requires: rubygem-puppetserver-blackslate >= 2.1.2.4-1
112
112
  Requires: rubygem-puppetserver-blackslate < 2.2.0.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-rake-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.13.1
4
+ version: 5.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-05-06 00:00:00.000000000 Z
12
+ date: 2022-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simp-beaker-helpers
@@ -265,7 +265,7 @@ dependencies:
265
265
  version: '0'
266
266
  description: ' "simp-rake-helpers provides common methods for SIMP Rake Tasks"
267
267
 
268
- '
268
+ '
269
269
  email: simp@simp-project.org
270
270
  executables: []
271
271
  extensions: []
@@ -592,7 +592,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
592
592
  - !ruby/object:Gem::Version
593
593
  version: '0'
594
594
  requirements: []
595
- rubygems_version: 3.0.9
595
+ rubyforge_project:
596
+ rubygems_version: 2.7.6.3
596
597
  signing_key:
597
598
  specification_version: 4
598
599
  summary: SIMP rake helpers