Hello community,

here is the log from the commit of package yast2-devtools for openSUSE:Factory 
checked in at 2016-02-25 21:52:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-devtools (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-devtools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-devtools"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-devtools/yast2-devtools.changes    
2015-08-07 00:19:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-devtools.new/yast2-devtools.changes       
2016-02-25 21:52:07.000000000 +0100
@@ -1,0 +2,14 @@
+Wed Feb 24 09:33:57 UTC 2016 - lsle...@suse.cz
+
+- YaST RPM macros - fix for the previous change: some packages
+  use configure.ac.in instead of the old configure.in.in (bsc#968002)
+- 3.1.40
+
+-------------------------------------------------------------------
+Tue Feb  9 15:31:34 UTC 2016 - lsle...@suse.cz
+
+- YaST RPM macros - add support for Rake based packages, optionally
+  run additional tests (used at Jenkins CI builds)
+- 3.1.39
+
+-------------------------------------------------------------------

Old:
----
  yast2-devtools-3.1.38.tar.bz2

New:
----
  yast2-devtools-3.1.40.tar.bz2

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

Other differences:
------------------
++++++ yast2-devtools.spec ++++++
--- /var/tmp/diff_new_pack.bCPsXx/_old  2016-02-25 21:52:09.000000000 +0100
+++ /var/tmp/diff_new_pack.bCPsXx/_new  2016-02-25 21:52:09.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-devtools
 #
-# 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:           yast2-devtools
-Version:        3.1.38
+Version:        3.1.40
 Release:        0
 Url:            http://github.com/yast/yast-devtools
 

++++++ yast2-devtools-3.1.38.tar.bz2 -> yast2-devtools-3.1.40.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-devtools-3.1.38/build-tools/rpm/macros.yast 
new/yast2-devtools-3.1.40/build-tools/rpm/macros.yast
--- old/yast2-devtools-3.1.38/build-tools/rpm/macros.yast       2015-08-05 
17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/build-tools/rpm/macros.yast       2016-02-24 
11:33:07.000000000 +0100
@@ -67,13 +67,35 @@
         %{__make} %{?jobs:-j%jobs}%{?!jobs:%{?_smp_mflags:%_smp_mflags}} \
     %endif # "x%%{?make_build}" != "x"
 
+# Run the tests, when "--with=yast_run_ci_tests" osc option is set some
+# additional tests are executed (rubocop, spell check...).
 %yast_check \
-    if [ ! -f "%{yast_ydatadir}/devtools/NO_MAKE_CHECK" ]; then \
+    %if %{with yast_run_ci_tests} \
+    if [ -f "configure.in.in" -o -f "configure.ac.in" ]; then \
+        # TODO: fix the check:ci task to also work with autotools based 
modules \
         %{__make} check \\\
             VERBOSE=1 \\\
             Y2DIR="%{buildroot}/%{yast_dir}" \\\
             DESTDIR="%{buildroot}" \
-    fi
+    elif [ -f "Rakefile" ]; then \
+        # TODO: coveralls support \
+        LC_ALL=en_US.UTF-8 rake --verbose --trace check:ci \
+    fi \
+    %else \
+    if [ ! -f "%{yast_ydatadir}/devtools/NO_MAKE_CHECK" ]; then \
+        if [ -f "configure.in.in" -o -f "configure.ac.in" ]; then \
+            %{__make} check \\\
+                VERBOSE=1 \\\
+                Y2DIR="%{buildroot}/%{yast_dir}" \\\
+                DESTDIR="%{buildroot}" \
+        elif [ -f "Rakefile" ]; then \
+            rake test:unit \
+        else \
+            echo "Cannot run tests, no configure.{ac|in}.in or Rakefile found" 
1>&2 \
+            exit 1 \
+        fi \
+    fi \
+    %endif
 
 %yast_desktop_files \
     \
@@ -92,11 +114,17 @@
 
 # install the yast module using autotools/make
 %yast_install \
-    %make_install \
-    \
-    # on SUSE run %%yast_check within %%install \
-    # other distris may choose to run them during %%check \
-    %if 0%{?suse_version} || 0%{?yast_check_during_install} \
-        %yast_check \
-    %endif # 0%%{?suse_version} || 0%%{?yast_check_during_install} \
-    %yast_desktop_files
+    if [ -f "configure.in.in" -o -f "configure.ac.in" ]; then \
+      %make_install \
+      # on SUSE run %%yast_check within %%install \
+      # other distris may choose to run them during %%check \
+      %if 0%{?suse_version} || 0%{?yast_check_during_install} \
+          %yast_check \
+      %endif # 0%%{?suse_version} || 0%%{?yast_check_during_install} \
+    elif [ -f "Rakefile" ]; then \
+      rake install DESTDIR="%{buildroot}" \
+    else \
+        echo "Cannot install the package, no configure.{ac|in}.in or Rakefile 
found" 1>&2 \
+        exit 1 \
+    fi \
+    %yast_desktop_files \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-devtools-3.1.38/jenkins-tools/fetch-jobs.rb 
new/yast2-devtools-3.1.40/jenkins-tools/fetch-jobs.rb
--- old/yast2-devtools-3.1.38/jenkins-tools/fetch-jobs.rb       1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-devtools-3.1.40/jenkins-tools/fetch-jobs.rb       2016-02-24 
11:33:07.000000000 +0100
@@ -0,0 +1,67 @@
+#!/usr/bin/env ruby
+#
+# This script get jobs configurations. It relies on jenkins_api_client gem
+# instead of Jenkins Java CLI, so it's quiet fast.
+#
+#   ruby fetch-jobs.rb --config ci-jenkins.yml --prefix yast- --output configs
+#
+# You can get more information using the --help option:
+#
+#   ruby fetch-jobs.rb --help
+begin
+  require "jenkins_api_client"
+rescue LoadError
+  STDERR.puts "You need to install rubygem-jenkins_api_client package"
+  exit 1
+end
+require "yaml"
+require "pathname"
+require "optparse"
+require "fileutils"
+
+module GetJobs
+  class Application
+    def initialize(argv)
+      opts = parse_options(argv)
+      @client = JenkinsApi::Client.new(YAML.load_file(opts[:config]))
+      @prefix = opts[:prefix]
+      @output = Pathname(opts[:output])
+    end
+
+    def run
+      FileUtils.mkdir_p(@output) unless Dir.exist?(@output)
+      @client.job.list(@prefix).each do |name|
+        job_config = @client.job.get_config(name)
+        File.open(@output.join("#{name}.xml").to_s, "w+") do |f|
+          f.puts job_config
+        end
+      end
+    end
+
+    private
+
+    def parse_options(argv)
+      opts = { config: "jenkins.yml", prefix: "yast-", output: "jobs" }
+      parser = OptionParser.new
+      parser.banner = "Usage: fetch-jobs.rb [options]"
+      parser.separator ""
+      parser.on("-c", "--config CONFIG", "Jenkins configuration file") do 
|config|
+        opts[:config] = config
+      end
+      parser.on("-p", "--prefix PREFIX", "Jobs prefix") do |prefix|
+        opts[:prefix] = prefix
+      end
+      parser.on("-d", "--output DIRECTORY", "Output directory") do |output|
+        opts[:output] = output
+      end
+      parser.on_tail("-h", "--help", "Display help") do
+        puts parser
+        exit
+      end
+      parser.parse!(argv)
+      opts
+    end
+  end
+end
+
+GetJobs::Application.new(ARGV).run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-devtools-3.1.38/jenkins-tools/jenkins.yml.template 
new/yast2-devtools-3.1.40/jenkins-tools/jenkins.yml.template
--- old/yast2-devtools-3.1.38/jenkins-tools/jenkins.yml.template        
2015-08-05 17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/jenkins-tools/jenkins.yml.template        
2016-02-24 11:33:07.000000000 +0100
@@ -1,2 +1,4 @@
-user: <jenkins_username>
-pwd: <jenkins_password>
+---
+server_ip: <server>
+username: <username>
+password: <password>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-create.rb 
new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-create.rb
--- old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-create.rb      
2015-08-05 17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-create.rb      
2016-02-24 11:33:07.000000000 +0100
@@ -8,8 +8,8 @@
 # modify JOB_NAME_PATTERN before use to specify pattern of job to delete
 
 conf = YAML.load(File.read("jenkins.yml"))
-USER = conf["user"]
-PWD  = conf["pwd"]
+USER = conf["username"]
+PWD  = conf["password"]
 URL_BASE = "https://#{USER}:#{PWD}@ci.opensuse.org";
 #URL_BASE = "http://river.suse.de";
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-delete.rb 
new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-delete.rb
--- old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-delete.rb      
2015-08-05 17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-delete.rb      
2016-02-24 11:33:07.000000000 +0100
@@ -6,8 +6,8 @@
 require "yaml"
 
 conf = YAML.load(File.read("jenkins.yml"))
-USER = conf["user"]
-PWD  = conf["pwd"]
+USER = conf["username"]
+PWD  = conf["password"]
 URL_BASE = "https://#{USER}:#{PWD}@ci.opensuse.org";
 #URL_BASE = "http://river.suse.de";
 # %s is replaced by arguments passed to program
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-modify.rb 
new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-modify.rb
--- old/yast2-devtools-3.1.38/jenkins-tools/yast-jenkins-modify.rb      
2015-08-05 17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/jenkins-tools/yast-jenkins-modify.rb      
2016-02-24 11:33:07.000000000 +0100
@@ -8,8 +8,8 @@
 # modify JOB_NAME_PATTERN before use to specify pattern of job to delete
 
 conf = YAML.load(File.read("jenkins.yml"))
-USER = conf["user"]
-PWD  = conf["pwd"]
+USER = conf["username"]
+PWD  = conf["password"]
 
 # %s is replaced by arguments passed to program
 JOB_NAME_PATTERN = "yast-%s-master"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-devtools-3.1.38/package/yast2-devtools.changes 
new/yast2-devtools-3.1.40/package/yast2-devtools.changes
--- old/yast2-devtools-3.1.38/package/yast2-devtools.changes    2015-08-05 
17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/package/yast2-devtools.changes    2016-02-24 
11:33:07.000000000 +0100
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Wed Feb 24 09:33:57 UTC 2016 - lsle...@suse.cz
+
+- YaST RPM macros - fix for the previous change: some packages
+  use configure.ac.in instead of the old configure.in.in (bsc#968002)
+- 3.1.40
+
+-------------------------------------------------------------------
+Tue Feb  9 15:31:34 UTC 2016 - lsle...@suse.cz
+
+- YaST RPM macros - add support for Rake based packages, optionally
+  run additional tests (used at Jenkins CI builds)
+- 3.1.39
+
+-------------------------------------------------------------------
 Wed Aug  5 16:57:29 CEST 2015 - shundham...@suse.de
 
 - reasonable defaults for method and class lengths in rubocop.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-devtools-3.1.38/package/yast2-devtools.spec 
new/yast2-devtools-3.1.40/package/yast2-devtools.spec
--- old/yast2-devtools-3.1.38/package/yast2-devtools.spec       2015-08-05 
17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/package/yast2-devtools.spec       2016-02-24 
11:33:07.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-devtools
-Version:        3.1.38
+Version:        3.1.40
 Release:        0
 Url:            http://github.com/yast/yast-devtools
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-devtools-3.1.38/ytools/yast2/create_maintenance_branch 
new/yast2-devtools-3.1.40/ytools/yast2/create_maintenance_branch
--- old/yast2-devtools-3.1.38/ytools/yast2/create_maintenance_branch    
2015-08-05 17:28:08.000000000 +0200
+++ new/yast2-devtools-3.1.40/ytools/yast2/create_maintenance_branch    
2016-02-24 11:33:07.000000000 +0100
@@ -1,30 +1,31 @@
 #!/usr/bin/env ruby
 
-# optional argument for source commit, if not specified use master
-# create_maintenance.rb # creates branch for master
-# create_maintenance.rb abcdef # creates branch from commit abcdef
-
-# - Create maintenance branch BRANCH_NAME
+# - Create maintenance branch
 # - Edit Rakefile to build and submit to corresponding projects
 # - Commit and push
 
-# constants for tuning script to create desired branch
-BRANCH_NAME="openSUSE-13_2"
-USE_IBS=false
-DEVEL_PROJECT="YaST:openSUSE:13.2"
-TARGET_PROJECT="openSUSE:13.2:Update"
-BUILD_TARGET="openSUSE_13.2"
-
-# start of non-configuration part
-CONF_OPTIONS = {
-  "obs_project"    => DEVEL_PROJECT,
-  "obs_sr_project" => TARGET_PROJECT,
-  "obs_target"     => BUILD_TARGET,
-  "obs_api"        => USE_IBS ? "https://api.suse.de/"; : 
"https://api.opensuse.org";
-}
-
 require "cheetah"
 
+if ARGV.size < 2
+  STDERR.puts <<EOS
+Bad arguments
+
+First argument: name of the branch
+Second argument: name of the target as recognized by yast-rake, see
+                 https://github.com/yast/yast-rake/blob/master/data/targets.yml
+Third argument (optional): source commit, if not specified use master
+
+Examples:
+#{File.basename($0)} SLE-12-SP1 sle12sp1 # creates branch for master
+#{File.basename($0)} SLE-12-SP1 sle12sp1 abcdef # creates branch from commit 
abcdef
+EOS
+  exit(1)
+end
+
+BRANCH_NAME = ARGV[0]
+TARGET = ARGV[1].delete(":")
+SOURCE_COMMIT = ARGV[2] || "origin/master"
+
 # by default pass output of commands to stdout and stderr
 Cheetah.default_options = { :stdout => STDOUT, :stderr => STDERR }
 
@@ -45,25 +46,14 @@
   raise "Cannot find Rakefile in pwd" unless File.exist?("Rakefile")
 
   lines = File.readlines("Rakefile")
-  conf_line = lines.grep(/Yast::Tasks.configuration do/).first
-  if conf_line
-    conf_var = conf_line[/do \|\s*(\S+)\s*\|/, 1]
-    line_index = lines.index(conf_line)
-  else
-    line_index = 2
-    conf_var = "conf"
-    conf_line = "Yast::Tasks.configuration do |#{conf_var}|\n"
-    lines.insert(line_index, conf_line, "end\n")
-  end
+  submit_to = "Yast::Tasks.submit_to"
 
-  CONF_OPTIONS.each do |key, value|
-    config_line = lines.grep(/#{conf_var}\.#{key}\s*=/).first
-    new_line = "  #{conf_var}.#{key} = #{value.inspect}\n"
-    if config_line
-      lines[lines.index(config_line)] = new_line
-    else
-      lines.insert(line_index + 1, new_line)
-    end
+  new_line = "#{submit_to} :#{TARGET}\n"
+  line_index = lines.index {|l| l =~ /#{submit_to}/ }
+  if line_index
+    lines[line_index] = new_line
+  else
+    lines.insert(2, new_line, "\n")
   end
 
   File.write("Rakefile", lines.join(""))
@@ -76,15 +66,12 @@
   exit 0
 end
 
-# allow to branch from non master
-source_commit = ARGV.empty? ? "origin/master" : ARGV.first
-
 #switch to master branch
 Cheetah.run "git", "checkout", "master"
 
 #create new branch ( ensure we use the latest non modified pushed version )
 Cheetah.run "git", "fetch", "origin"
-Cheetah.run "git", "branch", BRANCH_NAME, source_commit
+Cheetah.run "git", "branch", BRANCH_NAME, SOURCE_COMMIT
 Cheetah.run "git", "checkout", BRANCH_NAME
 
 modify_rakefile


Reply via email to