simp-rake-helpers 7.0.0 → 7.0.1
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/lib/simp/rake/helpers/assets/Gemfile +1 -1
- data/lib/simp/rake/helpers/rpm_spec.rb +17 -9
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/spec/lib/simp/rake/helpers/rpm_spec_spec.rb +40 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b01629a09d8aed1d3738c94e6eb15100a00872932b6912c53ea6727fea783ca7
|
|
4
|
+
data.tar.gz: 913def27f8d722694ce7754839a82d87fb6afd648039a777454edadab5683cd0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8aa589802f53f4e5c357918b6391a067e6aeadf8b2ea93d75f62324bcefe399dee35f5012862e6f84f773f2a6748e9eac5c74a078716703a8ff0cbf4d42604cc
|
|
7
|
+
data.tar.gz: a3efa5462279daaa95f1afc17557bd2f828928052262379451b423a697c4537e1f24befac8a5e740ed18717e89c307888acba6139f41d9434ce461716a85af5d
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
### 7.0.1 / 2026-10-14
|
|
2
|
+
- Fixed
|
|
3
|
+
- RPM builds for SIMP 7 failed with `Could not find template for SIMP
|
|
4
|
+
version 7.0.0-...`, because the RPM spec template was looked up only
|
|
5
|
+
for the exact SIMP major. A SIMP major without its own template now uses
|
|
6
|
+
the newest older one (`simp6.spec` for SIMP 7)
|
|
7
|
+
|
|
1
8
|
### 7.0.0 / 2026-10-05
|
|
2
9
|
- Changed
|
|
3
10
|
- **BREAKING:** `pkg:compare_latest_tag` decides whether a Puppet module
|
data/Gemfile
CHANGED
|
@@ -27,6 +27,6 @@ group :test do
|
|
|
27
27
|
# rubocop, rubocop-rake, and rubocop-rspec are pulled in and version-pinned by
|
|
28
28
|
# voxpupuli-test; pinning them here conflicts with its constraints.
|
|
29
29
|
# rubocop-performance is not a voxpupuli-test dependency, so it stays explicit.
|
|
30
|
-
gem 'rubocop-performance', '~> 1.
|
|
30
|
+
gem 'rubocop-performance', '~> 1.27.0'
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -9,18 +9,26 @@ class Simp::Rake::Helpers
|
|
|
9
9
|
|
|
10
10
|
include Simp::Rake::Build::Constants
|
|
11
11
|
|
|
12
|
+
TEMPLATE_DIR = File.join(File.dirname(__FILE__), 'assets', 'rpm_spec')
|
|
13
|
+
|
|
14
|
+
# The RPM spec template for a SIMP version: simp<N>.spec for the newest N
|
|
15
|
+
# that does not exceed the version's major, so a new SIMP major keeps
|
|
16
|
+
# using the previous template until it needs a different one. Without a
|
|
17
|
+
# version, simpdefault.spec.
|
|
12
18
|
def rpm_template(simp_version = nil)
|
|
13
19
|
simp_version = ENV.fetch('SIMP_BUILD_version', simp_version)
|
|
14
20
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
template_file = if simp_version
|
|
22
|
+
simp_main_version = simp_version.split('.').first.to_i
|
|
23
|
+
versioned = Dir.glob(File.join(TEMPLATE_DIR, 'simp[0-9]*.spec')).map do |file|
|
|
24
|
+
[File.basename(file)[%r{\d+}].to_i, file]
|
|
25
|
+
end
|
|
26
|
+
versioned.select { |major, _| major <= simp_main_version }.max_by(&:first)&.last
|
|
27
|
+
else
|
|
28
|
+
File.join(TEMPLATE_DIR, 'simpdefault.spec')
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
raise "Error: Could not find template for SIMP version #{simp_version}" unless template_file && File.exist?(template_file)
|
|
24
32
|
|
|
25
33
|
File.read(template_file)
|
|
26
34
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'simp/rake/helpers/rpm_spec'
|
|
4
|
+
require 'spec_helper'
|
|
5
|
+
|
|
6
|
+
describe Simp::Rake::Helpers::RPMSpec do
|
|
7
|
+
subject(:helper) { Class.new { include Simp::Rake::Helpers::RPMSpec }.new }
|
|
8
|
+
|
|
9
|
+
let(:template_dir) { Simp::Rake::Helpers::RPMSpec::TEMPLATE_DIR }
|
|
10
|
+
let(:simp6_template) { File.read(File.join(template_dir, 'simp6.spec')) }
|
|
11
|
+
let(:default_template) { File.read(File.join(template_dir, 'simpdefault.spec')) }
|
|
12
|
+
|
|
13
|
+
around(:each) do |example|
|
|
14
|
+
saved = ENV.delete('SIMP_BUILD_version')
|
|
15
|
+
example.run
|
|
16
|
+
ensure
|
|
17
|
+
saved.nil? ? ENV.delete('SIMP_BUILD_version') : ENV['SIMP_BUILD_version'] = saved
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'uses the template for the exact SIMP major' do
|
|
21
|
+
expect(helper.rpm_template('6.6.0-2')).to eq(simp6_template)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it 'falls back to the newest older template for a newer SIMP major' do
|
|
25
|
+
expect(helper.rpm_template('7.0.0-Alpha.el8')).to eq(simp6_template)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it 'prefers SIMP_BUILD_version over the argument' do
|
|
29
|
+
ENV['SIMP_BUILD_version'] = '7.0.0-Alpha.el10'
|
|
30
|
+
expect(helper.rpm_template('5.0.0')).to eq(simp6_template)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it 'uses the default template without a SIMP version' do
|
|
34
|
+
expect(helper.rpm_template).to eq(default_template)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'fails for a SIMP major older than every template' do
|
|
38
|
+
expect { helper.rpm_template('5.4.0') }.to raise_error(%r{Could not find template for SIMP version 5\.4\.0})
|
|
39
|
+
end
|
|
40
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simp-rake-helpers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0.
|
|
4
|
+
version: 7.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Tessmer
|
|
8
8
|
- Trevor Vaughan
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: simp-beaker-helpers
|
|
@@ -602,6 +602,7 @@ files:
|
|
|
602
602
|
- spec/lib/simp/rake/build/files/unmanaged_mod/metadata.json
|
|
603
603
|
- spec/lib/simp/rake/build/helpers_spec.rb
|
|
604
604
|
- spec/lib/simp/rake/build/rpmdeps_spec.rb
|
|
605
|
+
- spec/lib/simp/rake/helpers/rpm_spec_spec.rb
|
|
605
606
|
- spec/lib/simp/rake/helpers_spec.rb
|
|
606
607
|
- spec/lib/simp/rake/pkg_spec.rb
|
|
607
608
|
- spec/lib/simp/rake/pupmod/fixtures/othermod/Gemfile
|