simp-rake-helpers 5.5.2 → 5.5.3

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: 55923c19133642bbedd90f75926344b61c8ca0fc72d12a83d5a3f265a027f0dc
4
- data.tar.gz: 595956bbaa3b3b3af35f3bfdbd4ec9acfdf6dc858d15057eb1f3fd0491f1c060
3
+ metadata.gz: b500aee6edc684f4deccd9ff8cdb0ad5e58ee63245ee62d0361fa2586eea0b53
4
+ data.tar.gz: ea8a91b88e88ccd1602caa2b837617eef22e32218e27971551e44d17ab130026
5
5
  SHA512:
6
- metadata.gz: 8959c27f5a86af2921336dfa3e55bc0872473c1edf6b1fd10eaa55e2881c7d56d11830b0c9bc8392ace4c3666364199d533725aac2ed540eabf269a061be03f4
7
- data.tar.gz: 44084a5f896837b8f591311da3ac744e9913844d60c0dfaa2a8b39195efb2aed5a91902de78962311d08b1408659e369e8385245f2e36aa61219aa5fcc8b0a6a
6
+ metadata.gz: feffd37735210c71626ec9aab64ab909477c7c3a22fb6bafa5300289da567b5629abe88f8d0db0c8e7542ceed712184eee78397ebf4ae6a6837b661b5932a87d
7
+ data.tar.gz: c112afedf1e4b3372267568d20d2345d5ea693e23ece1ea6af28217b2ae6e81c14e85dcd976728cd8913218db21a7f724ba07ae13463d8b21be20811d97ffd65
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 5.5.3 / 2018-08-28
2
+ * Fix issue where the `pkg:signrpms` rake task would not honor 'force'
3
+ * Add a check for the existence of /usr/local/sbin/simp_rpm_helper, before
4
+ running it in the latest Puppet-module RPM spec file.
5
+
1
6
  ### 5.5.2 / 2018-08-21
2
7
  * Add additional UEFI support options to the ISO build based on user feedback.
3
8
  All of our testing could use the ISO on different UEFI systems successfully
@@ -446,13 +446,23 @@ module Simp::Rake::Build
446
446
  build(@build_dirs[:doc],t)
447
447
  end
448
448
 
449
- desc "Sign the RPMs."
449
+ desc <<-EOM
450
+ Sign a set of RPMs.
451
+
452
+ Signs any unsigned RPMs in the specified directory
453
+ * :key - The key directory to use under #{@build_dir}/build_keys
454
+ * Defaults to #{File.join(File.dirname(@rpm_dir), '*RPMS')}
455
+ * :rpm_dir - A directory containing RPM files to sign. Will recurse!
456
+ * Defaults to 'dev'
457
+ * :force - Force rpms that are already signed to be resigned
458
+ * Defaults to 'false', can be enabled with 'true'
459
+ EOM
450
460
  task :signrpms,[:key,:rpm_dir,:force] => [:prep,:key_prep] do |t,args|
451
461
  which('rpmsign') || raise(StandardError, 'Could not find rpmsign on your system. Exiting.')
452
462
 
453
463
  args.with_defaults(:key => 'dev')
454
464
  args.with_defaults(:rpm_dir => File.join(File.dirname(@rpm_dir), '*RPMS'))
455
- args.with_default(:force => 'false')
465
+ args.with_defaults(:force => 'false')
456
466
 
457
467
  force = (args[:force].to_s == 'false' ? false : true)
458
468
 
@@ -472,7 +482,10 @@ module Simp::Rake::Build
472
482
  :progress => t.name
473
483
  ) do |rpm|
474
484
  rpm_info = Simp::RPM.new(rpm)
475
- Simp::RPM.signrpm(rpm, "#{@build_dir}/build_keys/#{args[:key]}") unless rpm_info.signature
485
+
486
+ if force || !rpm_info.signature
487
+ Simp::RPM.signrpm(rpm, "#{@build_dir}/build_keys/#{args[:key]}")
488
+ end
476
489
  end
477
490
  end
478
491
 
@@ -484,8 +484,8 @@ mkdir -p %{buildroot}/%{prefix}
484
484
 
485
485
  -- Declares default scriptlets for SIMP 6.X (referenced from 6.1.0)
486
486
  --
487
- -- In order to keep the package-maintained pupmod-*-* pacakges
488
- -- Packages notify /usr/local/sbin/simp_rpm_helper, which
487
+ -- In order to keep the package-maintained pupmod-*-* packages.
488
+ -- Packages notify /usr/local/sbin/simp_rpm_helper.
489
489
  -- See: https://github.com/simp/simp-adapter/blob/master/src/sbin/simp_rpm_helper
490
490
  --
491
491
  -- This function should be called last
@@ -504,8 +504,10 @@ mkdir -p %{buildroot}/%{prefix}
504
504
  '# (default scriptlet for SIMP 6.x)\n'..
505
505
  '# when $1 = 1, this is an install\n'..
506
506
  '# when $1 = '.. data.upgrade ..', this is an upgrade\n'..
507
- '/usr/local/sbin/simp_rpm_helper --rpm_dir='..
508
- rpm_dir.." --rpm_section='"..name.."' --rpm_status=$1\n\n"
507
+ 'if [ -x /usr/local/sbin/simp_rpm_helper ] ; then\n'..
508
+ ' /usr/local/sbin/simp_rpm_helper --rpm_dir='..
509
+ rpm_dir.." --rpm_section='"..name.."' --rpm_status=$1\n"..
510
+ 'fi\n\n'
509
511
  )
510
512
 
511
513
  define_custom_content(content, custom_content_table, declared_scriptlets_table)
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '5.5.2'
5
+ VERSION = '5.5.3'
6
6
  end
@@ -37,14 +37,16 @@ shared_examples_for 'an RPM generator with customized scriptlets' do
37
37
  comment '...remaining default scriptlets call simp_rpm_helper with correct arguments'
38
38
  expected_simp_rpm_helper_scriptlets = scriptlet_label_map.select{|k,v| %w(post preun postun).include? v }
39
39
  expected_simp_rpm_helper_scriptlets.each do |rpm_label, simp_helper_label|
40
- expect(scriptlets[rpm_label][:bare_content]).to eq(
41
- "/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='#{simp_helper_label}' --rpm_status=$1"
42
- )
40
+ expected = <<EOM
41
+ if [ -x /usr/local/sbin/simp_rpm_helper ] ; then
42
+ /usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='#{simp_helper_label}' --rpm_status=$1
43
+ fi
44
+ EOM
45
+ expect(scriptlets[rpm_label][:bare_content]).to eq(expected.strip)
43
46
  end
44
47
  end
45
48
  end
46
49
 
47
-
48
50
  shared_examples_for 'an RPM generator with customized triggers' do
49
51
 
50
52
  it 'should create an RPM with customized triggers' do
@@ -137,12 +137,12 @@ describe 'rake pkg:rpm' do
137
137
 
138
138
  comment 'produces RPM with appropriate pre/post/preun/postun'
139
139
  result = on host, %(rpm -qp --scripts #{testpackage_rpm})
140
- scriptlets = result.stdout.scan( %r{^.*?scriptlet.*?/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage.*?$}m )
140
+ scriptlets = result.stdout.scan( %r{^.*?scriptlet.*?/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage.*?fi$}m )
141
141
 
142
- expect( scriptlets.grep( %r{\Apreinstall scriptlet.*\n/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='pre' --rpm_status=\$1\Z}m )).not_to be_empty
143
- expect( scriptlets.grep( %r{\Apostinstall scriptlet.*\n/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='post' --rpm_status=\$1\Z}m )).not_to be_empty
144
- expect( scriptlets.grep( %r{\Apreuninstall scriptlet.*\n/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='preun' --rpm_status=\$1\Z}m )).not_to be_empty
145
- expect( scriptlets.grep( %r{\Apostuninstall scriptlet.*\n/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='postun' --rpm_status=\$1\Z}m )).not_to be_empty
142
+ expect( scriptlets.grep( %r{\Apreinstall scriptlet.* /usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='pre' --rpm_status=\$1}m )).not_to be_empty
143
+ expect( scriptlets.grep( %r{\Apostinstall scriptlet.* /usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='post' --rpm_status=\$1}m )).not_to be_empty
144
+ expect( scriptlets.grep( %r{\Apreuninstall scriptlet.* /usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='preun' --rpm_status=\$1}m )).not_to be_empty
145
+ expect( scriptlets.grep( %r{\Apostuninstall scriptlet.* /usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/testpackage --rpm_section='postun' --rpm_status=\$1}m )).not_to be_empty
146
146
  end
147
147
 
148
148
  it_should_behave_like 'an RPM generator with edge cases'
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.5.2
4
+ version: 5.5.3
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: 2018-08-29 00:00:00.000000000 Z
12
+ date: 2018-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler