Hello community,

here is the log from the commit of package kiwi for openSUSE:Factory
checked in at Sun Oct 16 12:52:17 CEST 2011.



--------
--- openSUSE:Factory/kiwi/kiwi.changes  2011-10-10 14:11:34.000000000 +0200
+++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes      2011-10-14 
10:49:36.000000000 +0200
@@ -1,0 +2,120 @@
+Fri Oct 14 10:35:45 CEST 2011 - [email protected]
+  
+- v4.97.5 released
+  
+-------------------------------------------------------------------
+Thu Oct 13 16:15:52 CEST 2011 - [email protected]
+  
+- xen dom0 support exists only for x86_64 architecture in
+  SUSE 12.1. Therefore we check for this arch in the boot
+  image descriptions
+  
+-------------------------------------------------------------------
+Thu Oct 13 10:01:33 CEST 2011 - [email protected]
+  
+- fetchFile does not handle special characters consistently.
+  fetchFile "some%20file" with atftp correctly downloads 'some%20file'.
+  but with ftp curl converts the file name to 'some file', which is
+  not expected. This patch fixes this and makes the behavior
+  consistent
+  
+-------------------------------------------------------------------
+Wed Oct 12 21:39:56 CEST 2011 - [email protected]
+  
+- fixed use of uninitialized $count variable (bnc #455990)
+  
+-------------------------------------------------------------------
+Wed Oct 12 18:30:21 CEST 2011 - [email protected]
+  
+- don't ignore size setup even if the size is smaller than the min size
+  kiwi's min size is safe but includes spare space. people who want to
+  overwrite that size can do it but on their own risk
+  
+-------------------------------------------------------------------
+Wed Oct 12 17:37:23 CEST 2011 - [email protected]
+  
+- allow drivers section in the system image which will be
+  added to the drivers section of the selected boot image.
+  This allows to add custom driver information additional
+  to the existing driver selection as part of the boot
+  image (bnc #720933)
+  
+  Author: Marcus Schäfer <show>
+-------------------------------------------------------------------
+Wed Oct 12 12:35:03 CEST 2011 - [email protected]
+  
+- fixed size calculation, use 4% overhead
+  
+-------------------------------------------------------------------
+Wed Oct 12 10:20:06 CEST 2011 - [email protected]
+  
+- removed function waitForUSBDeviceScan and added new function
+  waitForIdleEventQueue which waits for a specific amount of time
+  to check whether new device nodes settle or not. if not the
+  function will return
+  
+-------------------------------------------------------------------
+Tue Oct 11 11:14:23 CEST 2011 - [email protected]
+  
+- removed obsolete files from the suse-11.3 examples
+  
+-------------------------------------------------------------------
+Tue Oct 11 10:40:16 CEST 2011 - [email protected]
+  
+- added preException hook which runs inside the systemExcpetion
+  function to allow further tasks before the exception message
+  is printed and the shell/reboot/wait action happens
+  
+-------------------------------------------------------------------
+Tue Oct 11 10:05:49 CEST 2011 - [email protected]
+  
+- fixed the check for the installed system in the netboot code
+  if the luks encryption is used. The check calls luksOpen with
+  luks_open_can_fail=yes. This means if the wrong passphrase is
+  given the check will proceed with 'update is required' and
+  does not fail with a reboot exception in luksOpen
+  
+-------------------------------------------------------------------
+Tue Oct 11 09:59:28 CEST 2011 - [email protected]
+  
+- added hooks preswap/postswap which run before the check and
+  creation of the imageSwapDevice. This allows to setup your
+  own swap device handling.
+  
+-------------------------------------------------------------------
+Tue Oct 11 09:51:45 CEST 2011 - [email protected]
+  
+- allow luksOpen to fail if luks_open_can_fail is set
+- allow map name to be specified in luksClose
+  
+-------------------------------------------------------------------
+Tue Oct 11 09:41:13 CEST 2011 - [email protected]
+  
+- fixed updateOtherDeviceFstab to make use of the prefix argument
+  
+-------------------------------------------------------------------
+Mon Oct 10 12:38:35 CEST 2011 - [email protected]
+  
+- don't show the LUKS passphrase as part of the boot log
+  
+-------------------------------------------------------------------
+Mon Oct 10 12:18:02 CEST 2011 - [email protected]
+  
+- fixed vgchange calls to take the volume group name as argument
+  
+-------------------------------------------------------------------
+Mon Oct 10 12:17:18 CEST 2011 - [email protected]
+  
+- fixed multiple display of the same info messages when
+  creating the virtual disk file
+  
+-------------------------------------------------------------------
+Mon Oct 10 11:52:57 CEST 2011 - [email protected]
+  
+- added a workaround for the cylinder counting bug in parted.
+  parted lists two different numbers for the amount of cylinders
+  only one is correct. This patch uses the correct value displayed
+  here. parted only shows different values if called on a loop
+  device
+  
+-------------------------------------------------------------------

calling whatdependson for head-i586


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

Other differences:
------------------
++++++ kiwi.spec ++++++
--- /var/tmp/diff_new_pack.86YkHt/_old  2011-10-16 12:52:00.000000000 +0200
+++ /var/tmp/diff_new_pack.86YkHt/_new  2011-10-16 12:52:00.000000000 +0200
@@ -69,7 +69,7 @@
 %endif
 %endif
 Summary:        OpenSuSE - KIWI Image System
-Version:        4.97.4
+Version:        4.97.5
 Release:        1
 Group:          System/Management
 License:        GPLv2

++++++ kiwi-docu.tar.bz2 ++++++
openSUSE:Factory/kiwi/kiwi-docu.tar.bz2 
/mounts/work_src_done/STABLE/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  2011-10-03 00:00:06.000000000 +0200
+++ new/kiwi/.revision  2011-10-03 00:00:06.000000000 +0200
@@ -1 +1 @@
-620e4e65d05b257e4fc8c6017908e6ba9f75e28e
+ea405e85218bd6fbf65c2cc645d64411a4dd63a4
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        2011-10-06 12:21:56.000000000 +0200
+++ new/kiwi/modules/KIWIBoot.pm        2011-10-14 10:46:44.000000000 +0200
@@ -386,7 +386,7 @@
                my $minInodes;
                my $sizeXMLBytes = 0;
                my $spare        = 100 * 1024 * 1024; # 100M free
-               my $journal      = 12  * 1024 * 1024; # 12M  journal
+               my $fsoverhead   = 1.4; # 4% filesystem overhead
                my $fsopts       = $cmdL -> getFilesystemOptions();
                my $inodesize    = $fsopts->[1];
                my $inoderatio   = $fsopts->[2];
@@ -399,11 +399,11 @@
                        # System is specified as a directory...
                        $minInodes = qxx ("find $system | wc -l");
                        $sizeBytes = qxx ("du -s --block-size=1 $system | cut 
-f1");
+                       $sizeBytes*= $fsoverhead;
                        chomp $minInodes;
                        chomp $sizeBytes;
                        $minInodes*= 2;
                        $sizeBytes+= $minInodes * $inodesize;
-                       $sizeBytes+= $journal;
                        $sizeBytes+= $kernelSize;
                        $sizeBytes+= $initrdSize;
                        $sizeBytes+= $spare;
@@ -1812,14 +1812,18 @@
        #------------------------------------------
        my $dmap; # device map
        my $root; # root device
+       if (! defined $system) {
+               $kiwi -> error  ("No system image given");
+               $kiwi -> failed ();
+               return undef;
+       }
+       if (! $haveDiskDevice) {
+               $kiwi -> info ("Creating virtual disk...");
+       } else {
+               $kiwi -> info ("Using disk device $haveDiskDevice...");
+       }
        while (1) {
-               if (! defined $system) {
-                       $kiwi -> error  ("No system image given");
-                       $kiwi -> failed ();
-                       return undef;
-               }
                if (! $haveDiskDevice) {
-                       $kiwi -> info ("Creating virtual disk...");
                        $status = qxx ("qemu-img create $diskname 
$this->{vmsize} 2>&1");
                        $result = $? >> 8;
                        if ($result != 0) {
@@ -1835,7 +1839,6 @@
                                return undef;
                        }
                } else {
-                       $kiwi -> info ("Using disk device $haveDiskDevice...");
                        # /.../
                        # the following is required for suse studio to 
determine the
                        # size of the image target disk. It has no relevance 
for the
@@ -4203,7 +4206,7 @@
        chomp $status;
        $this->{pDiskCylinderSize} = $status;
        $status = qxx (
-               "$parted | head -n 3 | tail -n 1 | cut -f1 -d:"
+               "$parted | head -n 2 | tail -n 1 | cut -f2 -d: | tr -d cyl"
        );
        $result = $? >> 8;
        if ($result != 0) {
@@ -5255,9 +5258,21 @@
        #===========================================
        # adapt min size according to cmdline or XML
        #-------------------------------------------
-       if ($cmdlBytes > $minBytes) {
+       if ($cmdlBytes > 0) {
+               if ($cmdlBytes < $minBytes) {
+                       $kiwi -> warning (
+                               "given size is smaller than calculated min size"
+                       );
+                       $kiwi -> oops();
+               }
                $minBytes = $cmdlBytes;
-       } elsif ($XMLBytes > $minBytes) {
+       } elsif ($XMLBytes > 0) {
+               if ($XMLBytes < $minBytes) {
+                       $kiwi -> warning (
+                               "given size is smaller than calculated min size"
+                       );
+                       $kiwi -> oops();
+               }
                $minBytes = $XMLBytes;
        }
        #==========================================
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     2011-10-07 15:20:57.000000000 +0200
+++ new/kiwi/modules/KIWIGlobals.pm     2011-10-14 10:46:44.000000000 +0200
@@ -40,7 +40,7 @@
        # Globals (generic)
        #------------------------------------------
        my %data;
-       $data{Version}         = "4.97.4";
+       $data{Version}         = "4.97.5";
        $data{Publisher}       = "SUSE LINUX Products GmbH";
        $data{Preparer}        = "KIWI - http://kiwi.berlios.de";;
        $data{ConfigName}      = "config.xml";
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       2011-10-06 12:21:56.000000000 +0200
+++ new/kiwi/modules/KIWIImage.pm       2011-10-14 10:46:44.000000000 +0200
@@ -187,6 +187,7 @@
        my @falistImage;
        my @fplistImage;
        my @fplistDelete;
+       my @driverList;
        my %fixedBootInclude;
        my @node;
        #==========================================
@@ -251,6 +252,21 @@
        }
        $changeset{"repositories"} = \%repos;
        #==========================================
+       # Store drivers section if any
+       #------------------------------------------
+       @node = $src_xml->getDriversNodeList() -> get_nodelist();
+       foreach my $element (@node) {
+               if (! $src_xml -> __requestedProfile ($element)) {
+                       next;
+               }
+               my @files = $element->getElementsByTagName ("file");
+               foreach my $element (@files) {
+                       my $driver = $element -> getAttribute ("name");
+                       push (@driverList,$driver);
+               }
+       }
+       $changeset{"driverList"} = \@driverList;
+       #==========================================
        # Store boot included packages
        #------------------------------------------
        @node = $src_xml->getPackageNodeList() -> get_nodelist();
@@ -4008,7 +4024,7 @@
        my $xml    = $this->{xml};
        my $mini   = qxx ("find $extend | wc -l"); chomp $mini;
        my $minsize= qxx ("du -s --block-size=1 $extend | cut -f1"); chomp 
$minsize;
-       my $journal= 12  * 1024 * 1024;
+       my $fsohead= 1.4; # 4% filesystem overhead
        my $spare  = 100 * 1024 * 1024;
        my $files  = $mini;
        my $fsopts = $cmdL -> getFilesystemOptions();
@@ -4025,9 +4041,8 @@
        $kiwi -> loginfo ("getSize: files: $files\n");
        $kiwi -> loginfo ("getSize: usage: $minsize Bytes\n");
        $kiwi -> loginfo ("getSize: inode: $isize Bytes\n");
-       $kiwi -> loginfo ("getSize: journ: $journal Bytes\n");
+       $minsize *= $fsohead;
        $minsize += $mini * $isize;
-       $minsize += $journal;
        $minsize += $spare;
        $xmlsize = $minsize;
        $kiwi -> loginfo ("getSize: minsz: $minsize Bytes\n");
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     2011-10-07 15:20:57.000000000 +0200
+++ new/kiwi/modules/KIWILinuxRC.sh     2011-10-14 10:46:44.000000000 +0200
@@ -329,6 +329,7 @@
                        what="shell"
                fi
        fi
+       runHook preException "$@"
        Echo "$1"
        case "$what" in
        "reboot")
@@ -2491,8 +2492,8 @@
                        fi
                        probeFileSystem $device
                        if [ ! "$FSTYPE" = "luks" ] ; then
-                               if [ ! -d $partMount ];then
-                                       mkdir -p $partMount
+                               if [ ! -d $prefix/$partMount ];then
+                                       mkdir -p $prefix/$partMount
                                fi
                                echo "$device $partMount $FSTYPE defaults 0 0" 
>> $nfstab
                        fi
@@ -2765,28 +2766,24 @@
        echo $SYSTEM_MD5STATUS | cut -f$1 -d:
 }
 #======================================
-# waitForUSBDeviceScan
+# waitForIdleEventQueue
 #--------------------------------------
-function waitForUSBDeviceScan {
-       local devices=0
-       local s1="usb-storage: device scan complete"
-       if [ ! "$HAVE_USB" = "yes" ];then
-               return
-       fi
-       if [ ! "$SCAN_USB" = "complete" ];then
-               Echo -n "Waiting for USB device scan to complete..."
-               while \
-                       [ $(dmesg|grep -c -E "$s1") -lt 1 ] && \
-                       [ $devices -lt 8 ]
-               do
-                       echo -n .
-                       sleep 1
-                       devices=$(( $devices + 1 ))
-               done
-               echo
+function waitForIdleEventQueue {
+       local devs=0
+       local p_devs=1
+       local timeout=5
+       Echo -n "Waiting for devices to settle..."
+       while true;do
                udevPending
-               SCAN_USB=complete
-       fi
+               devs=$(ls -1 /dev | wc -l)
+               if [ $devs -eq $p_devs ];then
+                       break
+               fi
+               p_devs=$devs
+               sleep $timeout
+               echo -n .
+       done
+       echo
 }
 #======================================
 # probeUSB
@@ -2795,8 +2792,6 @@
        local module=""
        local stdevs=""
        local hwicmd="/usr/sbin/hwinfo"
-       export HAVE_USB="no"
-       export SCAN_USB="not-started"
        udevPending
        if [ $HAVE_MODULES_ORDER = 0 ];then
                #======================================
@@ -2852,19 +2847,13 @@
                        modprobe $i &>/dev/null
                done
        fi
-       if [ -e /sys/bus/usb/devices ];then
-               stdevs=$(ls -1 /sys/bus/usb/devices/ | wc -l)
-               if [ $stdevs -gt 0 ];then
-                       export HAVE_USB="yes"
-               fi
-       fi
-       waitForUSBDeviceScan
 }
 #======================================
 # probeDevices
 #--------------------------------------
 function probeDevices {
        local skipUSB=$1
+       waitForIdleEventQueue
        #======================================
        # probe USB devices and load modules
        #--------------------------------------
@@ -2946,6 +2935,7 @@
                modprobe $i &>/dev/null
        done
        udevPending
+       waitForIdleEventQueue
 }
 #======================================
 # CDDevice
@@ -2992,7 +2982,6 @@
        #======================================
        # search for USB removable devices
        #--------------------------------------
-       waitForUSBDeviceScan
        for device in /sys/bus/usb/drivers/usb-storage/*;do
                if [ ! -L $device ];then
                        continue
@@ -3143,6 +3132,7 @@
        # contains a KIWI image signature
        # ----
        local IFS
+       local count=0
        #======================================
        # lookup devices from hwinfo
        #--------------------------------------
@@ -5228,6 +5218,22 @@
 }
 
 #======================================
+# encodeURL
+#--------------------------------------
+function encodeURL {
+       # /.../
+       # encode special characters in URL's to correctly
+       # serve as input for fetchFile and putFile
+       # ----
+       local STR
+       local CH
+       STR="$@"
+       echo -n "$STR" | while read -n1 CH; do
+               [[ $CH =~ [-_A-Za-z0-9./] ]] && printf "$CH" || printf "%%%x" 
\'"$CH"
+       done
+}
+
+#======================================
 # fetchFile
 #--------------------------------------
 function fetchFile {
@@ -5242,6 +5248,7 @@
        local host=$4
        local type=$5
        local chunk=$6
+       local encoded_path
        local dump
        local call
        local call_pid
@@ -5265,20 +5272,21 @@
                fi
        fi
        if test "$izip" = "compressed"; then
-               path=$(echo $path | sed -e s@\\.gz@@)
+               path=$(echo "$path" | sed -e s@\\.gz@@)
                path="$path.gz"
        fi
+       encoded_path=$(encodeURL "$path")
        #======================================
        # setup progress meta information
        #--------------------------------------
-       dump="dd bs=$chunk of=$dest"
+       dump="dd bs=$chunk of=\"$dest\""
        showProgress=0
        if [ -x /usr/bin/dcounter ] && [ -f /etc/image.md5 ] && [ -b "$dest" 
];then
                showProgress=1
                read sum1 blocks blocksize zblocks zblocksize < /etc/image.md5
                needBytes=`expr $blocks \* $blocksize`
                needMByte=`expr $needBytes / 1048576`
-               progressBaseName=$(basename $path)
+               progressBaseName=$(basename "$path")
                TEXT_LOAD=$(getText "Loading %1" "$progressBaseName")
                dump="dcounter -s $needMByte -l \"$TEXT_LOAD \" 2>/progress | 
$dump"
        fi
@@ -5288,28 +5296,34 @@
        case "$type" in
                "http")
                        if test "$izip" = "compressed"; then
-                               call="curl -f http://$host/$path 
2>$TRANSFER_ERRORS_FILE |\
+                               call="curl -f http://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        gzip -d 2>>$TRANSFER_ERRORS_FILE | 
$dump"
                        else
-                               call="curl -f http://$host/$path 2> 
$TRANSFER_ERRORS_FILE |\
+                               call="curl -f http://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        $dump"
                        fi
                        ;;
                "https")
                        if test "$izip" = "compressed"; then
-                               call="curl -f -k https://$host/$path 
2>$TRANSFER_ERRORS_FILE |\
+                               call="curl -f -k https://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        gzip -d 2>>$TRANSFER_ERRORS_FILE | 
$dump"
                        else
-                               call="curl -f -k https://$host/$path 2> 
$TRANSFER_ERRORS_FILE |\
+                               call="curl -f -k https://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        $dump"
                        fi
                        ;;
                "ftp")
                        if test "$izip" = "compressed"; then
-                               call="curl ftp://$host/$path 
2>$TRANSFER_ERRORS_FILE |\
+                               call="curl ftp://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        gzip -d 2>>$TRANSFER_ERRORS_FILE | 
$dump"
                        else
-                               call="curl ftp://$host/$path 2> 
$TRANSFER_ERRORS_FILE |\
+                               call="curl ftp://$host/$encoded_path \
+                                       2>$TRANSFER_ERRORS_FILE |\
                                        $dump"
                        fi
                        ;;
@@ -5327,7 +5341,7 @@
                                # mutlicast is disabled because you can't seek 
in a pipe
                                # atftp is disabled because it doesn't work 
with pipes
                                call="busybox tftp \
-                                       -b $imageBlkSize -g -r $path \
+                                       -b $imageBlkSize -g -r \"$path\" \
                                        -l >(gzip -d 2>>$TRANSFER_ERRORS_FILE | 
$dump) \
                                        $host 2>>$TRANSFER_ERRORS_FILE"
                        else
@@ -5336,7 +5350,7 @@
                                                --trace \
                                                --option \"$multicast_atftp\"  \
                                                --option \"blksize 
$imageBlkSize\" \
-                                               -g -r $path -l $dest $host 2>&1 
| \
+                                               -g -r \"$path\" -l \"$dest\" 
$host 2>&1 | \
                                                atftpProgress \
                                                        $needMByte 
\"$TEXT_LOAD\" \
                                                        $TRANSFER_ERRORS_FILE 
$imageBlkSize \
@@ -5345,7 +5359,7 @@
                                        call="atftp \
                                                --option \"$multicast_atftp\"  \
                                                --option \"blksize 
$imageBlkSize\" \
-                                               -g -r $path -l $dest $host \
+                                               -g -r \"$path\" -l \"$dest\" 
$host \
                                                &> $TRANSFER_ERRORS_FILE"
                                fi
                        fi
@@ -5407,6 +5421,7 @@
        local dest=$2
        local host=$3
        local type=$4
+       local encoded_dest
        if test -z "$path"; then
                systemException "No path specified" "reboot"
        fi
@@ -5423,21 +5438,25 @@
                        type="$SERVERTYPE"
                fi
        fi
+       encoded_dest=$(encodeURL "$dest")
        case "$type" in
                "http")
-                       curl -f -T $path http://$host/$dest > 
$TRANSFER_ERRORS_FILE 2>&1
+                       curl -f -T "$path" http://$host/$encoded_dest \
+                               > $TRANSFER_ERRORS_FILE 2>&1
                        return $?
                        ;;
                "https")
-                       curl -f -T $path https://$host/$dest > 
$TRANSFER_ERRORS_FILE 2>&1
+                       curl -f -T "$path" https://$host/$encoded_dest \
+                               > $TRANSFER_ERRORS_FILE 2>&1
                        return $?
                        ;;
                "ftp")
-                       curl -T $path ftp://$host/$dest  > 
$TRANSFER_ERRORS_FILE 2>&1
+                       curl -T "$path" ftp://$host/$encoded_dest \
+                               > $TRANSFER_ERRORS_FILE 2>&1
                        return $?
                        ;;
                "tftp")
-                       atftp -p -l $path -r $dest $host >/dev/null 2>&1
+                       atftp -p -l "$path" -r "$dest" $host >/dev/null 2>&1
                        return $?
                        ;;
                *)
@@ -6050,33 +6069,46 @@
        local name=$2
        local retry=1
        local info
+       #======================================
+       # no map name set, build it from device
+       #--------------------------------------
        if [ -z "$name" ];then
                name=luks_$(basename $ldev)
        fi
+       #======================================
+       # luks map already exists, return
+       #--------------------------------------
        if [ -e /dev/mapper/$name ];then
                export luksDeviceOpened=/dev/mapper/$name
                return
        fi
+       #======================================
+       # check device for luks extension
+       #--------------------------------------
        if ! cryptsetup isLuks $ldev &>/dev/null;then
                export luksDeviceOpened=$ldev
                return
        fi
-       if [ ! -z "$luks_pass" ];then
-               echo $luks_pass > /tmp/luks
-       fi
+       #======================================
+       # ask for passphrase if not cached
+       #--------------------------------------
        while true;do
-               if [ ! -e /tmp/luks ];then
+               if [ -z "$luks_pass" ];then
                        Echo "Try: $retry"
-                       LUKS_OPEN=$(runInteractive \
+                       errorLogStop
+                       luks_pass=$(runInteractive \
                                "--stdout --insecure --passwordbox 
"\"$TEXT_LUKS\"" 10 60"
                        )
-                       echo $LUKS_OPEN > /tmp/luks
+                       errorLogContinue
                fi
-               if cat /tmp/luks | cryptsetup luksOpen $ldev $name;then
+               if echo "$luks_pass" | cryptsetup luksOpen $ldev $name;then
                        break
                fi
-               rm -f /tmp/luks
                unset luks_pass
+               if [ -n "$luks_open_can_fail" ]; then
+                       unset luksDeviceOpened
+                       return 1
+               fi
                if [ $retry -eq 3 ];then
                        systemException \
                                "Max retries reached... reboot" \
@@ -6084,12 +6116,19 @@
                fi
                retry=$(($retry + 1))
        done
+       #======================================
+       # wait for the luks map to appear
+       #--------------------------------------
        if ! waitForStorageDevice /dev/mapper/$name &>/dev/null;then
                systemException \
                        "LUKS map /dev/mapper/$name doesn't appear... fatal !" \
                "reboot"
        fi
+       #======================================
+       # store luks device and return
+       #--------------------------------------
        export luksDeviceOpened=/dev/mapper/$name
+       return 0
 }
 #======================================
 # luksResize
@@ -6117,7 +6156,18 @@
        # /.../
        # close all open LUKS mappings
        # ----
-       local name
+       local name=$1
+       #======================================
+       # close specified name if set
+       #--------------------------------------
+       if [ -n "$1" ]; then
+               name=$(basename $1)
+               cryptsetup luksClose $name
+               return
+       fi
+       #======================================
+       # close all luks* map names
+       #--------------------------------------
        for i in /dev/mapper/luks*;do
                name=$(basename $i)
                cryptsetup luksClose $name
@@ -7664,7 +7714,7 @@
        echo "kpartx -d $diskLoop" >> $reset
        if searchVolumeGroup; then
                diskLoop=/dev/$VGROUP/LVRoot
-               echo "vgchange -an" >> $reset
+               echo "vgchange -a n $VGROUP" >> $reset
        else
                diskLoop=$(echo $diskLoop | cut -f3 -d '/')
                diskLoop=/dev/mapper/${diskLoop}p1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/modules/KIWILog.pm new/kiwi/modules/KIWILog.pm
--- old/kiwi/modules/KIWILog.pm 2011-10-03 00:00:06.000000000 +0200
+++ new/kiwi/modules/KIWILog.pm 2011-10-14 10:46:44.000000000 +0200
@@ -295,6 +295,29 @@
 }
 
 #==========================================
+# oops
+#------------------------------------------
+sub oops {
+       # ...
+       # This is the cyan "oops" flag
+       # ---
+       my $this    = shift;
+       my $rootEFD = $this->{rootefd};
+       my $FD      = $this->{channel};
+       if ((! defined $this->{fileLog}) && (! defined $this->{nocolor})) {
+               $this -> doStat();
+               print $FD "\033[1;36moops\n";
+               $this -> doNorm();
+               if ($this->{errorOk}) {
+                       print $rootEFD "   notset\n";
+               }
+       } else {
+               print $FD "   oops\n";
+       }
+       $this -> saveInCache ("   oops\n");
+}
+
+#==========================================
 # step
 #------------------------------------------
 sub step {
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 2011-10-03 00:00:06.000000000 +0200
+++ new/kiwi/modules/KIWIXML.pm 2011-10-14 10:46:44.000000000 +0200
@@ -170,6 +170,7 @@
        $this->{repositNodeList} = $repositNodeList;
        $this->{packageNodeList} = $packageNodeList;
        $this->{instsrcNodeList} = $instsrcNodeList;
+       $this->{driversNodeList} = $driversNodeList;
        #==========================================
        # Read and create profile hash
        #------------------------------------------
@@ -214,7 +215,6 @@
        #==========================================
        # Store object data
        #------------------------------------------
-       $this->{driversNodeList}    = $driversNodeList;
        $this->{usrdataNodeList}    = $usrdataNodeList;
        $this->{controlFile}        = $controlFile;
        #==========================================
@@ -2012,6 +2012,41 @@
 }
 
 #==========================================
+# addDrivers
+#------------------------------------------
+sub addDrivers {
+       # ...
+       # Add the given driver list to the specified drivers
+       # section of the xml description parse tree.
+       # ----
+       my $this  = shift;
+       my @drvs  = @_;
+       my $kiwi  = $this->{kiwi};
+       my $nodes = $this->{driversNodeList};
+       my $nodeNumber = -1;
+    for (my $i=1;$i<= $nodes->size();$i++) {
+               my $node = $nodes -> get_node($i);
+               if (! $this -> __requestedProfile ($node)) {
+                       next;
+               }
+               $nodeNumber = $i;
+       }
+       if ($nodeNumber < 0) {
+               $kiwi -> loginfo ("addDrivers: no drivers section found... 
skipped\n");
+               return $this;
+       }
+       foreach my $driver (@drvs) {
+               next if ($driver eq "");
+               my $addElement = new XML::LibXML::Element ("file");
+               $addElement -> setAttribute("name",$driver);
+               $nodes -> get_node($nodeNumber)
+                       -> appendChild ($addElement);
+       }
+       $this -> updateXML();
+       return $this;
+}
+
+#==========================================
 # addPackages
 #------------------------------------------
 sub addPackages {
@@ -3490,6 +3525,18 @@
 }
 
 #==========================================
+# getDriversNodeList
+#------------------------------------------
+sub getDriversNodeList {
+       # ...
+       # Return a list of all <drivers> nodes. Each list member
+       # is an XML::LibXML::Element object pointer
+       # ---
+       my $this = shift;
+       return $this->{driversNodeList};
+}
+
+#==========================================
 # getPackageNodeList
 #------------------------------------------
 sub getPackageNodeList {
@@ -4268,7 +4315,18 @@
                $kiwi -> done ();
        }
        #==========================================
-       # 2) merge/update packages
+       # 2) merge/update drivers
+       #------------------------------------------
+       if (@{$changeset->{driverList}}) {
+               $kiwi -> info ("Updating driver(s):\n");
+               my @drivers = @{$changeset->{driverList}};
+               foreach my $d (@drivers) {
+                       $kiwi -> info ("--> $d\n");
+               }
+               $this -> addDrivers (@drivers);
+       }
+       #==========================================
+       # 3) merge/update packages
        #------------------------------------------
        if (@{$changeset->{fplistImage}}) {
                $kiwi -> info ("Updating package(s):\n");
@@ -4288,7 +4346,7 @@
                }
        }
        #==========================================
-       # 3) merge/update archives
+       # 4) merge/update archives
        #------------------------------------------
        if (@{$changeset->{falistImage}}) {
                $kiwi -> info ("Updating archive(s):\n");
@@ -4301,13 +4359,13 @@
                );
        }
        #==========================================
-       # 4) merge/update machine attribs in type
+       # 5) merge/update machine attribs in type
        #------------------------------------------
        if (defined $changeset->{"domain"}) {
                $this -> __setMachineAttribute ("domain",$changeset);
        }
        #==========================================
-       # 5) merge/update preferences and type
+       # 6) merge/update preferences and type
        #------------------------------------------
        if (defined $changeset->{"locale"}) {
                $this -> __setOptionsElement ("locale",$changeset);
@@ -4376,7 +4434,7 @@
                $this -> __setSystemDiskElement (undef,$changeset);
        }
        #==========================================
-       # 6) merge/update type attributes
+       # 7) merge/update type attributes
        #------------------------------------------
        if (defined $changeset->{"hybrid"}) {
                $this -> __setTypeAttribute (
@@ -4419,7 +4477,7 @@
                );
        }
        #==========================================
-       # 7) merge/update image attribs, toplevel
+       # 8) merge/update image attribs, toplevel
        #------------------------------------------
        if (defined $changeset->{"displayname"}) {
                $this -> __setImageAttribute (
@@ -4427,7 +4485,7 @@
                );
        }
        #==========================================
-       # 8) cleanup reqProfiles
+       # 9) cleanup reqProfiles
        #------------------------------------------
        $this->{reqProfiles} = $reqProfiles;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/isoboot/suse-12.1/config.xml 
new/kiwi/system/boot/ix86/isoboot/suse-12.1/config.xml
--- old/kiwi/system/boot/ix86/isoboot/suse-12.1/config.xml      2011-10-03 
00:00:07.000000000 +0200
+++ new/kiwi/system/boot/ix86/isoboot/suse-12.1/config.xml      2011-10-14 
10:46:44.000000000 +0200
@@ -84,7 +84,8 @@
        </packages>
        <packages type="bootstrap" profiles="xenk">
                <package name="kernel-xen"/>
-               <package name="xen"/>
+               <!-- xen dom0 support only on x86_64 -->
+               <package name="xen" arch="x86_64"/>
        </packages>
        <packages type="bootstrap" profiles="desktop">
                <package name="kernel-desktop"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/netboot/suse-12.1/config.xml 
new/kiwi/system/boot/ix86/netboot/suse-12.1/config.xml
--- old/kiwi/system/boot/ix86/netboot/suse-12.1/config.xml      2011-10-03 
00:00:07.000000000 +0200
+++ new/kiwi/system/boot/ix86/netboot/suse-12.1/config.xml      2011-10-14 
10:46:44.000000000 +0200
@@ -160,7 +160,8 @@
                <package name="kernel-desktop"/>
        </packages>
        <packages type="image" profiles="xen">
-               <package name="xen"/>
+               <!-- xen dom0 support only on x86_64 -->
+               <package name="xen" arch="x86_64"/>
        </packages>
        <packages type="image" profiles="default,xen">
                <package name="cryptsetup"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/netboot/suse-linuxrc 
new/kiwi/system/boot/ix86/netboot/suse-linuxrc
--- old/kiwi/system/boot/ix86/netboot/suse-linuxrc      2011-10-07 
15:20:58.000000000 +0200
+++ new/kiwi/system/boot/ix86/netboot/suse-linuxrc      2011-10-14 
10:46:44.000000000 +0200
@@ -309,11 +309,14 @@
                if linuxPartition $imageDiskDevice;then
                        probeFileSystem $imageDevice
                        if [ "$FSTYPE" = "luks" ];then
-                               luksOpen $imageDevice
-                               imageDevice=$luksDeviceOpened
-                               imageRODevice=$imageDevice
-                               probeFileSystem $imageRootDevice
-                               export haveLuks=yes
+                               luks_open_can_fail=yes
+                               if luksOpen $imageDevice ; then
+                                       imageDevice=$luksDeviceOpened
+                                       imageRODevice=$imageDevice
+                                       probeFileSystem $imageRootDevice
+                                       export haveLuks=yes
+                               fi
+                               unset luks_open_can_fail
                        fi
                        if mountSystem $imageDevice;then
                                updateNeeded
@@ -329,6 +332,9 @@
                                RELOAD_IMAGE="yes"
                                systemIntegrity="clean"
                        fi
+                       if [ -n "$haveLuks" ]; then
+                               luksClose $imageDevice
+                       fi
                else
                        systemIntegrity="clean"
                fi
@@ -405,11 +411,13 @@
        else
                export imageSwapDevice=$(pxeRaidSwapDevice)
        fi
+       runHook preswap
        if [ ! -z "$imageSwapDevice" ];then
                if ! mkswap $imageSwapDevice 1>&2;then
                        systemException "Failed to create swap signature" 
"reboot"
                fi
        fi
+       runHook postswap
        #======================================
        # Setup boot space if requested
        #--------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/suse-12.1/config.xml 
new/kiwi/system/boot/ix86/oemboot/suse-12.1/config.xml
--- old/kiwi/system/boot/ix86/oemboot/suse-12.1/config.xml      2011-10-03 
00:00:07.000000000 +0200
+++ new/kiwi/system/boot/ix86/oemboot/suse-12.1/config.xml      2011-10-14 
10:46:44.000000000 +0200
@@ -93,7 +93,8 @@
        </packages>
        <packages type="image" profiles="xenk">
                <package name="kernel-xen"/>
-               <package name="xen"/>
+               <!-- xen dom0 support only on x86_64 -->
+               <package name="xen" arch="x86_64"/>
        </packages>
        <packages type="image" profiles="ec2">
                <package name="kernel-ec2"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/suse-repart 
new/kiwi/system/boot/ix86/oemboot/suse-repart
--- old/kiwi/system/boot/ix86/oemboot/suse-repart       2011-10-07 
15:20:58.000000000 +0200
+++ new/kiwi/system/boot/ix86/oemboot/suse-repart       2011-10-10 
15:09:09.000000000 +0200
@@ -377,7 +377,7 @@
                if [ "$haveLuks" = "yes" ];then
                        luksClose
                fi
-               vgchange -an
+               vgchange -a n $VGROUP
                #======================================
                # resize LVM partition
                #--------------------------------------
@@ -405,7 +405,7 @@
                        1 $swapParam $recoParam $bootParam yes $VGROUP
                callPartitioner $input
                waitForStorageDevice $(ddn $imageDiskDevice $extendID)
-               vgchange -an
+               vgchange -a n $VGROUP
                #======================================
                # extend volume group with rest space
                #--------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ix86/vmxboot/suse-12.1/config.xml 
new/kiwi/system/boot/ix86/vmxboot/suse-12.1/config.xml
--- old/kiwi/system/boot/ix86/vmxboot/suse-12.1/config.xml      2011-10-03 
00:00:07.000000000 +0200
+++ new/kiwi/system/boot/ix86/vmxboot/suse-12.1/config.xml      2011-10-14 
10:46:44.000000000 +0200
@@ -81,7 +81,8 @@
        </packages>
        <packages type="image" profiles="xenk">
                <package name="kernel-xen"/>
-               <package name="xen"/>
+               <!-- xen dom0 support only on x86_64 -->
+               <package name="xen" arch="x86_64"/>
        </packages>
        <packages type="image" profiles="ec2">
                <package name="kernel-ec2"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/ppc/netboot/suse-linuxrc 
new/kiwi/system/boot/ppc/netboot/suse-linuxrc
--- old/kiwi/system/boot/ppc/netboot/suse-linuxrc       2011-10-07 
15:20:58.000000000 +0200
+++ new/kiwi/system/boot/ppc/netboot/suse-linuxrc       2011-10-14 
10:46:44.000000000 +0200
@@ -309,11 +309,14 @@
                if linuxPartition $imageDiskDevice;then
                        probeFileSystem $imageDevice
                        if [ "$FSTYPE" = "luks" ];then
-                               luksOpen $imageDevice
-                               imageDevice=$luksDeviceOpened
-                               imageRODevice=$imageDevice
-                               probeFileSystem $imageRootDevice
-                               export haveLuks=yes
+                               luks_open_can_fail=yes
+                               if luksOpen $imageDevice ; then
+                                       imageDevice=$luksDeviceOpened
+                                       imageRODevice=$imageDevice
+                                       probeFileSystem $imageRootDevice
+                                       export haveLuks=yes
+                               fi
+                               unset luks_open_can_fail
                        fi
                        if mountSystem $imageDevice;then
                                updateNeeded
@@ -329,6 +332,9 @@
                                RELOAD_IMAGE="yes"
                                systemIntegrity="clean"
                        fi
+                       if [ -n "$haveLuks" ]; then
+                               luksClose $imageDevice
+                       fi
                else
                        systemIntegrity="clean"
                fi
@@ -405,11 +411,13 @@
        else
                export imageSwapDevice=$(pxeRaidSwapDevice)
        fi
+       runHook preswap
        if [ ! -z "$imageSwapDevice" ];then
                if ! mkswap $imageSwapDevice 1>&2;then
                        systemException "Failed to create swap signature" 
"reboot"
                fi
        fi
+       runHook postswap
        #======================================
        # Setup boot space if requested
        #--------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi/system/boot/s390/netboot/suse-linuxrc 
new/kiwi/system/boot/s390/netboot/suse-linuxrc
--- old/kiwi/system/boot/s390/netboot/suse-linuxrc      2011-10-07 
15:20:58.000000000 +0200
+++ new/kiwi/system/boot/s390/netboot/suse-linuxrc      2011-10-14 
10:46:44.000000000 +0200
@@ -309,11 +309,14 @@
                if linuxPartition $imageDiskDevice;then
                        probeFileSystem $imageDevice
                        if [ "$FSTYPE" = "luks" ];then
-                               luksOpen $imageDevice
-                               imageDevice=$luksDeviceOpened
-                               imageRODevice=$imageDevice
-                               probeFileSystem $imageRootDevice
-                               export haveLuks=yes
+                               luks_open_can_fail=yes
+                               if luksOpen $imageDevice ; then
+                                       imageDevice=$luksDeviceOpened
+                                       imageRODevice=$imageDevice
+                                       probeFileSystem $imageRootDevice
+                                       export haveLuks=yes
+                               fi
+                               unset luks_open_can_fail
                        fi
                        if mountSystem $imageDevice;then
                                updateNeeded
@@ -329,6 +332,9 @@
                                RELOAD_IMAGE="yes"
                                systemIntegrity="clean"
                        fi
+                       if [ -n "$haveLuks" ]; then
+                               luksClose $imageDevice
+                       fi
                else
                        systemIntegrity="clean"
                fi
@@ -405,11 +411,13 @@
        else
                export imageSwapDevice=$(pxeRaidSwapDevice)
        fi
+       runHook preswap
        if [ ! -z "$imageSwapDevice" ];then
                if ! mkswap $imageSwapDevice 1>&2;then
                        systemException "Failed to create swap signature" 
"reboot"
                fi
        fi
+       runHook postswap
        #======================================
        # Setup boot space if requested
        #--------------------------------------

continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to