From 8a04b0c2779cb35278360c9934835a0a49c42133 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 8 Dec 2011 12:05:28 -0800 Subject: [PATCH 1/4] add an upstream reference for the grub-probe call patch --- grub2.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/grub2.spec b/grub2.spec index a2716d7..643fa43 100644 --- a/grub2.spec +++ b/grub2.spec @@ -36,6 +36,7 @@ Patch3: grub-1.99-Workaround-for-variable-set-but-not-used-issue.patch Patch4: grub2-handle-initramfs-on-xen.patch Patch5: grub2-1.99-handle-more-dmraid.patch Patch6: grub2-gfxpayload-efi.patch +# https://savannah.gnu.org/bugs/index.php?35018 Patch7: grub-1.99-fix_grub-probe_call.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From 8a7df509499e7453b43263d9d8a1f4b876982bc9 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Wed, 14 Dec 2011 14:06:36 -0500 Subject: [PATCH 2/4] fix up various grub2-efi issues --- grub2.spec | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/grub2.spec b/grub2.spec index 643fa43..9918e50 100644 --- a/grub2.spec +++ b/grub2.spec @@ -18,7 +18,7 @@ Name: grub2 Epoch: 1 Version: 1.99 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -124,9 +124,9 @@ make %{?_smp_mflags} %else %define grubefiarch %{_arch}-efi %endif -./grub-mkimage -O %{grubefiarch} -o grub.efi -d grub-core part_gpt hfsplus fat \ +./grub-mkimage -O %{grubefiarch} -p /EFI/redhat/%{name}-efi -o grub.efi -d grub-core part_gpt hfsplus fat \ ext2 btrfs normal chain boot configfile linux appleldr minicmd \ - loadbios reboot halt search font gfxterm + loadbios reboot halt search font gfxterm echo video efi_gop efi_uga cd .. %endif @@ -170,11 +170,14 @@ rm -fr $RPM_BUILD_ROOT cd grub-efi-%{version} make DESTDIR=$RPM_BUILD_ROOT install mv $RPM_BUILD_ROOT/etc/bash_completion.d/grub $RPM_BUILD_ROOT/etc/bash_completion.d/grub-efi +mv $RPM_BUILD_ROOT/usr/lib/grub $RPM_BUILD_ROOT/usr/lib/grub-efi +sed s,grub/grub-mkconfig_lib,grub-efi/grub-mkconfig_lib, -i $RPM_BUILD_ROOT/sbin/grub2-efi-mkconfig # Ghost config file -install -d $RPM_BUILD_ROOT/boot/%{name}-efi -touch $RPM_BUILD_ROOT/boot/%{name}-efi/grub.cfg -ln -s ../boot/%{name}-efi/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg +install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/redhat/ +install -d $RPM_BUILD_ROOT/boot/efi/EFI/redhat/%{name}-efi +touch $RPM_BUILD_ROOT/boot/efi/EFI/redhat/%{name}-efi/grub.cfg +ln -s ../boot/efi/EFI/redhat/%{name}-efi/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg # Install ELF files modules and images were created from into # the shadow root, where debuginfo generator will grab them from @@ -189,8 +192,7 @@ do TGT=$(echo $MODULE |sed "s,$RPM_BUILD_ROOT,.debugroot,") # install -m 755 -D $BASE$EXT $TGT done -install -m 755 -d $RPM_BUILD_ROOT/boot/efi/EFI/redhat/ -install -m 755 grub.efi $RPM_BUILD_ROOT/boot/efi/EFI/redhat/grub.efi +install -m 755 grub.efi $RPM_BUILD_ROOT/boot/efi/EFI/redhat/%{name}-efi/grub.efi cd .. %endif @@ -321,7 +323,7 @@ fi %attr(0755,root,root)/boot/efi/EFI/redhat /etc/bash_completion.d/grub-efi %{_libdir}/grub2-efi -%{_libdir}/grub/ +%{_libdir}/grub-efi/ /sbin/grub2-efi-mkconfig /sbin/grub2-efi-mkdevicemap /sbin/grub2-efi-mknetdir @@ -354,8 +356,8 @@ fi %{_sysconfdir}/grub.d/README %config(noreplace) %{_sysconfdir}/grub2-efi.cfg %config(noreplace) %{_sysconfdir}/default/grub -%dir /boot/grub2-efi -%ghost %config(noreplace) /boot/grub2-efi/grub.cfg +%dir /boot/efi/EFI/redhat/grub2-efi +%ghost %config(noreplace) /boot/efi/EFI/redhat/grub2-efi/grub.cfg %doc grub-%{version}/COPYING grub-%{version}/INSTALL grub-%{version}/NEWS %doc grub-%{version}/README grub-%{version}/THANKS grub-%{version}/TODO %doc grub-%{version}/ChangeLog grub-%{version}/README.Fedora @@ -364,6 +366,9 @@ fi %endif %changelog +* Wed Dec 14 2011 Matthew Garrett - 1.99-14 +- fix up various grub2-efi issues + * Thu Dec 08 2011 Adam Williamson - 1.99-13 - fix hardwired call to grub-probe in 30_os-prober (rhbz#737203) From fd5ed7048b5a8c3a0205d52f11bd9c2ae0b86346 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 22:22:19 -0600 Subject: [PATCH 3/4] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- grub2.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grub2.spec b/grub2.spec index 9918e50..6526b40 100644 --- a/grub2.spec +++ b/grub2.spec @@ -18,7 +18,7 @@ Name: grub2 Epoch: 1 Version: 1.99 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -366,6 +366,9 @@ fi %endif %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1:1.99-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Wed Dec 14 2011 Matthew Garrett - 1.99-14 - fix up various grub2-efi issues From 1a635d813d926deec0473bd906f46b1fbcb2e0b8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 17 Feb 2012 09:57:50 -0700 Subject: [PATCH 4/4] Build with -Os (bug 782144) --- grub2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub2.spec b/grub2.spec index 6526b40..ce22b97 100644 --- a/grub2.spec +++ b/grub2.spec @@ -18,7 +18,7 @@ Name: grub2 Epoch: 1 Version: 1.99 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -109,6 +109,7 @@ cd grub-efi-%{version} ./autogen.sh %configure \ CFLAGS="$(echo $RPM_OPT_FLAGS | sed \ + -e 's/-O.//g' \ -e 's/-fstack-protector//g' \ -e 's/--param=ssp-buffer-size=4//g' \ -e 's/-mregparm=3/-mregparm=4/g' \ @@ -366,6 +367,9 @@ fi %endif %changelog +* Fri Feb 17 2012 Orion Poplawski - 1:1.99-16 +- Build with -Os (bug 782144) + * Fri Jan 13 2012 Fedora Release Engineering - 1:1.99-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild