Accepting request 181735 from home:k0da:ppc

- Enable grub2 installation on PowerPC 

- Package grub2 for PowerPC

OBS-URL: https://build.opensuse.org/request/show/181735
OBS-URL: https://build.opensuse.org/package/show/Base:System/perl-Bootloader?expand=0&rev=93
This commit is contained in:
Tomáš Chvátal 2013-07-09 07:12:23 +00:00 committed by Git OBS Bridge
parent b87f6334f7
commit 495559b092
3 changed files with 36 additions and 2 deletions

22
grub2-on-powerpc.patch Normal file
View File

@ -0,0 +1,22 @@
Index: perl-Bootloader-0.708/src/Core/GRUB2.pm
===================================================================
--- perl-Bootloader-0.708.orig/src/Core/GRUB2.pm
+++ perl-Bootloader-0.708/src/Core/GRUB2.pm
@@ -333,12 +333,15 @@ sub new
my $self = shift;
my $ref = shift;
my $old = shift;
+ my $arch = `uname --hardware-platform`;
+ my $target;
my $loader = $self->SUPER::new($ref, $old);
bless($loader);
- # Do we support any architecture besides x86?
- my $target = "i386-pc";
+ #Set target based on architecture (ppc or x86)
+ $target = "i386-pc" if $arch =~ /(i386|x86_64)/;
+ $target = "powerpc-ieee1275" if $arch =~ /(ppc|ppc64)/;
$loader->{'target'} = $target;
$loader->milestone("Created GRUB2 instance for target $target");

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jul 2 08:29:00 UTC 2013 - dvaleev@suse.com
- Enable grub2 installation on PowerPC
-------------------------------------------------------------------
Tue Jul 2 08:18:58 UTC 2013 - dvaleev@suse.com
- Package grub2 for PowerPC
-------------------------------------------------------------------
Mon Feb 25 16:22:22 CET 2013 - snwint@suse.de

View File

@ -19,14 +19,15 @@
Name: perl-Bootloader
Version: 0.708
Release: 0
Requires: perl-base = %{perl_version}
Requires: coreutils
Requires: e2fsprogs
Requires: perl-base = %{perl_version}
Recommends: perl-gettext
Summary: Library for Configuring Boot Loaders
License: GPL-2.0+
Group: System/Boot
Source: perl-Bootloader-%{version}.tar.xz
Patch0: grub2-on-powerpc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
Conflicts: multipath-tools < 0.4.8-40.25.1
@ -46,6 +47,7 @@ Authors:
%prep
%setup -q
%patch0 -p1
%build
@ -63,7 +65,7 @@ sed -i '/ZIPL/D;/PowerLILO/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloade
%endif
%endif
%ifarch ppc ppc64
rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,LILO*,ELILO*,GRUB*}
rm -f $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,LILO*,ELILO*,GRUB.*}
%if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130
sed -i '/ZIPL/D;/ELILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist
%endif