Hello community,
here is the log from the commit of package perl-Bootloader
checked in at Fri Sep 12 18:07:45 CEST 2008.
--------
--- perl-Bootloader/perl-Bootloader.changes 2008-08-21 15:59:29.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-Bootloader/perl-Bootloader.changes 2008-09-12 14:49:49.374730000 +0200
@@ -1,0 +2,17 @@
+Fri Sep 12 13:38:11 CEST 2008 - jreidinger@suse.cz
+
+- gfxmenu menu is removed from trustedgrub global section
+- if type of kernel is changed, then correctly transfer default
+ (bnc #402789)
+- if kernel params is not set in sysconfig, use old way to transfer
+ it (bnc #423613)
+- fix root in chainloading (bnc #394319)
+- don't change original name (bnc #397067)
+- drop support xen-pae from metadata (kernel update still support
+ it) (bnc #400526)
+- don't use uninitialized variable in elilo (bnc #252148)
+- remove read-only flag from lilo, because it stop booting
+ (bnc #381669)
+- 0.4.70
+
+-------------------------------------------------------------------
Old:
----
perl-Bootloader-0.4.69.tar.bz2
New:
----
perl-Bootloader-0.4.70.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Bootloader.spec ++++++
--- /var/tmp/diff_new_pack.L30916/_old 2008-09-12 18:07:26.000000000 +0200
+++ /var/tmp/diff_new_pack.L30916/_new 2008-09-12 18:07:26.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-Bootloader (Version 0.4.69)
+# spec file for package perl-Bootloader (Version 0.4.70)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,7 +19,7 @@
Name: perl-Bootloader
-Version: 0.4.69
+Version: 0.4.70
Release: 1
Requires: perl-base = %{perl_version}
Requires: e2fsprogs
@@ -74,6 +74,20 @@
/usr/lib/bootloader
%changelog
+* Fri Sep 12 2008 jreidinger@suse.cz
+- gfxmenu menu is removed from trustedgrub global section
+- if type of kernel is changed, then correctly transfer default
+ (bnc #402789)
+- if kernel params is not set in sysconfig, use old way to transfer
+ it (bnc #423613)
+- fix root in chainloading (bnc #394319)
+- don't change original name (bnc #397067)
+- drop support xen-pae from metadata (kernel update still support
+ it) (bnc #400526)
+- don't use uninitialized variable in elilo (bnc #252148)
+- remove read-only flag from lilo, because it stop booting
+ (bnc #381669)
+- 0.4.70
* Thu Aug 21 2008 jreidinger@suse.cz
- add support for trusted grub
- add support for reading console a trusted grub params from
++++++ perl-Bootloader-0.4.69.tar.bz2 -> perl-Bootloader-0.4.70.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.69/lib/Bootloader/Core/ELILO.pm new/perl-Bootloader-0.4.70/lib/Bootloader/Core/ELILO.pm
--- old/perl-Bootloader-0.4.69/lib/Bootloader/Core/ELILO.pm 2008-08-15 12:42:54.000000000 +0200
+++ new/perl-Bootloader-0.4.70/lib/Bootloader/Core/ELILO.pm 2008-09-12 13:30:11.000000000 +0200
@@ -144,13 +144,11 @@
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,
- \@md_arrays
- );
+ my @root_part = map {
+ my ($device, $disk, $nr, $fsid, $fstype, $part_type, $start_cyl, $size_cyl) = @$_;
+ # FIXME: weed out non-root partitions
+ } @partinfo;
+ my $root_devices = join(":",@root_part,\@md_arrays);
# FIXME: is "arch" export necessary?
@@ -294,21 +292,16 @@
# handle global append information
my $glob_app = undef;
- my $flag = 0;
foreach my $opt_ref (@{$glob_ref->{"__lines"}|| []})
{
my $key = $opt_ref->{"key"};
my $val = $opt_ref->{"value"};
if ($key eq "append")
{
- $flag = 1;
$glob_app = $val;
-# print STDERR "\nGLOBAL APPEND: $glob_app \n\n";
+ $self->l_milestone("GLOBAL APPEND: $glob_app \n");
}
}
-# if(! $flag) {
-# print STDERR "\nNO GLOBAL APPEND!\n\n";
-# }
# handle section append information
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.69/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.70/lib/Bootloader/Core/GRUB.pm
--- old/perl-Bootloader-0.4.69/lib/Bootloader/Core/GRUB.pm 2008-08-21 15:38:37.000000000 +0200
+++ new/perl-Bootloader-0.4.70/lib/Bootloader/Core/GRUB.pm 2008-09-12 09:58:02.000000000 +0200
@@ -251,7 +251,7 @@
other_blockoffset => "int:Block offset for chainloading:1:0:32",
type_xen => "bool:Xen section",
- xen_xen => "select:Hypervisor:/boot/xen.gz:/boot/xen.gz:/boot/xen-pae.gz",
+ xen_xen => "select:Hypervisor:/boot/xen.gz:/boot/xen.gz",
xen_xen_append => "string:Additional Xen Hypervisor Parameters:",
xen_image => "path:Kernel image:/boot/vmlinux",
xen_root => "select:Root device::" . $root_devices,
@@ -1249,8 +1249,12 @@
# $grub_root = $val;
}
else {
- $grub_root = $val;
- $ret{"noverifyroot"} = "true" if ($key eq "rootnoverify");
+ if ($type eq "other")
+ {
+ $ret{"chainloader"} = $val;
+ }
+ $grub_root = $val;
+ $ret{"noverifyroot"} = "true" if ($key eq "rootnoverify");
}
}
elsif ($key eq "title")
@@ -1376,12 +1380,12 @@
$parts[0] = $self->GrubPath2UnixPath($parts[0]);
if (exists $ret{"measure"}){
- push @{$ret{"measure"}}, $parts[0]." ".$parts[1];
+ $ret{"measure"}->{$parts[0]} = $parts[1];
}
else
{
- my @measure_array = ( $parts[0]." ".$parts[1] );
- $ret{'measure'} = \@measure_array;
+ my %measure_array = ( $parts[0] => $parts[1] );
+ $ret{'measure'} = \%measure_array;
}
}
}
@@ -1490,21 +1494,9 @@
$sectors = "1";
}
$sectors = "+$sectors" if $sectors ne "";
+ $chain = "" if $sectors ne ""; #chainloader with blockoffset no
- if ($sectors eq "")
- {
- $chain = $self->UnixPath2GrubPath ($chain, $grub_root);
- }
- else
- {
- $chain = $self->UnixDev2GrubDev ($chain);
- if (substr ($chain, 0, length ($grub_root)) eq $grub_root)
- {
- $chain = substr ($chain, length ($grub_root));
- }
- }
-
- return "$pcr$chain$sectors";
+ return "$pcr$sectors";
}
@@ -1688,10 +1680,22 @@
$line_ref = $self->UpdateSectionNameLine ($sectinfo{"name"}, $line_ref, $sectinfo{"original_name"});
delete ($sectinfo{"name"});
}
+ elsif ($key eq "configfile")
+ {
+ if (exists $sectinfo{"configfile"})
+ {
+ $line_ref->{"value"} = $sectinfo{"configfile"};
+ delete ($sectinfo{"configfile"});
+ }
+ else
+ {
+ $line_ref = undef;
+ }
+ }
#entries which must be recreated due to hard check if valid or order
- elsif ($key eq "module" or $key eq "measure" or $key eq "configfile" or
- $key eq "root" or $key eq "rootnoverify" or $key eq "map") {
- # put module lines always at the end.
+ elsif ($key eq "module" or $key eq "measure" or
+ $key eq "root" or $key eq "rootnoverify" or $key eq "map")
+ {
$line_ref = undef;
}
elsif ($key eq "makeactive")
@@ -1764,15 +1768,7 @@
# "(hd0,3)/boot/grub/menu.lst". We rather choose to require the
# device in the "root" key and do not expect and handle UNIX device
# names in the "configfile" value at all.
- if ($type eq "other" and defined ($sectinfo{$key})) {
- $line_ref->{"value"} = $self->CreateChainloaderLine (\%sectinfo, $grub_root);
- delete ($sectinfo{$key});
- delete ($sectinfo{"blockoffset"});
- delete ($sectinfo{"chainloaderpcr"});
- }
- else {
- $line_ref = undef;
- }
+ $line_ref = undef;
}
defined $line_ref ? $line_ref : ();
} @lines;
@@ -1788,15 +1784,21 @@
}
if ($grub_root ne "" or $noverify) {
my $value = undef;
- #trick how to boot freedos floppy bnc #278699
- my $grub_dev = $self->UnixDev2GrubDev($sectinfo{"chainloader"});
- $value = $grub_root if $grub_root ne "";
- $value = $grub_dev if ( $grub_dev =~ m/fd[0-9]/ );
+ my $blockoffset = $sectinfo{"blockoffset"} || "";
+ if ($type eq "other" && $blockoffset ne "")
+ {
+ $value = $self->UnixDev2GrubDev($sectinfo{"chainloader"});
+ }
+ else
+ {
+ $value = $grub_root if $grub_root ne "";
+ }
+
$value = "(hd0)" if not defined($value);
+
unshift @lines, {
"key" => $noverify ? "rootnoverify" : "root",
"value" => $value,
-# "value" => $grub_root ne "" ? $grub_root : "(hd0,0)",
};
}
@@ -1877,13 +1879,11 @@
elsif ($key eq "measure")
{
my @parts;
- foreach my $measure (@{$value}){
- @parts = undef;
- @parts = split(" ",$measure);
- $parts[0] = $self->UnixPath2GrubPath($parts[0],$grub_root);
+ while(my ($measure,$pcr) = each (%{$value})){
+ $measure = $self->UnixPath2GrubPath($measure,$grub_root);
push @lines, {
"key" => "measure",
- "value" => $parts[0]." ".$parts[1],
+ "value" => "$measure $pcr",
};
}
}
@@ -1940,6 +1940,12 @@
# Parse flavor of former default image out of comment
my $ff = $self->Comment2FormerFlavor ($line_ref->{"comment_before"});
$ret{"former_default_image_flavor"} = $ff if ($ff ne "");
+
+ # Parse RemovedDefault image out of comment
+ $ff = $self->Comment2RemovedDefault ($line_ref->{"comment_before"});
+ $ret{"removed_default"} = 1 if ($ff == 1);
+
+
}
elsif (defined ($type) and $type eq "path") {
$ret{$key} = $self->GrubPath2UnixPath ($val, $grub_root);
@@ -1990,6 +1996,12 @@
);
}
+ #remove gfxmenu in trusted grub due to security
+ if ($globinfo{"trusted_grub"} eq "true") {
+ delete ($globinfo{"trusted_grub"});
+ delete ($globinfo{"gfxmenu"});
+ }
+
@lines = map {
my $line_ref = $_;
my $key = $line_ref->{"key"};
@@ -2008,10 +2020,19 @@
$line_ref->{"value"} = $self->IndexOfSection (
delete $globinfo{$key}, $sections_ref) || 0;
+ #reset all information before default
+ my @empty;
+ $line_ref->{"comment_before"} = \@empty;
+
$line_ref = $self->CreateFormerDefaultImageLine (
$line_ref, $globinfo{"former_default_image_flavor"});
delete ($globinfo{"former_default_image_flavor"});
+ $line_ref = $self->CreateRemovedDefaultLine (
+ $line_ref, $globinfo{"removed_default"}) if
+ delete ($globinfo{"removed_default"});
+
+
}
elsif ($key eq "password")
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.69/lib/Bootloader/Core.pm new/perl-Bootloader-0.4.70/lib/Bootloader/Core.pm
--- old/perl-Bootloader-0.4.69/lib/Bootloader/Core.pm 2008-07-25 18:00:41.000000000 +0200
+++ new/perl-Bootloader-0.4.70/lib/Bootloader/Core.pm 2008-09-12 14:48:23.000000000 +0200
@@ -1075,6 +1075,49 @@
}
=item
+C<< $original_name = Bootloader::Core->Comment2RemovedDefault ($comment); >>
+
+Gets 1 if comment contains info about removed default. This can happen when you remove default kernel (this can handle situation when changing kernele and old kernel is removed before installing new.
+
+=cut
+
+my $remove_default_comment = "###YaST update: removed default";
+
+# string Comment2FormerFlavor (list<string> comment)
+sub Comment2RemovedDefault($) {
+ my $self = shift;
+ my $comment_lines_ref = shift || [];
+ foreach (@{$comment_lines_ref}) {
+ return 1
+ if m/${remove_default_comment}/o;
+ }
+ return 0;
+}
+
+=item
+C<< $line_ref = Bootloader::Core->CreateRemovedDefaultLine (\%line,); >>
+
+Updates the 'default line' in globals so that it contains info about removed default line. Returns the updated line reference.
+
+=cut
+
+# map