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-05-19 11:54:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks (Old) and /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-packaging_rake_tasks" Fri May 19 11:54:43 2023 rev:27 rq:1087771 version:1.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks/rubygem-packaging_rake_tasks.changes 2021-09-04 22:32:30.287924876 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new.1533/rubygem-packaging_rake_tasks.changes 2023-05-19 11:54:50.503029768 +0200 @@ -1,0 +2,14 @@ +Tue May 16 13:55:04 UTC 2023 - Ladislav Slezák <lsle...@suse.com> + +- Added support for multi build packages in "build_dependencies:*" + rake tasks (related to bsc#1211319) +- 1.5.3 + +------------------------------------------------------------------- +Mon Mar 6 09:06:07 UTC 2023 - Martin Vidner <mvid...@suse.com> + +- Stop using File.exists? which no longer works in Ruby 3.2 + (bsc#1206419) +- 1.5.2 + +------------------------------------------------------------------- Old: ---- packaging_rake_tasks-1.5.1.gem New: ---- packaging_rake_tasks-1.5.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-packaging_rake_tasks.spec ++++++ --- /var/tmp/diff_new_pack.LBSWDa/_old 2023-05-19 11:54:50.923032171 +0200 +++ /var/tmp/diff_new_pack.LBSWDa/_new 2023-05-19 11:54:50.927032194 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-packaging_rake_tasks # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: rubygem-packaging_rake_tasks -Version: 1.5.1 +Version: 1.5.3 Release: 0 %define mod_name packaging_rake_tasks %define mod_full_name %{mod_name}-%{version} ++++++ packaging_rake_tasks-1.5.1.gem -> packaging_rake_tasks-1.5.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 2020-12-01 10:20:18.000000000 +0100 +++ new/VERSION 2023-05-17 13:00:58.000000000 +0200 @@ -1 +1 @@ -1.5.1 +1.5.3 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 2020-12-01 10:20:18.000000000 +0100 +++ new/lib/tasks/build_dependencies.rake 2023-05-17 13:00:58.000000000 +0200 @@ -20,19 +20,46 @@ require "open3" namespace :build_dependencies do - def buildrequires - buildrequires = [] + # Read the multi build targets from the "_multibuild" file. + # @return [Array<String>] list of multi build targets or empty Array if the + # "_multibuild" file does not exist + def multibuild_flavors + flavors = [] + + # parse the _multibuild XML file if it is present + mbfile = File.join(Packaging::Configuration.instance.package_dir, "_multibuild") + if File.exist?(mbfile) + require "rexml/document" + doc = REXML::Document.new(File.read(mbfile)) + doc.elements.each("//multibuild/flavor | //multibuild/package") do |node| + flavors << node.text.strip + end + end - config = Packaging::Configuration.instance - Dir.glob("#{config.package_dir}/*.spec").each do |spec_file| - # 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", spec_file) + puts "Found multibuild targets: #{flavors.join(", ")}" if verbose + flavors + end - raise "Parsing #{spec_file} failed:\n#{stderr}" unless status.success? + # Read the build dependencies from all spec files. For multi build packages + # evaluate all package flavors. + # @return [Array<String>] list of build dependencies + def buildrequires + buildrequires = [] + # OBS additionally runs a default build with empty flavor in multi build packages, + # for simplification use it also for single build packages + flavors = multibuild_flavors + [ "" ] + 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) - buildrequires.concat(stdout.split("\n")) + # 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")) + end end # remove the duplicates and sort the packages for easier reading diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2021-09-02 14:53:23.000000000 +0200 +++ new/metadata 2023-05-17 13:01:49.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: packaging_rake_tasks version: !ruby/object:Gem::Version - version: 1.5.1 + version: 1.5.3 platform: ruby authors: - Josef Reidinger autorequire: bindir: bin cert_chain: [] -date: 2021-09-02 00:00:00.000000000 Z +date: 2023-05-17 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -49,7 +49,7 @@ - lib/tasks/tarball.rake homepage: https://github.com/openSUSE/packaging_rake_tasks licenses: -- LGPL v2.1 +- LGPL-2.1 metadata: {} post_install_message: rdoc_options: []