![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at 2015-04-15 17:42:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2015-04-10 09:44:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kiwi.new/kiwi.changes 2015-04-15 17:42:46.000000000 +0200 @@ -1,0 +2,104 @@ +Fri Apr 10 15:18:03 CEST 2015 - ms@suse.de + +- v7.02.37 released + +------------------------------------------------------------------- +Fri Apr 10 14:58:41 CEST 2015 - ms@suse.de + +- DB: rebuild documentation + +------------------------------------------------------------------- +Fri Apr 10 14:57:39 CEST 2015 - ms@suse.de + +- Update documentation + + Added information about recovery hooks + +------------------------------------------------------------------- +Fri Apr 10 14:47:48 CEST 2015 - ms@suse.de + +- Added recovery hooks + + * preRecovery / postRecovery + called before or after the recovery is processed + + * preRecoverySetup / postRecoverySetup + called before or after the setup of the recovery files + and tarballs is processed + +------------------------------------------------------------------- +Fri Apr 10 12:39:01 CEST 2015 - ms@suse.de + +- v7.02.36 released + +------------------------------------------------------------------- +Thu Apr 9 11:36:29 CEST 2015 - ms@suse.de + +- Fixed OEMFindPartitions + + * partition size of install target must be greater than + the size of the image partition, equal the size is not + enough + * change error message to exactly point to the partinfo + file which contains the information how the requested + target partitions must look like + * change the partinfo file to include the gpt partition + code as gdisk knows it in case of a GPT + +------------------------------------------------------------------- +Thu Apr 9 11:30:47 CEST 2015 - ms@suse.de + +- Fixed partedGetPartitionID + + In case of a GPT parted has no information about a partition id + Therefore we mapped the id to the known msdos values according + to the name kiwi defines for the partition. Any GPT specific + partition got the same id 'ee' which results in not being able + to distinguish them. However for the partition based install + in EFI mode it's required to identify any potential target install + partition by an id. Therefore partedGetPartitionID will return + the sgdisk partition code and will only map to the old legacy + values if sgdisk is not available + +------------------------------------------------------------------- +Thu Apr 9 11:28:33 CEST 2015 - ms@suse.de + +- Update spec file + + make the gptfdisk package a requirement for distros which + provides it + +------------------------------------------------------------------- +Thu Apr 9 11:25:37 CEST 2015 - ms@suse.de + +- Fixed setup of GPT partition table + + kiwi uses parted to create partition tables. In case of GPT + a linux default partition table has a guid set which points + to a Microsoft base partition. This is wrong and I did not + find a way to correct this with parted. Therefore the sgdisk + utility will be used to correct the partition code so that + we can at least see the right values when using sgdisk + +------------------------------------------------------------------- +Wed Apr 8 15:25:26 CEST 2015 - ms@suse.de + +- Changed validation in OEM partition install mode + + In partition based install kiwi checks if the current partitions + can be used for installation. Part of the validation was to check + if a filesystem signature could be found. If yes the partition + was not offered for installation. However this test is too strict + because in order to remove the filesystem signature the filesystem + must be actively destroyed. It's better to check for the filesystem + UUID instead. In order to allow the installer to use the partition + one can clear the uuid with the appropriate filesystem utility + e.g + + e2fstune -U clear + + for extX based filesystems and that will not destroy the filesystem + integrity. This means an active system can be prepared for install + by clearing the uuid instead of self destructing it + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.z8gvbo/_old 2015-04-15 17:42:48.000000000 +0200 +++ /var/tmp/diff_new_pack.z8gvbo/_new 2015-04-15 17:42:48.000000000 +0200 @@ -26,7 +26,7 @@ Group: System/Management Url: http://github.com/openSUSE/kiwi Name: kiwi -Version: 7.02.35 +Version: 7.02.37 Release: 0 Provides: kiwi-image:lxc Provides: kiwi-image:tbz @@ -94,6 +94,7 @@ %if 0%{?suse_version} # SUSE specific requires %if 0%{?suse_version} >= 1210 +Requires: gptfdisk Requires: libsolv-tools Requires: perl-solv %else ++++++ kiwi-docu.tar.bz2 ++++++ ++++ 12649 lines of diff (skipped) ++++++ 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-12-15 14:32:44.000000000 +0100 +++ new/kiwi/.revision 2014-12-15 14:32:44.000000000 +0100 @@ -1 +1 @@ -8c7c9f963aae5865fea321863dc26dd03fc70d81 +a1b5148889afb4530f8f202f4175f58e5c5bf171 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/metadata/KIWIConfig.xml new/kiwi/metadata/KIWIConfig.xml --- old/kiwi/metadata/KIWIConfig.xml 2015-02-11 17:02:34.000000000 +0100 +++ new/kiwi/metadata/KIWIConfig.xml 2015-04-08 18:16:08.000000000 +0200 @@ -180,6 +180,7 @@ <file name="pam_console_apply"/> <file name="parted"/> <file name="gdisk"/> + <file name="sgdisk"/> <file name="path_id"/> <file name="pidof"/> <file name="ping"/> 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 2015-03-05 11:47:32.000000000 +0100 +++ new/kiwi/modules/KIWIBoot.pm 2015-04-09 10:51:11.000000000 +0200 @@ -2256,6 +2256,7 @@ #------------------------------------------ my $pnr = 0; # partition number start for increment my $active = 1; # default active partition (bios) + my @linux_parts = (); # linux partition numbers if ($needBiosP) { $pnr++; push @commands,"n","p:legacy",$pnr,".","+".$this->{legacysize}."M"; @@ -2287,15 +2288,18 @@ if (! $type->{lvm}) { if ($needRoP) { $pnr++; + push @linux_parts, $pnr; push @commands,"n","p:lxroot",$pnr,".","+".$syszip."M"; push @commands,"t",$pnr,$rootid; $this->{partids}{readonly} = $pnr; $this->{partids}{root} = $pnr; $pnr++; + push @linux_parts, $pnr; push @commands,"n","p:lxrw",$pnr,".","."; $this->{partids}{readwrite} = $pnr; } else { $pnr++; + push @linux_parts, $pnr; push @commands,"n","p:lxroot",$pnr,".","."; $this->{partids}{root} = $pnr; if (! $needBootP) { @@ -2326,6 +2330,9 @@ $this -> cleanStack (); return; } + #========================================== + # Set bios boot flag if requested + #------------------------------------------ if ($needBiosP) { $status = KIWIQX::qxx ( "parted $this->{loop} set 1 bios_grub on 2>&1" @@ -2338,6 +2345,33 @@ return; } } + #========================================== + # Update linux partition ID for GPT table + #------------------------------------------ + if (($this->{ptype}) && ($this->{ptype} eq 'gpt')) { + my $sgdisk = $locator -> getExecPath ("sgdisk"); + if (! $sgdisk) { + $kiwi -> warning( + "sgdisk tool not found, GPT partition code stays untouched" + ); + $kiwi -> skipped() + } else { + foreach my $part (@linux_parts) { + $status = KIWIQX::qxx ( + "sgdisk -t $part:8300 $this->{loop} 2>&1" + ); + $result = $? >> 8; + if ($result != 0) { + $kiwi -> error ( + "Couldn't set Linux code to part:$part: $status" + ); + $kiwi -> failed (); + $this -> cleanStack (); + return; + } + } + } + } if ((! $haveDiskDevice ) || ($haveDiskDevice =~ /nbd|aoe/)) { #========================================== # setup device mapper @@ -6473,8 +6507,8 @@ /^parted/ && do { my $p_cmd = (); $this -> resetGeometry(); - my $ptype = $this -> getGeometry ($device); - if (! $ptype) { + $this->{ptype} = $this -> getGeometry ($device); + if (! $this->{ptype}) { return; } for (my $count=0;$count<@commands;$count++) { @@ -6484,7 +6518,7 @@ if ($cmd eq "n") { my $name = $commands[$count+1]; my $size = $commands[$count+4]; - if ($ptype ne 'gpt') { + if ($this->{ptype} ne 'gpt') { $name = 'primary'; } else { $name =~ s/^p://; @@ -6496,7 +6530,7 @@ "$partitioner -s $device unit s $p_cmd 2>&1" ); } - if (($cmd eq "t") && ($ptype eq 'msdos')) { + if (($cmd eq "t") && ($this->{ptype} eq 'msdos')) { my $index= $commands[$count+1]; my $type = $commands[$count+2]; if ($type eq '82') { 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 2015-04-08 14:41:44.000000000 +0200 +++ new/kiwi/modules/KIWIGlobals.pm 2015-04-10 15:17:58.000000000 +0200 @@ -1860,7 +1860,7 @@ # Globals (generic) #------------------------------------------ my %data; - $data{Version} = "7.02.35"; + $data{Version} = "7.02.37"; $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/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh --- old/kiwi/modules/KIWILinuxRC.sh 2015-03-29 14:16:20.000000000 +0200 +++ new/kiwi/modules/KIWILinuxRC.sh 2015-04-08 18:52:42.000000000 +0200 @@ -4566,7 +4566,7 @@ diskdevs=`echo $diskdevs | sed -e "s@(.*)@@"` for diskdev in $diskdevs;do for disknr in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15;do - id=`partitionID $diskdev $disknr` + id=$(partitionID $diskdev $disknr) if [ "$id" = "82" ];then echo $diskdev$disknr return @@ -5625,8 +5625,10 @@ function partedGetPartitionID { # /.../ # prints the partition ID for the given device and number - # map ID's if GPT table according to kiwi set partition - # names + # In case of a GPT map to the GUID code from the sgdisk + # utility. If sgdisk is not available map to the kiwi + # fdisk compatible hex id's which uses ee for any kind + # of unknown GPT partition entry # ---- local IFS=$IFS_ORIG local parted=$(parted -m -s $1 print | grep -v Warning:) @@ -5645,7 +5647,10 @@ sed -e 's@[,; ]@@g' | tr -d 0 else local name=$(parted -m -s $1 print | grep ^$2: | cut -f6 -d:) - if [ $name = "lxroot" ];then + if lookup sgdisk &>/dev/null;then + # map to short gdisk code + echo $(sgdisk -p $1 | grep -E "^ $2") | cut -f6 -d ' ' + elif [ $name = "lxroot" ];then # map lxroot to MBR type 83 (linux) echo 83 elif [ $name = "lxswap" ];then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/armv7l/oemboot/suse-dump new/kiwi/system/boot/armv7l/oemboot/suse-dump --- old/kiwi/system/boot/armv7l/oemboot/suse-dump 2014-12-15 14:32:48.000000000 +0100 +++ new/kiwi/system/boot/armv7l/oemboot/suse-dump 2015-04-09 11:14:59.000000000 +0200 @@ -75,7 +75,7 @@ req_psize=$(echo $i | cut -f1 -d:) req_label=$(echo $i | cut -f2 -d:) req_partid=$(echo $i | cut -f3 -d:) - if [ $partid = $req_partid ] && [ $req_psize -le $mbsize ];then + if [ $partid = $req_partid ] && [ $mbsize -gt $req_psize ];then if [ -z "$labels" ];then labels=$req_label else @@ -90,10 +90,10 @@ Echo "Searched in range: $rids" continue fi - probeFileSystem $device - if [ ! -z "$FSTYPE" ] && [ ! "$FSTYPE" = "unknown" ];then + local fsuuid=$(blkid $device -s UUID -o value) + if [ ! -z "$fsuuid" ];then Echo "Partition $device with $ID $partid and size $mbsize skipped" - Echo "Partition contains a filesystem" + Echo "Partition contains the filesystem UUID: $fsuuid" continue fi if [ -z "$OEMPartitions" ];then @@ -422,12 +422,13 @@ echo "* $partname partition requires at least $psize MB" \ >> $info if [ ! $imageTableType = "gpt" ];then - echo " Partition MBR Type: 0x$partid" >> $info + echo " Partition Type (parted): 0x$partid" >> $info + else + echo " Partition Type (gdisk): $partid" >> $info fi done - cat $info systemException \ - "Use parted to setup the partition table" \ + "Partition setup required, for details call: cat $info" \ "shell" continue fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/armv7l/oemboot/suse-linuxrc new/kiwi/system/boot/armv7l/oemboot/suse-linuxrc --- old/kiwi/system/boot/armv7l/oemboot/suse-linuxrc 2014-12-15 14:32:48.000000000 +0100 +++ new/kiwi/system/boot/armv7l/oemboot/suse-linuxrc 2015-04-10 14:47:22.000000000 +0200 @@ -359,6 +359,7 @@ #====================================== # 16.1) mount recovery partition #-------------------------------------- + runHook preRecovery mkdir -p /reco-save if ! mount -o ro $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -610,15 +611,19 @@ umount $jdev fi #====================================== - # 16.8) umount recovery + # 16.8) run post revovery hook + #-------------------------------------- + runHook postRecovery + #====================================== + # 16.9) umount recovery #-------------------------------------- umount $imageRecoveryDevice #====================================== - # 16.9) import oem config file + # 16.10) import oem config file #-------------------------------------- importFile < $OEM_PARTITION_CONFIG #====================================== - # 16.10) write oem-trigger + # 16.11) write oem-trigger #-------------------------------------- TDIR=/mnt/var/cache/recovery TOEM=oem-trigger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/armv7l/oemboot/suse-preinit new/kiwi/system/boot/armv7l/oemboot/suse-preinit --- old/kiwi/system/boot/armv7l/oemboot/suse-preinit 2015-03-17 16:55:53.000000000 +0100 +++ new/kiwi/system/boot/armv7l/oemboot/suse-preinit 2015-04-10 14:47:22.000000000 +0200 @@ -78,6 +78,7 @@ #-------------------------------------- if [ "$LOCAL_BOOT" = "no" ] && [ ! -z "$OEM_RECOVERY" ];then Echo "Setting up recovery configuration archive..." + runHook preRecoverySetup mkdir -p /reco-save if ! mount $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -121,6 +122,7 @@ if ! tar -czf /reco-save/boot-2.tgz $backupBootFiles;then systemException "Failed to tar up recovery boot-2.tgz" "reboot" fi + runHook postRecoverySetup umount /reco-save umount /boot/efi &>/dev/null rmdir /reco-save diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/rhel-dump new/kiwi/system/boot/ix86/oemboot/rhel-dump --- old/kiwi/system/boot/ix86/oemboot/rhel-dump 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/rhel-dump 2015-04-09 11:14:05.000000000 +0200 @@ -75,7 +75,7 @@ req_psize=$(echo $i | cut -f1 -d:) req_label=$(echo $i | cut -f2 -d:) req_partid=$(echo $i | cut -f3 -d:) - if [ $partid = $req_partid ] && [ $req_psize -le $mbsize ];then + if [ $partid = $req_partid ] && [ $mbsize -gt $req_psize ];then if [ -z "$labels" ];then labels=$req_label else @@ -90,10 +90,10 @@ Echo "Searched in range: $rids" continue fi - probeFileSystem $device - if [ ! -z "$FSTYPE" ] && [ ! "$FSTYPE" = "unknown" ];then + local fsuuid=$(blkid $device -s UUID -o value) + if [ ! -z "$fsuuid" ];then Echo "Partition $device with $ID $partid and size $mbsize skipped" - Echo "Partition contains a filesystem" + Echo "Partition contains the filesystem UUID: $fsuuid" continue fi if [ -z "$OEMPartitions" ];then @@ -422,12 +422,13 @@ echo "* $partname partition requires at least $psize MB" \ >> $info if [ ! $imageTableType = "gpt" ];then - echo " Partition MBR Type: 0x$partid" >> $info + echo " Partition Type (parted): 0x$partid" >> $info + else + echo " Partition Type (gdisk): $partid" >> $info fi done - cat $info systemException \ - "Use parted to setup the partition table" \ + "Partition setup required, for details call: cat $info" \ "shell" continue fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/rhel-linuxrc new/kiwi/system/boot/ix86/oemboot/rhel-linuxrc --- old/kiwi/system/boot/ix86/oemboot/rhel-linuxrc 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/rhel-linuxrc 2015-04-10 14:46:21.000000000 +0200 @@ -359,6 +359,7 @@ #====================================== # 16.1) mount recovery partition #-------------------------------------- + runHook preRecovery mkdir -p /reco-save if ! mount -o ro $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -610,15 +611,19 @@ umount $jdev fi #====================================== - # 16.8) umount recovery + # 16.8) run post revovery hook + #-------------------------------------- + runHook postRecovery + #====================================== + # 16.9) umount recovery #-------------------------------------- umount $imageRecoveryDevice #====================================== - # 16.9) import oem config file + # 16.10) import oem config file #-------------------------------------- importFile < $OEM_PARTITION_CONFIG #====================================== - # 16.10) write oem-trigger + # 16.11) write oem-trigger #-------------------------------------- TDIR=/mnt/var/cache/recovery TOEM=oem-trigger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/rhel-preinit new/kiwi/system/boot/ix86/oemboot/rhel-preinit --- old/kiwi/system/boot/ix86/oemboot/rhel-preinit 2015-03-17 16:55:53.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/rhel-preinit 2015-04-10 14:46:40.000000000 +0200 @@ -78,6 +78,7 @@ #-------------------------------------- if [ "$LOCAL_BOOT" = "no" ] && [ ! -z "$OEM_RECOVERY" ];then Echo "Setting up recovery configuration archive..." + runHook preRecoverySetup mkdir -p /reco-save if ! mount $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -121,6 +122,7 @@ if ! tar -czf /reco-save/boot-2.tgz $backupBootFiles;then systemException "Failed to tar up recovery boot-2.tgz" "reboot" fi + runHook postRecoverySetup umount /reco-save umount /boot/efi &>/dev/null rmdir /reco-save diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/suse-dump new/kiwi/system/boot/ix86/oemboot/suse-dump --- old/kiwi/system/boot/ix86/oemboot/suse-dump 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/suse-dump 2015-04-09 11:13:42.000000000 +0200 @@ -75,7 +75,7 @@ req_psize=$(echo $i | cut -f1 -d:) req_label=$(echo $i | cut -f2 -d:) req_partid=$(echo $i | cut -f3 -d:) - if [ $partid = $req_partid ] && [ $req_psize -le $mbsize ];then + if [ $partid = $req_partid ] && [ $mbsize -gt $req_psize ];then if [ -z "$labels" ];then labels=$req_label else @@ -90,10 +90,10 @@ Echo "Searched in range: $rids" continue fi - probeFileSystem $device - if [ ! -z "$FSTYPE" ] && [ ! "$FSTYPE" = "unknown" ];then + local fsuuid=$(blkid $device -s UUID -o value) + if [ ! -z "$fsuuid" ];then Echo "Partition $device with $ID $partid and size $mbsize skipped" - Echo "Partition contains a filesystem" + Echo "Partition contains the filesystem UUID: $fsuuid" continue fi if [ -z "$OEMPartitions" ];then @@ -422,12 +422,13 @@ echo "* $partname partition requires at least $psize MB" \ >> $info if [ ! $imageTableType = "gpt" ];then - echo " Partition MBR Type: 0x$partid" >> $info + echo " Partition Type (parted): 0x$partid" >> $info + else + echo " Partition Type (gdisk): $partid" >> $info fi done - cat $info systemException \ - "Use parted to setup the partition table" \ + "Partition setup required, for details call: cat $info" \ "shell" continue fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/suse-linuxrc new/kiwi/system/boot/ix86/oemboot/suse-linuxrc --- old/kiwi/system/boot/ix86/oemboot/suse-linuxrc 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/suse-linuxrc 2015-04-10 14:45:26.000000000 +0200 @@ -359,6 +359,7 @@ #====================================== # 16.1) mount recovery partition #-------------------------------------- + runHook preRecovery mkdir -p /reco-save if ! mount -o ro $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -610,15 +611,19 @@ umount $jdev fi #====================================== - # 16.8) umount recovery + # 16.8) run post revovery hook + #-------------------------------------- + runHook postRecovery + #====================================== + # 16.9) umount recovery #-------------------------------------- umount $imageRecoveryDevice #====================================== - # 16.9) import oem config file + # 16.10) import oem config file #-------------------------------------- importFile < $OEM_PARTITION_CONFIG #====================================== - # 16.10) write oem-trigger + # 16.11) write oem-trigger #-------------------------------------- TDIR=/mnt/var/cache/recovery TOEM=oem-trigger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/oemboot/suse-preinit new/kiwi/system/boot/ix86/oemboot/suse-preinit --- old/kiwi/system/boot/ix86/oemboot/suse-preinit 2015-03-17 16:55:53.000000000 +0100 +++ new/kiwi/system/boot/ix86/oemboot/suse-preinit 2015-04-10 14:43:55.000000000 +0200 @@ -78,6 +78,7 @@ #-------------------------------------- if [ "$LOCAL_BOOT" = "no" ] && [ ! -z "$OEM_RECOVERY" ];then Echo "Setting up recovery configuration archive..." + runHook preRecoverySetup mkdir -p /reco-save if ! mount $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -121,6 +122,7 @@ if ! tar -czf /reco-save/boot-2.tgz $backupBootFiles;then systemException "Failed to tar up recovery boot-2.tgz" "reboot" fi + runHook postRecoverySetup umount /reco-save umount /boot/efi &>/dev/null rmdir /reco-save diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ppc/oemboot/suse-dump new/kiwi/system/boot/ppc/oemboot/suse-dump --- old/kiwi/system/boot/ppc/oemboot/suse-dump 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ppc/oemboot/suse-dump 2015-04-09 11:15:03.000000000 +0200 @@ -75,7 +75,7 @@ req_psize=$(echo $i | cut -f1 -d:) req_label=$(echo $i | cut -f2 -d:) req_partid=$(echo $i | cut -f3 -d:) - if [ $partid = $req_partid ] && [ $req_psize -le $mbsize ];then + if [ $partid = $req_partid ] && [ $mbsize -gt $req_psize ];then if [ -z "$labels" ];then labels=$req_label else @@ -90,10 +90,10 @@ Echo "Searched in range: $rids" continue fi - probeFileSystem $device - if [ ! -z "$FSTYPE" ] && [ ! "$FSTYPE" = "unknown" ];then + local fsuuid=$(blkid $device -s UUID -o value) + if [ ! -z "$fsuuid" ];then Echo "Partition $device with $ID $partid and size $mbsize skipped" - Echo "Partition contains a filesystem" + Echo "Partition contains the filesystem UUID: $fsuuid" continue fi if [ -z "$OEMPartitions" ];then @@ -422,12 +422,13 @@ echo "* $partname partition requires at least $psize MB" \ >> $info if [ ! $imageTableType = "gpt" ];then - echo " Partition MBR Type: 0x$partid" >> $info + echo " Partition Type (parted): 0x$partid" >> $info + else + echo " Partition Type (gdisk): $partid" >> $info fi done - cat $info systemException \ - "Use parted to setup the partition table" \ + "Partition setup required, for details call: cat $info" \ "shell" continue fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ppc/oemboot/suse-linuxrc new/kiwi/system/boot/ppc/oemboot/suse-linuxrc --- old/kiwi/system/boot/ppc/oemboot/suse-linuxrc 2014-12-15 14:32:49.000000000 +0100 +++ new/kiwi/system/boot/ppc/oemboot/suse-linuxrc 2015-04-10 14:47:17.000000000 +0200 @@ -359,6 +359,7 @@ #====================================== # 16.1) mount recovery partition #-------------------------------------- + runHook preRecovery mkdir -p /reco-save if ! mount -o ro $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -610,15 +611,19 @@ umount $jdev fi #====================================== - # 16.8) umount recovery + # 16.8) run post revovery hook + #-------------------------------------- + runHook postRecovery + #====================================== + # 16.9) umount recovery #-------------------------------------- umount $imageRecoveryDevice #====================================== - # 16.9) import oem config file + # 16.10) import oem config file #-------------------------------------- importFile < $OEM_PARTITION_CONFIG #====================================== - # 16.10) write oem-trigger + # 16.11) write oem-trigger #-------------------------------------- TDIR=/mnt/var/cache/recovery TOEM=oem-trigger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ppc/oemboot/suse-preinit new/kiwi/system/boot/ppc/oemboot/suse-preinit --- old/kiwi/system/boot/ppc/oemboot/suse-preinit 2015-03-17 16:55:53.000000000 +0100 +++ new/kiwi/system/boot/ppc/oemboot/suse-preinit 2015-04-10 14:47:17.000000000 +0200 @@ -78,6 +78,7 @@ #-------------------------------------- if [ "$LOCAL_BOOT" = "no" ] && [ ! -z "$OEM_RECOVERY" ];then Echo "Setting up recovery configuration archive..." + runHook preRecoverySetup mkdir -p /reco-save if ! mount $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -121,6 +122,7 @@ if ! tar -czf /reco-save/boot-2.tgz $backupBootFiles;then systemException "Failed to tar up recovery boot-2.tgz" "reboot" fi + runHook postRecoverySetup umount /reco-save umount /boot/efi &>/dev/null rmdir /reco-save diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/s390/oemboot/suse-dump new/kiwi/system/boot/s390/oemboot/suse-dump --- old/kiwi/system/boot/s390/oemboot/suse-dump 2014-12-15 14:32:50.000000000 +0100 +++ new/kiwi/system/boot/s390/oemboot/suse-dump 2015-04-09 11:14:53.000000000 +0200 @@ -75,7 +75,7 @@ req_psize=$(echo $i | cut -f1 -d:) req_label=$(echo $i | cut -f2 -d:) req_partid=$(echo $i | cut -f3 -d:) - if [ $partid = $req_partid ] && [ $req_psize -le $mbsize ];then + if [ $partid = $req_partid ] && [ $mbsize -gt $req_psize ];then if [ -z "$labels" ];then labels=$req_label else @@ -90,10 +90,10 @@ Echo "Searched in range: $rids" continue fi - probeFileSystem $device - if [ ! -z "$FSTYPE" ] && [ ! "$FSTYPE" = "unknown" ];then + local fsuuid=$(blkid $device -s UUID -o value) + if [ ! -z "$fsuuid" ];then Echo "Partition $device with $ID $partid and size $mbsize skipped" - Echo "Partition contains a filesystem" + Echo "Partition contains the filesystem UUID: $fsuuid" continue fi if [ -z "$OEMPartitions" ];then @@ -422,12 +422,13 @@ echo "* $partname partition requires at least $psize MB" \ >> $info if [ ! $imageTableType = "gpt" ];then - echo " Partition MBR Type: 0x$partid" >> $info + echo " Partition Type (parted): 0x$partid" >> $info + else + echo " Partition Type (gdisk): $partid" >> $info fi done - cat $info systemException \ - "Use parted to setup the partition table" \ + "Partition setup required, for details call: cat $info" \ "shell" continue fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/s390/oemboot/suse-linuxrc new/kiwi/system/boot/s390/oemboot/suse-linuxrc --- old/kiwi/system/boot/s390/oemboot/suse-linuxrc 2014-12-15 14:32:50.000000000 +0100 +++ new/kiwi/system/boot/s390/oemboot/suse-linuxrc 2015-04-10 14:47:00.000000000 +0200 @@ -363,6 +363,7 @@ #====================================== # 16.1) mount recovery partition #-------------------------------------- + runHook preRecovery mkdir -p /reco-save if ! mount -o ro $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -613,15 +614,19 @@ umount $jdev fi #====================================== - # 16.8) umount recovery + # 16.8) run post revovery hook + #-------------------------------------- + runHook postRecovery + #====================================== + # 16.9) umount recovery #-------------------------------------- umount $imageRecoveryDevice #====================================== - # 16.9) import oem config file + # 16.10) import oem config file #-------------------------------------- importFile < $OEM_PARTITION_CONFIG #====================================== - # 16.10) write oem-trigger + # 16.11) write oem-trigger #-------------------------------------- TDIR=/mnt/var/cache/recovery TOEM=oem-trigger diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/s390/oemboot/suse-preinit new/kiwi/system/boot/s390/oemboot/suse-preinit --- old/kiwi/system/boot/s390/oemboot/suse-preinit 2015-03-17 16:55:53.000000000 +0100 +++ new/kiwi/system/boot/s390/oemboot/suse-preinit 2015-04-10 14:47:00.000000000 +0200 @@ -91,6 +91,7 @@ #-------------------------------------- if [ "$LOCAL_BOOT" = "no" ] && [ ! -z "$OEM_RECOVERY" ];then Echo "Setting up recovery configuration archive..." + runHook preRecoverySetup mkdir -p /reco-save if ! mount $imageRecoveryDevice /reco-save >/dev/null;then systemException "Failed to mount recovery device" "reboot" @@ -134,6 +135,7 @@ if ! tar -czf /reco-save/boot-2.tgz $backupBootFiles;then systemException "Failed to tar up recovery boot-2.tgz" "reboot" fi + runHook postRecoverySetup umount /reco-save umount /boot/efi &>/dev/null rmdir /reco-save