simp-rake-helpers 5.10.2 → 5.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile +1 -0
- data/lib/simp/componentinfo.rb +6 -3
- data/lib/simp/rake/build/rpmdeps.rb +51 -33
- data/lib/simp/rake/build/tar.rb +1 -1
- data/lib/simp/rake/helpers/assets/rpm_spec/simp6.spec +15 -1
- data/lib/simp/rake/helpers/assets/rpm_spec/simpdefault.spec +15 -1
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/lib/simp/relchecks.rb +1 -1
- data/spec/lib/simp/ci/files/job_broken_link_nodeset/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/job_invalid_nodeset/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/job_invalid_suite/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/job_missing_nodeset/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/job_missing_suite_and_nodeset/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/multiple_invalid_jobs/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/multiple_valid_jobs/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/no_gitlab_config_with_tests/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/no_gitlab_config_without_tests/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/suite_skeleton_only/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/ci/files/valid_job_nodeset_dir_link/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/componentinfo_spec.rb +25 -37
- data/spec/lib/simp/files/build/testpackage.spec +1 -1
- data/spec/lib/simp/files/componentinfo_spec/module_with_prerelease_dash_in_version/CHANGELOG +14 -0
- data/spec/lib/simp/files/componentinfo_spec/module_with_prerelease_dash_in_version/metadata.json +44 -0
- data/spec/lib/simp/files/testpackage-rc0.spec +32 -0
- data/spec/lib/simp/rake/build/files/changed_name_mod/metadata.json +12 -8
- data/spec/lib/simp/rake/build/files/unmanaged_mod/metadata.json +12 -8
- data/spec/lib/simp/rake/build/rpmdeps_spec.rb +12 -3
- data/spec/lib/simp/rake/pupmod/fixtures/simpmod/spec/acceptance/suites/default/nodesets +1 -1
- data/spec/lib/simp/relchecks_compare_latest_tag_spec.rb +1 -1
- data/spec/lib/simp/rpm_spec.rb +5 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bde11b6e154b94ae99c983cc5efbc50ee72bfd5e4fff43752f3bde5a1fe9383
|
4
|
+
data.tar.gz: 1f20976af7376822f6d4ab663b2d5f4b01bab9c85cc71a3f86035d586771e443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc56ab90f4e83059108725f9750793ba060bac5af618d72e819f095319233ae1229a7f8a153feb4ecd50de46808792fd9c3c2559f02ec632c606a9fdeb3a8659
|
7
|
+
data.tar.gz: 8cdf8f62c251be9bbc3388adaae57516fde2eb0478adf6ec4fd66c09bf411cf1902546ac309a455f87dcef1d30db3f5cd498dcc6838e2a80c0102f1448bc5c1e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
### 5.11.4 / 2020-08-03
|
2
|
+
* Permit *.md files in `rake pkg:compare_latest_tag`
|
3
|
+
|
4
|
+
### 5.11.3 / 2020-05-19
|
5
|
+
* Fix automatically added dependencies for SIMP 6.4+
|
6
|
+
|
7
|
+
### 5.11.2 / 2020-04-08
|
8
|
+
* Version information should not be required on dependencies in metadata.json
|
9
|
+
|
10
|
+
### 5.11.1 / 2020-04-07
|
11
|
+
* Puppet module RPM logic handles `-rc0` suffix in `metadata.json`
|
12
|
+
|
13
|
+
### 5.11.0 / 2020-03-16
|
14
|
+
* Add SIMP optional dependencies to RPM requires list
|
15
|
+
|
1
16
|
### 5.10.2 / 2020-02-10
|
2
17
|
* Allow v3 of simp-rspec-puppet-facts
|
3
18
|
* Fix '~> 0' notation
|
data/Gemfile
CHANGED
data/lib/simp/componentinfo.rb
CHANGED
@@ -99,9 +99,12 @@ class Simp::ComponentInfo
|
|
99
99
|
require 'json'
|
100
100
|
metadata_file = File.join(@component_dir, 'metadata.json')
|
101
101
|
metadata = JSON.parse(File.read(metadata_file))
|
102
|
-
|
103
|
-
|
104
|
-
|
102
|
+
fail("ERROR: Version missing from #{metadata_file}") if metadata['version'].nil?
|
103
|
+
|
104
|
+
@version = metadata['version'].split('-').first
|
105
|
+
rel_bits = metadata['version'].split('-')[1..-1]
|
106
|
+
@release = rel_bits.empty? ? nil : rel_bits.join('-')
|
107
|
+
|
105
108
|
|
106
109
|
changelog_file = File.join(component_dir, 'CHANGELOG')
|
107
110
|
unless File.exists?(changelog_file)
|
@@ -15,28 +15,29 @@ module Simp::Rake::Build::RpmDeps
|
|
15
15
|
# raises SIMPRpmDepVersionException if the dependency version
|
16
16
|
# string cannot be parsed
|
17
17
|
def self.get_version_requires(pkg, dep_version)
|
18
|
+
return ["Requires: #{pkg}"] if dep_version.nil?
|
19
|
+
return ["Requires: #{pkg} = #{$1}"] if dep_version =~ /^\s*(\d+\.\d+\.\d+)\s*$/
|
20
|
+
|
18
21
|
requires = []
|
19
|
-
if dep_version =~ /^\s*(\d+\.\d+\.\d+)\s*$/
|
20
|
-
requires << "Requires: #{pkg} = #{$1}"
|
21
|
-
else
|
22
|
-
if dep_version.include?('x')
|
23
|
-
dep_parts = dep_version.split('.')
|
24
|
-
|
25
|
-
if dep_parts.count == 3
|
26
|
-
dep_version = ">= #{dep_parts[0]}.#{dep_parts[1]}.0 < #{dep_parts[0].to_i + 1}.0.0"
|
27
|
-
else
|
28
|
-
dep_version = ">= #{dep_parts[0]}.0.0 < #{dep_parts[0].to_i + 1}.0.0"
|
29
|
-
end
|
30
|
-
end
|
31
22
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
if dep_version.include?('x')
|
24
|
+
dep_parts = dep_version.split('.')
|
25
|
+
|
26
|
+
if dep_parts.count == 3
|
27
|
+
dep_version = ">= #{dep_parts[0]}.#{dep_parts[1]}.0 < #{dep_parts[0].to_i + 1}.0.0"
|
36
28
|
else
|
37
|
-
|
29
|
+
dep_version = ">= #{dep_parts[0]}.0.0 < #{dep_parts[0].to_i + 1}.0.0"
|
38
30
|
end
|
39
31
|
end
|
32
|
+
|
33
|
+
# metadata.json is a LOT more forgiving than the RPM spec file
|
34
|
+
if dep_version =~ /^\s*(?:(?:([<>]=?)\s*(\d+\.\d+\.\d+))\s*(?:(<)\s*(\d+\.\d+\.\d+))?)\s*$/
|
35
|
+
requires << "Requires: #{pkg} #{$1} #{$2}"
|
36
|
+
requires << "Requires: #{pkg} #{$3} #{$4}" if $3
|
37
|
+
else
|
38
|
+
raise SIMPRpmDepVersionException.new
|
39
|
+
end
|
40
|
+
|
40
41
|
requires
|
41
42
|
end
|
42
43
|
|
@@ -103,6 +104,13 @@ module Simp::Rake::Build::RpmDeps
|
|
103
104
|
short_names.include?(dep['name'])
|
104
105
|
}
|
105
106
|
|
107
|
+
if dep_info.empty? && module_metadata['simp'] &&
|
108
|
+
module_metadata['simp']['optional_dependencies']
|
109
|
+
dep_info = module_metadata['simp']['optional_dependencies'].select{ |dep|
|
110
|
+
short_names.include?(dep['name'])
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
106
114
|
if dep_info.empty?
|
107
115
|
err_msg = "Could not find #{short_names.first} dependency"
|
108
116
|
raise SIMPRpmDepException.new(err_msg)
|
@@ -145,7 +153,7 @@ module Simp::Rake::Build::RpmDeps
|
|
145
153
|
end
|
146
154
|
|
147
155
|
# Generate 'Requires' lines from each dependency specified in the
|
148
|
-
# module_metadata hash
|
156
|
+
# module_metadata hash, including SIMP optional dependencies
|
149
157
|
#
|
150
158
|
# returns array of strings, each of which is a 'Requires' line for
|
151
159
|
# use in an RPM spec file
|
@@ -157,20 +165,29 @@ module Simp::Rake::Build::RpmDeps
|
|
157
165
|
# module's 'metadata.json' file
|
158
166
|
def self.generate_module_rpm_requires(module_metadata)
|
159
167
|
rpm_metadata_content = []
|
160
|
-
|
161
|
-
|
168
|
+
|
169
|
+
deps = []
|
162
170
|
if module_metadata['dependencies']
|
163
|
-
module_metadata['dependencies']
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
171
|
+
deps += module_metadata['dependencies']
|
172
|
+
end
|
173
|
+
|
174
|
+
if module_metadata['simp'] &&
|
175
|
+
module_metadata['simp']['optional_dependencies']
|
176
|
+
|
177
|
+
deps += module_metadata['simp']['optional_dependencies']
|
178
|
+
end
|
179
|
+
|
180
|
+
deps.sort! { |x,y| x['name'] <=> y['name'] }
|
181
|
+
deps.each do |dep|
|
182
|
+
pkg = "pupmod-#{dep['name'].gsub('/', '-')}"
|
183
|
+
dep_version = dep['version_requirement']
|
184
|
+
|
185
|
+
begin
|
186
|
+
rpm_metadata_content << get_version_requires(pkg, dep_version)
|
187
|
+
rescue SIMPRpmDepVersionException
|
188
|
+
err_msg = "Unable to parse #{dep['name']} dependency" +
|
189
|
+
" version '#{dep_version}'"
|
190
|
+
raise SIMPRpmDepException.new(err_msg)
|
174
191
|
end
|
175
192
|
end
|
176
193
|
|
@@ -202,8 +219,9 @@ module Simp::Rake::Build::RpmDeps
|
|
202
219
|
# * 'Requires' line(s) for any external dependencies specified
|
203
220
|
# in the module_rpm_meta hash.
|
204
221
|
#
|
205
|
-
# Otherwise, the generated 'requires' file will contain
|
206
|
-
#
|
222
|
+
# Otherwise, the generated 'requires' file will contain "Requires"
|
223
|
+
# lines for each dependency and each SIMP optional dependency
|
224
|
+
# specified in module_metadata.
|
207
225
|
#
|
208
226
|
# raises SIMPRpmDepException if any 'metadata.json' dependency
|
209
227
|
# version string from module_metadata cannot be parsed or a
|
data/lib/simp/rake/build/tar.rb
CHANGED
@@ -62,7 +62,7 @@ module Simp::Rake::Build
|
|
62
62
|
else
|
63
63
|
required_rpms['noarch'] << 'simp-rsync-skeleton'
|
64
64
|
required_rpms['noarch'] << 'simp-environment-skeleton'
|
65
|
-
required_rpms['noarch'] << 'simp-
|
65
|
+
required_rpms['noarch'] << 'simp-selinux-policy'
|
66
66
|
end
|
67
67
|
|
68
68
|
rpm_dir = File.join(@build_dir,'SIMP','RPMS')
|
@@ -196,14 +196,28 @@ end
|
|
196
196
|
|
197
197
|
-- Get the Module Version
|
198
198
|
|
199
|
-
|
199
|
+
-- Note on '-rc0' style Release versions in metadata.json:
|
200
|
+
-- Some Puppet orgs (like voxpupuli) append '-rc0' to the module version
|
201
|
+
-- to denote prerelease status and act as a safety check (because the Forge
|
202
|
+
-- only accepts release in SemVer \d+\.\d+\.\d+ release format)
|
203
|
+
--
|
204
|
+
-- This code will remove a '-rc0' style prerelease string from the RPM
|
205
|
+
-- Version, and use it as the default RPM Release (instead of '-0')
|
200
206
|
|
207
|
+
local version_match = metadata:match('"version":%s+"(.-)"%s*,'):gsub('-.*','')
|
201
208
|
if version_match then
|
202
209
|
package_version = version_match
|
203
210
|
else
|
204
211
|
error("Could not find valid package version in 'metadata.json'", 0)
|
205
212
|
end
|
206
213
|
|
214
|
+
-- Get the Module Release (if present)
|
215
|
+
|
216
|
+
local release_match = metadata:match('"version":%s+"[%d.]+-([^"]+)"')
|
217
|
+
|
218
|
+
if release_match then
|
219
|
+
package_release = release_match
|
220
|
+
end
|
207
221
|
}
|
208
222
|
|
209
223
|
%{lua:
|
@@ -196,14 +196,28 @@ end
|
|
196
196
|
|
197
197
|
-- Get the Module Version
|
198
198
|
|
199
|
-
|
199
|
+
-- Note on '-rc0' style Release versions in metadata.json:
|
200
|
+
-- Some Puppet orgs (like voxpupuli) append '-rc0' to the module version
|
201
|
+
-- to denote prerelease status and act as a safety check (because the Forge
|
202
|
+
-- only accepts release in SemVer \d+\.\d+\.\d+ release format)
|
203
|
+
--
|
204
|
+
-- This code will remove a '-rc0' style prerelease string from the RPM
|
205
|
+
-- Version, and use it as the default RPM Release (instead of '-0')
|
200
206
|
|
207
|
+
local version_match = metadata:match('"version":%s+"(.-)"%s*,'):gsub('-.*','')
|
201
208
|
if version_match then
|
202
209
|
package_version = version_match
|
203
210
|
else
|
204
211
|
error("Could not find valid package version in 'metadata.json'", 0)
|
205
212
|
end
|
206
213
|
|
214
|
+
-- Get the Module Release (if present)
|
215
|
+
|
216
|
+
local release_match = metadata:match('"version":%s+"[%d.]+-([^"]+)"')
|
217
|
+
|
218
|
+
if release_match then
|
219
|
+
package_release = release_match
|
220
|
+
end
|
207
221
|
}
|
208
222
|
|
209
223
|
%{lua:
|
data/lib/simp/relchecks.rb
CHANGED
@@ -87,7 +87,7 @@ class Simp::RelChecks
|
|
87
87
|
# determine mission-impacting files that have changed
|
88
88
|
files_changed = `git diff tags/#{last_tag} --name-only`.strip.split("\n")
|
89
89
|
files_changed.delete_if do |file|
|
90
|
-
file[0] == '.' or file == 'Rakefile' or file =~ /^Gemfile|^spec\/|^doc\/|^rakelib
|
90
|
+
file[0] == '.' or file == 'Rakefile' or file =~ /^Gemfile|^spec\/|^doc\/|^rakelib\/|.*\.md\Z/
|
91
91
|
end
|
92
92
|
|
93
93
|
if files_changed.empty?
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
data/spec/lib/simp/ci/files/job_missing_suite_and_nodeset/spec/acceptance/suites/default/nodesets
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
data/spec/lib/simp/ci/files/no_gitlab_config_with_tests/spec/acceptance/suites/default/nodesets
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
data/spec/lib/simp/ci/files/no_gitlab_config_without_tests/spec/acceptance/suites/default/nodesets
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
data/spec/lib/simp/ci/files/valid_job_nodeset_dir_link/spec/acceptance/suites/default/nodesets
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -7,14 +7,11 @@ describe Simp::ComponentInfo do
|
|
7
7
|
}
|
8
8
|
|
9
9
|
context 'with valid module input' do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
expect( info.version ).to eq '3.8.0'
|
16
|
-
expect( info.release ).to be nil
|
17
|
-
expected_changelog = [
|
10
|
+
let(:component_dir){ File.join(files_dir, 'module') }
|
11
|
+
let(:info){ Simp::ComponentInfo.new(component_dir) }
|
12
|
+
let(:expected_release) { nil }
|
13
|
+
let(:expected_changelog) do
|
14
|
+
[
|
18
15
|
{
|
19
16
|
:date => 'Wed Nov 15 2017',
|
20
17
|
:version => '3.8.0',
|
@@ -56,37 +53,28 @@ describe Simp::ComponentInfo do
|
|
56
53
|
]
|
57
54
|
}
|
58
55
|
]
|
59
|
-
expect(info.changelog).to eq expected_changelog
|
60
56
|
end
|
61
57
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
expect( info.
|
66
|
-
expect( info.
|
67
|
-
expect(
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
:release => '0',
|
83
|
-
:content => [
|
84
|
-
'* Mon Nov 06 2017 Tom Smith <tom.smith@simp.com> - 3.8.0-0',
|
85
|
-
'- Fixes split failure when "findmnt" does not exist on Linux'
|
86
|
-
]
|
87
|
-
}
|
88
|
-
]
|
89
|
-
expect(info.changelog).to eq expected_changelog
|
58
|
+
shared_examples 'an instance with expected module data' do
|
59
|
+
it { expect( info.component_dir ).to eq component_dir }
|
60
|
+
it { expect( info.type ).to eq :module }
|
61
|
+
it { expect( info.version ).to eq '3.8.0' }
|
62
|
+
it { expect( info.release ).to eq expected_release }
|
63
|
+
it { expect(info.changelog).to eq expected_changelog }
|
64
|
+
end
|
65
|
+
|
66
|
+
it_behaves_like 'an instance with expected module data'
|
67
|
+
|
68
|
+
context 'with loads version and latest-version-only changelog info' do
|
69
|
+
let(:info){Simp::ComponentInfo.new(component_dir, true)}
|
70
|
+
let(:expected_changelog){ super()[0..1] }
|
71
|
+
it_behaves_like 'an instance with expected module data'
|
72
|
+
end
|
73
|
+
|
74
|
+
context 'with a module version containing a prerelease suffix (3.8.0-rc0)' do
|
75
|
+
let(:component_dir){ File.join(files_dir, 'module_with_prerelease_dash_in_version') }
|
76
|
+
let(:expected_release){ 'rc0' }
|
77
|
+
it_behaves_like 'an instance with expected module data'
|
90
78
|
end
|
91
79
|
end
|
92
80
|
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../testpackage.spec
|
@@ -0,0 +1,14 @@
|
|
1
|
+
* Wed Nov 15 2017 Mary Jones <mary.jones@simp.com> - 3.8.0-0
|
2
|
+
- Disable deprecation warnings by default
|
3
|
+
|
4
|
+
* Mon Nov 06 2017 Tom Smith <tom.smith@simp.com> - 3.8.0-0
|
5
|
+
- Fixes split failure when "findmnt" does not exist on Linux
|
6
|
+
|
7
|
+
* Thu Oct 26 2017 Mary Jones <mary.jones@simp.com> - 3.7.0-0
|
8
|
+
- Add Mod::Macaddress data type
|
9
|
+
|
10
|
+
* Tue Sep 26 2017 Joe Brown <joe.brown@simp.com> - 3.6.0-0
|
11
|
+
- Convert all 'sysctl' 'kernel.shm*' entries to Strings
|
12
|
+
- shmall and shmmax were causing Facter and newer versions of Puppet to crash
|
13
|
+
- See FACT-1732 for additional information
|
14
|
+
- Add Puppet function `mod::assert_metadata_os()`
|
data/spec/lib/simp/files/componentinfo_spec/module_with_prerelease_dash_in_version/metadata.json
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"name": "simp-module",
|
3
|
+
"version": "3.8.0-rc0",
|
4
|
+
"author": "SIMP Team",
|
5
|
+
"summary": "A collection of common SIMP functions, facts, and types",
|
6
|
+
"license": "Apache-2.0",
|
7
|
+
"source": "https://github.com/simp/pupmod-simp-simplib",
|
8
|
+
"project_page": "https://github.com/simp/pupmod-simp-simplib",
|
9
|
+
"issues_url": "https://simp-project.atlassian.net",
|
10
|
+
"tags": [
|
11
|
+
"simp",
|
12
|
+
"functions",
|
13
|
+
"facts",
|
14
|
+
"types",
|
15
|
+
"alias",
|
16
|
+
"library"
|
17
|
+
],
|
18
|
+
"dependencies": [
|
19
|
+
|
20
|
+
],
|
21
|
+
"operatingsystem_support": [
|
22
|
+
{
|
23
|
+
"operatingsystem": "RedHat",
|
24
|
+
"operatingsystemrelease": [
|
25
|
+
"6",
|
26
|
+
"7"
|
27
|
+
]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"operatingsystem": "CentOS",
|
31
|
+
"operatingsystemrelease": [
|
32
|
+
"6",
|
33
|
+
"7"
|
34
|
+
]
|
35
|
+
}
|
36
|
+
],
|
37
|
+
"requirements": [
|
38
|
+
{
|
39
|
+
"name": "puppet",
|
40
|
+
"version_requirement": ">= 4.7.0 < 6.0.0"
|
41
|
+
}
|
42
|
+
],
|
43
|
+
"package_release_version": "0"
|
44
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Name: testpackage
|
2
|
+
Version: 1.0.0
|
3
|
+
Release: rc0
|
4
|
+
Summary: dummy test package
|
5
|
+
BuildArch: noarch
|
6
|
+
|
7
|
+
License: Apache-2.0
|
8
|
+
URL: http://foo.bar
|
9
|
+
|
10
|
+
%description
|
11
|
+
A dummy package used to test Simp::RPM methods
|
12
|
+
|
13
|
+
%prep
|
14
|
+
exit 0
|
15
|
+
|
16
|
+
%build
|
17
|
+
exit 0
|
18
|
+
|
19
|
+
|
20
|
+
%install
|
21
|
+
exit 0
|
22
|
+
|
23
|
+
%clean
|
24
|
+
exit 0
|
25
|
+
|
26
|
+
%files
|
27
|
+
%doc
|
28
|
+
|
29
|
+
|
30
|
+
%changelog
|
31
|
+
* Wed Jun 10 2015 nobody
|
32
|
+
- some comment
|
@@ -24,16 +24,20 @@
|
|
24
24
|
{
|
25
25
|
"name": "foo4/bar4",
|
26
26
|
"version_requirement": ">= 4.0.0 < 5.0.0"
|
27
|
-
},
|
28
|
-
{
|
29
|
-
"name": "foo5/bar5",
|
30
|
-
"version_requirement": "5.x"
|
31
|
-
},
|
32
|
-
{
|
33
|
-
"name": "foo6/bar6",
|
34
|
-
"version_requirement": "6.4.x"
|
35
27
|
}
|
36
28
|
],
|
29
|
+
"simp": {
|
30
|
+
"optional_dependencies": [
|
31
|
+
{
|
32
|
+
"name": "foo5/bar5",
|
33
|
+
"version_requirement": "5.x"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"name": "foo6/bar6",
|
37
|
+
"version_requirement": "6.4.x"
|
38
|
+
}
|
39
|
+
]
|
40
|
+
},
|
37
41
|
"operatingsystem_support": [
|
38
42
|
{
|
39
43
|
"operatingsystem": "RedHat",
|
@@ -12,19 +12,23 @@
|
|
12
12
|
"name": "puppetlabs/inifile",
|
13
13
|
"version_requirement": ">= 1.6.0 < 2.0.0"
|
14
14
|
},
|
15
|
-
{
|
16
|
-
"name": "puppetlabs/puppetdb",
|
17
|
-
"version_requirement": ">= 5.1.2 < 6.0.0"
|
18
|
-
},
|
19
|
-
{
|
20
|
-
"name": "puppetlabs/postgresql",
|
21
|
-
"version_requirement": ">= 4.8.0 < 5.0.0"
|
22
|
-
},
|
23
15
|
{
|
24
16
|
"name": "puppetlabs/stdlib",
|
25
17
|
"version_requirement": ">= 4.13.1 < 5.0.0"
|
26
18
|
}
|
27
19
|
],
|
20
|
+
"simp": {
|
21
|
+
"optional_dependencies": [
|
22
|
+
{
|
23
|
+
"name": "puppetlabs/puppetdb",
|
24
|
+
"version_requirement": ">= 5.1.2 < 6.0.0"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "puppetlabs/postgresql",
|
28
|
+
"version_requirement": ">= 4.8.0 < 5.0.0"
|
29
|
+
}
|
30
|
+
]
|
31
|
+
},
|
28
32
|
"requirements": [
|
29
33
|
{
|
30
34
|
"name": "puppet",
|
@@ -16,7 +16,8 @@ describe 'Simp::Rake::Build::RpmDeps#get_version_requires' do
|
|
16
16
|
"5.x" => ['Requires: pupmod-foo-bar >= 5.0.0',
|
17
17
|
'Requires: pupmod-foo-bar < 6.0.0'],
|
18
18
|
"6.4.x" => ['Requires: pupmod-foo-bar >= 6.4.0',
|
19
|
-
'Requires: pupmod-foo-bar < 7.0.0']
|
19
|
+
'Requires: pupmod-foo-bar < 7.0.0'],
|
20
|
+
nil => ['Requires: pupmod-foo-bar']
|
20
21
|
}.each do |input, output|
|
21
22
|
it do
|
22
23
|
expect(Simp::Rake::Build::RpmDeps::get_version_requires(pkg, input)).to eq output
|
@@ -40,6 +41,14 @@ describe 'Simp::Rake::Build::RpmDeps#get_version_requires' do
|
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
44
|
+
# In the tests below, a 'managed' component is one with an entry in the
|
45
|
+
# simp-core/build/rpm/dependencies.yaml. It is a module, whose RPM
|
46
|
+
# dependencies, obsoletes, and/or release qualifier need to be managed.
|
47
|
+
#
|
48
|
+
# An 'unmanaged' component is a module that has no special packaging needs.
|
49
|
+
# It has no obsoletes, can use the default release qualifier of 0, and needs
|
50
|
+
# no adjustments to the dependencies it advertises in its metadata.json file.
|
51
|
+
#
|
43
52
|
describe 'Simp::Rake::Build::RpmDeps#generate_rpm_meta_files' do
|
44
53
|
let(:files_dir) { File.join(File.dirname(__FILE__), 'files') }
|
45
54
|
let(:rpm_metadata) {
|
@@ -143,10 +152,10 @@ EOM
|
|
143
152
|
expected = <<EOM
|
144
153
|
Requires: pupmod-puppetlabs-inifile >= 1.6.0
|
145
154
|
Requires: pupmod-puppetlabs-inifile < 2.0.0
|
146
|
-
Requires: pupmod-puppetlabs-puppetdb >= 5.1.2
|
147
|
-
Requires: pupmod-puppetlabs-puppetdb < 6.0.0
|
148
155
|
Requires: pupmod-puppetlabs-postgresql >= 4.8.0
|
149
156
|
Requires: pupmod-puppetlabs-postgresql < 5.0.0
|
157
|
+
Requires: pupmod-puppetlabs-puppetdb >= 5.1.2
|
158
|
+
Requires: pupmod-puppetlabs-puppetdb < 6.0.0
|
150
159
|
Requires: pupmod-puppetlabs-stdlib >= 4.13.1
|
151
160
|
Requires: pupmod-puppetlabs-stdlib < 5.0.0
|
152
161
|
EOM
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
../../nodesets
|
@@ -31,7 +31,7 @@ describe 'Simp::RelChecks.compare_latest_tag' do
|
|
31
31
|
Simp::RelChecks.expects(:`).with('git fetch -t origin 2>/dev/null').returns("\n")
|
32
32
|
Simp::RelChecks.expects(:`).with('git tag -l').returns("1.0.0\nv1.0.1\n1.1.0\n")
|
33
33
|
Simp::RelChecks.expects(:`).with('git diff tags/1.1.0 --name-only').returns(
|
34
|
-
".travis.yml\nRakefile\nGemfile.lock\nspec/some_spec.rb\ndoc/index.html\nrakelib/mytasks.rake\n")
|
34
|
+
".travis.yml\nRakefile\nREFERENCE.md\nGemfile.lock\nspec/some_spec.rb\ndoc/index.html\nrakelib/mytasks.rake\n")
|
35
35
|
|
36
36
|
msg = " No new tag required: No significant files have changed since '1.1.0' tag\n"
|
37
37
|
expect{ Simp::RelChecks.compare_latest_tag(component_dir) }.
|
data/spec/lib/simp/rpm_spec.rb
CHANGED
@@ -20,6 +20,9 @@ describe Simp::RPM do
|
|
20
20
|
@d_rpm_file = File.join( dir, 'testpackage-1-0.el7.noarch.rpm' )
|
21
21
|
@d_rpm_obj = Simp::RPM.new( @d_rpm_file )
|
22
22
|
|
23
|
+
@rc0_spec_file = File.join( dir, 'testpackage-rc0.spec' )
|
24
|
+
@rc0_spec_obj = Simp::RPM.new( @rc0_spec_file )
|
25
|
+
|
23
26
|
#FIXME
|
24
27
|
# @signed_rpm_file = File.join( dir, 'testpackage-1-0.noarch.rpm' )
|
25
28
|
# @signed_rpm_obj = Simp::RPM.new( @signed_rpm_file )
|
@@ -85,6 +88,7 @@ describe Simp::RPM do
|
|
85
88
|
expect( @m_spec_obj.version ).to eq '1'
|
86
89
|
expect( @m_spec_obj.version('testpackage') ).to eq '1'
|
87
90
|
expect( @m_spec_obj.version('testpackage-doc') ).to eq '1.0.1'
|
91
|
+
expect( @rc0_spec_obj.version ).to eq '1.0.0'
|
88
92
|
end
|
89
93
|
|
90
94
|
it 'fails when invalid package specified' do
|
@@ -103,6 +107,7 @@ describe Simp::RPM do
|
|
103
107
|
expect( @m_spec_obj.release ).to eq '0'
|
104
108
|
expect( @m_spec_obj.release('testpackage') ).to eq '0'
|
105
109
|
expect( @m_spec_obj.release('testpackage-doc') ).to eq '2'
|
110
|
+
expect( @rc0_spec_obj.release ).to eq 'rc0'
|
106
111
|
end
|
107
112
|
|
108
113
|
it 'fails when invalid package specified' do
|
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.
|
4
|
+
version: 5.11.4
|
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: 2020-
|
12
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simp-beaker-helpers
|
@@ -534,6 +534,8 @@ files:
|
|
534
534
|
- spec/lib/simp/files/componentinfo_spec/module_with_invalid_weekday_entry/metadata.json
|
535
535
|
- spec/lib/simp/files/componentinfo_spec/module_with_malformed_metadata/CHANGELOG
|
536
536
|
- spec/lib/simp/files/componentinfo_spec/module_with_malformed_metadata/metadata.json
|
537
|
+
- spec/lib/simp/files/componentinfo_spec/module_with_prerelease_dash_in_version/CHANGELOG
|
538
|
+
- spec/lib/simp/files/componentinfo_spec/module_with_prerelease_dash_in_version/metadata.json
|
537
539
|
- spec/lib/simp/files/componentinfo_spec/module_with_version_misordered_entries/CHANGELOG
|
538
540
|
- spec/lib/simp/files/componentinfo_spec/module_with_version_misordered_entries/metadata.json
|
539
541
|
- spec/lib/simp/files/componentinfo_spec/module_without_changelog/metadata.json
|
@@ -568,6 +570,7 @@ files:
|
|
568
570
|
- spec/lib/simp/files/testpackage-1-0.noarch.rpm
|
569
571
|
- spec/lib/simp/files/testpackage-dist.spec
|
570
572
|
- spec/lib/simp/files/testpackage-multi.spec
|
573
|
+
- spec/lib/simp/files/testpackage-rc0.spec
|
571
574
|
- spec/lib/simp/files/testpackage.spec
|
572
575
|
- spec/lib/simp/local_gpg_signing_key_spec.rb.beaker-only
|
573
576
|
- spec/lib/simp/packer/iso_vars_json_spec.rb
|
@@ -647,8 +650,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
647
650
|
- !ruby/object:Gem::Version
|
648
651
|
version: '0'
|
649
652
|
requirements: []
|
650
|
-
|
651
|
-
rubygems_version: 2.7.7
|
653
|
+
rubygems_version: 3.0.8
|
652
654
|
signing_key:
|
653
655
|
specification_version: 4
|
654
656
|
summary: SIMP rake helpers
|