diff --git a/grub2-on-powerpc.patch b/grub2-on-powerpc.patch new file mode 100644 index 0000000..0215e97 --- /dev/null +++ b/grub2-on-powerpc.patch @@ -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"); diff --git a/perl-Bootloader.changes b/perl-Bootloader.changes index 286c75f..b5fe28b 100644 --- a/perl-Bootloader.changes +++ b/perl-Bootloader.changes @@ -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 diff --git a/perl-Bootloader.spec b/perl-Bootloader.spec index 85910e3..3cb447f 100644 --- a/perl-Bootloader.spec +++ b/perl-Bootloader.spec @@ -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