Hello community, here is the log from the commit of package perl-Bootloader checked in at Fri Jul 18 00:46:30 CEST 2008. -------- --- perl-Bootloader/perl-Bootloader.changes 2008-06-05 09:09:24.000000000 +0200 +++ perl-Bootloader/perl-Bootloader.changes 2008-07-17 17:38:09.921369000 +0200 @@ -1,0 +2,11 @@ +Thu Jul 17 17:33:47 CEST 2008 - jreidinger@suse.cz + +- refactor pathnames, no it can be used + $PERL_BOOTLOADER_TESTSUITE_PATH variable for prefix +- fixed manpage warnings bnc#398538 +- added fix for bnc#381386 to trunk +- perl-gettext is only reccomends (FATE #301805) +- read kernel parametrs from sysconfig (jsrain) +- Version bump to 0.4.64 + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.4.63.tar.bz2 New: ---- perl-Bootloader-0.4.64.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.S15844/_old 2008-07-18 00:41:11.000000000 +0200 +++ /var/tmp/diff_new_pack.S15844/_new 2008-07-18 00:41:11.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.4.63) +# spec file for package perl-Bootloader (Version 0.4.64) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,11 +12,11 @@ Name: perl-Bootloader -Version: 0.4.63 +Version: 0.4.64 Release: 1 -Requires: perl = %{perl_version} -Requires: perl-gettext +Requires: perl-base = %{perl_version} Requires: e2fsprogs +Recommends: perl-gettext AutoReqProv: on Group: System/Boot License: GPL v2 or later @@ -67,6 +67,14 @@ /usr/lib/bootloader %changelog +* Thu Jul 17 2008 jreidinger@suse.cz +- refactor pathnames, no it can be used + $PERL_BOOTLOADER_TESTSUITE_PATH variable for prefix +- fixed manpage warnings bnc#398538 +- added fix for bnc#381386 to trunk +- perl-gettext is only reccomends (FATE #301805) +- read kernel parametrs from sysconfig (jsrain) +- Version bump to 0.4.64 * Wed Jun 04 2008 aosthof@suse.de - Reverted the fix for minor bnc#389891 causing blocker bnc#395085 - Fixed perl dependency in perl-Bootloader.spec ++++++ bootloader_entry ++++++ --- perl-Bootloader/bootloader_entry 2007-12-19 11:11:49.000000000 +0100 +++ perl-Bootloader/bootloader_entry 2008-07-17 17:38:09.628497000 +0200 @@ -95,11 +95,11 @@ chmod 755 $delayed_exec_file else # Set up the new kernel - if [ -f /etc/sysconfig/bootloader ] && - [ -f /boot/grub/menu.lst -o \ - -f /etc/lilo.conf -o \ - -f /etc/elilo.conf -o \ - -f /etc/zipl.conf ]; then + if [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] && + [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub/menu.lst -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/lilo.conf -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/elilo.conf -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/zipl.conf ]; then case $flavor in (kdump|um) ;; @@ -254,7 +254,7 @@ ##################### M A I N ############################################### # Log how program was called -logname="/var/log/YaST2/perl-BL-standalone-log" +logname=$PERL_BOOTLOADER_TESTSUITE_PATH"/var/log/YaST2/perl-BL-standalone-log" echo "bootloader_entry was called as: $*" >> $logname # Log parts of the current system configuration ++++++ perl-Bootloader-0.4.63.tar.bz2 -> perl-Bootloader-0.4.64.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Core/ELILO.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Core/ELILO.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Core/ELILO.pm 2008-05-15 13:54:54.000000000 +0200 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Core/ELILO.pm 2008-07-17 16:23:59.000000000 +0200 @@ -41,6 +41,7 @@ use Bootloader::Core; our @ISA = ('Bootloader::Core'); +use Bootloader::Path; #module interface @@ -230,8 +231,7 @@ =cut -my $default_conf = "/etc/elilo.conf"; -#$default_conf = "/tmp/elilo.conf"; +my $default_conf = Bootloader::Path::Elilo_conf(); # list<string> ListFiles (); sub ListFiles { @@ -737,10 +737,12 @@ # FIXME: this is good-weather programming: /boot/efi is _always_ a # FAT partition which has to be mounted - system ("mkdir -p /boot/efi/efi/SuSE") unless -d "/boot/efi/efi/SuSE"; + my $efi = Bootloader::Path::Elilo_efi(); + system ("mkdir -p $efi") unless -d "$efi"; + my $elilo = Bootloader::Path::Elilo_elilo(); return 0 == $self->RunCommand ( - "/sbin/elilo -v", + "$elilo -v", "/var/log/YaST2/y2log_bootloader" ); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Core/GRUB.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Core/GRUB.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Core/GRUB.pm 2008-06-05 09:09:24.000000000 +0200 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Core/GRUB.pm 2008-07-17 16:23:59.000000000 +0200 @@ -80,6 +80,7 @@ use Bootloader::Core; our @ISA = ('Bootloader::Core'); +use Bootloader::Path; #module interface @@ -538,14 +539,16 @@ # fallback to grub device hd0 if translation has failed - this is good # enough for many cases + my $partition_fallback = 0; + if ($dev !~ /^${grubdev_pattern}$/) { - $self->l_milestone ("GRUB::UnixDev2GrubDev: Unknown device '$dev', fall back to hd0"); $dev = "hd0"; + $self->l_milestone ("GRUB::UnixDev2GrubDev: Unknown device '$dev', fall back to ($dev,$partition_fallback)"); } $dev = defined ($partition) ? "($dev,$partition)" - : "($dev)"; + : "($dev,$partition_fallback)"; $self->l_milestone ("GRUB::UnixDev2GrubDev: Translated UNIX->GRUB: $original to $dev"); @@ -677,7 +680,8 @@ { $line_ref = { 'options' => [ - '--stage2=/boot/grub/stage2' + '--stage2=/boot/grub/stage2', + '--force-lba' ], 'device' => $target, 'command' => 'setup' @@ -687,7 +691,8 @@ { $line_ref = { 'options' => [ - '--stage2=/boot/grub/stage2' + '--stage2=/boot/grub/stage2', + '--force-lba' ], 'discswitch' => $discswitch || "", 'stage2' => '/boot/grub/stage2', @@ -715,13 +720,15 @@ sub ListFiles { my $self = shift; - return [ "/boot/grub/menu.lst", "/boot/grub/device.map", "/etc/grub.conf" ]; + return [ Bootloader::Path::Grub_menulst() , + Bootloader::Path::Grub_devicemap(), + Bootloader::Path::Grub_grubconf() ]; } sub ListMenuFiles { my $self = shift; - return [ "/boot/grub/menu.lst" ]; + return [ Bootloader::Path::Grub_menulst() ]; } =item @@ -744,7 +751,7 @@ my $avoid_reading_device_map = shift; #first set the device map - other parsing uses it - my @device_map = @{$files{"/boot/grub/device.map"} || []}; + my @device_map = @{$files{"Bootloader::Path::Grub_devicemap()"} || []}; my %devmap = (); foreach my $dm_entry (@device_map) { @@ -756,7 +763,7 @@ $self->{"device_map"} = \%devmap if (! $avoid_reading_device_map); # and now proceed with menu.lst - my @menu_lst = @{$files{"/boot/grub/menu.lst"} || []}; + my @menu_lst = @{$files{Bootloader::Path::Grub_menulst()} || []}; $self->l_milestone ("GRUB::Parselines: input from menu.lst :\n'" . join("'\n' ", @menu_lst) . "'"); (my $glob_ref, my $sect_ref) = $self->ParseMenuFileLines ( @@ -766,7 +773,7 @@ ); # and finally get the location from /etc/grub.conf - my @grub_conf_lines = @{$files{"/etc/grub.conf"} || []}; + my @grub_conf_lines = @{$files{Bootloader::Path::Grub_grubconf()} || []}; $self->l_milestone ("GRUB::Parselines: input from /etc/grub.conf :\n'" . join("'\n' ", @grub_conf_lines) . "'"); my $grub_root = ""; @@ -920,9 +927,9 @@ #return all files return { - "/boot/grub/menu.lst" => $menu_lst, - "/boot/grub/device.map" => \@device_map, - "/etc/grub.conf" => $grub_conf, + Bootloader::Path::Grub_menulst() => $menu_lst, + Bootloader::Path::Grub_devicemap() => \@device_map, + Bootloader::Path::Grub_grubconf() => $grub_conf, } } @@ -1894,8 +1901,11 @@ # write generic_mbr in case my $log = "/var/log/YaST2/y2log_bootloader"; + my $grub = Bootloader::Path::Grub_grub(); + my $grubconf = Bootloader::Path::Grub_grubconf(); + my $devicemap = Bootloader::Path::Grub_devicemap(); my $ret = $self->RunCommand ( - "cat /etc/grub.conf | /usr/sbin/grub --device-map=/boot/grub/device.map --batch", + "cat $grubconf | $grub --device-map=$devicemap --batch", $log ); if ($ret == 0) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Core/PowerLILO.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Core/PowerLILO.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Core/PowerLILO.pm 2007-09-26 21:04:19.000000000 +0200 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Core/PowerLILO.pm 2008-07-17 16:23:59.000000000 +0200 @@ -43,6 +43,8 @@ our @ISA = qw(Bootloader::Core); +use Bootloader::Path; + #module interface sub GetMetaData() { @@ -80,7 +82,8 @@ my %exports; # one of iseries, prep, chrp, pmac_old, pmac_new ... - my $arch = qx{ /sbin/lilo --get-arch }; + my $lilo = Bootloader::Path::Lilo_lilo(); + my $arch = qx{ $lilo --get-arch }; chomp( $arch ); $arch = "pmac" if "$arch" =~ /^pmac/; @@ -285,7 +288,7 @@ sub ListFiles { my $self = shift; - return [ "/etc/lilo.conf" ]; + return [ Bootloader::Path::Lilo_conf() ]; } # FIXME document @@ -329,7 +332,7 @@ my $avoid_reading_device_map = shift; # the only file is /etc/lilo.conf - my @lilo_conf = @{$files{"/etc/lilo.conf"} || []}; + my @lilo_conf = @{$files{Bootloader::Path::Lilo_conf()} || []}; (my $glob_ref, my $sect_ref) = $self->ParseMenuFileLines ( "=", ["image", "other"], @@ -376,7 +379,7 @@ return undef unless defined ($lilo_conf); return { - "/etc/lilo.conf" => $lilo_conf, + Bootloader::Path::Lilo_conf() => $lilo_conf, } } @@ -726,8 +729,9 @@ sub InitializeBootloader { my $self = shift; + my $lilo = Bootloader::Path::Lilo_lilo(); return 0 == $self->RunCommand ( - "/sbin/lilo", + "$lilo", "/var/log/YaST2/y2log_bootloader" ); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Core/ZIPL.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Core/ZIPL.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Core/ZIPL.pm 2008-04-03 14:35:59.000000000 +0200 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Core/ZIPL.pm 2008-07-17 16:23:59.000000000 +0200 @@ -209,7 +209,7 @@ sub ListFiles { my $self = shift; - return [ "/etc/zipl.conf" ]; + return [ Bootloader::Path::Zipl_conf() ]; } @@ -308,7 +308,7 @@ my $avoid_reading_device_map = shift; # the only file is /etc/zipl.conf - my @zipl_conf = @{$files{"/etc/zipl.conf"} || []}; + my @zipl_conf = @{$files{Bootloader::Path::Zipl_conf()} || []}; (my $glob_ref, my $sect_ref) = $self->ParseMenuFileLines ( "=", ["label","menuname"], @@ -374,7 +374,7 @@ } return { - "/etc/zipl.conf" => $zipl_conf, + Bootloader::Path::Zipl_conf() => $zipl_conf, } } @@ -418,7 +418,7 @@ my $self = shift; return 0 == $self->RunCommand ( - "/sbin/zipl", + Bootloader::Path::Zipl_zipl(), "/var/log/YaST2/y2log_bootloader" ); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Path.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Path.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Path.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Path.pm 2008-07-17 16:23:59.000000000 +0200 @@ -0,0 +1,98 @@ +#!/usr/bin/perl -w +# +# Set of path used in bootloader. Allows setting prefix via global variable +# $PERL_BOOTLOADER_TESTSUITE_PATH +# + + +package Bootloader::Path; + +use strict; + +use Env qw($PERL_BOOTLOADER_TESTSUITE_PATH); + +sub Prefix { + my $value = shift; + if ( defined($PERL_BOOTLOADER_TESTSUITE_PATH) ) + { + $value = $PERL_BOOTLOADER_TESTSUITE_PATH . $value; + } + return $value; +} + +sub Logname { + my $value = "/var/log/YaST2/perl-BL-standalone-log"; + return Prefix($value); +} + +sub Fstab { + my $value = "/etc/fstab"; + return Prefix($value); +} + +sub Blkid { + my $value = "/sbin/blkid"; + return Prefix($value); +} + +sub Sysconfig { + my $value = "/etc/sysconfig/bootloader"; + return Prefix($value); +} + +sub Grub_menulst { + my $value = "/boot/grub/menu.lst"; + return Prefix($value); +} + +sub Grub_devicemap { + my $value = "/boot/grub/device.map"; + return Prefix($value); +} + +sub Grub_grubconf { + my $value = "/etc/grub.conf"; + return Prefix($value); +} + +sub Grub_grub { + my $value = "/usr/sbin/grub"; + return Prefix($value); +} + +sub Elilo_conf { + my $value = "/etc/elilo.conf"; + return Prefix($value); +} + +sub Elilo_efi { + my $value = "/boot/efi/efi/SuSE"; + return Prefix($value); +} + +sub Elilo_elilo { + my $value = "/sbin/elilo"; + return Prefix($value); +} + +sub Lilo_lilo { + my $value = "/sbin/lilo"; + return Prefix($value); +} + +sub Lilo_conf { + my $value = "/etc/lilo.conf"; + return Prefix($value); +} + +sub Zipl_conf { + my $value = "/etc/zipl.conf"; + return Prefix($value); +} + +sub Zipl_zipl { + my $value = "/sbin/zipl"; + return Prefix($value); +} + +1; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/perl-Bootloader-0.4.63/lib/Bootloader/Tools.pm new/perl-Bootloader-0.4.64/lib/Bootloader/Tools.pm --- old/perl-Bootloader-0.4.63/lib/Bootloader/Tools.pm 2008-05-26 16:53:29.000000000 +0200 +++ new/perl-Bootloader-0.4.64/lib/Bootloader/Tools.pm 2008-07-17 17:36:47.000000000 +0200 @@ -46,6 +46,8 @@ C<< $loader = Bootloader::Tools::GetBootloader (); >> +C<< $value = Bootloader::Tools::GetSysconfigValue (); >> + C<< Bootloader::Tools::InitLibrary (); >> C<< Bootloader::Tools::CountImageSections ($image); >> @@ -93,13 +95,14 @@ our @EXPORT = qw(InitLibrary CountImageSections CountSections RemoveImageSections GetDefaultImage GetDefaultInitrd GetBootloader UpdateBootloader - GetGlobals SetGlobals + GetGlobals SetGlobals GetSectionList GetSection AdaptCommentLine AddSection RemoveSections ); use Bootloader::Library; use Bootloader::Core; +use Bootloader::Path; my $lib_ref = undef; my $dmsetup = undef; @@ -108,7 +111,7 @@ sub DumpLog { my $core_lib = shift; - my $perl_logfile = "/var/log/YaST2/perl-BL-standalone-log"; + my $perl_logfile = Bootloader::Path::Logname(); my $using_logfile = 1; if (not open LOGFILE, ">>$perl_logfile") { @@ -197,7 +200,7 @@ =cut sub ReadMountPoints { - open (FILE, "/etc/fstab") || + open (FILE, Bootloader::Path::Fstab()) || die ("ReadMountPoints(): Failed to open /etc/fstab"); my %mountpoints = (); @@ -211,7 +214,8 @@ { if ($dev =~ m/^LABEL=/ || $dev =~ m/UUID=/) { - open (BLKID, "/sbin/blkid -t $dev |") || + my $command = Bootloader::Path::Blkid() . " -t $dev |"; + open (BLKID, $command) || die ("ReadMountPoints(): Failed to run blkid"); my $line = <BLKID>; @@ -793,15 +797,33 @@ =cut -# FIXME: this has to be read through yast::storage or such sub GetBootloader { - my $lt = qx{ . /etc/sysconfig/bootloader && echo \$LOADER_TYPE } or + my $path = Bootloader::Path::Sysconfig(); + my $lt = qx{ . $path && echo \$LOADER_TYPE } or die ("GetBootloader(): Cannot determine the loader type"); chomp ($lt); return $lt; } =item +C<< $value = Bootloader::Tools::GetSysconfigValue (); >> + +returns specified option from the /etc/sysconfig/bootloader +file. + +See AddSection for example + +=cut + +sub GetSysconfigValue { + my $key = shift; + my $file = Bootloader::Path::Sysconfig(); + my $value = qx{ . $file && echo \$$key } or ""; + chomp ($value); + return $value; +} + +=item C<< Bootloader::Tools::InitLibrary (); >> initializes the bootloader configuration library. Fills its internal structures @@ -1293,31 +1315,44 @@ # Append flavor appendix to section label if necessary AdjustSectionNameAppendix ("add", \%new); - my $failsafe_modified = 0; - - # FIXME: Failsafe parameters should be set dynamically in the future if ($name =~ m/^Failsafe.*$/) { - my $arch = `uname --hardware-platform`; - chomp ($arch); - - if ($arch eq "i386") { - $new{"append"} = "showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe"; - } - elsif ($arch eq "x86_64") { - $new{"append"} = "showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe"; - } - elsif ($arch eq "ia64") { - $new{"append"} = "ide=nodma nohalt noresume 3"; - } - else { - print ("Architecture $arch does not support failsafe entries.\n"); - } + $new{"append"} = GetSysconfigValue("FAILSAFE_APPEND"); + $new{"vgamode"} = GetSysconfigValue("FAILSAFE_VGA") + } + elsif ($option{"type"} eq "xen") { + $new{"append"} = GetSysconfigValue("XEN_APPEND"); + $new{"vgamode"} = GetSysconfigValue("XEN_VGA") + } + else { + $new{"append"} = GetSysconfigValue("DEFAULT_APPEND"); + $new{"vgamode"} = GetSysconfigValue("DEFAULT_VGA") + } - $failsafe_modified = 1; + my $failsafe_modified = 0; - # Don't make the failsafe entry the default one - $default = 0; - } + # FIXME: Failsafe parameters should be set dynamically in the future +# if ($name =~ m/^Failsafe.*$/) { +# my $arch = `uname --hardware-platform`; +# chomp ($arch); +# +# if ($arch eq "i386") { +# $new{"append"} = "showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe"; +# } +# elsif ($arch eq "x86_64") { +# $new{"append"} = "showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe"; +# } +# elsif ($arch eq "ia64") { +# $new{"append"} = "ide=nodma nohalt noresume 3"; +# } +# else { +# print ("Architecture $arch does not support failsafe entries.\n"); +# } +# +# $failsafe_modified = 1; +# +# # Don't make the failsafe entry the default one +# $default = 0; +# } $new{"__modified"} = 1; my $match = ''; ++++++ update-bootloader ++++++ --- perl-Bootloader/update-bootloader 2008-05-29 11:54:17.000000000 +0200 +++ perl-Bootloader/update-bootloader 2008-07-17 17:38:10.040246000 +0200 @@ -4,7 +4,7 @@ use Getopt::Long; use Pod::Usage; use Bootloader::Tools; -use Locale::gettext; +use Bootloader::Path; use strict; my %oper; @@ -47,9 +47,12 @@ activate the new config e.g. write boot loader to disk +=back =head1 PARAMETER +=over 8 + =item B<--help> Print a brief help message and exits. @@ -162,7 +165,19 @@ return "Linux"; } -my $logname = "/var/log/YaST2/perl-BL-standalone-log"; +sub test_gettext { + my $filename = "Locale/gettext.pm"; + my $realfilename; + foreach my $prefix (@INC) { + $realfilename = "$prefix/$filename"; + if (-f $realfilename) { + return 1; + } + } + return undef +} + +my $logname = Bootloader::Path::Logname(); open (LOG, ">>$logname"); print LOG ("update-bootloader called:\n" . $0 . " " . join (" ", @ARGV) . "\n"); close LOG; @@ -269,13 +284,19 @@ } # only localize on grub and lilo - if ($loader eq "grub" || $loader eq "lilo") { + if (($loader eq "grub" || $loader eq "lilo") && defined(test_gettext())) { setlocale(LC_MESSAGES, Bootloader::Tools::GetSystemLanguage()); my $d = Locale::gettext->domain("bootloader"); $d->dir("/usr/share/YaST2/locale"); my $opt_trans = $d->get($opt_name); chomp ($opt_trans); + + #log what is translated + my $logname = Bootloader::Path::Logname(); + open (LOG, ">>$logname"); + print LOG ("translate :\n" . $0 . " " . join (" ", @ARGV) . "\n"); + close LOG; # check whether translation only contains [a-zA-Z0-9 _] # otherwise fall back to untranslated string ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org