From 47bdaf55edae167b8784c3f66ffc07c46b4efd9f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 2 Oct 2011 21:06:28 +0200 Subject: [PATCH] grub: Update to 1.99. Fixes #232. --- grub/grub.nm | 40 ++++++++-------- grub/patches/grub-1.97.1-initramfs.patch | 13 ------ ...-1.98-GRUB_DISTRIBUTOR-spaces-fix-1.patch0 | 39 ---------------- grub/patches/grub-1.99-just-say-linux.patch | 46 +++++++++++++++++++ 4 files changed, 64 insertions(+), 74 deletions(-) delete mode 100644 grub/patches/grub-1.97.1-initramfs.patch delete mode 100644 grub/patches/grub-1.98-GRUB_DISTRIBUTOR-spaces-fix-1.patch0 create mode 100644 grub/patches/grub-1.99-just-say-linux.patch diff --git a/grub/grub.nm b/grub/grub.nm index 273066829..4adffac60 100644 --- a/grub/grub.nm +++ b/grub/grub.nm @@ -4,8 +4,8 @@ ############################################################################### name = grub -version = 1.98 -release = 6 +version = 1.99 +release = 1 groups = Base System/Boot url = http://www.gnu.org/software/grub/ @@ -19,7 +19,7 @@ description systems. end -source_dl = +source_dl = http://ftp.gnu.org/gnu/grub/ build requires @@ -30,45 +30,33 @@ build freetype-devel gettext ncurses-devel - xorg-x11-fonts zlib-devel end - CFLAGS += -fno-strict-aliasing + # Can only use very basic CFLAGS. + export CFLAGS = -O2 -pipe + export CXXFLAGS = %{CFLAGS} configure_options += \ --sysconfdir=/etc \ - --with-platform=pc \ - --enable-grub-emu - - prepare_cmds - sed -e "s@ GNU/Linux\"@\"@" -i util/grub.d/10_linux.in - end + --sbindir=/sbin \ + --with-platform=pc install make install DESTDIR=%{BUILDROOT} - sed -e "s/pkgdatadir/pkglibdir/g" -i %{BUILDROOT}/usr/sbin/grub-install - - mkdir -pv %{BUILDROOT}/boot/grub - # Install theme file install -m 0744 %{DIR_SOURCE}/05_theme %{BUILDROOT}/etc/grub.d/ # Install splash background + mkdir -pv %{BUILDROOT}/boot/grub install %{DIR_SOURCE}/splash.png %{BUILDROOT}/boot/grub - - # XXX - We will have to do this after the installation of the package by pakfire - # Generate grub compatible font for graphical boot menu - # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters - %{BUILDROOT}/usr/bin/grub-mkfont --output=%{BUILDROOT}/boot/grub/unifont.pf2 \ - --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f /usr/share/X11/fonts/misc/unifont.pcf.gz end end quality-agent whitelist_nx - /usr/bin/*|/usr/sbin/* + /sbin/*|/usr/bin/* end end @@ -77,6 +65,14 @@ packages requires gettext os-prober + /usr/share/X11/fonts/misc/unifont.pcf.gz + end + + # Generate grub compatible font for graphical boot menu + # This only converts Latin-1, Latin Extended A+B, Arrows, Box and Block characters + script postin + /usr/bin/grub-mkfont --output /boot/grub/unifont.pf2 \ + --range=0x0000-0x0241,0x2190-0x21FF,0x2500-0x259f /usr/share/X11/fonts/misc/unifont.pcf.gz end end end diff --git a/grub/patches/grub-1.97.1-initramfs.patch b/grub/patches/grub-1.97.1-initramfs.patch deleted file mode 100644 index 85570f07c..000000000 --- a/grub/patches/grub-1.97.1-initramfs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -uNr grub-1.97.1-orig/util/grub.d/10_linux.in grub-1.97.1/util/grub.d/10_linux.in ---- grub-1.97.1-orig/util/grub.d/10_linux.in 2009-11-09 09:48:16.000000000 -0600 -+++ grub-1.97.1/util/grub.d/10_linux.in 2009-12-01 15:28:16.000000000 -0600 -@@ -78,7 +78,8 @@ - initrd= - for i in "initrd.img-${version}" "initrd-${version}.img" \ - "initrd-${version}" "initrd.img-${alt_version}" \ -- "initrd-${alt_version}.img" "initrd-${alt_version}"; do -+ "initrd-${alt_version}.img" "initrd-${alt_version}" \ -+ "initramfs-${version}.img" ; do - if test -e "${dirname}/${i}" ; then - initrd="$i" - break diff --git a/grub/patches/grub-1.98-GRUB_DISTRIBUTOR-spaces-fix-1.patch0 b/grub/patches/grub-1.98-GRUB_DISTRIBUTOR-spaces-fix-1.patch0 deleted file mode 100644 index d3d072793..000000000 --- a/grub/patches/grub-1.98-GRUB_DISTRIBUTOR-spaces-fix-1.patch0 +++ /dev/null @@ -1,39 +0,0 @@ -=== modified file 'util/grub.d/10_hurd.in' ---- util/grub.d/10_hurd.in 2010-02-03 00:24:07 +0000 -+++ util/grub.d/10_hurd.in 2010-04-08 09:54:44 +0000 -@@ -27,7 +27,7 @@ - OS=GNU - else - OS="${GRUB_DISTRIBUTOR} GNU/Hurd" -- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}" -+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" - fi - - at_least_one=false - -=== modified file 'util/grub.d/10_kfreebsd.in' ---- util/grub.d/10_kfreebsd.in 2010-02-03 00:24:07 +0000 -+++ util/grub.d/10_kfreebsd.in 2010-04-08 09:54:44 +0000 -@@ -30,7 +30,7 @@ - case "${GRUB_DISTRIBUTOR}" in - Debian) - OS="${GRUB_DISTRIBUTOR} GNU/kFreeBSD" -- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') --class gnu-kfreebsd --class gnu ${CLASS}" -+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) --class gnu-kfreebsd --class gnu ${CLASS}" - ;; - *) - OS="FreeBSD" - -=== modified file 'util/grub.d/10_linux.in' ---- util/grub.d/10_linux.in 2010-02-26 13:32:24 +0000 -+++ util/grub.d/10_linux.in 2010-04-08 09:54:44 +0000 -@@ -31,7 +31,7 @@ - OS=GNU/Linux - else - OS="${GRUB_DISTRIBUTOR} GNU/Linux" -- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}" -+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" - fi - - # loop-AES arranges things so that /dev/loop/X can be our root device, but - diff --git a/grub/patches/grub-1.99-just-say-linux.patch b/grub/patches/grub-1.99-just-say-linux.patch new file mode 100644 index 000000000..389b163e9 --- /dev/null +++ b/grub/patches/grub-1.99-just-say-linux.patch @@ -0,0 +1,46 @@ +From d4bd41f972c6e22b86c773cbba2a1e14f400a8be Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 14 Mar 2011 14:27:42 -0400 +Subject: [PATCH] Don't say "GNU/Linux" in generated menus. + +In Fedora and RHEL we just call it Linux. +--- + util/grub.d/10_linux.in | 4 ++-- + util/grub.d/20_linux_xen.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index a09c3e6..0b0df78 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -29,9 +29,9 @@ export TEXTDOMAINDIR=@localedir@ + CLASS="--class gnu-linux --class gnu --class os" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS=Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR} Linux" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}" + fi + +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +index ee49cd9..10422b0 100644 +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -29,9 +29,9 @@ export TEXTDOMAINDIR=@localedir@ + CLASS="--class gnu-linux --class gnu --class os --class xen" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS=Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR} Linux" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}" + fi + +-- +1.7.4 + -- 2.39.5