simp-rake-helpers 5.13.0 → 5.14.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: 5686fa0464ed4e47817e43609d4aa2ec52ccab1a9facd6429d73ec39b321f487
4
- data.tar.gz: f787b34312ad9033c21811615adb5eb8d069655038e309109fab82560f1e0b81
3
+ metadata.gz: 5dfb50582e2d9f05a5ea7ac039013727dadd80b6fc931bd1c7a35ef2f1a89400
4
+ data.tar.gz: 5507ff633482b131f3beeeeee24166e8afeacdbc94987fde93a7c564e77d6d05
5
5
  SHA512:
6
- metadata.gz: 64c644cf1b04dbceaface541e8b6d219a7d6d9f93ed863a18062b25dece5307d62715a1fee0351e444c3f00e9c8ce476b7455a08f2b76291184949796e1770cf
7
- data.tar.gz: 18663a6da6f497810c0d505d2fd73109cd97355b664deaa3609f60787dd280fb6a6bee6f3e0f2fa473dacffc696bb369994396b271f48bebeae6fb1a31fabdc4
6
+ metadata.gz: edf69ac817e38a9b4c7e32ab6352c96b612728fd85a7e8e1c247ed6ac47a6d9d84e92207ce7437e6aa1cc2743cfad5128a7f0d94832940a093d2042063482682
7
+ data.tar.gz: d9a07c960cbfe946978d97a565ebe468a6f259c9486002db13f89c0a6aefea8422d68d14e5e9c523e8bc34ce4b4ce48fce5c42a8f4d9ad329b8c3cf4fdf30a07
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
- ### 5.13.0 /2021-11-14
1
+ ### 5.14.0 / 2022-05-14
2
+ - Added
3
+ - Run `implantisomd5` after the ISO has been created so that it can be
4
+ validated by the installer at runtime.
5
+
6
+ ### 5.13.3 / 2022-05-20
7
+ - Fixed:
8
+ - Changed default RPM installed file permissions to 0644/0755
9
+ - The tarball unpack exclusions were too aggressive. The `SIMP/GPGKEYS`
10
+ directory is now preserved properly.
11
+
12
+ ### 5.13.2 / 2022-05-13
13
+ - Fixed:
14
+ - SIMP_BUILD_reposync_only now properly unpacks the tarball
15
+
16
+ ### 5.13.1 / 2022-05-01
17
+ - Fixed:
18
+ - Aligned wtih an API change in the `dirty?` method in `r10k`
19
+
20
+ ### 5.13.0 / 2021-11-14
2
21
  - Added:
3
22
  - Output the full `mkisofs` command when building an ISO
23
+ - Added SIMP_BUILD_reposync_only to ignore the built tarball if a reposync
24
+ directory is present
4
25
 
5
26
  ### 5.12.7 / 2021-10-26
6
27
  - 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',
@@ -110,14 +111,15 @@ module Simp::Rake::Build
110
111
  - SIMP_BUILD_docs => 'yes' builds & includes documentation
111
112
  - SIMP_BUILD_checkout => 'no' will skip the git repo checkouts
112
113
  - SIMP_BUILD_bundle => 'no' skips running bundle in each subrepo
113
- - SIMP_BUILD_unpack => 'no' skips the unpack section
114
- - SIMP_BUILD_unpack_merge => 'no' prevents auto-merging the unpacked DVD
114
+ - SIMP_BUILD_unpack => 'no' prevents unpacking the source ISO
115
+ - SIMP_BUILD_unpack_merge => 'no' prevents auto-merging the unpacked ISO
115
116
  - SIMP_BUILD_prune => 'no' passes :prune=>false to iso:build
116
117
  - SIMP_BUILD_iso_name => Renames the output ISO filename [Default: false]
117
118
  - SIMP_BUILD_iso_tag => Appended to the output ISO's filename [Default: false]
118
119
  - SIMP_BUILD_update_packages => Automatically update any necessary packages in the packages.yaml file [Default: false]
119
120
  - SIMP_BUILD_verbose => 'yes' enables verbose reporting. [Default: 'no']
120
121
  - SIMP_BUILD_signing_key => The name of the GPG key to use to sign packages. [Default: 'dev']
122
+ - SIMP_BUILD_reposync_only => 'yes' skips unpacking the locally-build tarball so that you only get items from the reposync directory (if present)
121
123
  EOM
122
124
 
123
125
  task :auto, [:iso_paths,
@@ -138,6 +140,7 @@ module Simp::Rake::Build
138
140
  :key_name => ENV['SIMP_BUILD_signing_key'] || 'dev'
139
141
  )
140
142
 
143
+ reposync_only = ENV.fetch('SIMP_BUILD_reposync_only', 'no') == 'yes'
141
144
  iso_paths = File.expand_path(args[:iso_paths])
142
145
  target_release = args[:release]
143
146
  do_checksum = (args.do_checksum = ~ /^$/ ? 'false' : args.do_checksum)
@@ -16,7 +16,7 @@ class R10KHelper
16
16
  end
17
17
 
18
18
  # Return true if the repository has local modifications, false otherwise.
19
- def dirty?
19
+ def dirty?(exclude_spec=false)
20
20
  repo_status = false
21
21
 
22
22
  return repo_status unless File.directory?(path)
@@ -252,61 +252,80 @@ module Simp::Rake::Build
252
252
  end
253
253
  end
254
254
 
255
- # Add the SIMP code
256
- system("tar --no-same-permissions -C #{dir} -xzf #{tball}")
255
+ reposync_only = (ENV.fetch('SIMP_BUILD_reposync_only', 'no') == 'yes')
256
+ if reposync_only && !reposync_active
257
+ fail("ERROR: Reposync-only requested, but no reposync content found")
258
+ end
257
259
 
258
- # Pop the SIMP directory from the tarball into the correct spot
259
- # FIXME: This is a hack
260
- unless dir == repo_target_dir
261
- simpdir = File.join(dir,'SIMP')
260
+ if reposync_only
261
+ puts
262
+ puts '-'*80
263
+ puts '### Reposync-Only Mode ###'
264
+ puts
265
+ puts ' Locally built packages will not be added'
266
+ puts
267
+ puts '-'*80
268
+ puts
262
269
 
263
- if File.directory?(simpdir)
264
- cp_r(simpdir, repo_target_dir, :verbose => verbose)
265
- rm_rf(simpdir, :verbose => verbose)
266
- end
267
- end
270
+ # Only add the ISO modifications
271
+ system(%(tar --no-same-permissions --exclude="*.rpm" -C #{dir} -xzf #{tball}))
272
+ else
273
+ # Add the SIMP code and ISO modifications
274
+ system("tar --no-same-permissions -C #{dir} -xzf #{tball}")
268
275
 
269
- Dir.chdir("#{repo_target_dir}/SIMP") do
270
- # Add the SIMP Dependencies
271
- simp_base_ver = simpver.split('-').first
276
+ # Pop the SIMP directory from the tarball into the correct spot
277
+ # FIXME: This is a hack
278
+ unless dir == repo_target_dir
279
+ simpdir = File.join(dir,'SIMP')
272
280
 
273
- if $simp6
274
- yum_dep_location = File.join(@build_dir,'yum_data','packages')
275
- else
276
- simp_dep_src = %(SIMP#{simp_base_ver}_#{baseos}#{baseosver}_#{arch})
277
- yum_dep_location = File.join(@build_dir,'yum_data',simp_dep_src,'packages')
281
+ if File.directory?(simpdir)
282
+ cp_r(simpdir, repo_target_dir, :verbose => verbose)
283
+ rm_rf(simpdir, :verbose => verbose)
284
+ end
278
285
  end
279
286
 
280
- yum_dep_rpms = Dir.glob(File.join(yum_dep_location,'*.rpm'))
287
+ Dir.chdir("#{repo_target_dir}/SIMP") do
288
+ # Add the SIMP Dependencies
289
+ simp_base_ver = simpver.split('-').first
281
290
 
282
- unless File.directory?(yum_dep_location)
283
- fail("Could not find dependency directory at #{yum_dep_location}") unless reposync_active
284
- end
291
+ if $simp6
292
+ yum_dep_location = File.join(@build_dir,'yum_data','packages')
293
+ else
294
+ simp_dep_src = %(SIMP#{simp_base_ver}_#{baseos}#{baseosver}_#{arch})
295
+ yum_dep_location = File.join(@build_dir,'yum_data',simp_dep_src,'packages')
296
+ end
285
297
 
286
- if yum_dep_rpms.empty?
287
- fail("Could not find any dependency RPMs at #{yum_dep_location}") unless reposync_active
288
- end
298
+ yum_dep_rpms = Dir.glob(File.join(yum_dep_location,'*.rpm'))
289
299
 
290
- # Add any one-off RPMs that you might want to add to your own build
291
- # These are *not* checked to make sure that they actually match your
292
- # environment
293
- aux_packages = File.join(File.dirname(yum_dep_location),'aux_packages')
294
- if File.directory?(aux_packages)
295
- yum_dep_rpms += Dir.glob(File.join(aux_packages,'*.rpm'))
296
- end
300
+ unless File.directory?(yum_dep_location)
301
+ fail("Could not find dependency directory at #{yum_dep_location}") unless reposync_active
302
+ end
297
303
 
298
- yum_dep_rpms.each do |rpm|
299
- rpm_arch = rpm.split('.')[-2]
304
+ if yum_dep_rpms.empty?
305
+ fail("Could not find any dependency RPMs at #{yum_dep_location}") unless reposync_active
306
+ end
300
307
 
301
- unless File.directory?(rpm_arch)
302
- mkdir(rpm_arch)
308
+ # Add any one-off RPMs that you might want to add to your own build
309
+ # These are *not* checked to make sure that they actually match your
310
+ # environment
311
+ aux_packages = File.join(File.dirname(yum_dep_location),'aux_packages')
312
+ if File.directory?(aux_packages)
313
+ yum_dep_rpms += Dir.glob(File.join(aux_packages,'*.rpm'))
303
314
  end
304
315
 
305
- # Just in case this is a symlink, broken, or some other nonsense.
306
- target_file = File.join(rpm_arch,File.basename(rpm))
307
- rm_f(target_file) if File.exist?(target_file)
316
+ yum_dep_rpms.each do |rpm|
317
+ rpm_arch = rpm.split('.')[-2]
318
+
319
+ unless File.directory?(rpm_arch)
320
+ mkdir(rpm_arch)
321
+ end
322
+
323
+ # Just in case this is a symlink, broken, or some other nonsense.
324
+ target_file = File.join(rpm_arch,File.basename(rpm))
325
+ rm_f(target_file) if File.exist?(target_file)
308
326
 
309
- cp(rpm,rpm_arch, :verbose => verbose)
327
+ cp(rpm,rpm_arch, :verbose => verbose)
328
+ end
310
329
  end
311
330
 
312
331
  if reposync_active
@@ -430,7 +449,10 @@ module Simp::Rake::Build
430
449
  end # End of tarfiles loop
431
450
 
432
451
  # If we got here and didn't generate any ISOs, something went horribly wrong
433
- 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}")
434
456
  end
435
457
 
436
458
  =begin
@@ -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.0'
5
+ VERSION = '5.14.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]
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
 
4
4
  describe Simp::Rake::Build::Helpers do
5
5
  before :each do
6
- dir = File.expand_path( '../../files/simp_build', File.dirname( __FILE__ ) )
6
+ dir = File.expand_path( '../../files/simp_build', File.dirname( __FILE__ ) )
7
7
  env = ENV['SIMP_RPM_dist'].dup
8
8
  ENV['SIMP_RPM_dist'] = '.el7'
9
9
  @obj = Simp::Rake::Build::Helpers.new( dir )
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.0
4
+ version: 5.14.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-01-11 00:00:00.000000000 Z
12
+ date: 2022-05-27 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: []