simp-rake-helpers 5.12.7 → 5.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97111c5cebe9473b33a3ea7950af3cb1b26a48a67d46485435473bad9660cc46
4
- data.tar.gz: b5e86d3cfad3b1a21300fef1ae99c81f38c87a7c41ce6304e9ceb2e48c1e6f5e
3
+ metadata.gz: 34a577aa7249f7f21146cedc2a72eb0c922ade1d4cf12ec152097297d8c36ec9
4
+ data.tar.gz: 7cdefe54c3206c33da6fab2a1bdefb7e68ea1806f2905405a0edc3c4b6a6cce1
5
5
  SHA512:
6
- metadata.gz: eb8f742f59d39f13a22b79781a69c0ac2855bd8a57e1928e8cc8426d958b6f2724a53e9182cd7bc4139a808308cdeb668334fc707661f6a4576601a5ccbae191
7
- data.tar.gz: 8b1e9f3584bec5a5c29397802d3c8048ea9552148934f230c15c0bdd226ca763c3a97801c8e98abdc45110bdc6527be68ba504ccd7e0c34c984322bb6b11c6a9
6
+ metadata.gz: 063ea6a2ab7f471532b948400460587835b3e98497a33c682113cd216216fb0e362ed24f301edff42972ea79903c28ae8cdad81b56e6cc8834fc4ad48d19ee76
7
+ data.tar.gz: 2d05c1877803b352a2c85cf473c8a79b520159d23e023c9b69c13776e8d59209f79d13ae2eadb674bbf0aa96d71c00af168269f6914334f35db802c28609c637
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ### 5.13.2 / 2022-05-13
2
+ - Fixed:
3
+ - SIMP_BUILD_reposync_only now properly unpacks the tarball
4
+
5
+ ### 5.13.1 / 2022-05-01
6
+ - Fixed:
7
+ - Aligned wtih an API change in the `dirty?` method in `r10k`
8
+
9
+ ### 5.13.0 / 2021-11-14
10
+ - Added:
11
+ - Output the full `mkisofs` command when building an ISO
12
+ - Added SIMP_BUILD_reposync_only to ignore the built tarball if a reposync
13
+ directory is present
14
+
1
15
  ### 5.12.7 / 2021-10-26
2
16
  - Added:
3
17
  - Env var `SIMP_PKG_progress_bar=no` to turn off pkg RPM build progress bars
@@ -110,14 +110,15 @@ module Simp::Rake::Build
110
110
  - SIMP_BUILD_docs => 'yes' builds & includes documentation
111
111
  - SIMP_BUILD_checkout => 'no' will skip the git repo checkouts
112
112
  - 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
113
+ - SIMP_BUILD_unpack => 'no' prevents unpacking the source ISO
114
+ - SIMP_BUILD_unpack_merge => 'no' prevents auto-merging the unpacked ISO
115
115
  - SIMP_BUILD_prune => 'no' passes :prune=>false to iso:build
116
116
  - SIMP_BUILD_iso_name => Renames the output ISO filename [Default: false]
117
117
  - SIMP_BUILD_iso_tag => Appended to the output ISO's filename [Default: false]
118
118
  - SIMP_BUILD_update_packages => Automatically update any necessary packages in the packages.yaml file [Default: false]
119
119
  - SIMP_BUILD_verbose => 'yes' enables verbose reporting. [Default: 'no']
120
120
  - SIMP_BUILD_signing_key => The name of the GPG key to use to sign packages. [Default: 'dev']
121
+ - SIMP_BUILD_reposync_only => 'yes' skips unpacking the locally-build tarball so that you only get items from the reposync directory (if present)
121
122
  EOM
122
123
 
123
124
  task :auto, [:iso_paths,
@@ -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="SIMP" -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
@@ -421,9 +440,11 @@ module Simp::Rake::Build
421
440
  '-x ./lost+found',
422
441
  "-o #{@simp_output_iso}",
423
442
  dir
424
- ]
443
+ ].join(' ')
444
+
445
+ $stdout.puts "Running: #{mkisofs_cmd}"
425
446
 
426
- system(mkisofs_cmd.join(' '))
447
+ system(mkisofs_cmd)
427
448
  end
428
449
  end # End of tarfiles loop
429
450
 
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.12.7'
5
+ VERSION = '5.13.2'
6
6
  end
@@ -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.12.7
4
+ version: 5.13.2
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: 2021-10-27 00:00:00.000000000 Z
12
+ date: 2022-05-13 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: []