Hello community,

here is the log from the commit of package dice for openSUSE:Factory checked in 
at 2015-03-30 19:32:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dice (Old)
 and      /work/SRC/openSUSE:Factory/.dice.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dice"

Changes:
--------
--- /work/SRC/openSUSE:Factory/dice/dice.changes        2015-03-18 
13:04:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dice.new/dice.changes   2015-03-30 
19:32:59.000000000 +0200
@@ -1,0 +2,89 @@
+Fri Mar 20 16:35:51 CET 2015 - m...@suse.de
+
+- Prevent halt() from being called multiple times
+  
+  In case of an exception the global exception handler will
+  call the cleanup correctly. Thus there is no need to actively
+  halt the buildsystem if the next call is a raise
+  
+-------------------------------------------------------------------
+Fri Mar 20 16:07:28 CET 2015 - m...@suse.de
+  
+- Support dice build option --kiwiprofile
+  
+  If specified the option will hand over the value to the
+  contained kiwi call as --add-profile option. This fixes #6
+  
+-------------------------------------------------------------------
+Wed Mar 18 16:38:27 CET 2015 - m...@suse.de
+  
+- Update suse-13.1-JeOS recipe
+  
+  deprecated vagrant option -privileged, replaced by --privileged
+  
+-------------------------------------------------------------------
+Tue Mar 10 17:53:30 CET 2015 - m...@suse.de
+  
+- Delete invalid dot graph
+  
+-------------------------------------------------------------------
+Tue Mar 10 10:01:57 CET 2015 - m...@suse.de
+  
+- More robust inheritance for connection classes
+  
+  Connection sub classes should not require to call super
+  in order to run the constructor from the base class. It's
+  more robust to let the base class constructor call a post
+  initialize method which can be specialized in the sub class
+  when required
+  
+-------------------------------------------------------------------
+Tue Mar 10 09:57:44 CET 2015 - m...@suse.de
+  
+- More robust inheritance for buildsystem classes
+  
+  BuildSystem sub classes should not require to call super
+  in order to run the constructor from the base class. It's
+  more robust to let the base class constructor call a post
+  initialize method which can be specialized in the sub class
+  when required
+  
+-------------------------------------------------------------------
+Tue Mar 10 09:35:05 CET 2015 - m...@suse.de
+  
+- More robust inheritance for repository classes
+  
+  Repository sub classes should not require to call super
+  in order to run the constructor from the base class. It's
+  more robust to let the base class constructor call a post
+  initialize method which can be specialized in the sub class
+  when required
+  
+-------------------------------------------------------------------
+Mon Mar  9 17:25:16 CET 2015 - m...@suse.de
+  
+- Update project url
+  
+-------------------------------------------------------------------
+Fri Mar  6 21:08:56 CET 2015 - m...@suse.de
+  
+- Cleanup use of default values
+  
+  Use a symbol as default buildhost indicator to avoid conflicts
+  with buildhost names. In addition make sure that all constant
+  values are stored at the same place
+  
+-------------------------------------------------------------------
+Fri Mar  6 20:59:42 CET 2015 - m...@suse.de
+  
+- Update README due to ssh key handling changes
+  
+-------------------------------------------------------------------
+Fri Mar  6 17:00:01 CET 2015 - m...@suse.de
+  
+- config.ssh_private_key not used for vagrant builds
+  
+  Now that dice looks up the vagrant generated key there is
+  no need for the Dicefile to specify the ssh pkey path
+  
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ dice-0.5.3.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/build_system_base.rb new/lib/build_system_base.rb
--- old/lib/build_system_base.rb        2015-03-06 16:54:28.000000000 +0100
+++ new/lib/build_system_base.rb        2015-03-20 16:38:28.000000000 +0100
@@ -15,6 +15,11 @@
     recipe.change_working_dir
     @lock = get_lockfile
     @set_lock_called = false
+    post_initialize
+  end
+
+  def post_initialize
+    nil
   end
 
   def is_building?
@@ -55,7 +60,9 @@
       build_options = File.open(build_options_file, "rb")
       options = Marshal.load(build_options)
       build_options.close
-      Dice.option.kiwitype = options.kiwitype if !Dice.option.kiwitype
+      options.marshal_dump.each do |key, value|
+        Dice.option[key] = value
+      end
     rescue
       # ignore if no buildoptions exists
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cli.rb new/lib/cli.rb
--- old/lib/cli.rb      2015-03-06 16:54:28.000000000 +0100
+++ new/lib/cli.rb      2015-03-20 16:38:28.000000000 +0100
@@ -29,7 +29,7 @@
     else
       Dice.logger.error("dice unexpected error: #{e.message}")
       Dice.logger.error(
-        "Please file a bug report at https://github.com/schaefi/dice";
+        "Please file a bug report at https://github.com/SUSE/dice";
       )
       Dice.logger.error("backtrace")
       Dice.logger.error(e.backtrace.join("\n"))
@@ -87,6 +87,8 @@
       :desc => "Force building even if status is up to data"
     c.flag ["kiwitype", :t], :kiwitype => String, :required => false,
       :desc => "Set kiwi build type"
+    c.flag ["kiwiprofile", :p], :kiwiprofile => String, :required => false,
+      :desc => "Set kiwi build profile"
     c.action do |global_options,options,args|
       Dice.setup_options(options)
       description = shift_arg(args, "RECIPE-PATH")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/config.rb new/lib/config.rb
--- old/lib/config.rb   2015-03-06 16:54:28.000000000 +0100
+++ new/lib/config.rb   2015-03-20 16:38:28.000000000 +0100
@@ -4,12 +4,13 @@
   attr_accessor :ssh_user
 
   def initialize
-    # default host is localhost which triggers the use of vagrant
+    # default buildhost is a vagrant identification symbol
+    # which triggers the use of vagrant
     @buildhost = Dice::VAGRANT_BUILD
     # default ssh private key is the vagrant key
-    @ssh_private_key = File.join(Dice::ROOT, "key/vagrant")
+    @ssh_private_key = Dice::SSH_PRIVATE_KEY_PATH
     # default ssh user is vagrant
-    @ssh_user = "vagrant"
+    @ssh_user = Dice::SSH_USER
   end
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/connection_base.rb new/lib/connection_base.rb
--- old/lib/connection_base.rb  2015-03-06 16:54:28.000000000 +0100
+++ new/lib/connection_base.rb  2015-03-20 16:38:28.000000000 +0100
@@ -1,11 +1,17 @@
 class ConnectionBase
-  attr_reader :build_log
+  attr_reader :build_log, :recipe
 
   abstract_method :ssh
 
   def initialize(recipe)
-    recipe.change_working_dir
+    @recipe = recipe
     @build_log = recipe.basepath + "/" + Dice::META + "/" + Dice::BUILD_LOG
+    recipe.change_working_dir
+    post_initialize
+  end
+
+  def post_initialize
+    nil
   end
 
   def get_log
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/connection_host_build_system.rb 
new/lib/connection_host_build_system.rb
--- old/lib/connection_host_build_system.rb     2015-03-06 16:54:28.000000000 
+0100
+++ new/lib/connection_host_build_system.rb     2015-03-20 16:38:28.000000000 
+0100
@@ -1,11 +1,4 @@
 class ConnectionHostBuildSystem < ConnectionBase
-  attr_reader :recipe
-
-  def initialize(recipe)
-    super(recipe)
-    @recipe = recipe
-  end
-
   def ssh
     ssh_pkey = Dice.config.ssh_private_key
     ssh_user = Dice.config.ssh_user
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/connection_vagrant_build_system.rb 
new/lib/connection_vagrant_build_system.rb
--- old/lib/connection_vagrant_build_system.rb  2015-03-06 16:54:28.000000000 
+0100
+++ new/lib/connection_vagrant_build_system.rb  2015-03-20 16:38:28.000000000 
+0100
@@ -1,11 +1,4 @@
 class ConnectionVagrantBuildSystem < ConnectionBase
-  attr_reader :recipe
-
-  def initialize(recipe)
-    super(recipe)
-    @recipe = recipe
-  end
-
   def ssh
     Dice.logger.info(
       "#{self.class}: ssh into worker for #{recipe.basepath}..."
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/constants.rb new/lib/constants.rb
--- old/lib/constants.rb        2015-03-06 16:54:28.000000000 +0100
+++ new/lib/constants.rb        2015-03-20 16:38:28.000000000 +0100
@@ -1,6 +1,8 @@
 module Dice
   ROOT = File.expand_path("..", File.dirname(__FILE__))
-  VAGRANT_BUILD = "__VAGRANT__"
+  VAGRANT_BUILD = :VAGRANT
+  SSH_USER = "vagrant"
+  SSH_PRIVATE_KEY_PATH = File.join(ROOT, "key/vagrant")
 
   META = ".dice"
   LOCK = "lock"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dice_options.rb new/lib/dice_options.rb
--- old/lib/dice_options.rb     2015-03-06 16:54:28.000000000 +0100
+++ new/lib/dice_options.rb     2015-03-20 16:38:28.000000000 +0100
@@ -2,7 +2,7 @@
   @@options = nil
 
   def self.setup_options(options)
-    @@options = OpenStruct.new(options) unless @@options
+    @@options ||= OpenStruct.new(options)
   end
 
   def self.option
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/host_build_system.rb new/lib/host_build_system.rb
--- old/lib/host_build_system.rb        2015-03-06 16:54:28.000000000 +0100
+++ new/lib/host_build_system.rb        2015-03-20 16:38:28.000000000 +0100
@@ -1,12 +1,9 @@
 class HostBuildSystem < BuildSystemBase
-  attr_reader :recipe, :host, :user, :basepath
+  attr_reader :host, :user
 
-  def initialize(recipe)
-    super(recipe)
-    @recipe = recipe
+  def post_initialize
     @host = Dice.config.buildhost
     @user = Dice.config.ssh_user
-    @basepath = @recipe.basepath
   end
 
   def get_lockfile
@@ -19,7 +16,7 @@
 
   def up
     Dice.logger.info(
-      "#{self.class}: Using buildsystem #{host} for #{basepath}..."
+      "#{self.class}: Using buildsystem #{host} for #{recipe.basepath}..."
     )
     if is_busy?
       raise Dice::Errors::BuildWorkerBusy.new(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/job.rb new/lib/job.rb
--- old/lib/job.rb      2015-03-06 16:54:28.000000000 +0100
+++ new/lib/job.rb      2015-03-20 16:38:28.000000000 +0100
@@ -20,6 +20,9 @@
     if Dice.option.kiwitype
       build_opts += " --type #{Dice.option.kiwitype}"
     end
+    if Dice.option.kiwiprofile
+      build_opts += " --add-profile #{Dice.option.kiwiprofile}"
+    end
     logfile = File.open(build_log, "w")
     begin
       Command.run(
@@ -32,7 +35,6 @@
     rescue Cheetah::ExecutionFailed => e
       Dice.logger.info("#{self.class}: Build failed")
       logfile.close
-      buildsystem.halt
       raise Dice::Errors::BuildFailed.new(
         "Build failed for details check: #{build_log}"
       )
@@ -56,7 +58,6 @@
     rescue Cheetah::ExecutionFailed => e
       Dice.logger.info("#{self.class}: Bundler failed")
       logfile.close
-      buildsystem.halt
       raise Dice::Errors::BuildFailed.new(
         "Bundle result failed for details check: #{build_log}"
       )
@@ -77,7 +78,6 @@
     rescue Cheetah::ExecutionFailed => e
       Dice.logger.info("#{self.class}: Archiving failed")
       result.close
-      buildsystem.halt
       raise Dice::Errors::ResultRetrievalFailed.new(
         "Archiving result failed with: #{e.stderr}"
       )
@@ -98,7 +98,6 @@
       )
     rescue Cheetah::ExecutionFailed => e
       Dice.logger.info("#{self.class}: Preparation failed")
-      buildsystem.halt
       raise Dice::Errors::PrepareBuildFailed.new(
         "Preparing build environment failed with: #{e.stderr}"
       )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/recipe.rb new/lib/recipe.rb
--- old/lib/recipe.rb   2015-03-06 16:54:28.000000000 +0100
+++ new/lib/recipe.rb   2015-03-20 16:38:28.000000000 +0100
@@ -32,6 +32,7 @@
   end
 
   def reset_working_dir
+    Dice.logger.info("Reset working directory")
     Dir.chdir(cwd)
   end
 
@@ -72,6 +73,9 @@
     if Dice.option.kiwitype
       options.kiwitype = Dice.option.kiwitype
     end
+    if Dice.option.kiwiprofile
+      options.kiwiprofile = Dice.option.kiwiprofile
+    end
     build_options = File.open(build_options_file, "wb")
     Marshal.dump(options, build_options)
     build_options.close
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repository_base.rb new/lib/repository_base.rb
--- old/lib/repository_base.rb  2015-03-06 16:54:28.000000000 +0100
+++ new/lib/repository_base.rb  2015-03-20 16:38:28.000000000 +0100
@@ -1,10 +1,16 @@
 class RepositoryBase
-  attr_reader :uri, :tmp_dir
+  attr_reader :uri, :tmp_dir, :meta
 
   @@kiwi_solv = "/var/tmp/kiwi/satsolver"
 
   def initialize(uri)
     @uri = uri
+    @meta = solv_meta
+    post_initialize
+  end
+
+  def post_initialize
+    nil
   end
 
   def load_file(source)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repository_plaindir.rb 
new/lib/repository_plaindir.rb
--- old/lib/repository_plaindir.rb      2015-03-06 16:54:28.000000000 +0100
+++ new/lib/repository_plaindir.rb      2015-03-20 16:38:28.000000000 +0100
@@ -1,11 +1,4 @@
 class PlainDirRepository < RepositoryBase
-  attr_reader :meta
-
-  def initialize(uri)
-    super(uri)
-    @meta = solv_meta
-  end
-
   def solvable
     solv_file = @@kiwi_solv + "/" + meta.solv
     tmp_dir = create_tmpdir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repository_rpmmd.rb new/lib/repository_rpmmd.rb
--- old/lib/repository_rpmmd.rb 2015-03-06 16:54:28.000000000 +0100
+++ new/lib/repository_rpmmd.rb 2015-03-20 16:38:28.000000000 +0100
@@ -1,9 +1,7 @@
 class RpmMdRepository < RepositoryBase
-  attr_reader :meta, :rxml
+  attr_reader :rxml
 
-  def initialize(uri)
-    super(uri)
-    @meta = solv_meta
+  def post_initialize
     @rxml = get_repoxml
   end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repository_suse.rb new/lib/repository_suse.rb
--- old/lib/repository_suse.rb  2015-03-06 16:54:28.000000000 +0100
+++ new/lib/repository_suse.rb  2015-03-20 16:38:28.000000000 +0100
@@ -1,11 +1,4 @@
 class SuSERepository < RepositoryBase
-  attr_reader :meta
-
-  def initialize(uri)
-    super(uri)
-    @meta = solv_meta
-  end
-
   def solvable
     solv_file = @@kiwi_solv + "/" + meta.solv
     if uptodate?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/vagrant_build_system.rb 
new/lib/vagrant_build_system.rb
--- old/lib/vagrant_build_system.rb     2015-03-06 16:54:28.000000000 +0100
+++ new/lib/vagrant_build_system.rb     2015-03-20 16:38:28.000000000 +0100
@@ -1,9 +1,8 @@
 class VagrantBuildSystem < BuildSystemBase
-  attr_reader :recipe, :ssh_output
+  attr_reader :ssh_output
 
-  def initialize(recipe)
-    super(recipe)
-    @recipe = recipe
+  def post_initialize
+    @ssh_output = nil
   end
 
   def get_lockfile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-03-06 16:54:28.000000000 +0100
+++ new/metadata        2015-03-20 16:38:28.000000000 +0100
@@ -8,7 +8,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-03-06 00:00:00.000000000 Z
+date: 2015-03-20 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: cheetah
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recipes/suse-13.1-JeOS/Dicefile 
new/recipes/suse-13.1-JeOS/Dicefile
--- old/recipes/suse-13.1-JeOS/Dicefile 2015-03-06 16:54:28.000000000 +0100
+++ new/recipes/suse-13.1-JeOS/Dicefile 2015-03-20 16:38:28.000000000 +0100
@@ -1,4 +1,3 @@
 Dice.configure do |config|
   config.ssh_user = "vagrant"
-  config.ssh_private_key = File.join(ENV["HOME"], ".dice/key/vagrant")
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recipes/suse-13.1-JeOS/Vagrantfile 
new/recipes/suse-13.1-JeOS/Vagrantfile
--- old/recipes/suse-13.1-JeOS/Vagrantfile      2015-03-06 16:54:28.000000000 
+0100
+++ new/recipes/suse-13.1-JeOS/Vagrantfile      2015-03-20 16:38:28.000000000 
+0100
@@ -16,7 +16,7 @@
       # Virtualization:Appliances:Images/docker-box-13.1
       # cat kiwi-docker-image.tar.xz | docker import - kiwi-build-box:new
       d.image = "kiwi-build-box:new"
-      d.create_args = ["-privileged=true", "-i", "-t"]
+      d.create_args = ["--privileged=true", "-i", "-t"]
       # start the sshd in foreground to keep the container in running state
       d.cmd = ["/usr/sbin/sshd", "-D"]
       d.has_ssh = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recipes/suse-SLE12-JeOS/Dicefile 
new/recipes/suse-SLE12-JeOS/Dicefile
--- old/recipes/suse-SLE12-JeOS/Dicefile        2015-03-06 16:54:28.000000000 
+0100
+++ new/recipes/suse-SLE12-JeOS/Dicefile        2015-03-20 16:38:28.000000000 
+0100
@@ -1,4 +1,3 @@
 Dice.configure do |config|
   config.ssh_user = "vagrant"
-  config.ssh_private_key = File.join(ENV["HOME"], ".dice/key/vagrant")
 end


Reply via email to