Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at 2013-03-01 07:23:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kiwi (Old) and /work/SRC/openSUSE:Factory/.kiwi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiwi", Maintainer is "m...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/kiwi/kiwi.changes 2013-02-23 08:08:24.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kiwi.new/kiwi.changes 2013-03-01 07:23:33.000000000 +0100 @@ -1,0 +2,39 @@ +Thu Feb 28 12:42:42 CET 2013 - m...@suse.de + +- v5.04.56 released + +------------------------------------------------------------------- +Thu Feb 28 12:40:22 CET 2013 - m...@suse.de + +- fixed KIWILinuxRC::installBootLoaderGrub2() + + install grub2 only in BIOS mode, in EFI mode this doesn't make sense + + make sure the grub2 config file also lands on the EFI (fat) partition + when in UEFI mode the precompiled and signed grub.efi image searches + there for the configuration + +------------------------------------------------------------------- +Wed Feb 27 23:34:30 CET 2013 - m...@suse.de + +- v5.04.55 released + +------------------------------------------------------------------- +Wed Feb 27 19:07:20 CET 2013 - m...@suse.de + +- fixed UEFI bootloader setup for grub2 based disk images + + fixed creation of image install CDs in EFI mode + + call findAndCopyMagicBlock only if hybrid is requested + +------------------------------------------------------------------- +Mon Feb 25 09:50:01 CET 2013 - m...@suse.de + +- v5.04.54 released + +------------------------------------------------------------------- +Mon Feb 25 09:47:51 CET 2013 - m...@suse.de + +- added vmxFlavour-uefi and xenFlavour-uefi profiles to the + suse-SLE11-JeOS template image description. Given that + SLE11 SP3 is used these profiles can be used to build + UEFI images based on grub2 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.XuOdPi/_old 2013-03-01 07:23:35.000000000 +0100 +++ /var/tmp/diff_new_pack.XuOdPi/_new 2013-03-01 07:23:35.000000000 +0100 @@ -26,7 +26,7 @@ Summary: openSUSE - KIWI Image System License: GPL-2.0 Group: System/Management -Version: 5.04.53 +Version: 5.04.56 Release: 0 # requirements to build packages BuildRequires: e2fsprogs ++++++ kiwi.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2013-02-21 15:51:36.000000000 +0100 +++ new/kiwi/.revision 2013-02-21 15:51:36.000000000 +0100 @@ -1 +1 @@ -4111e7b900c8cdba3be23213c31ced08931c297b +a3bdf56b57a7da45ec3c0b1a317ad7a197a1efa4 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 2013-02-21 15:51:36.000000000 +0100 +++ new/kiwi/modules/KIWIBoot.pm 2013-02-27 23:54:12.000000000 +0100 @@ -904,13 +904,14 @@ my $base; my $opts; if ($bootloader eq "grub2") { - # let mkisofs run grub2 eltorito image... - $base = "-V \"$volid\" -A \"$appid\" "; - $base.= "-R -J -f -b boot/grub2/i386-pc/eltorito.img -no-emul-boot "; - $base.= "-boot-load-size 4 -boot-info-table -udf -allow-limited-size "; + # let mkisofs run grub2 efi or eltorito image... + $base = "-V \"$volid\" -A \"$appid\" -R -J -f "; if (($firmware eq "efi") || ($firmware eq "uefi")) { - $base.= "-eltorito-alt-boot -b boot/$efi_arch/efi "; - $base.= "-no-emul-boot "; + $base.= "-b boot/$efi_arch/efi -no-emul-boot "; + } else { + $base.= "-b boot/grub2/i386-pc/eltorito.img -no-emul-boot "; + $base.= "-boot-load-size 4 -boot-info-table -udf "; + $base.= "-allow-limited-size "; } $opts.= "-joliet-long "; } elsif ($bootloader eq "grub") { @@ -3326,8 +3327,8 @@ #========================================== # Stage files #------------------------------------------ - $stages{bios}{initrd} = "'usr/lib/grub2/$grubpc/*'"; - $stages{bios}{stageSRC} = "/usr/lib/grub2/$grubpc"; + $stages{bios}{initrd} = "'usr/lib/$grub/$grubpc/*'"; + $stages{bios}{stageSRC} = "/usr/lib/$grub/$grubpc"; $stages{bios}{stageDST} = "/boot/grub2/$grubpc"; if (($firmware eq "efi") || ($firmware eq "uefi")) { $stages{efi}{initrd} = "'usr/lib/$grub/$efipc/*'"; @@ -3341,12 +3342,27 @@ $stages{efi}{signed} = "usr/$lib/efi/grub.efi"; } #========================================== + # Module lists for self created grub images + #------------------------------------------ + my @bios_core_modules = ( + 'biosdisk','part_msdos','part_gpt','ext2', + 'iso9660','chain','normal','linux','echo', + 'vga','vbe','png','video_bochs','video_cirrus', + 'gzio','multiboot','search','configfile','fat' + ); + my @efi_core_modules = ( + 'fat','ext2','part_gpt','efi_gop','iso9660','chain', + 'linux','echo','configfile','boot','search_label', + 'search_fs_file','search','search_fs_uuid','ls', + 'video','video_fb','normal' + ); + #========================================== # Boot directories #------------------------------------------ my @bootdir = (); if (($firmware eq "efi") || ($firmware eq "uefi")) { push @bootdir,"$tmpdir/boot/grub2-efi/$efipc"; - push @bootdir,"$tmpdir/boot/grub2/$grubpc"; + push @bootdir,"$tmpdir/boot/grub2/$efipc"; push @bootdir,"$tmpdir/EFI/BOOT"; } else { push @bootdir,"$tmpdir/boot/grub2/$grubpc"; @@ -3364,7 +3380,8 @@ #------------------------------------------ $kiwi -> info ("Creating grub2 boot partition map"); foreach my $bootfile ($bootbios,$bootefi) { - next if (($bootfile eq $bootefi) && ($firmware ne "efi")); + next if (($bootfile eq $bootbios) && ($firmware =~ /efi/)); + next if (($bootfile eq $bootefi) && ($firmware eq 'bios')); my $bpfd = FileHandle -> new(); if (! $bpfd -> open(">$bootfile")) { $kiwi -> failed (); @@ -3416,7 +3433,8 @@ # import Grub2 stage files... #------------------------------------------ foreach my $stage ('bios','efi') { - next if (($stage eq "efi") && ($firmware !~ /efi/)); + next if (($stage eq "bios") && ($firmware =~ /efi/)); + next if (($stage eq "efi") && ($firmware eq 'bios')); my $stageD = $stages{$stage}{stageSRC}; my $stageT = $stages{$stage}{stageDST}; if (glob($tmpdir.$stageD.'/*')) { @@ -3444,57 +3462,29 @@ } $kiwi -> done(); #========================================== - # Create core/eltorito grub2 boot images + # Lookup grub2 mkimage tool #------------------------------------------ - $kiwi -> info ("Creating grub2 core boot image"); - my $core = "$tmpdir/boot/grub2/$grubpc/core.img"; - my @modules = ( - 'biosdisk','part_msdos','part_gpt','ext2', - 'iso9660','chain','normal','linux','echo', - 'vga','vbe','png','video_bochs','video_cirrus', - 'gzio','multiboot','search','configfile','fat' - ); - $status = qxx ( - "grub2-mkimage -O i386-pc -o $core -c $bootbios @modules 2>&1" - ); - $result = $? >> 8; - if ($result != 0) { + my $locator = KIWILocator -> new(); + my $grub2_mkimage = $locator -> getExecPath ("grub2-mkimage"); + if ($firmware =~ /efi/) { + my $grub2_efi_mkimage = $locator -> getExecPath ( + "grub2-efi-mkimage" + ); + if ($grub2_efi_mkimage) { + $grub2_mkimage = $grub2_efi_mkimage; + } + } + if (! $grub2_mkimage) { $kiwi -> failed (); - $kiwi -> error ("Couldn't create core boot image: $status"); + $kiwi -> error ("Can't find grub2 mkimage tool"); $kiwi -> failed (); return; } - $kiwi -> done(); - if ((defined $type) && ($type eq "iso")) { - $kiwi -> info ("Creating grub2 eltorito boot image"); - my $cdimg = "$tmpdir/boot/grub2/$grubpc/eltorito.img"; - my $cdcore = "$tmpdir/boot/grub2/$grubpc/cdboot.img"; - $status = qxx ("cat $cdcore $core > $cdimg 2>&1"); - $result = $? >> 8; - if ($result != 0) { - $kiwi -> failed (); - $kiwi -> error ("Couldn't create eltorito image: $status"); - $kiwi -> failed (); - return; - } - $kiwi -> done(); - } #========================================== # Create core efi boot image, standard EFI #------------------------------------------ if ($firmware eq "efi") { $kiwi -> info ("Creating grub2 efi boot image"); - my $locator = KIWILocator -> new(); - my $grub2_mkimage = $locator -> getExecPath ("grub2-efi-mkimage"); - if (! $grub2_mkimage) { - $grub2_mkimage = $locator -> getExecPath ("grub2-mkimage"); - } - if (! $grub2_mkimage) { - $kiwi -> failed (); - $kiwi -> error ("Can't find grub2 mkimage tool"); - $kiwi -> failed (); - return; - } my $core = "$tmpdir/EFI/BOOT/bootx64.efi"; my @modules = ( 'fat','ext2','part_gpt','efi_gop','iso9660','chain', @@ -3582,6 +3572,44 @@ } $kiwi -> done(); } + #========================================== + # Create core grub2 boot images + #------------------------------------------ + if ($firmware eq 'bios') { + $kiwi -> info ("Creating grub2 core boot image"); + my $format = $grubpc; + my $bootconf = $bootbios; + my @modules = @bios_core_modules; + my $core = "$tmpdir/boot/grub2/$format/core.img"; + my $cdimg = "$tmpdir/boot/grub2/$format/eltorito.img"; + my $cdcore = "$tmpdir/boot/grub2/$format/cdboot.img"; + my $status = qxx ( + "$grub2_mkimage -O $format -o $core -c $bootconf @modules 2>&1" + ); + my $result = $? >> 8; + if ($result != 0) { + $kiwi -> failed (); + $kiwi -> error ("Couldn't create core boot image: $status"); + $kiwi -> failed (); + return; + } + $kiwi -> done(); + #========================================== + # Create eltorito grub2 boot image + #------------------------------------------ + if ((defined $type) && ($type eq "iso")) { + $kiwi -> info ("Creating grub2 eltorito boot image"); + $status = qxx ("cat $cdcore $core > $cdimg"); + $result = $? >> 8; + if ($result != 0) { + $kiwi -> failed (); + $kiwi -> error ("Couldn't create eltorito image: $status"); + $kiwi -> failed (); + return; + } + $kiwi -> done(); + } + } } #========================================== # Grub @@ -4219,6 +4247,12 @@ } } $FD -> close(); + #========================================== + # copy grub2 config file to efi path too + #------------------------------------------ + if ($config eq 'grub2-efi') { + qxx ("cp $tmpdir/boot/$config/grub.cfg $tmpdir/EFI/BOOT 2>&1"); + } } $kiwi -> done(); } @@ -5024,7 +5058,7 @@ #========================================== # No install required with EFI bios #------------------------------------------ - if ($firmware ne "efi") { + if (($firmware ne "efi") && ($firmware ne "uefi")) { $kiwi -> info ("Installing grub2 on device: $diskname"); #========================================== # Create device map for the disk 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 2013-02-22 15:07:56.000000000 +0100 +++ new/kiwi/modules/KIWIGlobals.pm 2013-02-28 12:43:42.000000000 +0100 @@ -294,7 +294,10 @@ push @UmountStack,"kpartx -d $loop"; $this->{UmountStack} = \@UmountStack; $loop =~ s/\/dev\///; - $source = "/dev/mapper/".$loop."p2"; + $source = "/dev/mapper/".$loop."p3"; + if (! -b $source) { + $source = "/dev/mapper/".$loop."p2"; + } if (! -b $source) { $source = "/dev/mapper/".$loop."p1"; } @@ -931,7 +934,7 @@ # Globals (generic) #------------------------------------------ my %data; - $data{Version} = "5.04.53"; + $data{Version} = "5.04.56"; $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/KIWIIsoLinux.pm new/kiwi/modules/KIWIIsoLinux.pm --- old/kiwi/modules/KIWIIsoLinux.pm 2013-02-21 15:51:36.000000000 +0100 +++ new/kiwi/modules/KIWIIsoLinux.pm 2013-02-27 23:54:12.000000000 +0100 @@ -806,6 +806,7 @@ my $ldir_cnt = 0; my %type; my $cmdln; + my $hybrid; #========================================== # Lookup firmware setup #------------------------------------------ @@ -815,6 +816,9 @@ if ($type{firmware}) { $firmware = $type{firmware}; } + if ($type{hybrid}) { + $hybrid = $type{hybrid}; + } #========================================== # check for pre bootloader install #------------------------------------------ @@ -860,7 +864,7 @@ #========================================== # Call mkisofs second stage #------------------------------------------ - if ($firmware eq "efi" || $firmware eq "uefi") { + if (($hybrid) && (($firmware eq "efi" || $firmware eq "uefi"))) { if (! $this -> findAndCopyMagicBlock()) { $kiwi -> error ("Failed to read magic iso header"); $kiwi -> failed (); 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 2013-02-21 15:51:36.000000000 +0100 +++ new/kiwi/modules/KIWILinuxRC.sh 2013-02-28 12:43:42.000000000 +0100 @@ -887,26 +887,55 @@ # ---- local confTool=grub2-mkconfig local instTool=grub2-install - local confPath=/boot/grub2/grub.cfg - if [ "$partedTableType" = "gpt" ];then + local confPath_grub=/boot/grub2/grub.cfg + local confPath_uefi=/boot/EFI/EFI/BOOT/grub.cfg + local isEFI=0 + #====================================== + # check for EFI and mount EFI partition + #-------------------------------------- + if [ ! -z "$kiwi_JumpPart" ] && [ -d /boot/EFI ];then + local jdev=$(ddn $imageDiskDevice $kiwi_JumpPart) + if ! mount $jdev /boot/EFI;then + Echo "Failed to mount EFI boot partition" + return 1 + fi + isEFI=1 + fi + #====================================== + # lookup grub2 mkconfig tool + #-------------------------------------- + if [ $isEFI -eq 1 ];then which grub2-efi-mkconfig &>/dev/null && confTool=grub2-efi-mkconfig - which grub2-efi-install &>/dev/null && instTool=grub2-efi-install - confPath=/boot/grub2-efi/grub.cfg + confPath_grub=/boot/grub2-efi/grub.cfg fi if ! which $confTool &>/dev/null;then Echo "Image doesn't have grub2 installed" Echo "Can't install boot loader" return 1 fi - $confTool > $confPath + #====================================== + # create grub2 configuration + #-------------------------------------- + $confTool > $confPath_grub if [ ! $? = 0 ];then Echo "Failed to create grub2 boot configuration" return 1 fi - $instTool $imageDiskDevice 1>&2 - if [ ! $? = 0 ];then - Echo "Failed to install boot loader" + if [ $isEFI -eq 1 ] && [ -e $confPath_uefi ];then + cp $confPath_grub $confPath_uefi + umount /boot/EFI + fi + #====================================== + # install grub2 in BIOS mode + #-------------------------------------- + if [ $isEFI -eq 0 ];then + $instTool $imageDiskDevice 1>&2 + if [ ! $? = 0 ];then + Echo "Failed to install boot loader" + return 1 + fi fi + return 0 } #====================================== # installBootLoaderYaboot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/template/ix86/suse-SLE11-JeOS/config.xml new/kiwi/template/ix86/suse-SLE11-JeOS/config.xml --- old/kiwi/template/ix86/suse-SLE11-JeOS/config.xml 2013-02-21 15:51:36.000000000 +0100 +++ new/kiwi/template/ix86/suse-SLE11-JeOS/config.xml 2013-02-27 23:54:12.000000000 +0100 @@ -2,17 +2,19 @@ <image schemaversion="5.6" name="LimeJeOS-SLE11"> <description type="system"> - <author>Christoph Thiel</author> - <contact>cth...@novell.com</contact> + <author>Marcus Schäfer</author> + <contact>m...@suse.de</contact> <specification>SUSE Linux Enterprise 11 JeOS</specification> </description> <profiles> <profile name="vmxFlavour" description="VMX with default kernel" import="true"/> + <profile name="vmxFlavour-uefi" description="VMX with default kernel and UEFI support"/> <profile name="xenFlavour" description="VMX with Xen kernel"/> + <profile name="xenFlavour-uefi" description="VMX with Xen kernel and UEFI support"/> <profile name="vmxFlavour-s390" description="VMX for s390 with default kernel"/> </profiles> <preferences> - <version>1.1.0</version> + <version>1.11.3</version> <packagemanager>zypper</packagemanager> <bootsplash-theme>SLES</bootsplash-theme> <bootloader-theme>SLES</bootloader-theme> @@ -57,6 +59,41 @@ </machine> </type> </preferences> + <preferences profiles="xenFlavour-uefi"> + <type image="vmx" filesystem="ext3" boot="vmxboot/suse-SLES11" bootprofile="xen" bootkernel="xenk" bootloader="grub2" firmware="uefi"> + <machine memory="512" domain="domU"> + <vmdisk controller="ide" id="0" device="/dev/xvda"/> + <vmnic interface=""/> + </machine> + </type> + <type image="oem" filesystem="ext3" boot="oemboot/suse-SLES11" bootprofile="xen" bootkernel="xenk" installiso="true" bootloader="grub2" firmware="uefi"> + <oemconfig> + <oem-systemsize>2048</oem-systemsize> + <oem-swap>true</oem-swap> + </oemconfig> + <machine domain="dom0"> + <vmdisk controller="scsi" id="0"/> + </machine> + </type> + </preferences> + <preferences profiles="vmxFlavour-uefi"> + <type image="vmx" filesystem="ext3" boot="vmxboot/suse-SLES11" format="vmdk" bootloader="grub2" firmware="uefi"> + <machine memory="512" guestOS="suse" HWversion="4"> + <vmdisk controller="scsi" id="0"/> + <vmnic driver="e1000" interface="0" mode="bridged"/> + </machine> + </type> + <type image="oem" filesystem="ext3" boot="oemboot/suse-SLES11" installiso="true" bootloader="grub2" firmware="uefi"> + <oemconfig> + <oem-systemsize>2048</oem-systemsize> + <oem-swap>true</oem-swap> + </oemconfig> + <machine memory="512" guestOS="suse" HWversion="4"> + <vmdisk controller="scsi" id="0"/> + <vmnic driver="e1000" interface="0" mode="bridged"/> + </machine> + </type> + </preferences> <users group="root"> <user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/> </users> @@ -117,6 +154,12 @@ <package name="lvm2"/> <package name="syslinux"/> </packages> + <packages type="image" profiles="vmxFlavour-uefi,xenFlavour-uefi"> + <package name="grub2" bootinclude="true"/> + <package name="grub2-x86_64-efi" arch="x86_64" bootinclude="true"/> + <package name="shim" arch="x86_64" bootinclude="true"/> + <package name="bootsplash-branding-SLES" bootinclude="true" bootdelete="true"/> + </packages> <packages type="image" profiles="vmxFlavour,xenFlavour"> <package name="grub"/> <package name="bootsplash-branding-SLES" bootinclude="true" bootdelete="true"/> @@ -125,13 +168,13 @@ <packages type="image" profiles="vmxFlavour-s390"> <package name="zipl"/> </packages> - <packages type="image" profiles="xenFlavour"> + <packages type="image" profiles="xenFlavour,xenFlavour-uefi"> <package name="kernel-xen" replaces="kernel-default"/> <package name="kernel-xen-base" replaces="kernel-default-base"/> <package name="xen-tools-domU" replaces=""/> <package name="xen" replaces=""/> </packages> - <packages type="image" profiles="vmxFlavour,vmxFlavour-s390"> + <packages type="image" profiles="vmxFlavour,vmxFlavour-s390,vmxFlavour-uefi"> <package name="kernel-default" replaces="kernel-xen"/> <package name="kernel-default-base" replaces="kernel-xen-base"/> <package name="kernel-default-base" replaces="xen-tools-domU"/> -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org