simp-rake-helpers 5.12.4 → 5.12.5

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: d79c389d3f40c038b0ba81fe8351e4f71b256bd1eaeeef52eb0af07239ec793b
4
- data.tar.gz: 1025900b3bbfa941429f228c7952bf79ccfec9a0b388a5a8fcfaf670b3c6f590
3
+ metadata.gz: af430b5f3668ec96a8f12d66b7210e176083e9377ccfefd06fa92050ee56f77a
4
+ data.tar.gz: 423871d8e7f99d01d6065809ea1cfea2b76abae47b84add3197b982d042b3de3
5
5
  SHA512:
6
- metadata.gz: 9c2e9f763a211891553cde62a1963f9fd603f1ce9bfed11b828b36206fe5ec73e1b55f7d1f570c5d1df79cdc00c534d57cc8df24cd205e4cabe946895e820d47
7
- data.tar.gz: 818c69dcf5bab3bba5516539852abc856973f97275bc186d46ef268c2878d6a4e0542d179a47fd3ed6e48266ff819fc7c70127953694f92b6b7c1b5c03377e98
6
+ metadata.gz: 9424b979c1f67e6fba2ecedb6c8229e111c017a987f69ee7c9eea7db60d715b23530c91bd8baf01d44e11f0e1b16c73d016c13905c87e7f5540b7c5b072ab7bd
7
+ data.tar.gz: 9c43ca061b10e4241695b108af43a27c20e06f430d1cdaf349cd15e68333ee5f389e7f74427e9ab495cfc3f52df4786bf576ce99d00e66356c24db4b5d6694f0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 5.12.5 / 2021-10-07
2
+ - Fixed a bug where `build:auto` failed when building the SIMP ISO for EL7,
3
+ because the code attempted to move a directory onto itself.
4
+ - Ensured GPG keys in simp-gpgkeys are available in the DVD overlay tar file
5
+
1
6
  ### 5.12.4 / 2021-10-05
2
7
  - Ensure that the DIST qualifier is added to all built RPMs
3
8
  - Use the new SimpRepos directory layout when building an ISO using externally
@@ -190,6 +190,7 @@ module Simp::Rake::Build
190
190
  end
191
191
  end
192
192
 
193
+
193
194
  repo_target_dir = dir
194
195
 
195
196
  # If we've pulled in reposync directories, we expect them to
@@ -256,7 +257,14 @@ module Simp::Rake::Build
256
257
 
257
258
  # Pop the SIMP directory from the tarball into the correct spot
258
259
  # FIXME: This is a hack
259
- FileUtils.mv("#{dir}/SIMP", repo_target_dir) if File.directory?("#{dir}/SIMP")
260
+ unless dir == repo_target_dir
261
+ simpdir = File.join(dir,'SIMP')
262
+
263
+ if File.directory?(simpdir)
264
+ cp_r(simpdir, repo_target_dir, :verbose => verbose)
265
+ rm_rf(simpdir, :verbose => verbose)
266
+ end
267
+ end
260
268
 
261
269
  Dir.chdir("#{repo_target_dir}/SIMP") do
262
270
  # Add the SIMP Dependencies
@@ -301,8 +309,10 @@ module Simp::Rake::Build
301
309
  cp(rpm,rpm_arch, :verbose => verbose)
302
310
  end
303
311
 
304
- unless reposync_active
305
- ln_s('noarch', arch, :verbose => verbose) if (!File.directory?(arch) && File.directory?('noarch'))
312
+ if reposync_active
313
+ fail("Error: Could not run createrepo in #{Dir.pwd}") unless system(%(#{mkrepo} .))
314
+ else
315
+ ln_sf('noarch', arch, :verbose => verbose) if (!File.directory?(arch) && File.directory?('noarch'))
306
316
  fail("Could not find architecture '#{arch}' in the SIMP distribution") unless (File.directory?(arch) || File.symlink?(arch))
307
317
 
308
318
  # Get everything set up properly...
@@ -320,6 +330,40 @@ module Simp::Rake::Build
320
330
  ln_sf(source_rpm,link_target, :verbose => verbose)
321
331
  end
322
332
  end
333
+
334
+ fail("Error: Could not run createrepo in #{Dir.pwd}") unless system(%(#{mkrepo} .))
335
+ end
336
+ end
337
+ end
338
+
339
+ ### Munge the Repos
340
+
341
+ # Create an Updates directory that is properly populated
342
+ updates_readme = <<~README
343
+ This directory houses updates to NON-MODULAR RPMs.
344
+
345
+ DO NOT put modular RPMs in this directory or you will break your
346
+ system updates!
347
+ README
348
+
349
+ updates_dir = File.join(dir, 'Updates')
350
+ mkdir_p(updates_dir)
351
+
352
+ Dir.chdir(updates_dir) do
353
+ File.open('README','w'){|fh| fh.puts(updates_readme) }
354
+
355
+ repos = Dir.glob(File.join('..','**','repodata'))
356
+ modular_repos = Dir.glob(File.join('..','**','repodata','*-modules.*'))
357
+ non_modular_repos = repos.select{|x| modular_repos.grep(%r{^#{Regexp.escape(x)}}).empty? }
358
+ non_modular_repos.map!{|x| File.split(x).first}
359
+ non_modular_repos.delete_if{|x| x.match(%r{/SimpRepos|/SIMP}) }
360
+ non_modular_repos.each do |non_modular_repo|
361
+ Dir.glob(File.join(non_modular_repo, '**', '*.rpm')).each do |rpm|
362
+ # when non_modular_repo is '..', can still find RPMs we need
363
+ # to exclude
364
+ next if rpm.match(%r{/SimpRepos|/SIMP})
365
+
366
+ ln_sf(rpm, '.', :verbose => verbose)
323
367
  end
324
368
  end
325
369
 
@@ -610,7 +610,7 @@ protect=1
610
610
  .delete_if{|x| x =~ /\.src\.rpm$/}
611
611
  .each do |path|
612
612
  sym_path = "repos/base/#{File.basename(path)}"
613
- ln_s(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
613
+ ln_sf(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
614
614
  end
615
615
 
616
616
  if args[:aux_dir]
@@ -618,7 +618,7 @@ protect=1
618
618
  .delete_if{|x| x =~ /\.src\.rpm$/}
619
619
  .each do |path|
620
620
  sym_path = "repos/lookaside/#{File.basename(path)}"
621
- ln_s(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
621
+ ln_sf(path,sym_path, :verbose => @verbose) unless File.exists?(sym_path)
622
622
  end
623
623
  end
624
624
 
@@ -126,10 +126,16 @@ module Simp::Rake::Build
126
126
 
127
127
  Simp::RPM.copy_wo_vcs(@dvd_src,".",base_dir)
128
128
 
129
- # Copy in the GPG Public Keys
129
+ # Copy in the GPG Public Keys from @build_dir
130
130
  mkdir_p("#{destdir}/GPGKEYS")
131
131
  ln(Dir.glob("#{@build_dir}/GPGKEYS/RPM-GPG-KEY*"), "#{destdir}/GPGKEYS", { :force => true })
132
132
 
133
+ # Copy in the GPG Public Keys packaged by simp-gpgkeys
134
+ simp_gpgkeys = File.join(@src_dir, 'assets', 'gpgkeys', 'GPGKEYS')
135
+ if Dir.exist?(simp_gpgkeys)
136
+ ln(Dir.glob("#{simp_gpgkeys}/RPM-GPG-KEY*"), "#{destdir}/GPGKEYS", { :force => true })
137
+ end
138
+
133
139
  # Copy in the auto-build RPMs
134
140
  Dir.chdir("#{@build_dir}/SIMP/RPMS") do
135
141
  Dir.glob('*').each do |type|
@@ -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.4'
5
+ VERSION = '5.12.5'
6
6
  end
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.4
4
+ version: 5.12.5
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-06 00:00:00.000000000 Z
12
+ date: 2021-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simp-beaker-helpers