Mailinglist Archive: opensuse-commit (1192 mails)

< Previous Next >
commit perl-Bootloader
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Sat, 16 Aug 2008 02:09:56 +0200
  • Message-id: <20080816000957.43DFE67817A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package perl-Bootloader
checked in at Sat Aug 16 02:09:56 CEST 2008.


--------
--- perl-Bootloader/perl-Bootloader.changes 2008-08-05 13:31:55.000000000
+0200
+++ perl-Bootloader/perl-Bootloader.changes 2008-08-15 15:15:11.526905000
+0200
@@ -1,0 +2,10 @@
+Fri Aug 15 15:03:52 CEST 2008 - jreidinger@xxxxxxx
+
+- added testsuite - now contains reading config files for grub,
+ elilo and powerlilo (fate #303444)
+- implement serial console parameter for image and xen section for
+ grub, elilo and powerlilo (fate #110038)
+- fix root for booting freedos floppy (bnc #278699)
+- 0.4.68
+
+-------------------------------------------------------------------



Old:
----
perl-Bootloader-0.4.67.tar.bz2

New:
----
perl-Bootloader-0.4.68.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Bootloader.spec ++++++
--- /var/tmp/diff_new_pack.MR9666/_old 2008-08-16 02:00:44.000000000 +0200
+++ /var/tmp/diff_new_pack.MR9666/_new 2008-08-16 02:00:44.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-Bootloader (Version 0.4.67)
+# spec file for package perl-Bootloader (Version 0.4.68)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,7 +19,7 @@


Name: perl-Bootloader
-Version: 0.4.67
+Version: 0.4.68
Release: 1
Requires: perl-base = %{perl_version}
Requires: e2fsprogs
@@ -74,6 +74,13 @@
/usr/lib/bootloader

%changelog
+* Fri Aug 15 2008 jreidinger@xxxxxxx
+- added testsuite - now contains reading config files for grub,
+ elilo and powerlilo (fate #303444)
+- implement serial console parameter for image and xen section for
+ grub, elilo and powerlilo (fate #110038)
+- fix root for booting freedos floppy (bnc #278699)
+- 0.4.68
* Mon Aug 04 2008 jsrain@xxxxxxx
- fixed creating chainloader GRUB sections with disk remapping
(fate #301994)


++++++ perl-Bootloader-0.4.67.tar.bz2 -> perl-Bootloader-0.4.68.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/perl-Bootloader-0.4.67/lib/Bootloader/Core/ELILO.pm
new/perl-Bootloader-0.4.68/lib/Bootloader/Core/ELILO.pm
--- old/perl-Bootloader-0.4.67/lib/Bootloader/Core/ELILO.pm 2008-07-17
16:23:59.000000000 +0200
+++ new/perl-Bootloader-0.4.68/lib/Bootloader/Core/ELILO.pm 2008-08-15
12:42:54.000000000 +0200
@@ -231,13 +231,12 @@

=cut

-my $default_conf = Bootloader::Path::Elilo_conf();

# list<string> ListFiles ();
sub ListFiles {
my $self = shift;

- return [ $default_conf ];
+ return [ Bootloader::Path::Elilo_conf() ];
}


@@ -286,7 +285,7 @@
my $avoid_reading_device_map = shift;

# the only file is /etc/elilo.conf
- my @elilo_conf = @{$files{$default_conf} || []};
+ my @elilo_conf = @{$files{Bootloader::Path::Elilo_conf()} || []};
(my $glob_ref, my $sect_ref) = $self->ParseMenuFileLines (
"=",
["image"],
@@ -413,7 +412,7 @@
} @{$elilo_conf};

return {
- $default_conf => $elilo_conf,
+ Bootloader::Path::Elilo_conf() => $elilo_conf,
}
}

@@ -626,6 +625,7 @@
@lines = @lines_new;


+ my $create_append = 1;
while ((my $key, my $value) = each (%sectinfo))
{
if ($key eq "name")
@@ -635,6 +635,19 @@
$line_ref->{"key"} = "label";
push @lines, $line_ref;
}
+ elsif ( $key eq "append" || $key eq "console" )
+ {
+ if (defined($create_append))
+ {
+ my $append = $sectinfo{"append"} || "";
+ my $console = $sectinfo{"console"} || "";
+ push @lines, {
+ "key" => "append",
+ "value" => $append.$console,
+ };
+ $create_append = undef;
+ }
+ }
elsif (! exists ($so->{$type . "_" . $key}))
{
# only accept known section options :-)
@@ -697,6 +710,16 @@
{
$ret{"type"} = $key;
}
+ elsif ($key eq "append")
+ {
+ if ($val =~ /^(?:(.*)\s+)?console=ttyS(\d+),(\w+)(?:\s+(.*))?$/)
+ {
+ $ret{"console"} = "ttyS$2,$3" if $2 ne "";
+ $val = $self->MergeIfDefined( $1, $4);
+ }
+ $ret{"append"} = $val if $val ne "";
+ next;
+ }

unless (exists $ret{"type"} && exists $so->{$ret{"type"} . "_" . $key})
{
# only accept known section options :-)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/perl-Bootloader-0.4.67/lib/Bootloader/Core/GRUB.pm
new/perl-Bootloader-0.4.68/lib/Bootloader/Core/GRUB.pm
--- old/perl-Bootloader-0.4.67/lib/Bootloader/Core/GRUB.pm 2008-08-05
12:43:22.000000000 +0200
+++ new/perl-Bootloader-0.4.68/lib/Bootloader/Core/GRUB.pm 2008-08-15
15:00:00.000000000 +0200
@@ -410,9 +410,13 @@
my $match_found = 0;
$self->l_milestone ("GRUB::GrubDev2UnixDev: device_map:
".$self->{"device_map"});
while ((my $unix, my $fw) = each (%{$self->{"device_map"}})) {
+ $self->l_milestone ("GRUB::GrubDev2UnixDev: device_map: $unix <->
$fw.");
+ }
+ while ((my $unix, my $fw) = each (%{$self->{"device_map"}})) {
if ($dev eq $fw) {
$dev = $unix;
$match_found = 1;
+ last;
}
}
if ($match_found == 0) {
@@ -436,6 +440,9 @@
return $dev;
}
}
+ #no partition found so return $dev with partition
+ $self->l_milestone ("GRUB::GrubDev2UnixDev: No partition found for $dev
with $partition.");
+ return $dev.$partition;
}

$dev = $self->Member2MD ($dev);
@@ -1215,28 +1222,31 @@
$ret{"vgamode"} = $2 if $2 ne "";
$val = $self->MergeIfDefined ($1, $3);
}
- if ($val ne "")
+ if ($val =~ /^(?:(.*)\s+)?console=ttyS(\d+),(\w+)(?:\s+(.*))?$/)
{
- $ret{"append"} = $val;
+ $ret{"console"} = "ttyS$2,$3" if $2 ne "";
+ $val = $self->MergeIfDefined ($1, $4);
if ($type eq "xen") {
- if ($val =~ /console=ttyS(\d+),(\d+)/) {
- # merge console and speed into xen_append
- my $console = sprintf("com%d", $1+1);
- my $speed = sprintf("%s=%d", $console, $2);
- if (exists $ret{"xen_append"}) {
- my $xen_append = $ret{"xen_append"};
- while ($xen_append =~
- s/(.*)console=(\S+)\s*(.*)$/$1$3/o) {
- my $del_console = $2;
+ my $console = sprintf("com%d", $2+1);
+ my $speed = sprintf("%s=%s", $console, $3);
+ if (exists $ret{"xen_append"}) {
+ my $xen_append = $ret{"xen_append"};
+ while ($xen_append =~
+ s/(.*)console=(\S+)\s*(.*)$/$1$3/o) {
+ my $del_console = $2;
$xen_append =~
- s/(.*)${del_console}=\d+\s*(.*)$/$1$2/g;
- }
- $ret{"xen_append"} = "console=$console $speed
$xen_append";
- } else {
- $ret{"xen_append"} = "console=$console $speed";
+ s/(.*)${del_console}=\w+\s*(.*)$/$1$2/g;
}
+ $xen_append =~ s/\s*(\S*)\s*$/$1/;
+ $ret{"xen_append"} = "console=$console $speed
$xen_append";
+ } else {
+ $ret{"xen_append"} = "console=$console $speed";
}
}
+ }
+ if ($val ne "")
+ {
+ $ret{"append"} = $val;
}
}
elsif ($key eq "xen")
@@ -1275,6 +1285,10 @@
{
$ret{"remap"} = "true";
}
+ elsif ($key eq "makeactive")
+ {
+ $ret{"makeactive"} = "true";
+ }
}

$ret{"__lines"} = \@lines;
@@ -1342,11 +1356,13 @@
my $vga = $sectinfo_ref->{"vgamode"} || "";
my $append = $sectinfo_ref->{"append"} || "";
my $image = $sectinfo_ref->{"image"} || "";
+ my $console = $sectinfo_ref->{"console"} || "";
$root = " root=$root" if $root ne "";
$vga = " vga=$vga" if $vga ne "";
$append = " $append" if $append ne "";
+ $console = " console=$console" if $console ne "";
$image = $self->UnixPath2GrubPath ($image, $grub_root);
- return "$image$root$append$vga";
+ return "$image$root$append$vga$console";
}

=item
@@ -1539,8 +1555,8 @@
}

if ($type eq "xen") {
- if (exists($sectinfo{"append"}) and
- ($sectinfo{"append"} =~ /console=ttyS(\d+),(\d+)/) )
+ if (exists($sectinfo{"console"}) and
+ ($sectinfo{"console"} =~ /ttyS(\d+),(\w+)/) )
{
# merge console and speed into xen_append
my $console = sprintf("com%d", $1+1);
@@ -1551,7 +1567,7 @@
s/(.*)console=(\S+)\s*(.*)$/$1$3/o) {
my $del_console = $2;
$xen_append =~
- s/(.*)${del_console}=\d+\s*(.*)$/$1$2/g;
+ s/(.*)${del_console}=\w+\s*(.*)$/$1$2/g;
}
$sectinfo{"xen_append"} = "console=$console $speed $xen_append";
} else {
@@ -1590,6 +1606,7 @@
delete ($sectinfo{"vgamode"});
delete ($sectinfo{"append"});
delete ($sectinfo{"image"});
+ delete ($sectinfo{"console"});
}
}
elsif ($key eq "initrd" || $key eq "wildcard")
@@ -1655,9 +1672,15 @@
delete($sectinfo{"noverifyroot"});
}
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]/ );
+ $value = "(hd0)" if not defined($value);
unshift @lines, {
"key" => $noverify ? "rootnoverify" : "root",
- "value" => $grub_root ne "" ? $grub_root : "(hd0)",
+ "value" => $value,
# "value" => $grub_root ne "" ? $grub_root : "(hd0,0)",
};
}
@@ -1709,7 +1732,7 @@
"value" => $value,
};
}
- elsif ($key eq "remap")
+ elsif ($key eq "remap" and $value eq "true" )
{
unshift @lines, {
"key" => "map",
@@ -1720,7 +1743,7 @@
"value" => "($remap_device) (hd0)",
};
}
- elsif ($key eq "makeactive")
+ elsif ($key eq "makeactive" and $value eq "true" )
{
push @lines, {
"key" => "makeactive",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore
old/perl-Bootloader-0.4.67/lib/Bootloader/Core/PowerLILO.pm
new/perl-Bootloader-0.4.68/lib/Bootloader/Core/PowerLILO.pm
--- old/perl-Bootloader-0.4.67/lib/Bootloader/Core/PowerLILO.pm 2008-07-17
16:23:59.000000000 +0200
+++ new/perl-Bootloader-0.4.68/lib/Bootloader/Core/PowerLILO.pm 2008-08-15
10:07:23.000000000 +0200
@@ -620,6 +620,7 @@
@lines = @lines_new;


+ my $create_append = 1;
while ((my $key, my $value) = each (%sectinfo))
{
if ($key eq "name")
@@ -629,6 +630,19 @@
$line_ref->{"key"} = "label";
push @lines, $line_ref;
}
+ elsif ( $key eq "append" || $key eq "console" )
+ {
+ if (defined($create_append))
+ {
+ my $append = $sectinfo{"append"} || "";
+ my $console = $sectinfo{"console"} || "";
+ push @lines, {
+ "key" => "append",
+ "value" => $append.$console,
+ };
+ $create_append = undef;
+ }
+ }
elsif (! exists ($so->{$type . "_" . $key}))
{
# only accept known section options :-)
@@ -685,6 +699,17 @@
{
$ret{"type"} = $key;
}
+ elsif ($key eq "append")
+ {
+ my $val = $line_ref->{"value"};
+ if ($val =~ /^(?:(.*)\s+)?console=ttyS(\d+),(\w+)(?:\s+(.*))?$/)
+ {
+ $ret{"console"} = "ttyS$2,$3" if $2 ne "";
+ $val = $self->MergeIfDefined( $1, $4);
+ }
+ $ret{"append"} = $val if $val ne "";
+ next;
+ }
$ret{$key} = $line_ref->{"value"};
}
$ret{"__lines"} = \@lines;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/perl-Bootloader-0.4.67/lib/Bootloader/Library.pm
new/perl-Bootloader-0.4.68/lib/Bootloader/Library.pm
--- old/perl-Bootloader-0.4.67/lib/Bootloader/Library.pm 2008-04-07
16:24:58.000000000 +0200
+++ new/perl-Bootloader-0.4.68/lib/Bootloader/Library.pm 2008-08-14
11:06:00.000000000 +0200
@@ -159,6 +159,7 @@
}

$self->{"loader"} = $loader;
+ $loader->l_debug ("Bootloader::Library::SetLoaderType: TRACE new
$bootloader");
return 1;
}

@@ -200,6 +201,7 @@
my $self = shift;

my $loader = $self->{"loader"};
+ $loader->l_debug ("Library::GetMountPoints: TRACE");
return $loader->{"mountpoints"};
}

@@ -303,6 +305,7 @@
my $loader = $self->{"loader"};
return undef unless defined $loader;

+ $loader->l_debug( "Library::ReadSettings: TRACE" );
my $files_ref = $loader->ReadFiles ($loader->ListFiles ());
if (! defined ($files_ref))
{
@@ -340,6 +343,7 @@
my $loader = $self->{"loader"};
return undef unless defined $loader;

+ $loader->l_debug(" Library::WriteSettings: TRACE menu_only $menu_only ");
$loader->{"resolve_symlinks"} = 1;
my $new_lines_ref = $loader->CreateLines ();
if (! defined ($new_lines_ref))
@@ -372,6 +376,8 @@
my $loader = $self->{"loader"};
return undef unless defined $loader;

+ $loader->l_debug(" Library::ReadSettingsTmp: TRACE tmp_dir $tmp_dir ");
+
my @files = @{$loader->ListFiles ()};
my %filenames = ();
@files = map {
@@ -418,6 +424,8 @@
my $loader = $self->{"loader"};
return undef unless defined $loader;

+ $loader->l_debug(" Library::WriteSettingsTmp: TRACE tmp_dir $tmp_dir ");
+
my $new_lines_ref = $loader->CreateLines ();
if (! defined ($new_lines_ref))
{
@@ -461,6 +469,8 @@
return undef;
}

+ $loader->l_debug(" Library::GetFilesContents TRACE ");
+
$loader->{"resolve_symlinks"} = 0;
my $new_lines_ref = $loader->CreateLines ();
if (! defined ($new_lines_ref))
@@ -492,6 +502,8 @@
my $loader = $self->{"loader"};
return undef unless defined $loader;

+ $loader->l_debug(" Library::SetFilesContents TRACE ");
+
my %lines = ();
while ((my $fn, my $contents) = each (%{$files_ref}))
{
@@ -526,7 +538,11 @@
my $avoid_init = shift;

my $loader = $self->{"loader"};
- return defined $loader ? $loader->UpdateBootloader ($avoid_init) : undef;
+ return undef unless defined $loader;
+
+ $loader->l_debug("Library::UpdateBootloader: TRACE avoid_init
$avoid_init");
+
+ return $loader->UpdateBootloader ($avoid_init);
}

=item
@@ -549,7 +565,11 @@
my $self = shift;

my $loader = $self->{"loader"};
- return defined $loader ? $loader->InitializeBootloader () : undef;
+ return undef unless defined $loader;
+
+ $loader->l_debug( "Library::InitializeBootloader: TRACE");
+
+ return $loader->InitializeBootloader ();
}

=item
@@ -576,7 +596,11 @@
my $self = shift;

my $loader = $self->{"loader"};
- return defined $loader ? $loader->ListFiles () : undef;
+ return undef unless defined $loader;
+
+ $loader->l_debug( "Library::ListConfigurationFiles TRACE");
+
+ return $loader->ListFiles ();
}

=item
@@ -595,7 +619,10 @@
my $self = shift;

my $loader = $self->{"loader"};
- return defined $loader ? $loader->GetSettings () : undef;
+ return undef unless defined $loader;
+
+ $loader->l_debug( "Library::GetSettings TRACE");
+ return $loader->GetSettings ();
}

=item
@@ -615,7 +642,11 @@
my $settings_ref = shift;

my $loader = $self->{"loader"};
- return defined $loader ? $loader->SetSettings ($settings_ref) : undef;
+ return undef unless defined $loader;
+
+ $loader->l_debug( "Library::SetSettings TRACE");
+
+ return $loader->SetSettings ($settings_ref);
}

# wrappers for easier use
@@ -665,6 +696,8 @@
my $self = shift;
my $loader = $self->{loader} || return undef;

+ $loader->l_debug( "Library::GetMetaData TRACE");
+
return $loader->GetMetaData();;
}

@@ -844,6 +877,8 @@
my $unix_file = shift;
my $loader = $self->{loader} || return undef;

+ $loader->l_debug( "Library::UnixFile2GrubDev unix_file: $unix_file" );
+
my $unix_dev = $loader->UnixFile2UnixDev ($unix_file);
my $grub_dev = $loader->UnixDev2GrubDev ($unix_dev);

@@ -865,6 +900,8 @@
my $grub_dev = shift;
my $loader = $self->{loader} || return undef;

+ $loader->l_debug( "Library::GrubDev2UnixDev grub_dev: $grub_dev" );
+
my $unix_dev = $loader->GrubDev2UnixDev ($grub_dev);

return $unix_dev;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/perl-Bootloader-0.4.67/lib/Bootloader/Tools.pm
new/perl-Bootloader-0.4.68/lib/Bootloader/Tools.pm
--- old/perl-Bootloader-0.4.67/lib/Bootloader/Tools.pm 2008-07-17
17:36:47.000000000 +0200
+++ new/perl-Bootloader-0.4.68/lib/Bootloader/Tools.pm 2008-08-15
10:30:01.000000000 +0200
@@ -818,7 +818,7 @@
sub GetSysconfigValue {
my $key = shift;
my $file = Bootloader::Path::Sysconfig();
- my $value = qx{ . $file && echo \$$key } or "";
+ my $value = qx{ . $file && echo \$$key } || "";
chomp ($value);
return $value;
}
@@ -852,7 +852,7 @@
# internal: does section match with set of tags
sub match_section {
my ($sect_ref, $opt_ref,) = @_;
- my $match = 0;
+ my $match = 1;

my $core_lib = $lib_ref->{"loader"};

@@ -1448,7 +1448,7 @@
# Create the new kernel line with long (resolved)
# kernel filename
my $kernel_line =
$s->{"__lines"}[$index]->{"value"};
- $kernel_line =~
s/(^\S*)vmlinu[xz](\s*)/\1$link_target\2/;
+ $kernel_line =~
s/(^\S*)vmlinu[xz](\s*)/$1$link_target$2/;
$s->{"__lines"}[$index]->{"value"} = $kernel_line;
}
}
@@ -1463,7 +1463,7 @@
# Create the new initrd line with long (resolved)
# initrd filename
my $initrd_line =
$s->{"__lines"}[$index]->{"value"};
- $initrd_line =~
s/(^\S*)initrd(\s*)/\1$link_target\2/;
+ $initrd_line =~
s/(^\S*)initrd(\s*)/$1$link_target$2/;
$s->{"__lines"}[$index]->{"value"} = $initrd_line;
}
}
@@ -1741,7 +1741,7 @@
! defined $ENV{'DELAYED_RUN_UPDATE_BOOTLOADER'} and
! defined $glob_ref->{"former_default_image_flavor"}) {
my $former_flavor = $option{"image"};
- $former_flavor =~ s/.*-(\w+)/\1/;
+ $former_flavor =~ s/.*-(\w+)/$1/;

$glob_ref->{"former_default_image_flavor"} = $former_flavor;
}
@@ -1803,13 +1803,13 @@
if ($k eq "name" and $v =~ m/$sect_ref_new->{"name"}(
\(\w+\))?/) {
if ($v =~ m/^$sect_ref_new->{"name"}$/) {
my $flavor_old = $s->{"image"};
- $flavor_old =~ s/.*-(\w+)/(\1)/;
+ $flavor_old =~ s/.*-(\w+)/($1)/;
$s->{"name"} = $s->{"name"} . " " . $flavor_old;
$s->{"__modified"} = 1;
}

my $flavor_new = $sect_ref_new->{"image"};
- $flavor_new =~ s/.*-(\w+)/(\1)/;
+ $flavor_new =~ s/.*-(\w+)/($1)/;
$sect_ref_new->{"name"} = $sect_ref_new->{"name"} . " "
. $flavor_new;
}
}
@@ -1831,7 +1831,7 @@
}

if (!$hit) {
- $s_name_old =~ s/^(.+) \(\w+\)$/\1/;
+ $s_name_old =~ s/^(.+) \(\w+\)$/$1/;
push @section_names_removed, $s_name_old;
}
}
@@ -1853,7 +1853,7 @@

if ($count == 1) {
foreach my $hit (@hits) {
- $sections[$hit]->{"name"} =~ s/(.*) \(\w+\)/\1/;
+ $sections[$hit]->{"name"} =~ s/(.*) \(\w+\)/$1/;
$sections[$hit]->{"__modified"} = 1;
}
}



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread