Hello community, here is the log from the commit of package dice for openSUSE:Factory checked in at 2015-08-05 19:14:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-07-21 13:29:11.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dice.new/dice.changes 2015-08-05 19:15:01.000000000 +0200 @@ -1,0 +2,74 @@ +Wed Jul 29 09:34:05 CEST 2015 - m...@suse.de + +- Fixed job prepare_build + + The method glob deletes old builds from tmp. What sounds + like a good idea is a bad one because when multiple job + runs in parallel this breaks the other jobs. That's + because depending on the selected build system and setup + tmp might be a shared location + +------------------------------------------------------------------- +Tue Jul 28 23:18:53 CEST 2015 - m...@suse.de + +- Fixed calculateDigest + + The calculation of the recipe digest is based on the data which + build the image description. However if people use a repository + as part of the image description it should not be taken into + consideration, because a solver operation will find potential + repository changes. Therefore the list of files and directories + belonging to an image description is limited to the top level + entries and the recursive search for the optioal overlay + root directory + +------------------------------------------------------------------- +Tue Jul 28 16:01:52 CEST 2015 - m...@suse.de + +- Fixed comps download and test + +------------------------------------------------------------------- +Tue Jul 28 15:27:15 CEST 2015 - m...@suse.de + +- Follow up fix to support yum groups + + yum group names are prefixed with group: not with pattern: + +------------------------------------------------------------------- +Sat Jul 25 21:26:09 CEST 2015 - m...@suse.de + +- Added support for this:// kiwi uri type + +------------------------------------------------------------------- +Mon Jul 20 22:39:08 CEST 2015 - m...@suse.de + +- Added --skip-missing option + + Allows to skip packages for the solver operation if they + could not be found in the repositories. This is useful + if packages are only relevant for certain profiles of the + kiwi configuration. Dice always solves over all packages + listed in the configuration + +------------------------------------------------------------------- +Mon Jul 20 17:16:45 CEST 2015 - m...@suse.de + +- Version 0.7.3 + +------------------------------------------------------------------- +Mon Jul 20 17:00:40 CEST 2015 - m...@suse.de + +- Fixed kiwi URI obs resolver + + prevent double slashes in output URL + +------------------------------------------------------------------- +Mon Jul 20 16:36:11 CEST 2015 - m...@suse.de + +- Added support for yum groups in solver + + libsolv provides a comp2solv parser which allows to read yum + groups (comps) files. This allows to let satsolver use yum + groups for building rhel images + +------------------------------------------------------------------- Old: ---- dice-0.7.2.gem New: ---- dice-0.7.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dice.spec ++++++ --- /var/tmp/diff_new_pack.cVjfGB/_old 2015-08-05 19:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.cVjfGB/_new 2015-08-05 19:15:02.000000000 +0200 @@ -17,7 +17,7 @@ Name: dice -Version: 0.7.2 +Version: 0.7.3 Release: 0 %define mod_name dice %define mod_full_name %{mod_name}-%{version} ++++++ dice-0.7.2.gem -> dice-0.7.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/cli.rb new/lib/cli.rb --- old/lib/cli.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/cli.rb 2015-07-29 10:02:58.000000000 +0200 @@ -85,6 +85,8 @@ command :build do |c| c.switch ["force", :f], :required => false, :negatable => false, :desc => "Force building even if status is up to data" + c.switch ["skip-missing", :i], :required => false, :negatable => false, + :desc => "Skip packages not found in the repositories" c.flag ["kiwitype", :t], :kiwitype => String, :required => false, :desc => "Set kiwi build type" c.flag ["kiwiprofile", :p], :kiwiprofile => String, :required => false, @@ -149,6 +151,8 @@ LONGDESC arg "RECIPE-PATH" command :status do |c| + c.switch ["skip-missing", :i], :required => false, :negatable => false, + :desc => "Skip packages not found in the repositories" 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/job.rb new/lib/job.rb --- old/lib/job.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/job.rb 2015-07-29 10:02:58.000000000 +0200 @@ -91,7 +91,7 @@ def prepare_build Dice.logger.info("#{self.class}: Preparing build...") FileUtils.rm(archive) if File.file?(archive) - prepare_command = "rm -rf /tmp/kiwi_*.dice /var/lock/kiwi-init.lock" + prepare_command = "rm -rf /var/lock/kiwi-init.lock" begin Command.run( buildsystem.job_builder_command(prepare_command) 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-07-20 10:19:26.000000000 +0200 +++ new/lib/kiwi_uri.rb 2015-07-29 10:02:58.000000000 +0200 @@ -11,6 +11,7 @@ when /^obs:\/\/(.*)/ # obs url, translate to http url bs_path = $1.gsub(/:/, ":/") + bs_path = bs_path.gsub(/:\/\//, ":/") args[:name] = "http://download.opensuse.org/repositories/#{bs_path}" when /^(\/.*)/ # Simple path, should be a distribution dir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/recipe.rb new/lib/recipe.rb --- old/lib/recipe.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/recipe.rb 2015-07-29 10:02:58.000000000 +0200 @@ -132,7 +132,12 @@ def calculateDigest result = "" - recipe_items = Find.find(".") + recipe_files = Dir.glob("*") + if File.exists?("root") + overlay_files = Find.find("root") + end + recipe_items = recipe_files.to_a + overlay_files.to_a + recipe_items = recipe_items.sort.uniq recipe_items.each do |item| item.gsub!(/^\.\//,'') next if File.directory?(item) 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-07-20 10:19:26.000000000 +0200 +++ new/lib/repository_rpmmd.rb 2015-07-29 10:02:58.000000000 +0200 @@ -24,8 +24,8 @@ :source_dir => tmp_dir, :dest_dir => solv_dir ) - # rpm-md repos created by the buildservice optionaly provides - # pattern information in suse style which we add to the solvable + # rpm-md repos created for SUSE/zypper optionaly provides + # pattern information which we add to the solvable # when present get_pattern_files.each do |pattern| curl_file( @@ -38,6 +38,22 @@ :source_dir => tmp_dir + "/patterns", :dest_dir => solv_dir ) + # rpm-md repos created for RHEL/yum optionaly provides + # group information which we add to the solvable + # when present + get_group_files.each do |group| + curl_file( + :source => group, + :dest => tmp_dir + "/groups/" + File.basename(group) + ) + end + if Command.exists?("comps2solv") + create_solv( + :tool => "comps2solv", + :source_dir => tmp_dir + "/groups", + :dest_dir => solv_dir + ) + end merge_solv(solv_dir, time) cleanup solv_file @@ -76,9 +92,8 @@ begin patterns = load_file(patbase + "/patterns").split("\n") rescue - # the patterns information is an optional addition - # the buildservice could add to an rpm-md repo. if it - # does not exist it's not an error + # the patterns information is optional. + # There is no error if no such data exists return result end patterns.each do |pat| @@ -87,5 +102,19 @@ end result end + + def get_group_files + result = [] + rxml.elements.each("repomd/data[@type='group_gz']/location") do |e| + href = e.attribute("href").to_s + result << href + end + if !result.empty? && !Command.exists?("comps2solv") + Dice.logger.info( + "#{self.class}: comps2solv missing, yum groups can't be processed" + ) + end + result + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/run_command.rb new/lib/run_command.rb --- old/lib/run_command.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/run_command.rb 2015-07-29 10:02:58.000000000 +0200 @@ -4,5 +4,14 @@ Dice.logger.command(*args) Cheetah.run(*args) end + + def exists?(name) + begin + run("which", name) + rescue + return false + end + true + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/solver.rb new/lib/solver.rb --- old/lib/solver.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/solver.rb 2015-07-29 10:02:58.000000000 +0200 @@ -84,12 +84,28 @@ jobs = [] kiwi_config.packages.each do |package| item = pool.select(package, Solv::Selection::SELECTION_NAME) + if item.isempty? and package.include?("pattern:") + # package was a pattern definition which was not found, try to + # check if it is found as yum group before we handle this as an + # error + group_name = package.sub("pattern:", "group:") + item = pool.select(group_name, Solv::Selection::SELECTION_NAME) + end if item.isempty? - raise Dice::Errors::SolvJobFailed.new( - "No solver information for package: #{package}" - ) + if package.include?("pattern:") + collection_name = package.sub("pattern:", "") + message = "Package Collection: '#{collection_name}' not found" + else + message = "Package: '#{package}' not found" + end + if Dice.option["skip-missing"] + Dice.logger.info("#{message}: skipped") + else + raise Dice::Errors::SolvJobFailed.new(message) + end + else + jobs += item.jobs(Solv::Job::SOLVER_INSTALL) end - jobs += item.jobs(Solv::Job::SOLVER_INSTALL) end jobs end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/uri.rb new/lib/uri.rb --- old/lib/uri.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/uri.rb 2015-07-29 10:02:58.000000000 +0200 @@ -16,6 +16,7 @@ @allowed_local_types = OpenStruct.new allowed_local_types.iso = true allowed_local_types.dir = true + allowed_local_types.this = true type_ok? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/version.rb new/lib/version.rb --- old/lib/version.rb 2015-07-20 10:19:26.000000000 +0200 +++ new/lib/version.rb 2015-07-29 10:02:58.000000000 +0200 @@ -1,3 +1,3 @@ module Dice - VERSION = "0.7.2" + VERSION = "0.7.3" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-07-20 10:19:26.000000000 +0200 +++ new/metadata 2015-07-29 10:02:58.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: dice version: !ruby/object:Gem::Version - version: 0.7.2 + version: 0.7.3 platform: ruby authors: - SUSE autorequire: bindir: bin cert_chain: [] -date: 2015-07-20 00:00:00.000000000 Z +date: 2015-07-29 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: cheetah ++++++ gem2rpm.yml ++++++ --- /var/tmp/diff_new_pack.cVjfGB/_old 2015-08-05 19:15:02.000000000 +0200 +++ /var/tmp/diff_new_pack.cVjfGB/_new 2015-08-05 19:15:02.000000000 +0200 @@ -50,6 +50,7 @@ :main: :preamble: |- Requires: ruby-solv + Requires: which # Recommends: pwgen # :filelist: |- # /usr/bin/gem2rpm-opensuse