Hello community,
here is the log from the commit of package perl-Bootloader
checked in at Wed Apr 25 22:29:11 CEST 2007.
--------
--- perl-Bootloader/perl-Bootloader.changes 2007-04-11 18:40:20.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2007-04-25 19:13:32.000000000 +0200
@@ -1,0 +2,35 @@
+Wed Apr 25 19:11:25 CEST 2007 - aosthof(a)suse.de
+
+- Fixed usage of md raids for ia64 (#233255)
+- Reverted EFI Bootloader Label code in ELILO.pm to display gui
+ wigets in YaST as they used to be displayed (#242985)
+- Version bump to 0.4.15
+
+-------------------------------------------------------------------
+Wed Apr 25 19:09:18 CEST 2007 - aosthof(a)suse.de
+
+- Fixed naming scheme of product name for boot menu entries, so
+ that Xen or Failsafe entries for instance get displayed correctly
+
+-------------------------------------------------------------------
+Wed Apr 25 19:07:47 CEST 2007 - aosthof(a)suse.de
+
+- Fix for booting from extended partitions (#246161, #259050)
+
+-------------------------------------------------------------------
+Wed Apr 25 13:32:01 CEST 2007 - jplack(a)suse.de
+
+- do section type checking cleanly for ZIPL (#261551)
+
+-------------------------------------------------------------------
+Thu Apr 19 11:16:43 CEST 2007 - sf(a)suse.de
+
+- use underlying device instead of md RAID-device (Bug #265867)
+
+-------------------------------------------------------------------
+Thu Apr 12 18:08:58 CEST 2007 - aosthof(a)suse.de
+
+- Fixed error handling for "dmsetup" calls in DMRaidAvailable(),
+ IsDMDevice() and IsDMRaidSlave() in Tools.pm
+
+-------------------------------------------------------------------
Old:
----
perl-Bootloader-0.4.14.tar.bz2
New:
----
perl-Bootloader-0.4.15.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Bootloader.spec ++++++
--- /var/tmp/diff_new_pack.q21140/_old 2007-04-25 22:29:04.000000000 +0200
+++ /var/tmp/diff_new_pack.q21140/_new 2007-04-25 22:29:04.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-Bootloader (Version 0.4.14)
+# spec file for package perl-Bootloader (Version 0.4.15)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,8 +11,8 @@
# norootforbuild
Name: perl-Bootloader
-Version: 0.4.14
-Release: 3
+Version: 0.4.15
+Release: 1
Requires: perl >= %{perl_version}
Requires: perl-gettext
Requires: mdadm e2fsprogs
@@ -63,6 +63,23 @@
/usr/lib/bootloader
%changelog
+* Wed Apr 25 2007 - aosthof(a)suse.de
+- Fixed usage of md raids for ia64 (#233255)
+- Reverted EFI Bootloader Label code in ELILO.pm to display gui
+ wigets in YaST as they used to be displayed (#242985)
+- Version bump to 0.4.15
+* Wed Apr 25 2007 - aosthof(a)suse.de
+- Fixed naming scheme of product name for boot menu entries, so
+ that Xen or Failsafe entries for instance get displayed correctly
+* Wed Apr 25 2007 - aosthof(a)suse.de
+- Fix for booting from extended partitions (#246161, #259050)
+* Wed Apr 25 2007 - jplack(a)suse.de
+- do section type checking cleanly for ZIPL (#261551)
+* Thu Apr 19 2007 - sf(a)suse.de
+- use underlying device instead of md RAID-device (Bug #265867)
+* Thu Apr 12 2007 - aosthof(a)suse.de
+- Fixed error handling for "dmsetup" calls in DMRaidAvailable(),
+ IsDMDevice() and IsDMRaidSlave() in Tools.pm
* Wed Apr 11 2007 - aosthof(a)suse.de
- Corrected resolution of symlinks in Tools.pm (#244033)
* Wed Apr 11 2007 - aosthof(a)suse.de
++++++ bootloader_entry ++++++
--- perl-Bootloader/bootloader_entry 2007-03-13 16:58:55.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-Bootloader/bootloader_entry 2007-04-25 19:09:49.000000000 +0200
@@ -84,7 +84,7 @@
--default \
--add \
--force $opt_xen_kernel \
- --name "Kernel-$release"
+ --name "$release"
# Run the bootloader (e.g., lilo).
update_bootloader --refresh
@@ -96,7 +96,7 @@
--initrd /boot/$initrd \
--add \
--force \
- --name "Kernel-$release"
+ --name "$release"
# Run the bootloader (e.g., lilo).
update_bootloader --refresh
@@ -109,7 +109,7 @@
--default \
--add \
--force \
- --name "Kernel-$release"
+ --name "$release"
# Run the bootloader (e.g., lilo).
update_bootloader --refresh
++++++ perl-Bootloader-0.4.14.tar.bz2 -> perl-Bootloader-0.4.15.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.14/lib/Bootloader/Core/ELILO.pm new/perl-Bootloader-0.4.15/lib/Bootloader/Core/ELILO.pm
--- old/perl-Bootloader-0.4.14/lib/Bootloader/Core/ELILO.pm 2007-04-11 18:45:05.000000000 +0200
+++ new/perl-Bootloader-0.4.15/lib/Bootloader/Core/ELILO.pm 2007-04-25 19:13:32.000000000 +0200
@@ -142,12 +142,13 @@
my $boot_partitions = join(":", @bootpart);
+ my @md_arrays = keys %{$loader->{"md_arrays"} || {}};
my $root_devices = join(":",
map {
my ($device, $disk, $nr, $fsid, $fstype, $part_type, $start_cyl, $size_cyl) = @$_;
# FIXME: weed out non-root partitions
} @partinfo,
- keys %{$loader->{"md_arrays"} || {}}
+ \@md_arrays
);
# FIXME: is "arch" export necessary?
@@ -173,7 +174,7 @@
relocatable => "bool:Allow Attempt to relocate:",
# shadow entries for efi boot manager
- efilabel => "string:EFI Boot Manager Label::",
+ boot_efilabel => "string:EFI Boot Manager Label::",
#boot_rm_efilabel => "bool:Remove existing EFI Boot Manager Entries by Name:",
};
@@ -404,7 +405,7 @@
# handle 'hidden magic' entries
map {
- s/^/##YaST - / if /^efilabel/;
+ s/^/##YaST - / if /^boot_efilabel/;
#if /^boot_efilabel/ or /^boot_rm_efilabel/;
} @{$elilo_conf};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.14/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.15/lib/Bootloader/Core/GRUB.pm
--- old/perl-Bootloader-0.4.14/lib/Bootloader/Core/GRUB.pm 2007-04-02 14:08:36.000000000 +0200
+++ new/perl-Bootloader-0.4.15/lib/Bootloader/Core/GRUB.pm 2007-04-25 19:08:23.000000000 +0200
@@ -104,6 +104,7 @@
# boot_custom # data for grub.conf
# boot_mbr
# boot_root
+ # boot_boot
# map
# unhide
@@ -206,6 +207,7 @@
boot_mbr => "bool:Boot from Master Boot Record:false",
boot_root => "bool:Boot from Root Partition:true",
boot_boot => "bool:Boot from Boot Partition:true",
+ boot_extended => "bool:Boot from Extended Partition:true",
# map
# unhide
@@ -472,7 +474,8 @@
if ($dev =~ m#/dev/md\d+#) {
my @members = @{$self->MD2Members ($dev) || []};
# FIXME! This only works for mirroring (Raid1)
- $dev = $members[0] || $dev;
+ $kernel_dev = $members[0] || $kernel_dev;
+ $self->l_debug ("GRUB::UnixDev2GrubDev: First device of MDRaid:: $original --> $kernel_dev");
}
# fetch the underlying device (sda1 --> sda)
@@ -480,6 +483,7 @@
if ($dev_ref->[0] eq $kernel_dev) {
$kernel_dev = $dev_ref->[1];
$partition = $dev_ref->[2] - 1;
+ $self->l_debug ("GRUB::UnixDev2GrubDev: dev_ref: ".$dev_ref->[0]." ".$dev_ref->[1]." ".$dev_ref->[2]);
last;
}
}
@@ -794,6 +798,7 @@
# in glob_ref accordingly
my ($boot_dev,) = $self->SplitDevPath ("/boot");
my ($root_dev,) = $self->SplitDevPath ("/");
+ my $extended_dev = $self->GetExtendedPartition($boot_dev);
# mbr_dev is the first bios device
my $mbr_dev = $self->GrubDev2UnixDev("(hd0)");
@@ -812,6 +817,10 @@
$glob_ref->{"boot_boot"} = "true";
$self->l_milestone ("GRUB::Parselines: detected boot_boot");
}
+ elsif ($dev eq $extended_dev) {
+ $glob_ref->{"boot_extended"} = "true";
+ $self->l_milestone ("GRUB::Parselines: detected boot_extended");
+ }
else {
$glob_ref->{"boot_custom"} = $dev;
$self->l_milestone ("GRUB::Parselines: set boot_custom");
@@ -915,6 +924,14 @@
$s1_devices{$dev} = 1 if defined $dev;
}
+ # boot_extended => "bool:Boot from Extended Partition:true",
+ $flag = delete $glob{"boot_extended"};
+ if (defined $flag and $flag eq "true") {
+ # add partition(extended)
+ $dev = $self->GetExtendedPartition($self->SplitDevPath("/boot"));
+ $s1_devices{$dev} = 1 if defined $dev;
+ }
+
# convert any raid1 device entry into multiple member entries
foreach my $s1dev (keys %s1_devices)
{
@@ -938,7 +955,7 @@
# keep the first bootloader setup command for every boot device and drop
# all other
- # FIXME: shouldn't we make comments from that? commment handling here at all?
+ # FIXME: shouldn't we make comments from that? comment handling here at all?
my @grub_conf_items = grep {
my $keep = 1;
if ($_->{"command"} eq "install"|| $_->{"command"} eq "setup")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.14/lib/Bootloader/Core/ZIPL.pm new/perl-Bootloader-0.4.15/lib/Bootloader/Core/ZIPL.pm
--- old/perl-Bootloader-0.4.14/lib/Bootloader/Core/ZIPL.pm 2007-02-14 11:43:46.000000000 +0100
+++ new/perl-Bootloader-0.4.15/lib/Bootloader/Core/ZIPL.pm 2007-04-25 13:33:33.000000000 +0200
@@ -434,6 +434,10 @@
};
} # else ignore for unknown section type
}
+ elsif (not exists ($so->{$type . "_" . $key})) {
+ # print $type . "_" . $key . " unknown!\n";
+ next; # only accept known section options CAVEAT!
+ }
elsif ($key eq "list") {
my $i = 1;
foreach (split(/\s*,\s*/, $value)) {
@@ -457,10 +461,6 @@
elsif ($key eq "append") {
$parameters = $parameters . $value;
}
- elsif (not exists ($so->{$type . "_" . $key})) {
- # print $type . "_" . $key . " unknown!\n";
- next; # only accept known section options CAVEAT!
- }
else {
my ($stype) = split /:/, $so->{$type . "_" . $key};
# bool values appear in a config file or not
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.14/lib/Bootloader/Core.pm new/perl-Bootloader-0.4.15/lib/Bootloader/Core.pm
--- old/perl-Bootloader-0.4.14/lib/Bootloader/Core.pm 2007-02-21 14:30:39.000000000 +0100
+++ new/perl-Bootloader-0.4.15/lib/Bootloader/Core.pm 2007-04-25 19:08:23.000000000 +0200
@@ -380,6 +380,48 @@
}
=item
+C<< $extended_part_dev = Bootloader::Core->GetExtendedPartition ($part_dev); >>
+
+Takes a device name (string, eg. C<'/dev/sda7'>) and returns the device name
+of the extended partition on the same disk (string, eg. C<'/dev/sda3'>). If no
+extended partition exists on that disk, returns undef.
+
+=cut
+
+# string GetExtendedPartition (string part_dev)
+sub GetExtendedPartition {
+ my $self = shift;
+ my $part_dev = shift;
+ my $extended_part_dev = undef;
+
+ # Check for valid devices
+ unless ($part_dev =~ m/^\/dev\/[sh]d[a-z](\d+)?$/) {
+ $self->l_debug ("Core::GetExtendedPartition: Specified device
+ $part_dev is not valid and cannot be used as base for detecting an
+ extended partition on the same disk.");
+ return $extended_part_dev;
+ }
+
+ # Cut the partition number (if any) to get the corresponding disk
+ my $disk_dev = $part_dev;
+ $disk_dev =~ s/\d+$//;
+
+ # Partitioninfo is a list of list references of the format:
+ # Device, disk, nr, fsid, fstype, part_type, start_cyl, size_cyl
+ # /dev/sda9 /dev/sda 9 258 Apple_HFS `primary 0 18237
+
+ foreach my $part_ref (@{$self->{"partitions"}}) {
+ if ($part_ref->[1] eq $disk_dev and
+ $part_ref->[5] eq "`extended") {
+ $extended_part_dev = $part_ref->[0];
+ last;
+ }
+ }
+
+ return $extended_part_dev;
+}
+
+=item
C<< $quoted = Bootloader::Core->Quote ($text, $when); >>
Puts a text to quotes. As arguments takes the text (string) and information
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.14/lib/Bootloader/Tools.pm new/perl-Bootloader-0.4.15/lib/Bootloader/Tools.pm
--- old/perl-Bootloader-0.4.14/lib/Bootloader/Tools.pm 2007-04-11 18:40:20.000000000 +0200
+++ new/perl-Bootloader-0.4.15/lib/Bootloader/Tools.pm 2007-04-25 19:08:23.000000000 +0200
@@ -106,11 +106,11 @@
my $level = $rec->{"level"};
if ($level eq "debug")
{
- #print STDERR ("DEBUG: $message\n");
+# print STDERR ("DEBUG: $message\n");
}
elsif ($level eq "milestone")
{
- #print STDERR ("MILESTONE: $message\n");
+# print STDERR ("MILESTONE: $message\n");
}
elsif ($level eq "warning")
{
@@ -206,16 +206,19 @@
# FIXME: this has to be read through yast::storage
sub ReadPartitions {
- my $sb="/sys/block";
+ my $sb = "/sys/block";
opendir(BLOCK_DEVICES, "$sb") ||
die ("ReadPartitions(): Failed to open dir $sb");
+ # get disk devices
my @disks = grep {
!m/^\./ and -r "$sb/$_/range" and qx{ cat $sb/$_/range } > 1
} readdir(BLOCK_DEVICES);
closedir BLOCK_DEVICES;
+ # get partition info for all partitions on all @disks
my @devices = ();
+
# Add DM RAID Partitions to @devices
if (DMRaidAvailable()){
my $dev_ref = ReadDMRaidPartitions();
@@ -225,16 +228,60 @@
foreach my $disk (@disks)
{
+ # get kernel device name for this device
my $dev_disk = Udev2Dev ($disk);
+
+ # get additional info from parted for the partitions on this $disk
+ #
+ # Disk geometry for /dev/sdb: 0cyl - 14593cyl
+ # BIOS cylinder,head,sector geometry: 14593,255,63. Each cylinder is 8225kB.
+ # Disk label type: msdos
+ # Number Start End Size Type File system Flags
+ # 1 0cyl 63cyl 63cyl primary reiserfs raid, type=fd
+ # 2 64cyl 2022cyl 1959cyl primary ext3 boot, raid, type=fd
+ # 3 2023cyl 3067cyl 1045cyl primary linux-swap raid, type=fd
+ # 4 3068cyl 14592cyl 11525cyl extended lba, type=0f
+ # 5 3068cyl 3198cyl 130cyl logical reiserfs type=83
+ #
+ my @parted_info_list = ();
+ my $parted_info = `parted -s $dev_disk unit cyl print`;
+ if ( $? == 0 ) {
+ my @parted_info_split = split(/\n/, $parted_info);
+ # skip header lines
+
+
+ while ($#parted_info_split >=0 and $parted_info_split[0] !~ /^\s*\d/) {
+ shift @parted_info_split;
+ }
+
+ foreach $parted_info (@parted_info_split) {
+ # FIXME: parse the rest of the lines
+ chomp($parted_info);
+ my ($p_nr, $p_startcyl, $p_endcyl, $p_sizecyl, $p_type, $rest) =
+ split(' ', $parted_info);
+
+ $p_startcyl =~ s/cyl$//;
+ $p_endcyl =~ s/cyl$//;
+ $p_sizecyl =~ s/cyl$//;
+ $p_type =~ s/^/`/;
+
+ # array: part_nr -> (startcyl, endcyl, sizecyl, type)
+ $parted_info_list[$p_nr] =
+ [$p_startcyl, $p_endcyl, $p_sizecyl, $p_type];
+ }
+ }
+
if (!IsDMDevice($disk) && !IsDMRaidSlave($disk)){
+ # get partitions of $disk
opendir(BLOCK_DEVICES, "$sb/$disk") ||
die ("ReadPartitions(): Failed to open dir $sb/$disk");
my @parts = grep {
!m/^\./ and -d "$sb/$disk/$_" and -f "$sb/$disk/$_/dev"
- } readdir (BLOCK_DEVICES);
+ } readdir (BLOCK_DEVICES);
closedir BLOCK_DEVICES;
+ # generate proper device names and other info for all @part[ition]s
foreach my $part (@parts)
{
chomp ($part);
@@ -244,7 +291,26 @@
{
$index = substr ($index, 1);
}
- push @devices, [$part, $dev_disk, $index];
+ # The @devices array will contain the following members:
+ #
+ # index type value (example)
+ #
+ # 0 device /dev/sda9
+ # 1 disk /dev/sda
+ # 2 nr 9
+ # 3 fsid 258
+ # 4 fstype Apple_HFS
+ # 5 part_type `primary
+ # 6 start_cyl 0
+ # 7 size_cyl 18237
+
+ push @devices, [$part, $dev_disk, $index, 0, "",
+ defined( $parted_info_list[$index]->[3] ) ?
+ $parted_info_list[$index]->[3] : "",
+ defined( $parted_info_list[$index]->[0] ) ?
+ $parted_info_list[$index]->[0] : 0,
+ defined( $parted_info_list[$index]->[1] ) ?
+ $parted_info_list[$index]->[1] : 0];
}
}
}
@@ -260,7 +326,7 @@
=cut
sub DMRaidAvailable {
- my $retval = 1;
+ my $retval = 0;
$dmsetup = AddPathToExecutable("dmsetup");
@@ -268,9 +334,7 @@
my $dm_devices = qx{$dmsetup info -c --noheadings -o uuid};
chomp($dm_devices);
- if ($dm_devices eq "No devices found") {
- $retval = 0;
- }
+ $retval = $dm_devices ne "No devices found";
}
else {
print ("The command \"dmsetup\" is not available.\n");
@@ -388,6 +452,11 @@
my $majmin_disk = Udev2MajMin($disk);
chomp($majmin_disk);
my @dmparts = ();
+
+ unless (-e $dmsetup) {
+ return 0;
+ }
+
my @dm_devs = qx{$dmsetup info -c --noheadings -o name | grep -v part};
if ($dm_devs[0] !~ /No devices found/) {
@@ -422,6 +491,10 @@
sub IsDMDevice {
my $dev = shift;
+ unless (-e $dmsetup) {
+ return 0;
+ }
+
my $cmd = "$dmsetup info -c --noheadings -oname $dev";
if (my $test = qx{$cmd 2>/dev/null}){
chomp $test;
@@ -615,11 +688,11 @@
{
# we could test $num_device against number of found devices to
# detect degradedmode but that does not matter here (really?)
+
$mapping{$array} = [ split(/,/, $1) ];
}
}
close( MD );
-
return \%mapping;
}
@@ -666,6 +739,7 @@
DumpLog ();
}
+
# internal: does section match with set of tags
sub match_section {
my ($sect_ref, $opt_ref,) = @_;
++++++ update-bootloader ++++++
--- perl-Bootloader/update-bootloader 2007-04-02 12:59:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-Bootloader/update-bootloader 2007-04-25 19:09:49.000000000 +0200
@@ -108,22 +108,38 @@
sub GetProduct {
my $namever;
-
- # First try: Does yast work these days?
- $namever = `yast2 print-product 2>&1`;
- chomp $namever;
+
+ # first try: new zypp-query-pool adopted to our needs
+ my @product_query = split ('\|', qx{/usr/lib/zypp/zypp-query-pool products \@system});
+ my $found = 0;
+ my $i = 0;
+
+ for ($i = 0; $i <= @product_query; $i++){
+ if ($product_query[$i] eq "base"){
+ $found = 1;
+ last;
+ }
+ }
# Determine the bootloader type, because long product names may only
# be used in case of grub
my $loader = Bootloader::Tools::GetBootloader();
-
# Substitude whitespaces with an underscore
- if ($loader ne "grub") {
- $namever =~ s/\s/_/;
+ if ($found){
+ if ($loader ne "grub") {
+ $namever = $product_query[$i+1];
+ $namever =~ s/\s/_/;
+ }
+ else{
+ $namever = $product_query[$i+2];
+ }
+ chomp $namever;
}
return "$namever" if $namever ne '' and $namever !~ /\n/;
# Second try: Is there a usable /etc/SuSE-release?
+ # This should really not be used anymore, as the syntax changed
+ # no 'SP1' in the output.
if (open(RELEASE, "</etc/SuSE-release") && $loader eq "grub") {
# first line is sufficient
$namever = <RELEASE>;
@@ -253,8 +269,8 @@
if ($loader eq "grub") {
$opt_name =~ s/-[^-]*$//;
- $opt_failsafe = "Failsafe -- " . $opt_name;
- $opt_name = GetProduct() . " -- " . $opt_name;
+ $opt_failsafe = "Failsafe -- " . GetProduct() . " - " . $opt_name;
+ $opt_name = GetProduct() . " - " . $opt_name;
}
else {
$opt_failsafe = "Failsafe";
@@ -265,10 +281,10 @@
elsif ($opt_xen) {
if ($loader eq "grub") {
$opt_name =~ s/-xen.*$//;
- $opt_xen_name = "Xen -- " . GetProduct() . " - " . $opt_name;
+ $opt_xen_name = "XEN -- " . GetProduct() . " - " . $opt_name;
}
else {
- $opt_name = "Xen";
+ $opt_name = "XEN";
}
}
# Naming scheme for all other kernels
@@ -277,7 +293,7 @@
$opt_name = GetProduct() if $add_product;
}
else {
- $opt_name .= " -- " . GetProduct() if $add_product;
+ $opt_name = GetProduct() . " -- " . $opt_name if $add_product;
}
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org