name = grub
version = 2.00
-release = 2
+release = 3
sup_arches = x86_64 i686
groups = System/Boot
prepare_cmds
cp -vf %{unifont} unifont.pcf.gz
./autogen.sh
-
- # Create a copy of the source tree to build
- # an EFI enabled version of grub.
- cp -pR . %{DIR_SRC}/%{thisapp}-efi
end
# As the modules contain always 32 bit code, they
--program-transform-name=s,grub,grub, \
--disable-werror \
CFLAGS="$(echo %{CFLAGS} | sed \
+ -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' \
+ -e 's/-fstack-protector-all//g' \
-e 's/-fstack-protector//g' \
+ -e 's/-fPIC//g' \
-e 's/--param=ssp-buffer-size=4//g' \
-e 's/-mregparm=3/-mregparm=4/g' \
-e 's/-fexceptions//g' \
-e 's/-m64//g' \
-e 's/-fasynchronous-unwind-tables//g' )"
- build_cmds
- cd ../%{thisapp}-efi
- ./configure \
- %{configure_options} \
- --with-platform=efi \
- CFLAGS="$(echo %{CFLAGS} | 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' \
- -e 's/-fexceptions//g' \
- -e 's/-m64//g' \
- -e 's/-fasynchronous-unwind-tables//g' )"
-
- make %{PARALLELISMFLAGS}
-
- ./grub-mkimage \
- -O i386-efi \
- -p /EFI/%{DISTRO_SNAME}/grub-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 echo video all_video
- end
-
- install
- cd ../%{thisapp}-efi
- make install DESTDIR=%{BUILDROOT}
-
- install -m 755 -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/
- install -d %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi
- touch %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
- ln -svf ../boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg %{BUILDROOT}/etc/grub-efi.cfg
- install -m 755 grub.efi %{BUILDROOT}/boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.efi
-
- cd -
- make install DESTDIR=%{BUILDROOT}
-
+ install_cmds
# Install empty configuration file.
mkdir -pv %{BUILDROOT}/boot/grub
touch %{BUILDROOT}/boot/grub/grub.cfg
system-logos >= 2
end
- configfiles
- /boot/grub/grub.cfg
- /etc/default/grub
+ # An EFI version of grub does not exist any more.
+ obsoletes
+ grub-efi <= 2.0.0-2
end
- end
-
- package %{name}-efi
- description
- EFI version of GRUB, the Grand Unified Boot Loader.
- end
- summary = %{description}
-
- requires += grub = %{thisver}
configfiles
- /boot/efi/EFI/%{DISTRO_SNAME}/grub-efi/grub.cfg
- end
-
- files
- /boot/efi
- /etc/grub-efi.cfg
- /usr/lib/grub/i386-efi
+ /boot/grub/grub.cfg
+ /etc/default/grub
end
end
--- /dev/null
+From f66d54b934710f54999debb72e8b7c620edece1d Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Fri, 25 May 2012 15:28:19 -0400
+Subject: [PATCH] gnulib accused in build breaking shocker.
+
+---
+ grub-core/gnulib/stdio.in.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/grub-core/gnulib/stdio.in.h b/grub-core/gnulib/stdio.in.h
+index 80b9dbf..69932d9 100644
+--- a/grub-core/gnulib/stdio.in.h
++++ b/grub-core/gnulib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
++#if 0
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+--
+1.7.10.1
+