- grub2-kernel-commandline.patch: add kerenl parameters (detected

necessary and user specfied one during installation) to grub2's
  config file.(bnc#752939)
- 0.6.1

- grub2-efi-module.patch: add new grub2-efi module to support
  booting on UEFI firmware.

OBS-URL: https://build.opensuse.org/package/show/Base:System/perl-Bootloader?expand=0&rev=53
This commit is contained in:
Steffen Winterfeldt 2012-03-30 09:55:57 +00:00 committed by Git OBS Bridge
parent d734d0c0fa
commit 2fd5373901
6 changed files with 24 additions and 44 deletions

View File

@ -1,35 +0,0 @@
Index: perl-Bootloader-0.6.0/src/Core/GRUB2.pm
===================================================================
--- perl-Bootloader-0.6.0.orig/src/Core/GRUB2.pm
+++ perl-Bootloader-0.6.0/src/Core/GRUB2.pm
@@ -655,6 +655,7 @@ Returns undef on fail, defined nonzero v
# boolean InitializeBootloader ()
sub InitializeBootloader {
my $self = shift;
+ my %glob = %{$self->{"global"}};
my $file = Bootloader::Path::Grub2_installdevice();
my $files_ref = $self->ReadFiles ([$file,]);
@@ -663,6 +664,13 @@ sub InitializeBootloader {
return undef;
}
+ my $install_opts = "--force";
+ my $skip_fs_probe = delete $glob{"boot_extended"};
+
+ if (defined $skip_fs_probe and $skip_fs_probe eq "true") {
+ $install_opts .= " --skip-fs-probe ";
+ }
+
my @devices = @{$files_ref->{$file} || []};
# Hmm .. grub2-install must has been run before
@@ -679,7 +687,7 @@ sub InitializeBootloader {
# the tradeoff is we can't capture errors
# only patch grub2 package is possible way
# to get around this problem
- "/usr/sbin/grub2-install --force $dev",
+ "/usr/sbin/grub2-install $install_opts $dev",
"/var/log/YaST2/y2log_bootloader"
);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df412d5727f56bd645f26ca73b0e222534172050ce63b081339aac295b902c54
size 149756

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c9aa2bf41ca0b6d18589fc632e91e52a329cb058966d86645b750ea99ad9a868
size 151853

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Mar 22 10:30:34 UTC 2012 - mchang@suse.com
- grub2-kernel-commandline.patch: add kerenl parameters (detected
necessary and user specfied one during installation) to grub2's
config file.(bnc#752939)
- 0.6.1
-------------------------------------------------------------------
Thu Mar 22 10:30:33 UTC 2012 - mchang@suse.com
- grub2-efi-module.patch: add new grub2-efi module to support
booting on UEFI firmware.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Mar 9 08:40:15 UTC 2012 - mchang@suse.com Fri Mar 9 08:40:15 UTC 2012 - mchang@suse.com

View File

@ -17,7 +17,7 @@
Name: perl-Bootloader Name: perl-Bootloader
Version: 0.6.0 Version: 0.6.1
Release: 0 Release: 0
Requires: perl-base = %{perl_version} Requires: perl-base = %{perl_version}
Requires: e2fsprogs Requires: e2fsprogs
@ -29,7 +29,6 @@ Source: perl-Bootloader-%{version}.tar.bz2
Source1: update-bootloader Source1: update-bootloader
Source2: bootloader_entry Source2: bootloader_entry
Source3: boot.readme Source3: boot.readme
Patch: grub2-skip-fs-probe-for-extended-partition.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl BuildRequires: perl
Conflicts: multipath-tools < 0.4.8-40.25.1 Conflicts: multipath-tools < 0.4.8-40.25.1
@ -49,7 +48,6 @@ Authors:
%prep %prep
%setup -q %setup -q
%patch -p1
rm -rf perl-Bootloader-testsuite rm -rf perl-Bootloader-testsuite
mkdir -p lib mkdir -p lib
mv src lib/Bootloader mv src lib/Bootloader

View File

@ -122,7 +122,7 @@ sub GetProduct {
if ( -f '/usr/bin/zypper' ){ if ( -f '/usr/bin/zypper' ){
my $zypper_out = qx{zypper --terse tos -l}; my $zypper_out = qx{zypper --terse tos -l};
if ($zypper_out =~ m/^labelLong\s*(\S.*\S)\s*\nlabelShort\s*(\S.*\S)[\s\n]*$/){ if ($zypper_out =~ m/^labelLong\s*(\S.*\S)\s*\nlabelShort\s*(\S.*\S)[\s\n]*$/){
return $1 if ($1 ne "" && ($loader eq "grub" || $loader eq "grub2")); return $1 if ($1 ne "" && ($loader eq "grub" || $loader eq "grub2" || $loader eq "grub2-efi"));
return $2 if ($2 ne ""); return $2 if ($2 ne "");
} }
} }
@ -131,7 +131,7 @@ sub GetProduct {
# Second try: Is there a usable /etc/SuSE-release? # Second try: Is there a usable /etc/SuSE-release?
# This should really not be used anymore, as the syntax changed # This should really not be used anymore, as the syntax changed
# no 'SP1' in the output. # no 'SP1' in the output.
if (open(RELEASE, "</etc/SuSE-release") && ($loader eq "grub" || $loader eq "grub2")) { if (open(RELEASE, "</etc/SuSE-release") && ($loader eq "grub" || $loader eq "grub2" || $loader eq "grub2-efi")) {
# first line is sufficient # first line is sufficient
$namever = <RELEASE>; $namever = <RELEASE>;
@ -506,7 +506,10 @@ if (defined $oper{remove}) {
} }
if (defined $oper{refresh}) { if (defined $oper{refresh}) {
my $ret = UpdateBootloader(); my $loader = Bootloader::Tools::GetBootloader();
my $avoid_init = ($loader eq "grub2" || $loader eq "grub2-efi") ? 1 : 0;
my $ret = UpdateBootloader($avoid_init);
exit 1 if ( !$ret ); exit 1 if ( !$ret );
} }