simp-rake-helpers 2.5.0 → 2.5.1

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
  SHA1:
3
- metadata.gz: 6ac44b8dfa44bfa0bde4f0752f8698c347ad93bd
4
- data.tar.gz: e425013cffa3024ad3538d3679119c2f4f4855f7
3
+ metadata.gz: 94dfd5a4fce17cf18dcbcd3954850a62bc22a95f
4
+ data.tar.gz: ff422c250c7161ce2a4a6effca2dab2aab108262
5
5
  SHA512:
6
- metadata.gz: 8927124043e3a9494ec35b679c2b8a2dd1a594b0bdc26c8c9f262684e26ceeeb04351eda37256dcf88bf5940f7ac286c996ec7a6da5672b3b236e7b757644839
7
- data.tar.gz: f09399ce4a60cd02aa848d87668d417c64fd22d3400f60dbaa1f6b6f3cd91ab220a06616173fe2ab45909e51ec4eb0229524260578f1bef062d0ede804d74dd6
6
+ metadata.gz: a157149981567ad24a45eca17f0f19b90699fdd9e365a8543b808f75dac25609b19095a66f610c983d41826e605cfca2a8f75e6bec25cb5acba3fe77f81373f1
7
+ data.tar.gz: 5b51f064fbdc28b2915b595993e43d4c87f1c87f4992473935cc1df7f8a6b917244df7ba843085761056f98aa9b7b7b8689065a58d45efb26d8b0db97023f8a6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 2.5.1 / 2016-08-30
2
+ * Fixed the RPM spec template so that it properly picks up the requires and
3
+ release files
4
+ * This is a bit of a mess and needs to be completely refactored in the future
5
+
1
6
  ### 2.4.7 / 2016-08-14
2
7
  * Removed unecessary `deps:checkout` warnings from fresh (empty) checkouts
3
8
 
@@ -158,7 +158,13 @@ end
158
158
 
159
159
  -- First, the Release Number
160
160
 
161
- local rel_file = io.open(src_dir .. "/build/rpm_metadata/release", "r")
161
+ rel_file = io.open(src_dir .. "/build/rpm_metadata/release", "r")
162
+
163
+ if not rel_file then
164
+ -- Need this for the SRPM case
165
+ rel_file = io.open(src_dir .. "/release", "r")
166
+ end
167
+
162
168
  if rel_file then
163
169
  for line in rel_file:lines() do
164
170
  is_comment = string.match(line, "^%s*#")
@@ -176,7 +182,13 @@ end
176
182
  %{lua:
177
183
 
178
184
  -- Next, the Requirements
179
- local req_file = io.open(src_dir .. "/build/rpm_metadata/requires", "r")
185
+ req_file = io.open(src_dir .. "/build/rpm_metadata/requires", "r")
186
+
187
+ if not req_file then
188
+ -- Need this for the SRPM case
189
+ req_file = io.open(src_dir .. "/requires", "r")
190
+ end
191
+
180
192
  if req_file then
181
193
  for line in req_file:lines() do
182
194
  valid_line = (string.match(line, "^Requires: ") or string.match(line, "^Obsoletes: ") or string.match(line, "^Provides: "))
@@ -235,7 +247,7 @@ end
235
247
 
236
248
  Summary: %{module_name} Puppet Module
237
249
  %if 0%{?_variant:1}
238
- Name: %{base_name}-%{_variant}
250
+ Name: %{base_name}-%{variant}
239
251
  %else
240
252
  Name: %{base_name}
241
253
  %endif
@@ -250,14 +262,14 @@ Source1: %{lua: print("metadata.json")}
250
262
  -- Include our sources as appropriate
251
263
  changelog = io.open(src_dir .. "/CHANGELOG","r")
252
264
  if changelog then
253
- print("Source2: " .. "CHANGELOG")
265
+ print("Source2: " .. "CHANGELOG\\n")
254
266
  end
255
267
 
256
268
  if rel_file then
257
- print("Source3: " .. "build/rpm_metadata/release")
269
+ print("Source3: " .. "release\\n")
258
270
  end
259
271
  if req_file then
260
- print("Source4: " .. "build/rpm_metadata/requires")
272
+ print("Source4: " .. "requires\\n")
261
273
  end
262
274
  }
263
275
  URL: %{lua: print(module_source)}
@@ -2,5 +2,5 @@ module Simp; end
2
2
  module Simp::Rake; end
3
3
 
4
4
  class Simp::Rake::Helpers
5
- VERSION = '2.5.0'
5
+ VERSION = '2.5.1'
6
6
  end
data/lib/simp/rake/pkg.rb CHANGED
@@ -267,9 +267,15 @@ module Simp::Rake
267
267
  if require_rebuild?(@tar_dest,srpms) || require_rebuild?("#{@base_dir}/metadata.json")
268
268
 
269
269
  @puppet_module_info_files.each do |file|
270
- tgt_file = File.join(@pkg_dir, File.basename(file))
271
- FileUtils.rm_rf(tgt_file) if File.exist?(tgt_file)
272
- FileUtils.cp_r(file, @pkg_dir) if File.exist?(file)
270
+ next unless File.exist?(file)
271
+
272
+ Find.find(file) do |path|
273
+ next if File.directory?(path)
274
+
275
+ tgt_file = File.join(@pkg_dir, File.basename(path))
276
+ FileUtils.rm_rf(tgt_file) if File.exist?(tgt_file)
277
+ FileUtils.cp(path, @pkg_dir) if File.exist?(path)
278
+ end
273
279
  end
274
280
 
275
281
  cmd = %Q(#{mock_cmd} --root #{args.chroot} #{mocksnap} --buildsrpm --spec #{@spec_file} --sources #{@pkg_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: 2.5.0
4
+ version: 2.5.1
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: 2016-08-30 00:00:00.000000000 Z
12
+ date: 2016-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler