Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-libyui-rake for 
openSUSE:Factory checked in at 2021-07-16 00:00:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-libyui-rake (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-libyui-rake.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-libyui-rake"

Fri Jul 16 00:00:48 2021 rev:10 rq:906514 version:0.1.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-libyui-rake/rubygem-libyui-rake.changes  
2020-04-23 18:33:47.752473214 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-libyui-rake.new.2625/rubygem-libyui-rake.changes
        2021-07-16 00:03:19.492300755 +0200
@@ -1,0 +2,21 @@
+Wed Mar 31 13:35:58 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Updated OBS build targets
+  - Added "sle15sp3" target (bsc#1184225)
+  - Added future "sle15sp4" target
+  - Update "sle_latest" to point to "sle15sp4"
+- 0.1.23
+
+-------------------------------------------------------------------
+Tue Mar 30 14:29:14 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Fixed packaging_rake_tasks dependency (related to bsc#1183957)
+- 0.1.22
+
+-------------------------------------------------------------------
+Wed Mar  3 16:11:29 UTC 2021 - Jos?? Iv??n L??pez Gonz??lez <jlo...@suse.com>
+
+- Added so_version tasks (related to bsc#1181653).
+- 0.1.21
+
+-------------------------------------------------------------------

Old:
----
  libyui-rake-0.1.20.gem

New:
----
  libyui-rake-0.1.23.gem

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

Other differences:
------------------
++++++ rubygem-libyui-rake.spec ++++++
--- /var/tmp/diff_new_pack.pekiFm/_old  2021-07-16 00:03:19.900297485 +0200
+++ /var/tmp/diff_new_pack.pekiFm/_new  2021-07-16 00:03:19.904297452 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-libyui-rake
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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-libyui-rake
-Version:        0.1.20
+Version:        0.1.23
 Release:        0
 %define mod_name libyui-rake
 %define mod_full_name %{mod_name}-%{version}

++++++ libyui-rake-0.1.20.gem -> libyui-rake-0.1.23.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2020-04-23 10:03:27.000000000 +0200
+++ new/VERSION 2021-03-30 22:28:16.000000000 +0200
@@ -1 +1 @@
-0.1.20
+0.1.23
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/data/targets.yml new/data/targets.yml
--- old/data/targets.yml        2020-04-23 10:03:27.000000000 +0200
+++ new/data/targets.yml        2021-03-30 22:28:16.000000000 +0200
@@ -59,11 +59,21 @@
   obs_project: "Devel:YaST:SLE-15-SP2"
   obs_sr_project: "SUSE:SLE-15-SP2:Update"
   obs_target: "SUSE_SLE-15-SP2_GA"
+:sle15sp3:
+  obs_api: "https://api.suse.de/";
+  obs_project: "Devel:YaST:SLE-15-SP3"
+  obs_sr_project: "SUSE:SLE-15-SP3:Update"
+  obs_target: "SUSE_SLE-15-SP3_GA"
+:sle15sp4:
+  obs_api: "https://api.suse.de/";
+  obs_project: "Devel:YaST:SLE-15-SP4"
+  obs_sr_project: "SUSE:SLE-15-SP4:Update"
+  obs_target: "SUSE_SLE-15-SP4_GA"
 :sle_latest:
   obs_api: "https://api.suse.de/";
   obs_project: "Devel:YaST:Head"
-  obs_sr_project: "SUSE:SLE-15-SP3:GA"
-  obs_target: "SUSE_SLE-15-SP3_GA"
+  obs_sr_project: "SUSE:SLE-15-SP4:GA"
+  obs_target: "SUSE_SLE-15-SP4_GA"
 :factory:
   obs_project: "devel:libraries:libyui"
   obs_sr_project: "openSUSE:Factory"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/libyui/tasks.rb new/lib/libyui/tasks.rb
--- old/lib/libyui/tasks.rb     2020-04-23 10:03:27.000000000 +0200
+++ new/lib/libyui/tasks.rb     2021-03-30 22:28:16.000000000 +0200
@@ -1,5 +1,5 @@
 #--
-# Copyright (C) 2015 SUSE LLC
+# Copyright (C) 2015-2021 SUSE LLC
 #   This library is free software; you can redistribute it and/or modify
 # it only under the terms of version 2.1 of the GNU Lesser General Public
 # License as published by the Free Software Foundation.
@@ -41,29 +41,110 @@
 
     # Some helpers to be used on tasks definition
     module Helpers
-      # Extracts the value from a CMake string
+      # Returns the CMake version from the version file.
+      # VERSION_TWEAK is optional.
       #
-      # @param s   [String] '... SET( VERSION_MAJOR "3") ...'
-      # @param key [String] 'VERSION_MAJOR'
-      # @return "3"
+      # @param filename [String, nil] %{VERSION_CMAKE} by default
+      # @return [String] like "1.2.3" or "1.2.3.4"
+      def cmake_version(filename = nil)
+        filename = cmake_filename(filename)
+
+        values = cmake_values(filename,
+          "VERSION_MAJOR", "VERSION_MINOR", "VERSION_PATCH", "VERSION_TWEAK")
+
+        values.compact.join(".")
+      end
+
+      # Returns the CMake so version from the version file.
+      #
+      # @param filename [String, nil] %{VERSION_CMAKE} by default
+      # @return [String] like "4.0.0"
+      def cmake_so_version(filename = nil)
+        filename = cmake_filename(filename)
+
+        values = cmake_values(filename, "SONAME_MAJOR", "SONAME_MINOR", 
"SONAME_PATCH")
+
+        values.compact.join(".")
+      end
+
+      # Bumps the so version in the CMake version file
+      #
+      # @param filename [string, nil] %{VERSION_CMAKE} by default
+      def bump_cmake_so_version(filename = nil)
+        filename = cmake_filename(filename)
+
+        so_version = cmake_so_version(filename).split(".").first.to_i.next
+
+        content = File.read(filename)
+        content.sub!(/(^SET.*SONAME_MAJOR.*)"([^"\n])*"/, 
"\\1\"#{so_version}\"")
+        content.sub!(/(^SET.*SONAME_MINOR.*)"([^"\n])*"/, "\\1\"0\"")
+        content.sub!(/(^SET.*SONAME_PATCH.*)"([^"\n])*"/, "\\1\"0\"")
+
+        File.write(filename, content)
+      end
+
+      # Extract values from a CMake version file
+      #
+      # @see cmake_value
+      #
+      # @param filename [String]
+      # @param keys [Array<String>]
+      def cmake_values(filename, *keys)
+        content = File.read(filename)
+
+        keys.map { |k| cmake_value(content, k) }
+      end
+
+      # Extracts the value of the given key from the content of a CMake 
version file
+      #
+      # @param s   [String] e.g., '... SET( VERSION_MAJOR "3") ...'
+      # @param key [String] e.g., 'VERSION_MAJOR'
+      #
+      # @return [String] e.g., "3"
       def cmake_value(s, key)
         e_key = Regexp.escape(key)
         m = /SET\s*\(\s*#{e_key}\s+"([^"]*)"\s*\)/.match(s)
         m ? m[1] : nil
       end
 
-      # Returns the CMake version from the version file.
-      # VERSION_TWEAK is optional.
+      # Filename of the CMake version file
       #
-      # @param  [String] Version file (VERSION_CMAKE by default)
-      # @return [String] like "1.2.3" or "1.2.3.4"
-      # @see VERSION_CMAKE
-      def cmake_version(file = nil)
-        f = File.read(file || VERSION_CMAKE)
-        [cmake_value(f, "VERSION_MAJOR"),
-         cmake_value(f, "VERSION_MINOR"),
-         cmake_value(f, "VERSION_PATCH"),
-         cmake_value(f, "VERSION_TWEAK")].compact.join(".")
+      # @param filename [string, nil] %{VERSION_CMAKE} if no filename is given
+      # @return [String]
+      def cmake_filename(filename)
+        filename || VERSION_CMAKE
+      end
+
+      # Returns the so version from the given spec file
+      #
+      # @param filename [String, nil] if nil, it uses the shortest spec 
filename
+      # @return [String, nil] e.g., "12"
+      def spec_so_version(filename = nil)
+        filename = spec_filename(filename)
+
+        File.read(filename).scan(/^%define\s+so_version\s+(\d+)/).flatten.first
+      end
+
+      # Bumps the so version in the given spec file
+      #
+      # @param filename [String, nil] if nil, it uses the shortest spec 
filename
+      def bump_spec_so_version(filename = nil)
+        filename = spec_filename(filename)
+
+        so_version = spec_so_version(filename).to_i.next
+
+        content = File.read(filename)
+        content.gsub!(/^(%define\s+so_version\s+)\d+$/, "\\1#{so_version}")
+
+        File.write(filename, content)
+      end
+
+      # Filename of the spec file
+      #
+      # @param filename [String, nil] if nil, it uses the shortest spec 
filename
+      # @return [String]
+      def spec_filename(filename)
+        filename || Dir.glob("package/*.spec").sort.first
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/tasks/so_version.rake 
new/lib/tasks/so_version.rake
--- old/lib/tasks/so_version.rake       1970-01-01 01:00:00.000000000 +0100
+++ new/lib/tasks/so_version.rake       2021-03-30 22:28:16.000000000 +0200
@@ -0,0 +1,53 @@
+#--
+# Copyright (C) 2021 SUSE LLC
+#   This library is free software; you can redistribute it and/or modify
+# it only under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+#   This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+#   You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#++
+
+namespace :so_version do
+  include Libyui::Tasks::Helpers
+
+  desc "Check that the so version numbers are in sync"
+  task :check do
+    so_version = cmake_so_version.split(".").first
+
+    filenames = Dir.glob("package/*.spec").sort
+    filenames.reject! { |f| spec_so_version(f).nil? }
+
+    mismatches = filenames.select { |f| spec_so_version(f) != so_version }
+
+    if mismatches.any?
+      messages = ["so version mismatch:"]
+      messages << "cmake so version: #{so_version}"
+      messages += mismatches.map { |f| "#{f}: #{spec_so_version(f)}" }
+
+      raise messages.join("\n")
+    end
+
+    puts cmake_so_version if verbose
+  end
+
+  desc "Increase the so version in spec and cmake files"
+  task bump: :check do
+    bump_cmake_so_version
+
+    Dir.glob("package/*.spec").each { |f| bump_spec_so_version(f) }
+
+    puts cmake_so_version if verbose
+  end
+
+  desc "Show the so version"
+  task :show do
+    puts cmake_so_version
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-04-23 10:03:27.000000000 +0200
+++ new/metadata        2021-03-31 16:53:45.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: libyui-rake
 version: !ruby/object:Gem::Version
-  version: 0.1.20
+  version: 0.1.23
 platform: ruby
 authors:
 - YaST team
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2020-04-23 00:00:00.000000000 Z
+date: 2021-03-31 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -36,14 +36,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 1.4.8
+        version: '1.5'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: 1.4.8
+        version: '1.5'
 description: |
   Rake tasks that support the workflow of a libyui developer. It allows 
packaging
   a repo, sending it to the build service, creating a submit request to the
@@ -60,6 +60,7 @@
 - data/targets.yml
 - lib/libyui/rake.rb
 - lib/libyui/tasks.rb
+- lib/tasks/so_version.rake
 - lib/tasks/test.rake
 - lib/tasks/version.rake
 homepage: https://github.com/openSUSE/libyui-rake
@@ -81,7 +82,8 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
+rubyforge_project: 
+rubygems_version: 2.7.6.2
 signing_key: 
 specification_version: 4
 summary: Rake tasks providing basic workflow for libyui development

Reply via email to