Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-packaging_rake_tasks for 
openSUSE:Factory checked in at 2023-06-21 22:37:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.15902 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-packaging_rake_tasks"

Wed Jun 21 22:37:27 2023 rev:28 rq:1093906 version:1.5.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks/rubygem-packaging_rake_tasks.changes
        2023-05-19 11:54:50.503029768 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.15902/rubygem-packaging_rake_tasks.changes
     2023-06-21 22:37:43.685601659 +0200
@@ -1,0 +2,7 @@
+Mon Jun 19 16:06:03 UTC 2023 - Ladislav Slezák <lsle...@suse.com>
+
+- Fixed crash in "build_dependencies:*" rake tasks when processing
+  some spec files (related to bsc#1211319)
+- 1.5.4
+
+-------------------------------------------------------------------

Old:
----
  packaging_rake_tasks-1.5.3.gem

New:
----
  packaging_rake_tasks-1.5.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-packaging_rake_tasks.spec ++++++
--- /var/tmp/diff_new_pack.XE0S7m/_old  2023-06-21 22:37:44.225604909 +0200
+++ /var/tmp/diff_new_pack.XE0S7m/_new  2023-06-21 22:37:44.229604933 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           rubygem-packaging_rake_tasks
-Version:        1.5.3
+Version:        1.5.4
 Release:        0
 %define mod_name packaging_rake_tasks
 %define mod_full_name %{mod_name}-%{version}

++++++ packaging_rake_tasks-1.5.3.gem -> packaging_rake_tasks-1.5.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2023-05-17 13:00:58.000000000 +0200
+++ new/VERSION 2023-06-20 09:43:08.000000000 +0200
@@ -1 +1 @@
-1.5.3
+1.5.4
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/tasks/build_dependencies.rake 
new/lib/tasks/build_dependencies.rake
--- old/lib/tasks/build_dependencies.rake       2023-05-17 13:00:58.000000000 
+0200
+++ new/lib/tasks/build_dependencies.rake       2023-06-20 09:43:08.000000000 
+0200
@@ -18,6 +18,7 @@
 
 require "shellwords"
 require "open3"
+require "tempfile"
 
 namespace :build_dependencies do
   # Read the multi build targets from the "_multibuild" file.
@@ -36,10 +37,17 @@
       end
     end
 
-    puts "Found multibuild targets: #{flavors.join(", ")}" if verbose
+    puts "Found multibuild targets: #{flavors.join(", ")}" if verbose && 
!flavors.empty?
     flavors
   end
 
+  # Read the build dependencies from a file
+  def buildrequires_from_file(file)
+    stdout = `rpmspec -q --buildrequires #{file.shellescape}`
+    raise "Parsing #{file} failed" unless $?.success?
+    stdout.split("\n")
+  end
+
   # Read the build dependencies from all spec files. For multi build packages
   # evaluate all package flavors.
   # @return [Array<String>] list of build dependencies
@@ -51,14 +59,19 @@
     Dir.glob("#{Packaging::Configuration.instance.package_dir}/*.spec").each 
do |spec_file|
       # replace the "@BUILD_FLAVOR@" placeholder by each flavor defined
       flavors.each do |flavor|
-        spec_content = File.read(spec_file).gsub("@BUILD_FLAVOR@", flavor)
+        spec_content = File.read(spec_file).gsub!("@BUILD_FLAVOR@", flavor)
 
-        # get the BuildRequires from the spec files, this also expands the RPM 
macros like %{rubygem}
-        # use Open3 as the command produces some bogus error messages on 
stderr even on success,
-        # but in case of error it provides a hint what failed
-        stdout, stderr, status = Open3.capture3("rpmspec", "-q", 
"--buildrequires", "/dev/stdin", stdin_data: spec_content)
-        raise "Parsing #{spec_file} (flavor 
#{flavor.inspect})failed:\n#{stderr}" unless status.success?
-        buildrequires.concat(stdout.split("\n"))
+        if spec_content.nil?
+          # no replacement, use the file directly
+          buildrequires.concat(buildrequires_from_file(spec_file))
+        else
+          # rpmspec can only read a file, write the processed data to a 
temporary file
+          Tempfile.create(["rake_build_deps-", ".spec"]) do |tmp|
+            tmp.write(spec_content)
+            tmp.flush
+            buildrequires.concat(buildrequires_from_file(tmp.path))
+          end
+        end
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2023-05-17 13:01:49.000000000 +0200
+++ new/metadata        2023-06-20 09:43:08.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: packaging_rake_tasks
 version: !ruby/object:Gem::Version
-  version: 1.5.3
+  version: 1.5.4
 platform: ruby
 authors:
 - Josef Reidinger
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2023-05-17 00:00:00.000000000 Z
+date: 2023-06-20 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -66,8 +66,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project: 
-rubygems_version: 2.7.6.3
+rubygems_version: 3.3.26
 signing_key: 
 specification_version: 4
 summary: Rake tasks providing tasks to package project in git and integration 
with

Reply via email to