Hello community, here is the log from the commit of package perl-Bootloader checked in at Thu Dec 7 21:20:28 CET 2006. -------- --- perl-Bootloader/perl-Bootloader.changes 2006-11-29 13:39:53.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2006-12-07 13:54:37.000000000 +0100 @@ -1,0 +2,13 @@ +Thu Dec 7 13:52:00 CET 2006 - aosthof@suse.de + +- fixed identation (correct usage of tabs) +- fixed remove_entry() that it removes xen entries correctly + (#223576) + +------------------------------------------------------------------- +Thu Nov 30 15:42:48 CET 2006 - jplack@suse.de + +- implement new section type menu neccessary for linking to other + systems/ complexer multiboot setups + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.4.5.tar.bz2 New: ---- perl-Bootloader-0.4.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.IZjX0y/_old 2006-12-07 21:20:11.000000000 +0100 +++ /var/tmp/diff_new_pack.IZjX0y/_new 2006-12-07 21:20:11.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.4.5) +# spec file for package perl-Bootloader (Version 0.4.6) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,7 +11,7 @@ # norootforbuild Name: perl-Bootloader -Version: 0.4.5 +Version: 0.4.6 Release: 1 Requires: perl >= %{perl_version} Requires: perl-gettext @@ -64,6 +64,13 @@ /usr/lib/bootloader %changelog -n perl-Bootloader +* Thu Dec 07 2006 - aosthof@suse.de +- fixed identation (correct usage of tabs) +- fixed remove_entry() that it removes xen entries correctly + (#223576) +* Thu Nov 30 2006 - jplack@suse.de +- implement new section type menu neccessary for linking to other + systems/ complexer multiboot setups * Wed Nov 29 2006 - jplack@suse.de - handle xen sections correctly in update-bootloader (#224330) * Mon Nov 27 2006 - od@suse.de ++++++ bootloader_entry ++++++ --- perl-Bootloader/bootloader_entry 2006-11-27 16:26:00.000000000 +0100 +++ /mounts/work_src_done/STABLE/perl-Bootloader/bootloader_entry 2006-12-07 13:41:23.000000000 +0100 @@ -1,7 +1,7 @@ #!/bin/bash # # This script represents an interface between the postinstall and postuninstall -# scripts of kernel rpms and the update-bootloader script. +# scripts of kernel rpms and the update-bootloader script. # # Interface: # ---------- @@ -33,33 +33,32 @@ function getargs() { # old interface with 4 parameters - if [ $# -eq 4 ] ; then - action=${1} # contains the action to be executed, e.g. "add" or "remove" - flavor=${2#*-} # contains the kernel-flavor, e.g. "default" or "xen" - flavor=${flavor%%-*} - release=${2#*-*-} # contains the kernel-release, e.g. "2.6.18-4-default" - release=${release%.*.*} - release="${release}-${flavor}" - image=${3} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default" - initrd=${4} # contains the full initrd name, e.g. "initrd-2.6.18-4-default" + if [ $# -eq 4 ] ; then + action=${1} # contains the action to be executed, e.g. "add" or "remove" + flavor=${2#*-} # contains the kernel-flavor, e.g. "default" or "xen" + flavor=${flavor%%-*} + release=${2#*-*-} # contains the kernel-release, e.g. "2.6.18-4-default" + release=${release%.*.*} + release="${release}-${flavor}" + image=${3} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default" + initrd=${4} # contains the full initrd name, e.g. "initrd-2.6.18-4-default" # new interface with 5 parameters - else - action=${1} # contains the action to be executed, e.g. "add" or "remove" - flavor=${2} # contains the kernel-flavor, e.g. "default" or "xen" - release=${3} # contains the kernel-release, e.g. "2.6.18-4-default" - image=${4} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default" - initrd=${5} # contains the full initrd name, e.g. "initrd-2.6.18-4-default" - fi + else + action=${1} # contains the action to be executed, e.g. "add" or "remove" + flavor=${2} # contains the kernel-flavor, e.g. "default" or "xen" + release=${3} # contains the kernel-release, e.g. "2.6.18-4-default" + image=${4} # contains the full image name, e.g. "vmlinuz-2.6.18-4-default" + initrd=${5} # contains the full initrd name, e.g. "initrd-2.6.18-4-default" + fi } # Wrapper for the update-bootloader function function update_bootloader() { - [ -x /sbin/update-bootloader -a \ - "$YAST_IS_RUNNING" != instsys ] || return 0 - /sbin/update-bootloader "$@" + [ -x /sbin/update-bootloader -a "$YAST_IS_RUNNING" != instsys ] || return 0 + /sbin/update-bootloader "$@" } @@ -70,31 +69,31 @@ { # Set up the new kernel if [ "$YAST_IS_RUNNING" != instsys ]; then - case $flavor in - (kdump|um) - ;; - (*) - opt_xen_kernel= - case $flavor in - xen*) - set -- $flavor - set -- ${1#xen} - opt_xen_kernel=--xen-kernel=/boot/xen${1:+-$1}.gz - ;; - esac + case $flavor in + (kdump|um) + ;; + (*) + opt_xen_kernel= + case $flavor in + xen*) + set -- $flavor + set -- ${1#xen} + opt_xen_kernel=--xen-kernel=/boot/xen${1:+-$1}.gz + ;; + esac # Add the new bootloader entry - update_bootloader --image /boot/$image \ - --initrd /boot/$initrd \ - --default \ - --add \ - --force $opt_xen_kernel \ - --name "Kernel-$release" - - # Run the bootloader (e.g., lilo). - update_bootloader --refresh - ;; - esac + update_bootloader --image /boot/$image \ + --initrd /boot/$initrd \ + --default \ + --add \ + --force $opt_xen_kernel \ + --name "Kernel-$release" + + # Run the bootloader (e.g., lilo). + update_bootloader --refresh + ;; + esac fi } @@ -122,14 +121,23 @@ # in perl-Bootloader). Other bootloaders do not specify other # sections at all, or do only chainload them (BootLILO.ycp), and # thus do not match either. (#223030) - # - update_bootloader --image /boot/$image \ - --initrd /boot/$initrd \ - --remove \ - --force + + + if [ $flavor == "xen" ]; then + update_bootloader --image /boot/$image \ + --initrd /boot/$initrd \ + --xen \ + --remove \ + --force + else + update_bootloader --image /boot/$image \ + --initrd /boot/$initrd \ + --remove \ + --force + fi # Run the bootloader (e.g., lilo). - update_bootloader --refresh + update_bootloader --refresh } @@ -138,8 +146,8 @@ # Checks if correct amount of arguments is given -if [ "$#" -ne "4" -a "$#" -ne "5" ] ; then - usage +if [ "$#" -ne "4" -a "$#" -ne "5" ] ; then + usage fi # Get all given arguments @@ -147,17 +155,17 @@ # Find out which action should be executed case $action in - add) - # Add a new bootloader entry - add_entry - ;; - remove) - # Remove an existing bootloader entry - remove_entry - ;; - *) - # Unknown argument - usage - ;; + add) + # Add a new bootloader entry + add_entry + ;; + remove) + # Remove an existing bootloader entry + remove_entry + ;; + *) + # Unknown argument + usage + ;; esac ++++++ perl-Bootloader-0.4.5.tar.bz2 -> perl-Bootloader-0.4.6.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.5/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.6/lib/Bootloader/Core/GRUB.pm --- old/perl-Bootloader-0.4.5/lib/Bootloader/Core/GRUB.pm 2006-11-27 19:58:44.000000000 +0100 +++ new/perl-Bootloader-0.4.6/lib/Bootloader/Core/GRUB.pm 2006-11-30 15:44:51.000000000 +0100 @@ -120,10 +120,6 @@ # * rarp:: Initialize a network device via RARP # debug - - - - # image section # root (hd0,0) # omit this, it's always encoded in image/initrd path @@ -140,7 +136,6 @@ # append # initrd - # chainloader section # lock # root @@ -148,12 +143,10 @@ # makeactive # blockoffset # this is encoded in 'chainloader' +1 - # FIXME: add help texts for all widgets my %exports; - my @bootpart; my @partinfo = @{$loader->{"partitions"} || []}; @@ -256,6 +249,10 @@ xen_vgamode => "string:Vga Mode", xen_append => "string:Optional kernel command line parameter", xen_initrd => "path:Initial RAM disk:/boot/initrd", + + type_menu => "bool:Menu section", + menu_root => "select:Partition of menu file:::" . $other_partitions, + menu_configfile => "path:Menu description file:/boot/grub/menu.lst" }; # my $so = $exports{"section_options"}; @@ -1005,8 +1002,13 @@ if ($key eq "root" || $key eq "rootnoverify") { - $grub_root = $val; - $ret{"noverifyroot"} = "true" if ($key eq "rootnoverify"); + if ($type eq "menu") { + $ret{"root"} = $self->GrubDev2UnixDev ($val); + } + else { + $grub_root = $val; + $ret{"noverifyroot"} = "true" if ($key eq "rootnoverify"); + } } elsif ($key eq "title") { @@ -1066,7 +1068,7 @@ $ret{"xen"} = $self->GrubPath2UnixPath ($1, $grub_root); $ret{"xen_append"} = $2 if defined $2; } - elsif ($key eq "initrd" || $key eq "wildcard") + elsif ($key eq "initrd" || $key eq "wildcard" || $key eq "configfile") { $ret{$key} = $self->GrubPath2UnixPath ($val, $grub_root); } @@ -1236,22 +1238,26 @@ my $modules = 0; my $kernel_xen = 0; my $chainloader = 0; + my $configfile = 0; foreach my $line_ref (@lines) { - if ($line_ref->{"key"} eq "module") - { + if ($line_ref->{"key"} eq "module") { $modules++; } - elsif ($line_ref->{"key"} eq "kernel" && $line_ref->{"value"} =~ m/xen/) - { + elsif ($line_ref->{"key"} eq "kernel" && $line_ref->{"value"} =~ m/xen/) { $kernel_xen = 1; } - elsif ($line_ref->{"key"} eq "chainloader") - { + elsif ($line_ref->{"key"} eq "chainloader") { $chainloader = 1; } + elsif ($line_ref->{"key"} eq "configfile") { + $configfile = 1; + } + } + if ($configfile) { + return "menu"; } - if ($modules > 0 and $kernel_xen and not $chainloader) { + elsif ($modules > 0 and $kernel_xen and not $chainloader) { return "xen"; } elsif ($chainloader and $modules == 0 and $kernel_xen == 0) { @@ -1290,7 +1296,7 @@ } #if section type is not known, don't touch it. - if ($type ne "image" && $type ne "other" && $type ne "xen") + if ($type ne "image" and $type ne "other" and $type ne "xen" and $type ne "menu") { return \@lines; } @@ -1300,6 +1306,12 @@ $grub_root = $self->GetCommonDevice ($sectinfo{"image"}, $sectinfo{"initrd"}); $grub_root = $self->UnixDev2GrubDev ($grub_root); } + elsif ($type eq "menu") { + my ($boot_dev,) = $self->SplitDevPath ("/boot"); + $grub_root = $self->UnixDev2GrubDev ( + exists $sectinfo{"root"} ? delete($sectinfo{"root"}) : $boot_dev + ); + } if ($type eq "xen") { if (exists($sectinfo{"append"}) and @@ -1327,7 +1339,7 @@ my $line_ref = $_; my $key = $line_ref->{"key"}; - if ($key eq "root" || $key eq "rootnoverify") + if ($key eq "root" or $key eq "rootnoverify" or $key eq "configfile") { # always remove old root line $line_ref = undef; @@ -1427,10 +1439,16 @@ } elsif ($key eq "chainloader") { - my $line = $self->CreateChainloaderLine (\%sectinfo, $grub_root); push @lines, { - "key" => "chainloader", - "value" => $line, + "key" => $key, + "value" => $self->CreateChainloaderLine (\%sectinfo, $grub_root), + }; + } + elsif ($key eq "configfile") + { + push @lines, { + "key" => $key, + "value" => $value, }; } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org