Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at Fri Jul 23 21:54:50 CEST 2010. -------- --- kiwi/kiwi.changes 2010-07-19 10:51:04.000000000 +0200 +++ kiwi/kiwi.changes 2010-07-23 12:10:04.000000000 +0200 @@ -1,0 +2,22 @@ +Tue Jul 20 17:17:02 CEST 2010 - ms@suse.de + +- v4.50 +- fixed URL quoting, we have to distinguish the quoting + for local path URL's and network protocol URL's +- fixed oem-partition-install for LVM images +- fixed xenconfig creation for vmx if no format was set +- fixed locale validation and documentation as well as + some template examples provided by kiwi. The locale value + in kiwi is always a UTF-8 locale therefore it's not + allowed to add the encoding type to the locale string. + We also support the xx_XX locale style only which is + now all checked by the schema (bnc #620789) +- added main::isize function to replace the use of + the -s operator. This is done because of SUSE Studio + which maps a file to a block special under certain + circumstances which causes -s to not work anymore +- fixed oem recovery for LVM based images. It's required + to backup the LVM metadata in order to restore it +- fixed suse-11.3/suse-pxe-client/config.xml + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.3K9zwU/_old 2010-07-23 21:54:15.000000000 +0200 +++ /var/tmp/diff_new_pack.3K9zwU/_new 2010-07-23 21:54:15.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package kiwi (Version 4.49) +# spec file for package kiwi (Version 4.50) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -60,7 +60,7 @@ Requires: clicfs %endif Summary: OpenSuSE - KIWI Image System -Version: 4.49 +Version: 4.50 Release: 1 Group: System/Management License: GPLv2 ++++++ kiwi-docu.tar.bz2 ++++++ kiwi/kiwi-docu.tar.bz2 kiwi/kiwi-docu.tar.bz2 differ: char 11, line 1 ++++++ kiwi.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/.revision 2010-07-23 12:07:46.000000000 +0200 @@ -1 +1 @@ -44324fe47caada053959b86a4d974f7550c12413 +4e1b90ad352a75393c9df63afd6351256b038f4d diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/kiwi.pl 2010-07-23 12:07:46.000000000 +0200 @@ -46,7 +46,7 @@ #============================================ # Globals (Version) #-------------------------------------------- -our $Version = "4.49"; +our $Version = "4.50"; our $Publisher = "SUSE LINUX Products GmbH"; our $Preparer = "KIWI - http://kiwi.berlios.de"; our $openSUSE = "http://download.opensuse.org"; @@ -2687,6 +2687,31 @@ } #========================================== +# isize +#------------------------------------------ +sub isize { + # /.../ + # implements a size function like the -s operator + # but also works for block specials using blockdev + # --- + my $target = shift; + if (! defined $target) { + return 0; + } + if (-b $target) { + my $size = qxx ("blockdev --getsize64 $target 2>&1"); + my $code = $? >> 8; + if ($code == 0) { + chomp $size; + return $size; + } + } elsif (-f $target) { + return -s $target; + } + return 0; +} + +#========================================== # checkFileSystem #------------------------------------------ sub checkFileSystem { 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 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWIBoot.pm 2010-07-23 10:59:54.000000000 +0200 @@ -98,7 +98,7 @@ if (-f $system || -b $system) { my %fsattr = main::checkFileSystem ($system); if ($fsattr{readonly}) { - $syszip = -s $system; + $syszip = main::isize ($system); } else { $syszip = 0; } @@ -305,7 +305,7 @@ $sizeBytes+= $journal; } else { # system is specified as a file... - $sizeBytes = -s $system; + $sizeBytes = main::isize ($system); $sizeBytes*= 1.1; } #========================================== @@ -339,8 +339,8 @@ # if system is a split system the vmsize will be # adapted within the image creation function accordingly # ---- - my $kernelSize = -s $kernel; - my $initrdSize = -s $initrd; + my $kernelSize = main::isize ($kernel); + my $initrdSize = main::isize ($initrd); $vmsize = $kernelSize + ($initrdSize * 1.5) + $sizeBytes; #========================================== # Calculate required inode count for root @@ -840,9 +840,9 @@ # Check if system fits on storage device #------------------------------------------ my $hardSize = $this -> getStorageSize ($stick); - my $softSize = -s $system; + my $softSize = main::isize ($system); if (-f $splitfile) { - $softSize += -s $splitfile; + $softSize += main::isize ($splitfile); } $softSize /= 1024; $softSize += $lvmbootMB + $luksbootMB + $syslbootMB + $dmbootMB; @@ -1055,7 +1055,7 @@ if ((defined $system) && (($syszip) || ($haveSplit))) { my $sizeOK = 1; my $systemPSize = $this -> getStorageSize ($deviceMap{1}); - my $systemISize = -s $system; $systemISize /= 1024; + my $systemISize = main::isize ($system); $systemISize /= 1024; chomp $systemPSize; #print "_______A $systemPSize : $systemISize\n"; if ($systemPSize < $systemISize) { @@ -1829,7 +1829,7 @@ my $isxen = $this->{isxen}; my $xml = $this->{xml}; my $pinst = $xml->getOEMPartitionInstall(); - my $irdsize = -s $initrd; + my $irdsize = main::isize ($initrd); my $diskname = $system.".install.raw"; my $md5name = $system; my %deviceMap = (); @@ -1978,7 +1978,7 @@ #------------------------------------------ $irdsize= ($irdsize / 1e6) + 20; $irdsize= sprintf ("%.0f", $irdsize); - $vmsize = -s $system; + $vmsize = main::isize ($system); $vmsize = ($vmsize / 1e6) * 1.3 + $irdsize; $vmsize = sprintf ("%.0f", $vmsize); $vmsize = $vmsize."M"; @@ -2524,7 +2524,7 @@ # increase vmsize if image split portion #------------------------------------------ if (($imgtype eq "split") && (-f $splitfile)) { - my $splitsize = -s $splitfile; $splitsize /= 1048576; + my $splitsize = main::isize ($splitfile); $splitsize /= 1048576; $vmsize = $this->{vmmbyte} + ($splitsize * 1.5) + $lvmbootMB; $vmsize = sprintf ("%.0f", $vmsize); $this->{vmmbyte} = $vmsize; @@ -2774,7 +2774,7 @@ if ($syszip > 0) { my $sizeOK = 1; my $systemPSize = $this->getStorageSize ($deviceMap{1}); - my $systemISize = -s $system; $systemISize /= 1024; + my $systemISize = main::isize ($system); $systemISize /= 1024; chomp $systemPSize; #print "_______A $systemPSize : $systemISize\n"; if ($systemPSize < $systemISize) { @@ -3598,7 +3598,7 @@ my $file = shift; my $kiwi = $this->{kiwi}; $kiwi -> info ("Creating image MD5 sum..."); - my $size = -s $file; + my $size = main::isize ($file); my $primes = qxx ("factor $size"); $primes =~ s/^.*: //; my $blocksize = 1; for my $factor (split /\s/,$primes) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIConfig.sh new/kiwi/modules/KIWIConfig.sh --- old/kiwi/modules/KIWIConfig.sh 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWIConfig.sh 2010-07-23 10:59:54.000000000 +0200 @@ -970,7 +970,7 @@ lvchange lvresize lvextend lvcreate grub dcounter tty dmsetup dialog awk gawk clicfs cryptsetup clear blkid fbiterm gettext diff bc utimer cmp busybox kexec pam_console_apply - setterm kpartx + setterm kpartx vgcfgbackup vgcfgrestore " tools="$tools $@" for path in /sbin /usr/sbin /usr/bin /bin;do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIImage.pm new/kiwi/modules/KIWIImage.pm --- old/kiwi/modules/KIWIImage.pm 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWIImage.pm 2010-07-23 10:59:54.000000000 +0200 @@ -1209,7 +1209,7 @@ #========================================== # Create VM format/configuration #------------------------------------------ - if (defined $name->{format}) { + if ((defined $name->{format}) || ($xendomain eq "domU")) { undef $main::BootVMDisk; undef $main::BootVMSystem; $main::Convert = $main::Destination."/".$name->{systemImage}.".raw"; @@ -2207,6 +2207,7 @@ my $imageTree = $this->{imageTree}; my $baseSystem= $this->{baseSystem}; my $sxml = $this->{xml}; + my %xenc = $sxml->getXenConfig(); my $FSTypeRW; my $FSTypeRO; my $error; @@ -2223,6 +2224,15 @@ my $code; my $name; my $treebase; + my $xendomain; + #========================================== + # check for xen domain setup + #------------------------------------------ + if (defined $xenc{xen_domain}) { + $xendomain = $xenc{xen_domain}; + } else { + $xendomain = "dom0"; + } #========================================== # turn image path into absolute path #------------------------------------------ @@ -2916,7 +2926,7 @@ #========================================== # Create VM format/configuration #------------------------------------------ - if (defined $name->{format}) { + if ((defined $name->{format}) || ($xendomain eq "domU")) { undef $main::BootVMDisk; undef $main::BootVMSystem; $main::Convert = $main::Destination."/".$name->{systemImage}.".raw"; @@ -3070,7 +3080,8 @@ $targetPartitionNext = $targetPartition + 1; } if ($href -> {size} eq "image") { - print FD int(((-s "$this->{imageDest}/$name")/1024/1024)+1); + my $size = main::isize ("$this->{imageDest}/$name"); + print FD int (($size/1024/1024)+1); } else { print FD $href -> {size}; } @@ -3884,7 +3895,7 @@ # Create image md5sum #------------------------------------------ $kiwi -> info ("Creating image MD5 sum..."); - my $size = -s "$this->{imageDest}/$name"; + my $size = main::isize ("$this->{imageDest}/$name"); my $primes = qxx ("factor $size"); $primes =~ s/^.*: //; my $blocksize = 1; for my $factor (split /\s/,$primes) { @@ -3993,7 +4004,7 @@ return undef; } my $line = <FD>; close FD; chomp $line; - my $size = -s $image; + my $size = main::isize ($image); my $primes = qxx ("factor $size"); $primes =~ s/^.*: //; my $blocksize = 1; for my $factor (split /\s/,$primes) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh --- old/kiwi/modules/KIWILinuxRC.sh 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWILinuxRC.sh 2010-07-23 10:59:54.000000000 +0200 @@ -2129,7 +2129,7 @@ # probe filesystem #-------------------------------------- probeFileSystem $sdev - if [ -z $FSTYPE ] || [ $FSTYPE = "unknown" ];then + if [ -z "$FSTYPE" ] || [ "$FSTYPE" = "unknown" ];then FSTYPE="auto" fi echo "$diskByID $mount $FSTYPE defaults 0 0" >> $nfstab @@ -5651,6 +5651,32 @@ fi } #====================================== +# restoreLVMMetadata +#-------------------------------------- +function restoreLVMPhysicalVolumes { + # /.../ + # restore the pysical volumes by the given restore file + # created from vgcfgbackup. It's important to create them + # with the same uuid's compared to the restore file + # ---- + local restorefile=$1 + cat $restorefile | grep -A2 -E 'pv[0-9] {' | while read line;do + if [ -z "$uuid" ];then + uuid=$(echo $line | grep 'id =' |\ + cut -f2 -d= | tr -d \") + fi + if [ -z "$pdev" ];then + pdev=$(echo $line|grep 'device =' |\ + cut -f2 -d\" | cut -f1 -d\") + fi + if [ ! -z "$pdev" ];then + pvcreate -u $uuid $pdev + unset uuid + unset pdev + fi + done +} +#====================================== # pxeSizeToMB #-------------------------------------- function pxeSizeToMB { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIMigrate.txt new/kiwi/modules/KIWIMigrate.txt --- old/kiwi/modules/KIWIMigrate.txt 2010-06-25 15:46:54.000000000 +0200 +++ new/kiwi/modules/KIWIMigrate.txt 2010-07-23 10:59:54.000000000 +0200 @@ -10,3 +10,4 @@ openSUSE-11.0=suse-11.0 openSUSE-11.1=suse-11.1 openSUSE-11.2=suse-11.2 +openSUSE-11.3=suse-11.3 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 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rnc 2010-07-23 10:59:54.000000000 +0200 @@ -34,6 +34,7 @@ size-type = xsd:token {pattern = "\d*|image"} volume-size-type = xsd:token {pattern = "\d+|\d+M|\d+G"} image-name = xsd:token {pattern = "[^\s/]+"} +locale-name = xsd:token {pattern = "[a-z]{2}_[A-Z]{2}(,[a-z]{2}_[A-Z]{2})*"} #========================================== # start with image description @@ -453,7 +454,7 @@ ] element locale { k.locale.attlist, - text + locale-name } } 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 2010-07-19 10:48:34.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rng 2010-07-23 10:59:54.000000000 +0200 @@ -42,6 +42,11 @@ <param name="pattern">[^\s/]+</param> </data> </define> + <define name="locale-name"> + <data type="token"> + <param name="pattern">[a-z]{2}_[A-Z]{2}(,[a-z]{2}_[A-Z]{2})*</param> + </data> + </define> Reply