]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
grub: Remove EFI version.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Mar 2013 12:26:52 +0000 (13:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 15 Mar 2013 14:45:19 +0000 (15:45 +0100)
Don't build the EFI version of GRUB any more, because we don't
want to use GRUB for this.

grub/grub.nm
grub/patches/grub-2.00-ignore-gnulib-gets-stupidity.patch [new file with mode: 0644]

index ceabf1ebd03aee2f8dd2e8e73dfb718e2ab7256d..e8fb98538d99b63c4135e551aaa7a63986951a53 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = grub
 version    = 2.00
-release    = 2
+release    = 3
 sup_arches = x86_64 i686
 
 groups     = System/Boot
@@ -46,10 +46,6 @@ build
        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
@@ -62,51 +58,17 @@ build
                --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
@@ -148,28 +110,14 @@ packages
                        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
 
diff --git a/grub/patches/grub-2.00-ignore-gnulib-gets-stupidity.patch b/grub/patches/grub-2.00-ignore-gnulib-gets-stupidity.patch
new file mode 100644 (file)
index 0000000..345c19d
--- /dev/null
@@ -0,0 +1,26 @@
+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
+