Hello community,

here is the log from the commit of package dice for openSUSE:Factory checked in 
at 2015-11-26 17:03:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-11-08 
11:27:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dice.new/dice.changes   2015-11-26 
17:03:52.000000000 +0100
@@ -1,0 +2,45 @@
+Mon Nov 16 12:04:54 CET 2015 - [email protected]
+
+- Fixed docker result retrieval
+  
+  Don't pass and store big data via stdout channel through a docker
+  command. I received unstable results and broken pipes. Better store
+  the data as a file on a shared host/container volume
+  
+-------------------------------------------------------------------
+Thu Nov 12 12:28:20 CET 2015 - [email protected]
+  
+- release version bump
+  
+-------------------------------------------------------------------
+Thu Nov 12 12:27:50 CET 2015 - [email protected]
+  
+- Fixed 404 header check
+  
+  Don't fail on garbage (compressed) junks of data
+  
+-------------------------------------------------------------------
+Thu Nov 12 12:02:58 CET 2015 - [email protected]
+  
+- release version bump
+  
+-------------------------------------------------------------------
+Thu Nov 12 12:00:36 CET 2015 - [email protected]
+  
+- Pass KIWI_IGNORE_OLD_MOUNTS for dice build
+  
+-------------------------------------------------------------------
+Thu Nov 12 11:15:23 CET 2015 - [email protected]
+  
+- Update spec template
+  
+  curl is a required component
+  
+-------------------------------------------------------------------
+Thu Nov 12 11:05:46 CET 2015 - [email protected]
+  
+- Rename uri to repo_uri
+  
+  This caused a name conflict on the openuri side of ruby
+  
+-------------------------------------------------------------------

Old:
----
  dice-0.7.4.gem

New:
----
  dice-0.7.7.gem

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

Other differences:
------------------
++++++ dice.spec ++++++
--- /var/tmp/diff_new_pack.E16guv/_old  2015-11-26 17:03:53.000000000 +0100
+++ /var/tmp/diff_new_pack.E16guv/_new  2015-11-26 17:03:53.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           dice
-Version:        0.7.4
+Version:        0.7.7
 Release:        0
 %define mod_name dice
 %define mod_full_name %{mod_name}-%{version}
@@ -40,6 +40,7 @@
 
 # Disable autogenerating "Requires:" headers for bundled gems.
 %define __requires_exclude ^rubygem
+Requires:       curl
 Requires:       ruby >= 2.0
 Requires:       ruby-solv
 Url:            http://www.suse.com

++++++ dice-0.7.4.gem -> dice-0.7.7.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-10-30 10:53:12.000000000 +0100
+++ new/lib/build_system_base.rb        2015-11-16 15:09:34.000000000 +0100
@@ -51,6 +51,23 @@
     @job ||= Job.new(self)
   end
 
+  def archive_job_result(job_result_dir, archive_filename)
+    result_command = "tar -C #{job_result_dir} -c ."
+    result = File.open(archive_filename, "w")
+    begin
+      Command.run(
+        job_builder_command(result_command),
+        :stdout => result
+      )
+    rescue Cheetah::ExecutionFailed => e
+      result.close
+      raise Dice::Errors::ResultRetrievalFailed.new(
+        "Archiving result failed with: #{e.stderr}"
+      )
+    end
+    result.close
+  end
+
   def job_builder_command(action)
     command = [
       "ssh",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/dice.rb new/lib/dice.rb
--- old/lib/dice.rb     2015-10-30 10:53:12.000000000 +0100
+++ new/lib/dice.rb     2015-11-16 15:09:34.000000000 +0100
@@ -15,7 +15,7 @@
 require "inifile"
 require "time"
 
-require_relative "uri"
+require_relative "repo_uri"
 require_relative "cleaner"
 require_relative "semaphore/semaphore"
 require_relative "dice_options"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/docker_build_system.rb 
new/lib/docker_build_system.rb
--- old/lib/docker_build_system.rb      2015-10-30 10:53:12.000000000 +0100
+++ new/lib/docker_build_system.rb      2015-11-16 15:09:34.000000000 +0100
@@ -54,6 +54,20 @@
     recipe.reset_working_dir
   end
 
+  def archive_job_result(job_result_dir, archive_filename)
+    archive = File.basename(archive_filename)
+    result_command = "tar -C #{job_result_dir} -cf /vagrant/.dice/#{archive} ."
+    begin
+      Command.run(
+        job_builder_command(result_command)
+      )
+    rescue Cheetah::ExecutionFailed => e
+      raise Dice::Errors::ResultRetrievalFailed.new(
+        "Archiving result failed with: #{e.stderr}"
+      )
+    end
+  end
+
   def job_builder_command(action)
     container_name = recipe.build_name_from_path
     command = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/job.rb new/lib/job.rb
--- old/lib/job.rb      2015-10-30 10:53:12.000000000 +0100
+++ new/lib/job.rb      2015-11-16 15:09:34.000000000 +0100
@@ -23,7 +23,8 @@
     end
     logfile = File.open(build_log, "w")
     logfile.sync = true
-    kiwi_command = "/usr/sbin/kiwi #{build_opts}"
+    kiwi_environment = "export KIWI_IGNORE_OLD_MOUNTS=1"
+    kiwi_command = "bash -c '#{kiwi_environment}; /usr/sbin/kiwi 
#{build_opts}'"
     begin
       Command.run(
         buildsystem.job_builder_command(kiwi_command),
@@ -67,23 +68,16 @@
 
   def get_result
     Dice.logger.info("#{self.class}: Retrieving results in #{archive}...")
-    result = File.open(archive, "w")
-    result_command = "tar --exclude image-root -C /tmp/#{bundle_name} -c ."
     begin
-      Command.run(
-        buildsystem.job_builder_command(result_command),
-        :stdout => result
-      )
-    rescue Cheetah::ExecutionFailed => e
+      buildsystem.archive_job_result("/tmp/" + bundle_name, archive)
+    rescue => e
       Dice.logger.info("#{self.class}: Archiving failed")
-      result.close
       cleanup_build
       raise Dice::Errors::ResultRetrievalFailed.new(
-        "Archiving result failed with: #{e.stderr}"
+        "Archiving result failed: #{e}"
       )
     end
     cleanup_build
-    result.close
   end
 
   private
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/kiwi_uri.rb new/lib/kiwi_uri.rb
--- old/lib/kiwi_uri.rb 2015-10-30 10:53:12.000000000 +0100
+++ new/lib/kiwi_uri.rb 2015-11-16 15:09:34.000000000 +0100
@@ -17,7 +17,7 @@
         # Simple path, should be a distribution dir
         args[:name] = "dir://#{$1}/"
       end
-      Uri.new(args)
+      RepoUri.new(args)
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/repo_uri.rb new/lib/repo_uri.rb
--- old/lib/repo_uri.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/repo_uri.rb 2015-11-16 15:09:34.000000000 +0100
@@ -0,0 +1,109 @@
+class RepoUri
+  attr_reader :name, :type, :location, :repo_type
+  attr_reader :allowed_local_types, :allowed_remote_types
+  attr_reader :mount_point
+
+  def initialize(args)
+    @name = args[:name]
+    @repo_type = args[:repo_type]
+    set_uri_type_and_location
+
+    @allowed_remote_types = OpenStruct.new
+    allowed_remote_types.http  = true
+    allowed_remote_types.https = true
+    allowed_remote_types.ftp   = true
+
+    @allowed_local_types  = OpenStruct.new
+    allowed_local_types.iso    = true
+    allowed_local_types.dir    = true
+    allowed_local_types.this   = true
+
+    type_ok?
+
+    set_absolute_location if !is_remote?
+  end
+
+  def is_remote?
+    remote_location = false
+    if allowed_remote_types[type]
+      remote_location = true
+    end
+    remote_location
+  end
+
+  def is_iso?
+    iso_file = false
+    if type == "iso"
+      iso_file = true
+    end
+    iso_file
+  end
+
+  def map_loop
+    @mount_point ||= mount_loop
+  end
+
+  def unmap_loop
+    if mount_point
+      umount_loop(mount_point)
+      @mount_point = nil
+    end
+  end
+
+  private
+
+  def set_absolute_location
+    @location = File.expand_path(@location)
+    if !File.exists?(@location)
+      raise Dice::Errors::UriNotFound.new(
+        "Repository #{location} does not exist"
+      )
+    end
+  end
+
+  def umount_loop(mount_dir)
+    begin
+      Command.run("sudo", "-n", "umount", mount_dir)
+    rescue Cheetah::ExecutionFailed => e
+      Dice.logger.error(
+        "Umounting #{mount_dir} failed: #{e.stderr}"
+      )
+    end
+    begin
+      FileUtils.rmdir(mount_dir)
+    rescue
+      # ignore if tmpdir remove failed
+    end
+  end
+
+  def mount_loop
+    mount_dir = Dir.mktmpdir
+    begin
+      Command.run("sudo", "-n", "mount", location, mount_dir)
+    rescue Cheetah::ExecutionFailed => e
+      raise Dice::Errors::MountISOFailed.new(
+        "Mounting #{location} failed: #{e.stderr}"
+      )
+    end
+    mount_dir
+  end
+
+  def set_uri_type_and_location
+    if name =~ /^(.*):\/\/(.*)/
+      @type = "#{$1}"
+      @location = "#{$2}"
+    else
+      raise Dice::Errors::UriStyleMatchFailed.new(
+        "Can't find resource type/location in #{name}"
+      )
+    end
+  end
+
+  def type_ok?
+    if !allowed_local_types[type] && !allowed_remote_types[type]
+      raise Dice::Errors::UriTypeUnknown.new(
+        "URI style #{name} unknown"
+      )
+    end
+  end
+end
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-10-30 10:53:12.000000000 +0100
+++ new/lib/repository_base.rb  2015-11-16 15:09:34.000000000 +0100
@@ -162,8 +162,14 @@
   def check_404_header(source, dest)
     outfile = File.open(dest, "rb")
     # if there is a 404 not found information it will be in the first two lines
-    header = outfile.readline
-    header+= outfile.readline
+    begin
+      header = outfile.readline
+      header+= outfile.readline
+    rescue
+      # ignore errors in read and just look on what has been read so far
+      # source input could be compressed data which could confuse the
+      # readline call, but has no negative impact on this check
+    end
     outfile.close
     if header =~ /404 Not Found/
       raise Dice::Errors::CurlFileFailed.new(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/uri.rb new/lib/uri.rb
--- old/lib/uri.rb      2015-10-30 10:53:12.000000000 +0100
+++ new/lib/uri.rb      1970-01-01 01:00:00.000000000 +0100
@@ -1,109 +0,0 @@
-class Uri
-  attr_reader :name, :type, :location, :repo_type
-  attr_reader :allowed_local_types, :allowed_remote_types
-  attr_reader :mount_point
-
-  def initialize(args)
-    @name = args[:name]
-    @repo_type = args[:repo_type]
-    set_uri_type_and_location
-
-    @allowed_remote_types = OpenStruct.new
-    allowed_remote_types.http  = true
-    allowed_remote_types.https = true
-    allowed_remote_types.ftp   = true
-
-    @allowed_local_types  = OpenStruct.new
-    allowed_local_types.iso    = true
-    allowed_local_types.dir    = true
-    allowed_local_types.this   = true
-
-    type_ok?
-
-    set_absolute_location if !is_remote?
-  end
-
-  def is_remote?
-    remote_location = false
-    if allowed_remote_types[type]
-      remote_location = true
-    end
-    remote_location
-  end
-
-  def is_iso?
-    iso_file = false
-    if type == "iso"
-      iso_file = true
-    end
-    iso_file
-  end
-
-  def map_loop
-    @mount_point ||= mount_loop
-  end
-
-  def unmap_loop
-    if mount_point
-      umount_loop(mount_point)
-      @mount_point = nil
-    end
-  end
-
-  private
-
-  def set_absolute_location
-    @location = File.expand_path(@location)
-    if !File.exists?(@location)
-      raise Dice::Errors::UriNotFound.new(
-        "Repository #{location} does not exist"
-      )
-    end
-  end
-
-  def umount_loop(mount_dir)
-    begin
-      Command.run("sudo", "-n", "umount", mount_dir)
-    rescue Cheetah::ExecutionFailed => e
-      Dice.logger.error(
-        "Umounting #{mount_dir} failed: #{e.stderr}"
-      )
-    end
-    begin
-      FileUtils.rmdir(mount_dir)
-    rescue
-      # ignore if tmpdir remove failed
-    end
-  end
-
-  def mount_loop
-    mount_dir = Dir.mktmpdir
-    begin
-      Command.run("sudo", "-n", "mount", location, mount_dir)
-    rescue Cheetah::ExecutionFailed => e
-      raise Dice::Errors::MountISOFailed.new(
-        "Mounting #{location} failed: #{e.stderr}"
-      )
-    end
-    mount_dir
-  end
-
-  def set_uri_type_and_location
-    if name =~ /^(.*):\/\/(.*)/
-      @type = "#{$1}"
-      @location = "#{$2}"
-    else
-      raise Dice::Errors::UriStyleMatchFailed.new(
-        "Can't find resource type/location in #{name}"
-      )
-    end
-  end
-
-  def type_ok?
-    if !allowed_local_types[type] && !allowed_remote_types[type]
-      raise Dice::Errors::UriTypeUnknown.new(
-        "URI style #{name} unknown"
-      )
-    end
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/version.rb new/lib/version.rb
--- old/lib/version.rb  2015-10-30 10:53:12.000000000 +0100
+++ new/lib/version.rb  2015-11-16 15:09:34.000000000 +0100
@@ -1,3 +1,3 @@
 module Dice
-  VERSION = "0.7.4"
+  VERSION = "0.7.7"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-10-30 10:53:12.000000000 +0100
+++ new/metadata        2015-11-16 15:09:34.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: dice
 version: !ruby/object:Gem::Version
-  version: 0.7.4
+  version: 0.7.7
 platform: ruby
 authors:
 - SUSE
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-10-30 00:00:00.000000000 Z
+date: 2015-11-16 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: cheetah
@@ -153,6 +153,7 @@
 - lib/kiwi_uri.rb
 - lib/logger.rb
 - lib/recipe.rb
+- lib/repo_uri.rb
 - lib/repository.rb
 - lib/repository_base.rb
 - lib/repository_plaindir.rb
@@ -162,7 +163,6 @@
 - lib/semaphore/extconf.rb
 - lib/semaphore/semaphore.cpp
 - lib/solver.rb
-- lib/uri.rb
 - lib/vagrant_build_system.rb
 - lib/version.rb
 homepage: https://github.com/schaefi/dice/


Reply via email to