Hello community, here is the log from the commit of package rubygem-packaging_rake_tasks for openSUSE:Factory checked in at 2016-03-20 11:48:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks (Old) and /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-packaging_rake_tasks" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-packaging_rake_tasks/rubygem-packaging_rake_tasks.changes 2015-10-03 20:29:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-packaging_rake_tasks.new/rubygem-packaging_rake_tasks.changes 2016-03-20 11:48:22.000000000 +0100 @@ -1,0 +2,8 @@ +Wed Mar 9 10:43:06 CET 2016 - sch...@suse.de + +- Checking *.changes file for new bugzilla, fate,... IDs before + packaging. + (bnc#0) +- 1.1.4 + +------------------------------------------------------------------- Old: ---- packaging_rake_tasks-1.1.3.gem New: ---- packaging_rake_tasks-1.1.4.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-packaging_rake_tasks.spec ++++++ --- /var/tmp/diff_new_pack.iU8IAy/_old 2016-03-20 11:48:23.000000000 +0100 +++ /var/tmp/diff_new_pack.iU8IAy/_new 2016-03-20 11:48:23.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-packaging_rake_tasks # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # 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.1.3 +Version: 1.1.4 Release: 0 %define mod_name packaging_rake_tasks %define mod_full_name %{mod_name}-%{version} ++++++ packaging_rake_tasks-1.1.3.gem -> packaging_rake_tasks-1.1.4.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/VERSION new/VERSION --- old/VERSION 2015-05-06 10:39:43.000000000 +0200 +++ new/VERSION 2016-03-15 16:03:18.000000000 +0100 @@ -1 +1 @@ -1.1.3 +1.1.4 Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/check_changelog.rake new/lib/tasks/check_changelog.rake --- old/lib/tasks/check_changelog.rake 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/tasks/check_changelog.rake 2016-03-15 16:03:18.000000000 +0100 @@ -0,0 +1,46 @@ +#-- +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 +#++ + +require 'rake' + +namespace "check" do + desc "Checking for new IDs (bugzilla,fate,...) in *.changes file" + task :changelog do + begin + checkout + copy_sources + + puts "Checking IDs in *.changes file" if verbose + # Checking makes only sense if the version in the *.spec file has been changed + if version_changed?( "#{osc_checkout_dir}/#{package_name}.spec" ) + Dir.chdir(osc_checkout_dir) do + # Tags described in https://github.com/openSUSE/osc-plugin-factory/blob/e12bc02e9817277335ce6adaa8e8d334d03fcc5d/check_tags_in_requests.py#L63 + cmd = "osc -A '#{obs_api}' diff *.changes" + puts cmd if verbose + ret = `bash -c '#{cmd}'` + unless ret.match(/(bnc|fate|boo|bsc|bgo)#[0-9]+/i) || ret.match(/cve-[0-9]{4}-[0-9]+/i) + raise "Stopping, missing new bugzilla or fate entry in the *.changes file.\n"\ + "e.g. bnc#<number>, fate#<number>, boo#<number>, bsc#<number>, bgo#<number>, cve-<number>" + end + end + else + puts "=> do not check for IDs in *.changes file" + end + ensure + cleaning + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/osc.rake new/lib/tasks/osc.rake --- old/lib/tasks/osc.rake 2015-05-06 10:39:43.000000000 +0200 +++ new/lib/tasks/osc.rake 2016-03-15 16:03:18.000000000 +0100 @@ -74,6 +74,26 @@ end end + def version_changed? updated_spec_file + begin + file = Tempfile.new('yast-rake') + file.close + sh "osc -A '#{obs_api}' cat '#{obs_sr_project}' '#{package_name}' '#{package_name}.spec' > #{file.path}" + original_version = version_from_spec(file.path) + new_version = version_from_spec(updated_spec_file) + + if new_version == original_version + puts "Version has not been changed in *.spec file" if verbose + return false + else + puts "Version has been changed in *.spec file" if verbose + return true + end + ensure + file.unlink if file + end + end + def version_from_spec spec_glob version = `grep '^Version:' #{spec_glob}` version.sub!(/^Version:\s*/, "") @@ -189,21 +209,13 @@ task :sr => "osc:commit" do begin checkout - - file = Tempfile.new('yast-rake') - file.close - sh "osc -A '#{obs_api}' cat '#{obs_sr_project}' '#{package_name}' '#{package_name}.spec' > #{file.path}" - original_version = version_from_spec(file.path) - new_version = version_from_spec("#{package_dir}/#{package_name}.spec") - - if new_version == original_version - puts "No version change => no submit request" if verbose + unless version_changed?( "#{package_dir}/#{package_name}.spec" ) + puts "=> no submit request" if verbose else Rake::Task["osc:sr:force"].execute end ensure cleaning - file.unlink if file end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/package.rake new/lib/tasks/package.rake --- old/lib/tasks/package.rake 2015-05-06 10:39:43.000000000 +0200 +++ new/lib/tasks/package.rake 2016-03-15 16:03:18.000000000 +0100 @@ -20,5 +20,5 @@ desc 'Prepare sources for rpm build' # just call the checks and then build the package -task :package => ["check:syntax", "check:committed", :test, :tarball] +task :package => ["check:syntax", "check:committed", "check:changelog", :test, :tarball] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-05-14 14:32:04.000000000 +0200 +++ new/metadata 2016-03-15 16:03:18.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: packaging_rake_tasks version: !ruby/object:Gem::Version - version: 1.1.3 + version: 1.1.4 platform: ruby authors: - Josef Reidinger autorequire: bindir: bin cert_chain: [] -date: 2015-05-14 00:00:00.000000000 Z +date: 2016-03-15 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -36,6 +36,7 @@ - lib/packaging.rb - lib/packaging/configuration.rb - lib/packaging/tasks.rb +- lib/tasks/check_changelog.rake - lib/tasks/check_committed.rake - lib/tasks/check_license.rake - lib/tasks/check_osc.rake @@ -63,7 +64,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.4.5 +rubygems_version: 2.2.2 signing_key: specification_version: 4 summary: Rake tasks providing tasks to package project in git and integration with