commit kiwi for openSUSE:Factory

Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at 2014-06-01 18:56:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kiwi (Old) and /work/SRC/openSUSE:Factory/.kiwi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kiwi" Changes: -------- --- /work/SRC/openSUSE:Factory/kiwi/kiwi.changes 2014-05-27 07:09:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kiwi.new/kiwi.changes 2014-06-01 18:56:11.000000000 +0200 @@ -1,0 +2,121 @@ +Fri May 30 14:06:47 CEST 2014 - ms@suse.de + +- v5.06.104 released + +------------------------------------------------------------------- +Fri May 30 11:57:08 CEST 2014 - ms@suse.de + +- make sure KIWISatSolver correctly quotes repo alias names + in a way that the shell can still find files with e.g spaces + +------------------------------------------------------------------- +Fri May 30 11:38:49 CEST 2014 - ms@suse.de + +- make sure kiwi scripts runs in C locale (bnc #880674) + +------------------------------------------------------------------- +Wed May 28 12:12:16 CEST 2014 - ms@suse.de + +- Follow up update jenkins prepare worker script + + make sure validation runtime checks find all tools on the host + +------------------------------------------------------------------- +Wed May 28 11:11:22 CEST 2014 - ms@suse.de + +- Update jenkins prepare worker script + + make sure validation runtime checks find all tools on the host + +------------------------------------------------------------------- +Tue May 27 21:36:13 CEST 2014 - ms@suse.de + +- v5.06.103 released + +------------------------------------------------------------------- +Tue May 27 21:35:27 CEST 2014 - ms@suse.de + +- Fixed creation of versioned vagrant box json file + +------------------------------------------------------------------- +Tue May 27 20:37:54 CEST 2014 - ms@suse.de + +- v5.06.102 released + +------------------------------------------------------------------- +Tue May 27 18:09:22 CEST 2014 - ms@suse.de + +- Update suse-13.1/suse-vagrant-box example + + build for two providers, libvirt and virtualbox + +------------------------------------------------------------------- +Tue May 27 18:08:19 CEST 2014 - ms@suse.de + +- Allow to specify multiple vagrantconfig sections + + one can build boxes for different providers in one build + + report missing machine configuration only when it makes sense + +------------------------------------------------------------------- +Tue May 27 14:49:15 CEST 2014 - ms@suse.de + +- v5.06.101 released + +------------------------------------------------------------------- +Tue May 27 14:45:08 CEST 2014 - ms@suse.de + +- Cleanup examples and templates + + remove obsolete openSUSE 12.1 examples + + fix package lists and type setup according to result + of preparation runtime checks + +------------------------------------------------------------------- +Tue May 27 14:43:43 CEST 2014 - ms@suse.de + +- Update Makefile + + don't use shell backticks, instead use make's shell command + + limit scope of 'make valid' target to the present architecture + +------------------------------------------------------------------- +Tue May 27 14:42:52 CEST 2014 - ms@suse.de + +- Extend scope of kiwi --check-config + Additionally call the prepare runtime checks after validation + +------------------------------------------------------------------- +Tue May 27 12:34:10 CEST 2014 - ms@suse.de + +- Added runtime check __checkSelectedBootLoaderIncluded + Check if the selected bootloader will also be installed into the image + +------------------------------------------------------------------- +Tue May 27 12:26:48 CEST 2014 - ms@suse.de + +- Fixed typo in suse-13.1/suse-vagrant-box definition + * wrong indention + +------------------------------------------------------------------- +Tue May 27 10:38:58 CEST 2014 - ms@suse.de + +- v5.06.100 released + +------------------------------------------------------------------- +Tue May 27 10:19:22 CEST 2014 - ms@suse.de + +- Fixed search path for *.kiwi control files in getControlFile + +------------------------------------------------------------------- +Mon May 26 21:46:32 CEST 2014 - ms@suse.de + +- DB: rebuild documentation + +------------------------------------------------------------------- +Mon May 26 21:37:24 CEST 2014 - ms@suse.de + +- DB: update documentation, remove obsolete kiwistderr information + +------------------------------------------------------------------- +Mon May 26 16:10:29 CEST 2014 - ms@suse.de + +- Removed obsolete setup of kiwistderr cmdline value. + The kiwi boot code does not handle this information since + quite some time + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.EOGCgN/_old 2014-06-01 18:56:13.000000000 +0200 +++ /var/tmp/diff_new_pack.EOGCgN/_new 2014-06-01 18:56:13.000000000 +0200 @@ -26,7 +26,7 @@ Group: System/Management Url: http://github.com/openSUSE/kiwi Name: kiwi -Version: 5.06.99 +Version: 5.06.104 Release: 0 Provides: kiwi-schema = 6.1 # requirements to build packages ++++++ kiwi-docu.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/kiwi/kiwi-docu.tar.bz2 /work/SRC/openSUSE:Factory/.kiwi.new/kiwi-docu.tar.bz2 differ: char 11, line 1 ++++++ kiwi-repo.tar.bz2 ++++++ ++++++ kiwi.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/.revision 2014-05-27 14:49:56.000000000 +0200 @@ -1 +1 @@ -30fc38c40b9501aa7d5d8af7ed5cf09e28b52bfb +8f5fffd0d15c249cfdd0118f69764a60534c5155 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/Makefile new/kiwi/Makefile --- old/kiwi/Makefile 2014-05-23 14:09:39.000000000 +0200 +++ new/kiwi/Makefile 2014-05-27 14:49:56.000000000 +0200 @@ -4,7 +4,7 @@ # # Makefile for OpenSuSE - KIWI Image System # --- -arch = `uname -m | grep -q ^i[3-6] && echo ix86 || uname -m` +arch := $(shell uname -m | grep -q ^i[3-6] && echo ix86 || uname -m) buildroot = / syslinux = /usr/share/syslinux bindlib = lib @@ -118,7 +118,7 @@ #============================================ # kiwi manual pages #-------------------------------------------- - for i in `ls -1 ./doc/*.1`;do \ + for i in $(shell ls -1 ./doc/*.1);do \ install -m 644 $$i ${MANVZ} ;\ done @@ -138,7 +138,7 @@ #-------------------------------------------- install -m 755 ./kiwi.pl ${KIWIBINVZ}/kiwi install -m 644 ./xsl/* ${KIWIXSLVZ} - for i in `find modules -type f | grep -v -E '\.test'`;do \ + for i in $(shell find modules -type f | grep -v -E '\.test');do \ install -m 644 $$i ${KIWIMODVZ} ;\ done @@ -146,7 +146,7 @@ # Install KIWI metadata files #-------------------------------------------- tar -C metadata -czf ${KIWIMETAVZ}/KIWIAnalyse.tgz d3 - for i in `find metadata -type f | grep -v -E 'd3'`;do \ + for i in $(shell find metadata -type f | grep -v -E 'd3');do \ install -m 644 $$i ${KIWIMETAVZ} ;\ done @@ -198,7 +198,7 @@ #============================================ # Validate all XML descriptions... #-------------------------------------------- - for i in `find -name config.xml | grep -v tests`;do \ + for i in $(shell find doc template/$(arch)/ system/boot/$(arch)/ -name config.xml);do \ test -f xsl/master.xsl && \ xsltproc -o $$i.new xsl/master.xsl $$i && mv $$i.new $$i;\ echo $$i;\ @@ -213,7 +213,7 @@ if test ! -d tests/.timestamps; then \ mkdir tests/.timestamps; \ fi - for i in `find -name "*.t" | cut -d/ -f4`;do \ + for i in $(shell find -name "*.t" | cut -d/ -f4);do \ touch tests/.timestamps/$$i's';\ done cd tests/unit && \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/kiwi.pl 2014-05-27 14:49:56.000000000 +0200 @@ -31,6 +31,7 @@ use warnings; use Carp qw (cluck); use Getopt::Long; +use File::Basename; use File::Spec; use File::Find; use File::Glob ':glob'; @@ -1353,6 +1354,12 @@ if (! defined $FSInodeSize) { $FSInodeSize = 256; } + #======================================== + # set build type from commandline + #---------------------------------------- + if (defined $SetImageType) { + $cmdL -> setBuildType($SetImageType); + } #========================================== # non root task: Check XML configuration #------------------------------------------ @@ -1488,9 +1495,6 @@ $kiwi -> failed (); kiwiExit (1); } - if (defined $SetImageType) { - $cmdL -> setBuildType($SetImageType); - } return; } @@ -1778,7 +1782,8 @@ #------------------------------------------ sub checkConfig { # ... - # Check the specified configuration file + # Check the specified configuration. validate the + # schema and apply the prepare runtime checks # --- my $config = shift; my $gdata = $global -> getKiwiConfig(); @@ -1802,6 +1807,19 @@ $kiwi -> failed (); exit 1; } + my $configDir = dirname ($config); + my $xml = KIWIXML -> new ( + $configDir,$cmdL->getBuildType(),undef,$cmdL + ); + if (! $xml) { + exit 1; + } + my $krc = KIWIRuntimeChecker -> new( + $cmdL, $xml + ); + if ((! $krc) || (! $krc -> prepareChecks())) { + exit 1; + } $kiwi -> info ('Validation passed'); $kiwi -> done (); exit 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIBoot.pm new/kiwi/modules/KIWIBoot.pm --- old/kiwi/modules/KIWIBoot.pm 2014-05-26 15:35:05.000000000 +0200 +++ new/kiwi/modules/KIWIBoot.pm 2014-05-27 09:33:35.000000000 +0200 @@ -4249,7 +4249,6 @@ $type->{installboot} = "install"; $type->{boottimeout} = 1; $type->{fastboot} = 1; - $cmdline="kiwistderr=/dev/hvc0"; $vga="normal"; } if ($topic =~ /^KIWI (CD|USB)/) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIGlobals.pm new/kiwi/modules/KIWIGlobals.pm --- old/kiwi/modules/KIWIGlobals.pm 2014-05-26 15:35:05.000000000 +0200 +++ new/kiwi/modules/KIWIGlobals.pm 2014-05-30 14:10:16.000000000 +0200 @@ -1398,7 +1398,7 @@ # Globals (generic) #------------------------------------------ my %data; - $data{Version} = "5.06.99"; + $data{Version} = "5.06.104"; $data{Publisher} = "SUSE LINUX GmbH"; $data{Preparer} = "KIWI - http://opensuse.github.com/kiwi"; $data{ConfigName} = "config.xml"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIImageFormat.pm new/kiwi/modules/KIWIImageFormat.pm --- old/kiwi/modules/KIWIImageFormat.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIImageFormat.pm 2014-05-27 21:37:17.000000000 +0200 @@ -220,10 +220,12 @@ my $xml = $this->{xml}; my $bootp = $this->{bootp}; my $vconf = $this->{vmdata}; - my $xend; - if ($vconf) { - $xend = $vconf -> getDomain(); + if ((! $vconf) && ($format =~ /qcow2|vagrant/)) { + # a machine configuration doesn't make sense with these + # formats requested. Thus we can silently return here + return; } + my $xend = $vconf -> getDomain(); if (! $xend) { $xend = "dom0"; } @@ -487,141 +489,149 @@ my $this = shift; my $kiwi = $this->{kiwi}; my $xml = $this->{xml}; - my $box = $this->{image}; my $dest = dirname $this->{image}; - my $vgc = $xml -> getVagrantConfig(); + my $vgclist= $xml -> getVagrantConfig(); my $desc = $xml -> getDescriptionInfo(); my $pref = $xml -> getPreferences(); my $img; my $fmt; - if (! $vgc) { - $kiwi -> error ( - "No vagrantconfig section found" - ); - $kiwi -> failed (); - return; - } - my $provider = $vgc -> getProvider(); - #========================================== - # create vagrant image - #------------------------------------------ - if ($provider eq 'libvirt') { - $img = $this -> createQCOW2(); - $fmt = 'qcow2'; - } elsif ($provider eq 'virtualbox') { - $img = $this -> createVMDK(); - $fmt = 'vmdk'; - } - if (! $img) { - return; - } - $kiwi -> info ("Creating vagrant box metadata files"); - #========================================== - # create vagrant metadata.json - #------------------------------------------ - my $vsize = $vgc -> getVirtualSize(); - my $json_fd = FileHandle -> new(); - my $json_meta = $dest."/metadata.json"; - my $json_ref = JSON->new->allow_nonref; - my %json_data; - $json_data{provider} = $provider; - $json_data{format} = $fmt; - $json_data{virtual_size} = $vsize; - $json_ref -> pretty; - my $json_text = $json_ref ->encode( \%json_data ); - if (! $json_fd -> open (">$json_meta")) { - $kiwi -> failed (); - $kiwi -> error ( - "Couldn't create $json_meta file: $!" - ); - $kiwi -> failed (); - return; - } - print $json_fd $json_text; - $json_fd -> close(); - #========================================== - # create vagrant cloud configuration - #------------------------------------------ - $box =~ s/\.raw$/\.box/; - my $json_cloud = $box; - $json_cloud =~ s/\.box$/\.json/; - %json_data = (); - my $versions = []; - my $providers = []; - $providers->[0]->{name} = $provider; - $providers->[0]->{url} = basename $box; - $versions->[0]->{version} = $pref -> getVersion(); - $versions->[0]->{providers} = $providers; - $json_data{name} = $xml -> getImageName(); - $json_data{description} = $desc -> getSpecificationDescript(); - $json_data{description} =~ s/[\n\t]+//g; - $json_data{versions} = $versions; - $json_ref = JSON->new->allow_nonref; - $json_ref -> pretty; - $json_text = $json_ref ->encode( \%json_data ); - $json_fd = FileHandle -> new(); - if (! $json_fd -> open (">$json_cloud")) { - $kiwi -> failed (); - $kiwi -> error ( - "Couldn't create $json_cloud file: $!" - ); - $kiwi -> failed (); - return; - } - print $json_fd $json_text; - $json_fd -> close(); - #========================================== - # create vagrant Vagrantfile - #------------------------------------------ - my $vagrant_meta = $dest."/Vagrantfile"; - my $vagrant_fd = FileHandle -> new(); - my $vagrant_mac= $this -> __randomMAC(); - if (! $vagrant_fd -> open (">$vagrant_meta")) { - $kiwi -> failed (); + my @boxes; + if (! $vgclist) { $kiwi -> error ( - "Couldn't create Vagrantfile file: $!" + "No vagrantconfig section(s) found" ); $kiwi -> failed (); return; } - print $vagrant_fd 'Vagrant::Config.run do |config|'."\n"; - print $vagrant_fd ' config.vm.base_mac = "'.$vagrant_mac.'"'."\n"; - print $vagrant_fd 'end'."\n"; - print $vagrant_fd 'include_vagrantfile = '; - print $vagrant_fd 'File.expand_path("../include/_Vagrantfile", '; - print $vagrant_fd '__FILE__)'."\n"; - print $vagrant_fd 'load include_vagrantfile '; - print $vagrant_fd 'if File.exist?(include_vagrantfile)'."\n"; - $vagrant_fd -> close(); - $kiwi -> done(); - #========================================== - # package vagrant box - #------------------------------------------ - $kiwi -> info ("Creating vagrant box"); - my $img_basename = basename $img; - KIWIQX::qxx ("cd $dest && mv $img_basename box.img"); - my @components = (); - push @components, basename $json_meta; - push @components, basename $vagrant_meta; - push @components, 'box.img'; - my $status = KIWIQX::qxx ( - "tar -C $dest -czf $box @components 2>&1" - ); - my $result = $? >> 8; - if ($result != 0) { - $kiwi -> failed (); - $kiwi -> error ( - "Couldn't create box tarball: $status" + foreach my $vgc (@{$vgclist}) { + my $box = $this->{image}; + my $provider = $vgc -> getProvider(); + $kiwi -> info ("Creating vagrant box for $provider provider\n"); + #========================================== + # create vagrant image + #------------------------------------------ + if ($provider eq 'libvirt') { + $this->{format} = 'qcow2'; + $img = $this -> createQCOW2(); + $fmt = 'qcow2'; + } elsif ($provider eq 'virtualbox') { + $this->{format} = 'vmdk'; + $img = $this -> createVMDK(); + $fmt = 'vmdk'; + } + $this->{format} = 'vagrant'; + if (! $img) { + return; + } + $kiwi -> info ("--> Creating box metadata files"); + #========================================== + # create vagrant metadata.json + #------------------------------------------ + my $vsize = $vgc -> getVirtualSize(); + my $json_fd = FileHandle -> new(); + my $json_meta = $dest."/metadata.json"; + my $json_ref = JSON->new->allow_nonref; + my %json_data; + $json_data{provider} = $provider; + $json_data{format} = $fmt; + $json_data{virtual_size} = $vsize; + $json_ref -> pretty; + my $json_text = $json_ref ->encode( \%json_data ); + if (! $json_fd -> open (">$json_meta")) { + $kiwi -> failed (); + $kiwi -> error ( + "Couldn't create $json_meta file: $!" + ); + $kiwi -> failed (); + return; + } + print $json_fd $json_text; + $json_fd -> close(); + #========================================== + # create vagrant cloud configuration + #------------------------------------------ + my $json_cloud = $box; + $json_cloud =~ s/\.raw$/\.$provider\.json/; + $box =~ s/\.raw$/\.$provider\.box/; + %json_data = (); + my $versions = []; + my $providers = []; + $providers->[0]->{name} = $provider; + $providers->[0]->{url} = basename $box; + $versions->[0]->{version} = $pref -> getVersion(); + $versions->[0]->{providers} = $providers; + $json_data{name} = $xml -> getImageName(); + $json_data{description} = $desc -> getSpecificationDescript(); + $json_data{description} =~ s/[\n\t]+//g; + $json_data{versions} = $versions; + $json_ref = JSON->new->allow_nonref; + $json_ref -> pretty; + $json_text = $json_ref ->encode( \%json_data ); + $json_fd = FileHandle -> new(); + if (! $json_fd -> open (">$json_cloud")) { + $kiwi -> failed (); + $kiwi -> error ( + "Couldn't create $json_cloud file: $!" + ); + $kiwi -> failed (); + return; + } + print $json_fd $json_text; + $json_fd -> close(); + #========================================== + # create vagrant Vagrantfile + #------------------------------------------ + my $vagrant_meta = $dest."/Vagrantfile"; + my $vagrant_fd = FileHandle -> new(); + my $vagrant_mac= $this -> __randomMAC(); + if (! $vagrant_fd -> open (">$vagrant_meta")) { + $kiwi -> failed (); + $kiwi -> error ( + "Couldn't create Vagrantfile file: $!" + ); + $kiwi -> failed (); + return; + } + print $vagrant_fd 'Vagrant::Config.run do |config|'."\n"; + print $vagrant_fd ' config.vm.base_mac = "'.$vagrant_mac.'"'."\n"; + print $vagrant_fd 'end'."\n"; + print $vagrant_fd 'include_vagrantfile = '; + print $vagrant_fd 'File.expand_path("../include/_Vagrantfile", '; + print $vagrant_fd '__FILE__)'."\n"; + print $vagrant_fd 'load include_vagrantfile '; + print $vagrant_fd 'if File.exist?(include_vagrantfile)'."\n"; + $vagrant_fd -> close(); + $kiwi -> done(); + #========================================== + # package vagrant box + #------------------------------------------ + $kiwi -> info ("--> Creating box archive"); + my $img_basename = basename $img; + KIWIQX::qxx ("cd $dest && mv $img_basename box.img"); + my @components = (); + push @components, basename $json_meta; + push @components, basename $vagrant_meta; + push @components, 'box.img'; + my $status = KIWIQX::qxx ( + "tar -C $dest -czf $box @components 2>&1" ); - $kiwi -> failed (); - return; + my $result = $? >> 8; + if ($result != 0) { + $kiwi -> failed (); + $kiwi -> error ( + "Couldn't create box tarball: $status" + ); + $kiwi -> failed (); + return; + } + push @boxes, $box; + $kiwi -> done(); + #========================================== + # cleanup + #------------------------------------------ + KIWIQX::qxx ("rm -f $json_meta $vagrant_meta $dest/box.img"); } - $kiwi -> done(); - #========================================== - # cleanup - #------------------------------------------ - KIWIQX::qxx ("rm -f $json_meta $vagrant_meta $dest/box.img"); - return $box; + return @boxes; } #========================================== @@ -631,7 +641,7 @@ my $this = shift; my $kiwi = $this->{kiwi}; my $xml = $this->{xml}; - my $vmc = $xml -> getVMachineConfig(); + my $vmc = $this->{vmdata}; my $dest = dirname $this->{image}; my $base = basename $this->{image}; my $format; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWILocator.pm new/kiwi/modules/KIWILocator.pm --- old/kiwi/modules/KIWILocator.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWILocator.pm 2014-05-27 10:40:10.000000000 +0200 @@ -222,7 +222,7 @@ if (-f $config) { $found = 1; last; } - @globsearch = glob ($dir."/*.kiwi"); + @globsearch = glob ($dir.$search."*.kiwi"); my $globitems = @globsearch; if ($globitems == 0) { next; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerEnsconce.pm new/kiwi/modules/KIWIManagerEnsconce.pm --- old/kiwi/modules/KIWIManagerEnsconce.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIManagerEnsconce.pm 2014-05-30 14:10:16.000000000 +0200 @@ -225,6 +225,8 @@ my @removeOpts = ( "--nodeps --allmatches --noscripts" ); + print $fd "export LANG=C"."\n"; + print $fd "export LC_ALL=C"."\n"; print $fd "function clean { kill \$SPID;"; print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;"; print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerYum.pm new/kiwi/modules/KIWIManagerYum.pm --- old/kiwi/modules/KIWIManagerYum.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIManagerYum.pm 2014-05-30 14:10:16.000000000 +0200 @@ -381,6 +381,8 @@ my @removeOpts = ( "--nodeps --allmatches --noscripts" ); + print $fd "export LANG=C"."\n"; + print $fd "export LC_ALL=C"."\n"; print $fd "function clean { kill \$SPID;"; print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;"; print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManagerZypper.pm new/kiwi/modules/KIWIManagerZypper.pm --- old/kiwi/modules/KIWIManagerZypper.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIManagerZypper.pm 2014-05-30 14:10:16.000000000 +0200 @@ -582,6 +582,8 @@ my @removeOpts = ( "--nodeps --allmatches --noscripts" ); + print $fd "export LANG=C"."\n"; + print $fd "export LC_ALL=C"."\n"; print $fd "function clean { kill \$SPID;"; print $fd "while kill -0 \$SPID &>/dev/null; do sleep 1;"; print $fd "if [ \"\$c\" = 5 ];then kill \$SPID;break;fi;"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIRuntimeChecker.pm new/kiwi/modules/KIWIRuntimeChecker.pm --- old/kiwi/modules/KIWIRuntimeChecker.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIRuntimeChecker.pm 2014-05-27 14:49:56.000000000 +0200 @@ -109,6 +109,9 @@ if (! $this -> __checkContainerHasLXC()) { return; } + if (! $this -> __checkSelectedBootLoaderIncluded()) { + return; + } if (! $this -> __checkProfileConsistent()) { return; } @@ -168,6 +171,9 @@ if (! $this -> __checkYaSTenvironment()) { return; } + if (! $this -> __checkSelectedBootLoaderIncluded()) { + return; + } if (! $this -> __haveValidTypeString()) { return; } @@ -341,6 +347,62 @@ } #========================================== +# __checkSelectedBootLoaderIncluded +#------------------------------------------ +sub __checkSelectedBootLoaderIncluded { + # ... + # check if the selected bootloader will also be installed into + # the image. This is required for the oem, vmx and pxe image + # types. In case of a pxe type the deploy configuration might + # not require a bootloader e.g for remote root systems. As we + # don't know the deploy configuration at build time the check + # might complain unnecessarily. In such a case add the package + # in question and remove it in config.sh again. + # --- + my $this = shift; + my $xml = $this->{xml}; + my $kiwi = $this->{kiwi}; + my %loaderPackages = ( + 'grub' => 'grub', + 'grub2' => 'grub2', + 'extlinux' => 'syslinux', + 'syslinux' => 'syslinux', + 'zipl' => 's390-tools', + 'uboot' => 'u-boot-tools' + ); + my $msg; + my $type = $xml -> getImageType(); + if (! $type) { + return 1; + } + my $name = $type -> getTypeName(); + if ($name !~ /oem|vmx|pxe/) { + return 1; + } + my $bootloader = $type -> getBootLoader(); + if (! $bootloader) { + $bootloader = 'grub'; + } + my $loaderPackage = $loaderPackages{$bootloader}; + if (! $loaderPackage) { + return 1; + } + my $pckgs = $xml -> getPackages(); + push @{$pckgs}, @{$xml -> getBootstrapPackages()}; + for my $pckg (@{$pckgs}) { + my $pname = $pckg -> getName(); + if ($pname eq $loaderPackage) { + return 1; + } + } + $msg = "Selected bootloader is $bootloader, but required "; + $msg.= "package $loaderPackage is not included in image."; + $kiwi -> error ( $msg ); + $kiwi -> failed (); + return; +} + +#========================================== # __checkContainerHasLXC #------------------------------------------ sub __checkContainerHasLXC { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISatSolver.pm new/kiwi/modules/KIWISatSolver.pm --- old/kiwi/modules/KIWISatSolver.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWISatSolver.pm 2014-05-30 14:10:16.000000000 +0200 @@ -190,7 +190,7 @@ $kiwi -> failed (); return; } - push @files, $solv_file; + push @files, quotemeta($solv_file); } } else { #========================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rnc new/kiwi/modules/KIWISchema.rnc --- old/kiwi/modules/KIWISchema.rnc 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rnc 2014-05-27 20:38:41.000000000 +0200 @@ -1822,7 +1822,7 @@ k.size? & k.split? & k.systemdisk? & - k.vagrantconfig? + k.vagrantconfig* } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rng new/kiwi/modules/KIWISchema.rng --- old/kiwi/modules/KIWISchema.rng 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rng 2014-05-27 20:38:41.000000000 +0200 @@ -2564,9 +2564,9 @@ <optional> <ref name="k.systemdisk"/> </optional> - <optional> + <zeroOrMore> <ref name="k.vagrantconfig"/> - </optional> + </zeroOrMore> </interleave> </element> </define> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIXML.pm new/kiwi/modules/KIWIXML.pm --- old/kiwi/modules/KIWIXML.pm 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/modules/KIWIXML.pm 2014-05-27 20:38:41.000000000 +0200 @@ -99,7 +99,7 @@ # defaultType = { # machine = KIWIXMLVMachineData # oemconfig = KIWIXMLOEMConfigData - # vagrantconfig = KIWIXMLVagrantConfigData + # vagrantconfig = (KIWIXMLVagrantConfigData,...) # pxeconfig = (KIWIXMLPXEDeployConfigData,...) # pxedeploy = KIWIXMLPXEDeployData # split = KIWIXMLSplitData @@ -110,7 +110,7 @@ # selectedType = { # machine = KIWIXMLVMachineData # oemconfig = KIWIXMLOEMConfigData - # vagrantconfig = KIWIXMLVagrantConfigData + # vagrantconfig = (KIWIXMLVagrantConfigData,...) # pxeconfig = (KIWIXMLPXEDeployConfigData,...) # pxedeploy = KIWIXMLPXEDeployData # split = KIWIXMLSplitData @@ -196,7 +196,7 @@ # <typename>[+] { # machine = KIWIXMLVMachineData # oemconfig = KIWIXMLOEMConfigData - # vagrantconfig = KIWIXMLVagrantConfigData + # vagrantconfig = (KIWIXMLVagrantConfigData,...) # pxeconfig = (KIWIXMLPXEDeployConfigData,...) # pxedeploy = KIWIXMLPXEDeployData # split = KIWIXMLSplitData @@ -1611,7 +1611,8 @@ #------------------------------------------ sub getVagrantConfig { # ... - # Return a VagrantConfigData object for the selected build type + # Return an array ref containing VagrantConfigData objects + # for the selected build type # --- my $this = shift; return $this->{selectedType}->{vagrantconfig}; @@ -1629,26 +1630,6 @@ } #========================================== -# setVagrantConfig -#------------------------------------------ -sub setVagrantConfig { - # ... - # Store a new VagrantConfigData object for the selected build type - # --- - my $this = shift; - my $vagrantconf = shift; - my $vagrantref = ref $vagrantconf; - if (! $vagrantref) { - return; - } - if ($vagrantref ne 'KIWIXMLVagrantConfigData') { - return; - } - $this->{selectedType}->{vagrantconfig} = $vagrantconf; - return $this; -} - -#========================================== # setOEMConfig #------------------------------------------ sub setOEMConfig { @@ -2953,26 +2934,30 @@ sub __createVagrantConfig { # ... # Return a ref to a hash that contains the configuration data - # for the <vagrantconfig> element and it's children for the + # for the <vagrantconfig> elements and it's children for the # given XML:ELEMENT object # --- my $this = shift; my $node = shift; my $kiwi = $this->{kiwi}; - my $vagrantConfig = $node - -> getChildrenByTagName('vagrantconfig') -> get_node(1); - if (! $vagrantConfig ) { + my @vagrantConfigNodes = $node + -> getChildrenByTagName('vagrantconfig'); + if (! @vagrantConfigNodes) { return; } - my %vagrantConfigData; - $vagrantConfigData{provider} = - $vagrantConfig -> getAttribute('provider'); - $vagrantConfigData{virtual_size} = - $vagrantConfig -> getAttribute('virtualsize'); - my $vagrantConfObj = KIWIXMLVagrantConfigData -> new( - \%vagrantConfigData - ); - return $vagrantConfObj; + my @vagrantConfigData; + for my $vagrantConfig (@vagrantConfigNodes) { + my %vagrantConfigSet; + $vagrantConfigSet{provider} = + $vagrantConfig -> getAttribute('provider'); + $vagrantConfigSet{virtual_size} = + $vagrantConfig -> getAttribute('virtualsize'); + my $vagrantConfObj = KIWIXMLVagrantConfigData -> new( + \%vagrantConfigSet + ); + push @vagrantConfigData, $vagrantConfObj; + } + return \@vagrantConfigData; } #========================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/tests/jenkins/prepare.sh new/kiwi/tests/jenkins/prepare.sh --- old/kiwi/tests/jenkins/prepare.sh 2014-05-23 14:09:40.000000000 +0200 +++ new/kiwi/tests/jenkins/prepare.sh 2014-05-30 14:10:16.000000000 +0200 @@ -34,7 +34,7 @@ # install required packages spec=/home/jenkins/kiwi/kiwi/rpm/kiwi.spec -packages="genisoimage cdrkit-cdrtools-compat squashfs osc" +packages="grub grub2 genisoimage cdrkit-cdrtools-compat squashfs osc yum" if ! zypper -n install --no-recommends $packages;then exit 1 fi -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de