diff --git a/perl-Bootloader-0.4.91.tar.bz2 b/perl-Bootloader-0.4.91.tar.bz2 deleted file mode 100644 index d7b5b16..0000000 --- a/perl-Bootloader-0.4.91.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36ba8dc97ea892d39350b6e3ccfc05e8a033e18b15d7df8de327aa18f7533056 -size 55720 diff --git a/perl-Bootloader-0.5.0.tar.bz2 b/perl-Bootloader-0.5.0.tar.bz2 new file mode 100644 index 0000000..037b1fe --- /dev/null +++ b/perl-Bootloader-0.5.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fca57ff4fb82863ac2ac993b59634914fc13df232e083182eb0d1c213454faf7 +size 55786 diff --git a/perl-Bootloader.changes b/perl-Bootloader.changes index 394f234..93aae6e 100644 --- a/perl-Bootloader.changes +++ b/perl-Bootloader.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 14 14:22:39 CEST 2009 - jreidinger@suse.cz + +- Code cleanup +- abstract udev settings from library +- abstract architecture from library +- doesn't parse # after text for grub bootloader (bnc #481416) +- move MBR handling code from yast2-bootlaoder to pbl +- 0.5.0 + ------------------------------------------------------------------- Tue Apr 14 12:44:58 CEST 2009 - jreidinger@suse.cz diff --git a/perl-Bootloader.spec b/perl-Bootloader.spec index fe718d3..dad27f7 100644 --- a/perl-Bootloader.spec +++ b/perl-Bootloader.spec @@ -1,5 +1,5 @@ # -# spec file for package perl-Bootloader (Version 0.4.91) +# spec file for package perl-Bootloader (Version 0.5.0) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,7 +19,7 @@ Name: perl-Bootloader -Version: 0.4.91 +Version: 0.5.0 Release: 1 Requires: perl-base = %{perl_version} Requires: e2fsprogs @@ -47,6 +47,7 @@ Authors: Joachim Plack Olaf Dabrunz Jiri Srain + Josef Reidinger %prep %setup -q @@ -68,6 +69,24 @@ install -d -m 755 $RPM_BUILD_ROOT/boot install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/boot/ install -d -m 755 $RPM_BUILD_ROOT/usr/share/man/man8/ install -m 644 update-Bootloader.8.gz $RPM_BUILD_ROOT/usr/share/man/man8/ +#install only needed files for bootloader for specific architecture +%ifarch %ix86 x86_64 +rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,PowerLILO*} +rm $RPM_BUILD_ROOT/%{_mandir}/man?/{*ZIPL*,*PowerLILO*} +sed -i '/ZIPL/D;/PowerLILO/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist +%endif +%ifarch ppc ppc64 +rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,LILO*,ELILO*, GRUB*} +sed -i '/ZIPL/D;/ELILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist +%endif +%ifarch s390 s390x +rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB*} +sed -i '/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist +%endif +%ifarch ia32 ia64 +rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{LILO*,GRUB*,ZIPL*,PowerLILO*} +sed -i '/ZIPL/D;/PowerLILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist +%endif %files %defattr(-, root, root) @@ -82,6 +101,13 @@ install -m 644 update-Bootloader.8.gz $RPM_BUILD_ROOT/usr/share/man/man8/ %changelog * Tue Apr 14 2009 jreidinger@suse.cz +- Code cleanup +- abstract udev settings from library +- abstract architecture from library +- doesn't parse # after text for grub bootloader (bnc #481416) +- move MBR handling code from yast2-bootlaoder to pbl +- 0.5.0 +* Tue Apr 14 2009 jreidinger@suse.cz - count timeout for elilo and Powerlilo in seconds instead tenths of seconds - 0.4.91 diff --git a/update-bootloader b/update-bootloader index 3f5fc9c..64bdaf4 100644 --- a/update-bootloader +++ b/update-bootloader @@ -5,6 +5,7 @@ use Getopt::Long; use Pod::Usage; use Bootloader::Tools; use Bootloader::Path; +use Bootloader::MBRTools; use strict; my %oper; @@ -186,6 +187,7 @@ GetOptions (\%oper, 'add|a' , 'refresh' , 'remove|r' , + 'examinembr|e=s', 'default|d' => \$opt_default, 'force-default' => \$opt_force_default, 'help|h' => \$opt_help, @@ -210,6 +212,16 @@ pod2usage("Option 'default' is only allowed for operation 'add'") pod2usage("Option 'force-default' is only allowed for operation 'add'") if ($opt_force_default and not defined $oper{add}); +if (defined $oper{"examinembr"}) { + my $ret = Bootloader::MBRTools::ExamineMBR($oper{"examinembr"}); + if (defined $ret){ + print "$ret\n"; + exit 0; + } else { + exit 1; + } +} + if (Bootloader::Tools::GetBootloader() eq "none") { open (LOG, ">>$logname"); @@ -230,7 +242,7 @@ if (defined $opt_xen_kernel) { $opt_xen = 1; } elsif ($opt_xen) { my $xen_flavor = $opt_image; - $xen_flavor =~ s/.*-(\w+)/\1/; + $xen_flavor =~ s/.*-(\w+)/$1/; if ($xen_flavor eq "xenpae") { $opt_xen_kernel = "/boot/xen-pae.gz"; @@ -351,7 +363,7 @@ if (defined $oper{add}) { # Naming scheme for all other kernels else { my $flavor = $opt_name; - $flavor =~ s/.*-(\w+)/\1/; + $flavor =~ s/.*-(\w+)/$1/; $flavor = ucfirst ($flavor); # Create long labels for grub