* [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2012-11-06 15:09 Yuta SATOH
0 siblings, 0 replies; 5+ messages in thread
From: Yuta SATOH @ 2012-11-06 15:09 UTC (permalink / raw
To: gentoo-commits
commit: 9d866a8d7006140d7ebb06f4449c5fc7541cbf0d
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Tue Nov 6 15:03:49 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Tue Nov 6 15:03:49 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=9d866a8d
grub -- added from latest portage tree
---
sys-boot/grub/files/grub-2.00-config-quoting.patch | 113 +++++++
sys-boot/grub/files/grub-2.00-fbsd.patch | 109 ++++++
sys-boot/grub/files/grub-2.00-fbsd91-boot.patch | 55 +++
sys-boot/grub/files/grub-2.00-hardcoded-awk.patch | 15 +
sys-boot/grub/files/grub-2.00-no-gets.patch | 22 ++
sys-boot/grub/files/grub-2.00-parallel-make.patch | 24 ++
sys-boot/grub/files/grub-2.00-tftp-endian.patch | 24 ++
sys-boot/grub/files/grub.conf.gentoo | 16 +
sys-boot/grub/files/grub.default | 38 +++
sys-boot/grub/files/grub.default-2 | 43 +++
sys-boot/grub/grub-2.00-r1.ebuild | 348 ++++++++++++++++++++
11 files changed, 807 insertions(+), 0 deletions(-)
diff --git a/sys-boot/grub/files/grub-2.00-config-quoting.patch b/sys-boot/grub/files/grub-2.00-config-quoting.patch
new file mode 100644
index 0000000..3b031c6
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-config-quoting.patch
@@ -0,0 +1,113 @@
+https://bugs.gentoo.org/show_bug.cgi?id=426364
+https://savannah.gnu.org/bugs/index.php?36839
+--- util/grub-mkconfig_lib.in
++++ util/grub-mkconfig_lib.in
+@@ -255,19 +255,19 @@
+ echo "$version_find_latest_a"
+ }
+
+-# One layer of quotation is eaten by "", the second by sed, and the third by
+-# printf; so this turns ' into \'. Note that you must use the output of
++# One layer of quotation is eaten by "" and the second by
++# sed; so this turns ' into \'. Note that you must use the output of
+ # this function in a printf format string.
+
+ grub_quote () {
+- sed "s/'/'\\\\\\\\''/g"
++ sed "s/'/'\\\\''/g"
+ }
+
+ gettext_quoted () {
+- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
++ gettext "$@" | grub_quote
+ }
+
+-# Run the first argument through gettext_quoted, and then pass that and all
++# Run the first argument through gettext, and then pass that and all
+ # remaining arguments to printf. This is a useful abbreviation and tends to
+ # be easier to type.
+ gettext_printf () {
+
+=== modified file 'util/grub.d/10_hurd.in'
+--- util/grub.d/10_hurd.in
++++ util/grub.d/10_hurd.in
+@@ -117,7 +117,7 @@
+ opts=
+ fi
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
+ EOF
+
+@@ -133,7 +133,7 @@
+ fi
+
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
+ --multiboot-command-line='\${kernel-command-line}' \\
+ --host-priv-port='\${host-port}' \\
+--- util/grub.d/10_illumos.in
++++ util/grub.d/10_illumos.in
+@@ -46,6 +46,7 @@
+ ISADIR=
+ fi
+ zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
++ echo '$(echo "$message" | grub_quote)'
+ multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
+ module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
+ }
+--- util/grub.d/10_kfreebsd.in
++++ util/grub.d/10_kfreebsd.in
+@@ -100,7 +100,7 @@
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ kfreebsd ${rel_dirname}/${basename} ${args}
+ EOF
+
+--- util/grub.d/10_linux.in
++++ util/grub.d/10_linux.in
+@@ -134,14 +134,14 @@
+ fi
+ message="$(gettext_printf "Loading Linux %s ..." ${version})"
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ EOF
+ if test -n "${initrd}" ; then
+ # TRANSLATORS: ramdisk isn't identifier. Should be translated.
+ message="$(gettext_printf "Loading initial ramdisk ...")"
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ initrd ${rel_dirname}/${initrd}
+ EOF
+ fi
+--- util/grub.d/20_linux_xen.in
++++ util/grub.d/20_linux_xen.in
+@@ -120,16 +120,16 @@
+ xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
+ lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$xmessage'
++ echo '$(echo "$xmessage" | grub_quote)'
+ multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
+- echo '$lmessage'
++ echo '$(echo "$lmessage" | grub_quote)'
+ module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
+ EOF
+ if test -n "${initrd}" ; then
+ # TRANSLATORS: ramdisk isn't identifier. Should be translated.
+ message="$(gettext_printf "Loading initial ramdisk ...")"
+ sed "s/^/$submenu_indentation/" << EOF
+- echo '$message'
++ echo '$(echo "$message" | grub_quote)'
+ module ${rel_dirname}/${initrd}
+ EOF
+ fi
diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
new file mode 100644
index 0000000..4fc2b23
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-fbsd.patch
@@ -0,0 +1,109 @@
+* Added support freebsd-boot partition on GPT.
+* FreeBSD's sed doesn't support '\t', change to tab.
+* grub2-probe is used instead of grub-probe on Gentoo.
+
+Taken from FreeBSD ports
+patch-include-grub-gpt_partition.h
+patch-util-i386-pc-grub-setup.c
+patch-util-grub.d-10_kfreebsd.in
+
+diff -Nur grub-2.00.orig/grub-core/partmap/gpt.c grub-2.00/grub-core/partmap/gpt.c
+--- grub-2.00.orig/grub-core/partmap/gpt.c 2012-05-22 06:12:44.000000000 +0900
++++ grub-2.00/grub-core/partmap/gpt.c 2012-11-06 23:23:27.000000000 +0900
+@@ -37,6 +37,8 @@
+
+ #ifdef GRUB_UTIL
+ static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
++static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT;
++static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT;
+ #endif
+
+ /* 512 << 7 = 65536 byte sectors. */
+@@ -158,7 +160,9 @@
+ disk->partition = p2;
+
+ /* If there's an embed region, it is in a dedicated partition. */
+- if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
++ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16) ||
++ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_freebsd_boot, 16) ||
++ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_solaris_boot, 16))
+ {
+ start = p->start;
+ len = p->len;
+diff -Nur grub-2.00.orig/include/grub/gpt_partition.h grub-2.00/include/grub/gpt_partition.h
+--- grub-2.00.orig/include/grub/gpt_partition.h 2012-01-28 22:51:46.000000000 +0900
++++ grub-2.00/include/grub/gpt_partition.h 2012-11-06 23:18:11.000000000 +0900
+@@ -50,6 +50,21 @@
+ { 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3 } \
+ }
+
++#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \
++ { grub_cpu_to_le32_compile_time (0x83BD6B9D), \
++ grub_cpu_to_le16_compile_time (0x7F41), \
++ grub_cpu_to_le16_compile_time (0x11DC), \
++ { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \
++ }
++
++#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \
++ { grub_cpu_to_le32_compile_time (0x6A82CB45), \
++ grub_cpu_to_le16_compile_time (0x1DD2), \
++ grub_cpu_to_le16_compile_time (0x11B2), \
++ { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \
++ }
++
++
+ struct grub_gpt_header
+ {
+ grub_uint8_t magic[8];
+diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
+--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
++++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-06 23:19:31.000000000 +0900
+@@ -54,7 +54,7 @@
+ fi
+
+ if [ -z "${prepare_module_dir_cache}" ]; then
+- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub2-probe -t device "${module_dir}") | sed -e "s/^/ /")"
+ fi
+
+ printf '%s\n' "${prepare_module_dir_cache}"
+@@ -91,10 +91,10 @@
+ echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
++ save_default_entry | sed -e "s/^/ /" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/ /")"
+ fi
+
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+@@ -112,7 +112,7 @@
+
+ load_kfreebsd_module acpi true
+
+- for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
++ for abstraction in dummy $(grub2-probe -t abstraction --device ${GRUB_DEVICE}) ; do
+ case $abstraction in
+ lvm) load_kfreebsd_module geom_linux_lvm false ;;
+ esac
+@@ -179,7 +179,7 @@
+ case ${GRUB_FS} in
+ zfs)
+ # zpool name
+- kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
++ kfreebsd_device=$(grub2-probe -t fs_label --device ${GRUB_DEVICE})
+ # filesystem name (empty string for the main filesystem)
+ kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
+ ;;
+@@ -213,7 +213,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ kfreebsd_entry "${OS}" "${version}" simple
+- submenu_indentation="\t"
++ submenu_indentation=" "
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
diff --git a/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch b/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch
new file mode 100644
index 0000000..fc1ed66
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch
@@ -0,0 +1,55 @@
+Fix to boot directly.
+
+Taken from http://people.freebsd.org/~nox/tmp/grub2-paste_180121.patch
+FYI, http://www.freebsd.org/cgi/query-pr.cgi?pr=170417&cat=ports
+
+=== modified file 'grub-core/loader/i386/bsd.c'
+--- grub-core/loader/i386/bsd.c 2012-06-07 14:41:52 +0000
++++ grub-core/loader/i386/bsd.c 2012-07-21 17:44:45 +0000
+@@ -1309,7 +1309,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xFFFFFF;
++ paddr = phdr->p_paddr & 0xFFFFFFF;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1333,7 +1333,7 @@
+ }
+
+ *do_load = 1;
+- phdr->p_paddr &= 0xFFFFFF;
++ phdr->p_paddr &= 0xFFFFFFF;
+ paddr = phdr->p_paddr;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+@@ -1351,7 +1351,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1375,7 +1375,7 @@
+ }
+
+ *do_load = 1;
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+
+@@ -1394,7 +1394,7 @@
+ {
+ grub_relocator_chunk_t ch;
+
+- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
++ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
+ err = grub_elf32_phdr_iterate (elf, filename,
+ grub_bsd_elf32_size_hook, NULL);
+ if (err)
+
+
diff --git a/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch b/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch
new file mode 100644
index 0000000..8019a3c
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=424137
+https://savannah.gnu.org/bugs/?37558
+https://code.google.com/p/original-mawk/issues/detail?id=17
+--- grub-core/Makefile.am 2012-07-07 12:29:01 +0000
++++ grub-core/Makefile.am 2012-10-12 13:04:02 +0000
+@@ -349,7 +349,7 @@
+
+ # generate global module dependencies list
+ moddep.lst: syminfo.lst genmoddep.awk video.lst
+- cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
++ cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
+ platform_DATA += moddep.lst
+ CLEANFILES += config.log syminfo.lst moddep.lst
+
+
diff --git a/sys-boot/grub/files/grub-2.00-no-gets.patch b/sys-boot/grub/files/grub-2.00-no-gets.patch
new file mode 100644
index 0000000..c21d4b9
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-no-gets.patch
@@ -0,0 +1,22 @@
+hack until gzip pulls a newer gnulib version
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- a/grub-core/gnulib/stdio.in.h
++++ b/grub-core/gnulib/stdio.in.h
+@@ -125,7 +125,6 @@
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/sys-boot/grub/files/grub-2.00-parallel-make.patch b/sys-boot/grub/files/grub-2.00-parallel-make.patch
new file mode 100644
index 0000000..8af8b36
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-parallel-make.patch
@@ -0,0 +1,24 @@
+Fix parallel make problems.
+Upstream changesets 4547, 4552.
+--- gentpl.py
++++ gentpl.py
+@@ -487,7 +487,7 @@
+ def manpage():
+ r = "if COND_MAN_PAGES\n"
+ r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
+- r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
++ r += rule("[+ name +].[+ mansection +]", "[+ name +] grub-mkconfig_lib", """
+ chmod a+x [+ name +]
+ PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
+ """)
+--- grub-core/Makefile.am
++++ grub-core/Makefile.am
+@@ -63,7 +63,7 @@
+ rs_decoder.S: $(srcdir)/lib/reed_solomon.c
+ $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
+
+-kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
++boot/i386/pc/startup_raw.S: $(builddir)/rs_decoder.S
+ boot/mips/loongson/fwstart.S: $(builddir)/sm712_start.S
+
+ CLEANFILES += grub_script.yy.c grub_script.yy.h
diff --git a/sys-boot/grub/files/grub-2.00-tftp-endian.patch b/sys-boot/grub/files/grub-2.00-tftp-endian.patch
new file mode 100644
index 0000000..f4e5644
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.00-tftp-endian.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/show_bug.cgi?id=438612
+
+=== modified file 'grub-core/net/tftp.c'
+--- grub-core/net/tftp.c 2012-06-22 20:04:16 +0000
++++ grub-core/net/tftp.c 2012-07-02 09:22:50 +0000
+@@ -143,7 +143,7 @@
+
+ tftph_ack = (struct tftphdr *) nb_ack.data;
+ tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
+- tftph_ack->u.ack.block = block;
++ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
+
+ err = grub_net_send_udp_packet (data->sock, &nb_ack);
+ if (err)
+@@ -225,7 +225,7 @@
+ grub_priority_queue_pop (data->pq);
+
+ if (file->device->net->packs.count < 50)
+- err = ack (data, tftph->u.data.block);
++ err = ack (data, data->block + 1);
+ else
+ {
+ file->device->net->stall = 1;
+
diff --git a/sys-boot/grub/files/grub.conf.gentoo b/sys-boot/grub/files/grub.conf.gentoo
new file mode 100644
index 0000000..0027099
--- /dev/null
+++ b/sys-boot/grub/files/grub.conf.gentoo
@@ -0,0 +1,16 @@
+# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
+# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
+# If you are not using Genkernel and you need help creating this file, you
+# should consult the handbook. Alternatively, consult the grub.conf.sample that
+# is included with the Grub documentation.
+
+default 0
+timeout 30
+#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
+
+#title Gentoo Linux 2.6.24-r5
+#root (hd0,0)
+#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
+#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
+
+# vim:ft=conf:
diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default
new file mode 100644
index 0000000..061e4d1
--- /dev/null
+++ b/sys-boot/grub/files/grub.default
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default,v 1.3 2012/02/29 01:52:23 floppym Exp $
+#
+# To populate all changes in this file you need to regenerate your
+# grub configuration file afterwards:
+# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
+#
+# See the grub info page for documentation on possible variables and
+# their associated values.
+
+GRUB_DISTRIBUTOR="Gentoo"
+
+GRUB_DEFAULT=0
+GRUB_HIDDEN_TIMEOUT=0
+GRUB_HIDDEN_TIMEOUT_QUIET=true
+GRUB_TIMEOUT=10
+
+GRUB_CMDLINE_LINUX_DEFAULT=""
+GRUB_CMDLINE_LINUX=""
+
+# Uncomment to disable graphical terminal (grub-pc only)
+#GRUB_TERMINAL=console
+
+# The resolution used on graphical terminal.
+# Note that you can use only modes which your graphic card supports via VBE.
+# You can see them in real GRUB with the command `vbeinfo'.
+#GRUB_GFXMODE=640x480
+
+# Background image used on graphical terminal.
+# Can be in various bitmap formats.
+#GRUB_BACKGROUND="/boot/grub2/mybackground.png"
+
+# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entries
+#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/files/grub.default-2 b/sys-boot/grub/files/grub.default-2
new file mode 100644
index 0000000..392a3ae
--- /dev/null
+++ b/sys-boot/grub/files/grub.default-2
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.2 2012/06/28 22:36:53 floppym Exp $
+#
+# To populate all changes in this file you need to regenerate your
+# grub configuration file afterwards:
+# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
+#
+# See the grub info page for documentation on possible variables and
+# their associated values.
+
+GRUB_DISTRIBUTOR="Gentoo"
+
+GRUB_DEFAULT=0
+GRUB_HIDDEN_TIMEOUT=0
+GRUB_HIDDEN_TIMEOUT_QUIET=true
+GRUB_TIMEOUT=10
+
+GRUB_CMDLINE_LINUX_DEFAULT=""
+GRUB_CMDLINE_LINUX=""
+
+# Uncomment to disable graphical terminal (grub-pc only)
+#GRUB_TERMINAL=console
+
+# The resolution used on graphical terminal.
+# Note that you can use only modes which your graphic card supports via VBE.
+# You can see them in real GRUB with the command `vbeinfo'.
+#GRUB_GFXMODE=640x480
+
+# Path to theme spec txt file.
+# The starfield is by default provided with use truetype.
+# NOTE: when enabling custom theme, ensure you have required font/etc.
+#GRUB_THEME="/boot/grub2/themes/starfield/theme.txt"
+
+# Background image used on graphical terminal.
+# Can be in various bitmap formats.
+#GRUB_BACKGROUND="/boot/grub2/mybackground.png"
+
+# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entries
+#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild
new file mode 100644
index 0000000..15eee11
--- /dev/null
+++ b/sys-boot/grub/grub-2.00-r1.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.3 2012/10/20 21:46:34 floppym Exp $
+
+EAPI=4
+
+if [[ ${PV} == "9999" ]] ; then
+ EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
+ LIVE_ECLASS="bzr"
+ SRC_URI=""
+ DO_AUTORECONF="true"
+else
+ MY_P=${P/_/\~}
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
+ SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
+ else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
+ mirror://gentoo/${MY_P}.tar.xz"
+ fi
+ KEYWORDS="~amd64 ~x86"
+ S=${WORKDIR}/${MY_P}
+ DO_AUTORECONF="true"
+fi
+
+inherit eutils flag-o-matic multiprocessing pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
+unset LIVE_ECLASS
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="http://www.gnu.org/software/grub/"
+
+LICENSE="GPL-3"
+SLOT="2"
+IUSE="custom-cflags debug device-mapper doc efiemu mount nls static sdl truetype libzfs"
+
+GRUB_PLATFORMS=(
+ # everywhere:
+ emu
+ # mips only:
+ qemu-mips yeeloong
+ # amd64, x86, ppc, ppc64:
+ ieee1275
+ # amd64, x86:
+ coreboot multiboot efi-32 pc qemu
+ # amd64, ia64:
+ efi-64
+)
+IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}"
+
+REQUIRED_USE="grub_platforms_qemu? ( truetype )"
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+RDEPEND="
+ app-arch/xz-utils
+ >=sys-libs/ncurses-5.2-r5
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse )
+ truetype? (
+ media-libs/freetype
+ media-fonts/dejavu
+ >=media-fonts/unifont-5
+ )
+ ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+ ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
+"
+DEPEND="${RDEPEND}
+ >=dev-lang/python-2.5.2
+ sys-devel/flex
+ sys-devel/bison
+ sys-apps/help2man
+ sys-apps/texinfo
+ static? (
+ truetype? (
+ app-arch/bzip2[static-libs(+)]
+ media-libs/freetype[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ )
+ )
+"
+RDEPEND+="
+ grub_platforms_efi-32? ( sys-boot/efibootmgr )
+ grub_platforms_efi-64? ( sys-boot/efibootmgr )
+"
+if [[ -n ${DO_AUTORECONF} ]] ; then
+ DEPEND+=" >=sys-devel/autogen-5.10"
+else
+ DEPEND+=" app-arch/xz-utils"
+fi
+
+export STRIP_MASK="*/grub/*/*.{mod,img}"
+
+QA_EXECSTACK="
+ usr/bin/grub*
+ usr/sbin/grub*
+ usr/lib*/grub/*/*.mod
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/setjmp.module
+"
+
+QA_WX_LOAD="
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/*.image
+"
+
+QA_PRESTRIPPED="
+ usr/lib.*/grub/.*/kernel.img
+"
+
+grub_run_phase() {
+ local phase=$1
+ local platform=$2
+ [[ -z ${phase} || -z ${platform} ]] && die "${FUNCNAME} [phase] [platform]"
+
+ [[ -d "${WORKDIR}/build-${platform}" ]] || \
+ { mkdir "${WORKDIR}/build-${platform}" || die ; }
+ pushd "${WORKDIR}/build-${platform}" > /dev/null || die
+
+ echo ">>> Running ${phase} for platform \"${platform}\""
+ echo ">>> Working in: \"${WORKDIR}/build-${platform}\""
+
+ grub_${phase} ${platform}
+
+ popd > /dev/null || die
+}
+
+grub_src_configure() {
+ local platform=$1
+ local with_platform=
+ local enable_efiemu="--disable-efiemu"
+
+ [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
+
+ # Used below for efi cross-building
+ tc-export CC NM OBJCOPY STRIP
+
+ estack_push CTARGET "${CTARGET}"
+ estack_push TARGET_CC "${TARGET_CC}"
+ estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
+ estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}"
+
+ case ${platform} in
+ efi-32)
+ if [[ ${CHOST} == x86_64* ]]; then
+ CTARGET="${CTARGET:-i386}"
+ TARGET_CC="${TARGET_CC:-${CC}}"
+ export TARGET_CC
+ fi
+ with_platform="--with-platform=efi"
+ ;;
+ efi-64)
+ if [[ ${CHOST} == i?86* ]]; then
+ CTARGET="${CTARGET:-x86_64}"
+ TARGET_CC="${TARGET_CC:-${CC}}"
+ TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
+ TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
+ export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
+ fi
+ with_platform="--with-platform=efi"
+ ;;
+ guessed) ;;
+ *)
+ with_platform="--with-platform=${platform}"
+ case ${CTARGET:-${CHOST}} in
+ i?86*|x86_64*)
+ enable_efiemu=$(use_enable efiemu)
+ ;;
+ esac
+ ;;
+ esac
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --libdir=/usr/lib \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --disable-werror \
+ --program-prefix= \
+ --program-transform-name="s,grub,grub2," \
+ --with-grubdir=grub2 \
+ ${with_platform} \
+ $(use_enable debug mm-debug) \
+ $(use_enable debug grub-emu-usb) \
+ $(use_enable device-mapper) \
+ ${enable_efiemu} \
+ $(use_enable mount grub-mount) \
+ $(use_enable nls) \
+ $(use_enable truetype grub-mkfont) \
+ $(use_enable libzfs) \
+ $(use sdl && use_enable debug grub-emu-sdl)
+
+ estack_pop CTARGET CTARGET || die
+ estack_pop TARGET_CC TARGET_CC || die
+ estack_pop TARGET_CFLAGS TARGET_CFLAGS || die
+ estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die
+}
+
+grub_src_compile() {
+ default_src_compile
+ pax-mark -mpes "${grub_binaries[@]}"
+}
+
+grub_build_docs() {
+ emake -C docs html
+}
+
+grub_src_install() {
+ default_src_install
+}
+
+grub_install_docs() {
+ emake -C docs DESTDIR="${D}" install-html
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 439082
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "GRUB does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_prepare() {
+ if [[ ${PV} != 9999 ]]; then
+ epatch "${FILESDIR}/${P}-parallel-make.patch" #424231
+ epatch "${FILESDIR}/${P}-no-gets.patch" #424703
+ epatch "${FILESDIR}/${P}-config-quoting.patch" #426364
+ epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612
+ epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137
+ fi
+
+ # fix texinfo file name, bug 416035
+ sed -i \
+ -e 's/^\* GRUB:/* GRUB2:/' \
+ -e 's/(grub)/(grub2)/' -- \
+ "${S}"/docs/grub.texi
+
+ epatch_user
+
+ # autogen.sh does more than just run autotools
+ if [[ -n ${DO_AUTORECONF} ]] ; then
+ sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die
+ (
+ autopoint() { :; }
+ . ./autogen.sh
+ ) || die
+ fi
+
+ # install into the right dir for eselect #372735
+ sed -i \
+ -e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
+ util/bash-completion.d/Makefile.in || die
+
+ # get enabled platforms
+ GRUB_ENABLED_PLATFORMS=""
+ local i
+ for i in ${GRUB_PLATFORMS[@]}; do
+ use grub_platforms_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
+ done
+ [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && GRUB_ENABLED_PLATFORMS="guessed"
+ einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
+}
+
+src_configure() {
+ local i
+
+ use custom-cflags || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
+ use static && append-ldflags -static
+
+ # Sandbox bug 404013.
+ use libzfs && addpredict /etc/dfs:/dev/zfs
+
+ multijob_init
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ multijob_child_init grub_run_phase ${FUNCNAME} ${i}
+ done
+ multijob_finish || die
+}
+
+src_compile() {
+ # Used for pax marking in grub_src_compile
+ local grub_binaries=(
+ grub-editenv
+ grub-fstest
+ grub-menulst2cfg
+ grub-mkimage
+ grub-mklayout
+ grub-mkpasswd-pbkdf2
+ grub-mkrelpath
+ grub-script-check
+ grub-bios-setup
+ grub-ofpathname
+ grub-probe
+ grub-sparc64-setup
+ )
+ use mount && grub_binaries+=( grub-mount )
+ use truetype && grub_binaries+=( grub-mkfont )
+
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+
+ # Just build docs once
+ use doc && grub_run_phase build_docs ${i}
+}
+
+src_install() {
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+
+ use doc && grub_run_phase install_docs ${i}
+
+ mv "${ED}"usr/share/info/grub{,2}.info || die
+
+ # can't be in docs array as we use default_src_install in different builddir
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default-2 grub
+}
+
+pkg_postinst() {
+ # display the link to guide
+ elog "For information on how to configure grub-2 please refer to the guide:"
+ elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
+ if ! has_version sys-boot/os-prober; then
+ elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
+ fi
+ if ! has_version dev-libs/libisoburn; then
+ elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
+ fi
+ if has_version sys-boot/grub:0; then
+ ewarn "If you want to keep GRUB Legacy (grub-0.97) installed, please run"
+ ewarn "the following to add sys-boot/grub:0 to your world file."
+ ewarn "emerge --noreplace sys-boot/grub:0"
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2012-11-07 11:17 Yuta SATOH
0 siblings, 0 replies; 5+ messages in thread
From: Yuta SATOH @ 2012-11-07 11:17 UTC (permalink / raw
To: gentoo-commits
commit: 4ed96644f7ae69407b3a350e5d3d342fca30a3d4
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Wed Nov 7 11:16:53 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Wed Nov 7 11:16:53 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=4ed96644
grub -- Apply patches all environments, fix for grub2-mkconfig to work correctly on ZFS environment. bug 442050
---
sys-boot/grub/files/grub-2.00-fbsd.patch | 26 +++++++++++++++++++++++---
sys-boot/grub/grub-2.00-r1.ebuild | 15 +++++++--------
2 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
index 4fc2b23..4d7716d 100644
--- a/sys-boot/grub/files/grub-2.00-fbsd.patch
+++ b/sys-boot/grub/files/grub-2.00-fbsd.patch
@@ -57,7 +57,7 @@ diff -Nur grub-2.00.orig/include/grub/gpt_partition.h grub-2.00/include/grub/gpt
grub_uint8_t magic[8];
diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
-+++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-06 23:19:31.000000000 +0900
++++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-07 20:01:10.000000000 +0900
@@ -54,7 +54,7 @@
fi
@@ -89,7 +89,27 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
case $abstraction in
lvm) load_kfreebsd_module geom_linux_lvm false ;;
esac
-@@ -179,7 +179,7 @@
+@@ -122,10 +122,17 @@
+ zfs)
+ load_kfreebsd_module opensolaris false
+
+- ls "${dirname}/zfs/zpool.cache" > /dev/null
++ if [ -f /boot/zfs/zpool.cache ] ; then
++ zpoolcache=/boot/zfs/zpool.cache
++ zpoolcache_dirname=`dirname $zpoolcache`
++ zpoolcache_rel_dirname=`make_system_path_relative_to_its_root $zpoolcache_dirname`
++ else
++ ls "${dirname}/zfs/zpool.cache" > /dev/null
++ zpoolcache_rel_dirname=${rel_dirname}/zfs
++ fi
+ printf '%s\n' "${prepare_boot_cache}"
+ sed "s/^/$submenu_indentation/" << EOF
+- kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
++ kfreebsd_module ${zpoolcache_rel_dirname}/zpool.cache type=/boot/zfs/zpool.cache
+ EOF
+ ;;
+ esac
+@@ -179,7 +186,7 @@
case ${GRUB_FS} in
zfs)
# zpool name
@@ -98,7 +118,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
# filesystem name (empty string for the main filesystem)
kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
;;
-@@ -213,7 +213,7 @@
+@@ -213,7 +220,7 @@
if [ "x$is_first_entry" = xtrue ]; then
kfreebsd_entry "${OS}" "${version}" simple
diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild
index de01cdc..b4f64a5 100644
--- a/sys-boot/grub/grub-2.00-r1.ebuild
+++ b/sys-boot/grub/grub-2.00-r1.ebuild
@@ -82,8 +82,10 @@ DEPEND="${RDEPEND}
)
"
RDEPEND+="
- grub_platforms_efi-32? ( sys-boot/efibootmgr )
- grub_platforms_efi-64? ( sys-boot/efibootmgr )
+ kernel_linux? (
+ grub_platforms_efi-32? ( sys-boot/efibootmgr )
+ grub_platforms_efi-64? ( sys-boot/efibootmgr )
+ )
"
if [[ -n ${DO_AUTORECONF} ]] ; then
DEPEND+=" >=sys-devel/autogen-5.10"
@@ -139,8 +141,6 @@ grub_src_configure() {
# Used below for efi cross-building
tc-export CC NM OBJCOPY STRIP
- use elibc_FreeBSD && append-cppflags "-isystem /usr/include"
-
estack_push CTARGET "${CTARGET}"
estack_push TARGET_CC "${TARGET_CC}"
estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
@@ -236,10 +236,8 @@ src_prepare() {
epatch "${FILESDIR}/${P}-config-quoting.patch" #426364
epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612
epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137
- if use elibc_FreeBSD ; then
- epatch "${FILESDIR}/${P}-fbsd.patch"
- epatch "${FILESDIR}/${P}-fbsd91-boot.patch"
- fi
+ epatch "${FILESDIR}/${P}-fbsd.patch"
+ epatch "${FILESDIR}/${P}-fbsd91-boot.patch"
fi
# fix texinfo file name, bug 416035
@@ -279,6 +277,7 @@ src_configure() {
use custom-cflags || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
use static && append-ldflags -static
+ use elibc_FreeBSD && append-cppflags "-isystem /usr/include"
# Sandbox bug 404013.
use libzfs && addpredict /etc/dfs:/dev/zfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2012-12-01 14:24 Yuta SATOH
0 siblings, 0 replies; 5+ messages in thread
From: Yuta SATOH @ 2012-12-01 14:24 UTC (permalink / raw
To: gentoo-commits
commit: 6d3c2fc9b8cf667080181bb0ec0feac8792bf5c9
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Sat Dec 1 14:23:48 2012 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Sat Dec 1 14:23:48 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=6d3c2fc9
grub-2.00-r1 -- updated files/grub-2.00-fbsd.patch, drop freebsd-boot partition support
---
sys-boot/grub/Manifest | 2 +-
sys-boot/grub/files/grub-2.00-fbsd.patch | 57 ++----------------------------
2 files changed, 4 insertions(+), 55 deletions(-)
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index d3bd25e..c6002b9 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -1,5 +1,5 @@
AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
-AUX grub-2.00-fbsd.patch 5386 SHA256 6c0379c86013a1dac65cdd7654d697d427e1e16714af457db329cc087c65e0a9 SHA512 27eb0c3963f7ea81d2f5f58b2d7f9814faf32e3e20a3ebf93dfd1421bf06a58da15ef472262b6ee28643224e9a71b2729083ca54a1e7a7aa7001ff46afad4283 WHIRLPOOL 0f475324d309b26e0195a3aec75f8f59a6c857bfa6866a3732536325736f5c113bd89c5e7656e09216c747f84eac68a84243052dec6014992d2b951f0b27733b
+AUX grub-2.00-fbsd.patch 3197 SHA256 2f857d729b1e82e607c99a22197889ed62f315192fc3cb120c865843fccece07 SHA512 cb7487fc9d0c3e44cb58518e4cc4a55316e1666c0eae637f9171905d8452d20ed784cee2f3e0a9647d2c778e580e8fc24b9de0a62ee6a22cce711dbfa452d730 WHIRLPOOL db28faf67ec8b915fcc11c9b4d94e7d07b33776478421146c7a2b7021893edde05fb22ae969aee9a6568254de0afb880d57db8cc6d9263862629941c45e69d66
AUX grub-2.00-fbsd91-boot.patch 1448 SHA256 efb04cc814c8afb91cef8b1eb5916571eda6095c813244ef5c343b90f8c734c7 SHA512 3c05067ba62897b065ec477a1154fe0eeb4ef59a9058b032f11ca2111c73f91b68166a9f77cc4ae3dc4dd9eb3d1ce1639465f354fc46d3dce12b5a1d4a5aa493 WHIRLPOOL 075fd010a30630463ec96368e527fa39928cbe4a16b325190ad9d2279d7cb5168dda8f81b0b03601b4923a910faed3e2cd40952d065068f07cccd742107fae4b
AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba
AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b
diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
index 4d7716d..3b6ba0d 100644
--- a/sys-boot/grub/files/grub-2.00-fbsd.patch
+++ b/sys-boot/grub/files/grub-2.00-fbsd.patch
@@ -1,60 +1,9 @@
-* Added support freebsd-boot partition on GPT.
* FreeBSD's sed doesn't support '\t', change to tab.
* grub2-probe is used instead of grub-probe on Gentoo.
Taken from FreeBSD ports
-patch-include-grub-gpt_partition.h
-patch-util-i386-pc-grub-setup.c
patch-util-grub.d-10_kfreebsd.in
-diff -Nur grub-2.00.orig/grub-core/partmap/gpt.c grub-2.00/grub-core/partmap/gpt.c
---- grub-2.00.orig/grub-core/partmap/gpt.c 2012-05-22 06:12:44.000000000 +0900
-+++ grub-2.00/grub-core/partmap/gpt.c 2012-11-06 23:23:27.000000000 +0900
-@@ -37,6 +37,8 @@
-
- #ifdef GRUB_UTIL
- static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
-+static const grub_gpt_part_type_t grub_gpt_partition_type_freebsd_boot = GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT;
-+static const grub_gpt_part_type_t grub_gpt_partition_type_solaris_boot = GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT;
- #endif
-
- /* 512 << 7 = 65536 byte sectors. */
-@@ -158,7 +160,9 @@
- disk->partition = p2;
-
- /* If there's an embed region, it is in a dedicated partition. */
-- if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
-+ if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16) ||
-+ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_freebsd_boot, 16) ||
-+ ! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_solaris_boot, 16))
- {
- start = p->start;
- len = p->len;
-diff -Nur grub-2.00.orig/include/grub/gpt_partition.h grub-2.00/include/grub/gpt_partition.h
---- grub-2.00.orig/include/grub/gpt_partition.h 2012-01-28 22:51:46.000000000 +0900
-+++ grub-2.00/include/grub/gpt_partition.h 2012-11-06 23:18:11.000000000 +0900
-@@ -50,6 +50,21 @@
- { 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3 } \
- }
-
-+#define GRUB_GPT_PARTITION_TYPE_FREEBSD_BOOT \
-+ { grub_cpu_to_le32_compile_time (0x83BD6B9D), \
-+ grub_cpu_to_le16_compile_time (0x7F41), \
-+ grub_cpu_to_le16_compile_time (0x11DC), \
-+ { 0xBE, 0x0B, 0x00, 0x15, 0x60, 0xB8, 0x4F, 0x0F } \
-+ }
-+
-+#define GRUB_GPT_PARTITION_TYPE_SOLARIS_BOOT \
-+ { grub_cpu_to_le32_compile_time (0x6A82CB45), \
-+ grub_cpu_to_le16_compile_time (0x1DD2), \
-+ grub_cpu_to_le16_compile_time (0x11B2), \
-+ { 0x99, 0xA6, 0x08, 0x00, 0x20, 0x73, 0x66, 0x31 } \
-+ }
-+
-+
- struct grub_gpt_header
- {
- grub_uint8_t magic[8];
diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
+++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-07 20:01:10.000000000 +0900
@@ -63,7 +12,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
if [ -z "${prepare_module_dir_cache}" ]; then
- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
-+ prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub2-probe -t device "${module_dir}") | sed -e "s/^/ /")"
++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | sed -e "s/^/ /")"
fi
printf '%s\n' "${prepare_module_dir_cache}"
@@ -85,7 +34,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
load_kfreebsd_module acpi true
- for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
-+ for abstraction in dummy $(grub2-probe -t abstraction --device ${GRUB_DEVICE}) ; do
++ for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do
case $abstraction in
lvm) load_kfreebsd_module geom_linux_lvm false ;;
esac
@@ -114,7 +63,7 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
zfs)
# zpool name
- kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
-+ kfreebsd_device=$(grub2-probe -t fs_label --device ${GRUB_DEVICE})
++ kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE})
# filesystem name (empty string for the main filesystem)
kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
;;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2013-01-04 11:06 Yuta SATOH
0 siblings, 0 replies; 5+ messages in thread
From: Yuta SATOH @ 2013-01-04 11:06 UTC (permalink / raw
To: gentoo-commits
commit: c97e6c5a2e822287030700c08ff981220d65d0cb
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Fri Jan 4 11:06:07 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Fri Jan 4 11:06:07 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=c97e6c5a
grub-2.00-fbsd.patch: updated patch from upstream
---
sys-boot/grub/Manifest | 5 +-
sys-boot/grub/files/grub-2.00-fbsd.patch | 348 +++++++++++++++++++++--
sys-boot/grub/files/grub-2.00-fbsd91-boot.patch | 55 ----
sys-boot/grub/grub-2.00-r1.ebuild | 1 -
4 files changed, 328 insertions(+), 81 deletions(-)
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index c6002b9..302f5c6 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -1,6 +1,5 @@
AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
-AUX grub-2.00-fbsd.patch 3197 SHA256 2f857d729b1e82e607c99a22197889ed62f315192fc3cb120c865843fccece07 SHA512 cb7487fc9d0c3e44cb58518e4cc4a55316e1666c0eae637f9171905d8452d20ed784cee2f3e0a9647d2c778e580e8fc24b9de0a62ee6a22cce711dbfa452d730 WHIRLPOOL db28faf67ec8b915fcc11c9b4d94e7d07b33776478421146c7a2b7021893edde05fb22ae969aee9a6568254de0afb880d57db8cc6d9263862629941c45e69d66
-AUX grub-2.00-fbsd91-boot.patch 1448 SHA256 efb04cc814c8afb91cef8b1eb5916571eda6095c813244ef5c343b90f8c734c7 SHA512 3c05067ba62897b065ec477a1154fe0eeb4ef59a9058b032f11ca2111c73f91b68166a9f77cc4ae3dc4dd9eb3d1ce1639465f354fc46d3dce12b5a1d4a5aa493 WHIRLPOOL 075fd010a30630463ec96368e527fa39928cbe4a16b325190ad9d2279d7cb5168dda8f81b0b03601b4923a910faed3e2cd40952d065068f07cccd742107fae4b
+AUX grub-2.00-fbsd.patch 16465 SHA256 5464dda43bed28634e406a3b182db1d76e70059e0a3b3c276ee91ff27ca78cbd SHA512 d0fecaf83796971ef6f2cd43cab4c89faf1496d4241e249467d7839b366c616e15a8c6961d9224ed0e139d018d5d9f354cf59ddf2ef5e915a4b03e11dbdf568e WHIRLPOOL 963c61923503a57894634f0b3431e8e701a83f6514e5829f0ed91fc3c9011fa39870c319e1cbfee62341f1d37dfd0fdadcd4a028b725bb65d2f06fbedfd31166
AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba
AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b
AUX grub-2.00-parallel-make.patch 996 SHA256 351abb76af8469d4ecc35d55917821a2ab2e5bddc0634e6a5df85eeec34800ce SHA512 a97a5cf654c1b17918043fc6fa347f1473d5ce24280b9aedefb078abc1f43a4daacd5fc8889cf1dac46d9cf1bf755736e91745a15ac71ed01069ae76e083bd6a WHIRLPOOL 448aa705f15752071be6319314a733be120b95daeb10eaeefb2f52802f9ead3442c7b0598225c7f2d970db72b9dcfbbeb559bb00d8260dacc12363343b53e297
@@ -9,4 +8,4 @@ AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e6687
AUX grub.default 1254 SHA256 181bdb7433ebcbde635e7058a1febaf0100e4e9c83ea4fd222d7010c375882d8 SHA512 1cdce5d9c606a2cba29ec859df96de9e8c292301ee3f26dff848816cda950088c0660dbd3401eec97b15841a2544116664eeda6cb0be753f6d160a7e62578dbc WHIRLPOOL 03514e95078f4f4d176e85ba3a739105a7cbf58a6c3e2ba4a2c660c48329dcc78b968391ecb2d9821084ba4ddddbe03e41d9d6c36685f1db1d4a1f00a1e5d393
AUX grub.default-2 1470 SHA256 fcef668c1316a38f6a1c784c489c2052b23b8e2b79dc1a940b5bda831947af74 SHA512 5c331323ef17683fdfc59b0057a6e89a451039febc4ff6242c17cd3aeda0ef60930a79dc52e180bf534f94867a8b4545655808ae5a7362643542fea42b6a0d91 WHIRLPOOL 5f8a1192763ee9089e48a7eff13ef75947e7f4db20ff873ae86fd99920b107de827588558bdc26d2bf5ee3da4f51a44d53470aa65bf73ab565cf23e84097de5c
DIST grub-2.00.tar.xz 5136412 SHA256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 SHA512 f0dbfc90639491e5c671d2df206dec0139171bf096a99ee236f7ebf21cdafc6e6d39a9607e14ad2a6aee7c199ecc63f0a39573d969318e1a0cd32f989aa6b44a WHIRLPOOL b9690c023ab507926b8615ce28bf9de82b793ebd02126a5ecd52a130ab4bc52e2ae650b02ae2d784d4089e2981be944ba8b4800cde742aab793ff0d9029843c8
-EBUILD grub-2.00-r1.ebuild 8776 SHA256 a264b7b8155ca8d94446004757a9b18e4d37371451dc441977f9ce805977c171 SHA512 3195415a8e685342b4a69df933e0a1c06c2b067cdac4844e057b29b483386ed4e82e6128ac303ad1150422148cd47eb90f6ff88236b0e83f932adb2f5cdeec2b WHIRLPOOL 0e212af0267c03eac58851ba25ce56169d138541306d304cb2bcbf6581b428ccb4e39b48da6913dcb91ef1ff3b1ee3125390eeae375909077dd05c2f0d90d0da
+EBUILD grub-2.00-r1.ebuild 8730 SHA256 b9b978d6f17e73077c31d90ca84ae7c085f742a6ff00c6e24e5ac775dd132a50 SHA512 6ff12f41163f4d4d5e9f7a8d4d1040e30425144e8e79267854a1a1cd51378a59fe4d9d96de1e5b310dc7960a93a85cf811ae0e625b92c6332cff50b552f51299 WHIRLPOOL 2b151bbaff50c03acbe972b043892b05b9915fbc20b24ed956153e01464f6485638f910db42c10bf3e7c6995bd48e6747d6f8fb2dccd50ff029161994d90689e
diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
index 3b6ba0d..bcfbf26 100644
--- a/sys-boot/grub/files/grub-2.00-fbsd.patch
+++ b/sys-boot/grub/files/grub-2.00-fbsd.patch
@@ -1,18 +1,127 @@
-* FreeBSD's sed doesn't support '\t', change to tab.
-* grub2-probe is used instead of grub-probe on Gentoo.
-
-Taken from FreeBSD ports
-patch-util-grub.d-10_kfreebsd.in
+Taken from
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4556
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4584
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4624
+http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4625
+diff -Nur grub-2.00.orig/grub-core/loader/i386/bsd.c grub-2.00/grub-core/loader/i386/bsd.c
+--- grub-2.00.orig/grub-core/loader/i386/bsd.c 2012-06-07 22:06:00.000000000 +0900
++++ grub-2.00/grub-core/loader/i386/bsd.c 2013-01-04 19:50:55.000000000 +0900
+@@ -1309,7 +1309,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xFFFFFF;
++ paddr = phdr->p_paddr & 0xFFFFFFF;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1333,7 +1333,7 @@
+ }
+
+ *do_load = 1;
+- phdr->p_paddr &= 0xFFFFFF;
++ phdr->p_paddr &= 0xFFFFFFF;
+ paddr = phdr->p_paddr;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+@@ -1351,7 +1351,7 @@
+ && phdr->p_type != PT_DYNAMIC)
+ return 0;
+
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ if (paddr < kern_start)
+ kern_start = paddr;
+@@ -1375,7 +1375,7 @@
+ }
+
+ *do_load = 1;
+- paddr = phdr->p_paddr & 0xffffff;
++ paddr = phdr->p_paddr & 0xfffffff;
+
+ *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
+
+@@ -1394,7 +1394,7 @@
+ {
+ grub_relocator_chunk_t ch;
+
+- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
++ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
+ err = grub_elf32_phdr_iterate (elf, filename,
+ grub_bsd_elf32_size_hook, NULL);
+ if (err)
+diff -Nur grub-2.00.orig/util/grub-mkconfig_lib.in grub-2.00/util/grub-mkconfig_lib.in
+--- grub-2.00.orig/util/grub-mkconfig_lib.in 2012-06-28 00:27:53.000000000 +0900
++++ grub-2.00/util/grub-mkconfig_lib.in 2013-01-04 19:50:55.000000000 +0900
+@@ -349,3 +349,10 @@
+ cat
+ fi
+ }
++
++grub_tab=" "
++
++grub_add_tab () {
++ sed -e "s/^/$grub_tab/"
++}
++
+diff -Nur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
+--- grub-2.00.orig/util/grub.d/10_hurd.in 2012-03-05 05:10:04.000000000 +0900
++++ grub-2.00/util/grub.d/10_hurd.in 2013-01-04 19:50:55.000000000 +0900
+@@ -108,7 +108,7 @@
+ EOF
+ fi
+
+- prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
++ prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/"
+ message="$(gettext_printf "Loading GNU Mach ...")"
+
+ if [ x$type = xrecovery ] ; then
+@@ -122,9 +122,9 @@
+ EOF
+
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/"
+ fi
+- prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
++ prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/"
+ message="$(gettext_printf "Loading the Hurd ...")"
+ if [ x$type = xrecovery ] ; then
+ opts=
+@@ -158,7 +158,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ hurd_entry "$kernel" simple
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ # TRANSLATORS: %s is replaced with an OS name
+ echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
+diff -Nur grub-2.00.orig/util/grub.d/10_illumos.in grub-2.00/util/grub.d/10_illumos.in
+--- grub-2.00.orig/util/grub.d/10_illumos.in 2012-03-05 04:03:38.000000000 +0900
++++ grub-2.00/util/grub.d/10_illumos.in 2013-01-04 19:50:55.000000000 +0900
+@@ -35,8 +35,8 @@
+ esac
+
+ echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
+-save_default_entry | sed -e "s/^/\t/"
+-prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"
++save_default_entry | grub_add_tab
++prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab
+ message="$(gettext_printf "Loading kernel of Illumos ...")"
+ cat << EOF
+ insmod gzio
diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
-+++ grub-2.00/util/grub.d/10_kfreebsd.in 2012-11-07 20:01:10.000000000 +0900
++++ grub-2.00/util/grub.d/10_kfreebsd.in 2013-01-04 19:50:55.000000000 +0900
@@ -54,7 +54,7 @@
fi
if [ -z "${prepare_module_dir_cache}" ]; then
- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
-+ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | sed -e "s/^/ /")"
++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | grub_add_tab)"
fi
printf '%s\n' "${prepare_module_dir_cache}"
@@ -21,11 +130,11 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
fi
if [ x$type != xrecovery ] ; then
- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
-+ save_default_entry | sed -e "s/^/ /" | sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
fi
if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
-+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/ /")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
@@ -38,27 +147,20 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
case $abstraction in
lvm) load_kfreebsd_module geom_linux_lvm false ;;
esac
-@@ -122,10 +122,17 @@
+@@ -122,10 +122,10 @@
zfs)
load_kfreebsd_module opensolaris false
- ls "${dirname}/zfs/zpool.cache" > /dev/null
-+ if [ -f /boot/zfs/zpool.cache ] ; then
-+ zpoolcache=/boot/zfs/zpool.cache
-+ zpoolcache_dirname=`dirname $zpoolcache`
-+ zpoolcache_rel_dirname=`make_system_path_relative_to_its_root $zpoolcache_dirname`
-+ else
-+ ls "${dirname}/zfs/zpool.cache" > /dev/null
-+ zpoolcache_rel_dirname=${rel_dirname}/zfs
-+ fi
++ ls "/boot/zfs/zpool.cache" > /dev/null
printf '%s\n' "${prepare_boot_cache}"
sed "s/^/$submenu_indentation/" << EOF
- kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
-+ kfreebsd_module ${zpoolcache_rel_dirname}/zpool.cache type=/boot/zfs/zpool.cache
++ kfreebsd_module $(make_system_path_relative_to_its_root /boot)/zfs/zpool.cache type=/boot/zfs/zpool.cache
EOF
;;
esac
-@@ -179,7 +186,7 @@
+@@ -179,7 +179,7 @@
case ${GRUB_FS} in
zfs)
# zpool name
@@ -67,12 +169,214 @@ diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfr
# filesystem name (empty string for the main filesystem)
kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
;;
-@@ -213,7 +220,7 @@
+@@ -213,7 +213,7 @@
if [ "x$is_first_entry" = xtrue ]; then
kfreebsd_entry "${OS}" "${version}" simple
- submenu_indentation="\t"
-+ submenu_indentation=" "
++ submenu_indentation="$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
+--- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-19 06:24:38.000000000 +0900
++++ grub-2.00/util/grub.d/10_linux.in 2013-01-04 19:50:55.000000000 +0900
+@@ -101,7 +101,7 @@
+ echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
+ fi
+
+ # Use ELILO's generic "efifb" when it's known to be available.
+@@ -123,12 +123,12 @@
+
+ if [ x$dirname = x/ ]; then
+ if [ -z "${prepare_root_cache}" ]; then
+- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
++ prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
+ else
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ fi
+@@ -230,7 +230,7 @@
+ linux_entry "${OS}" "${version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_netbsd.in grub-2.00/util/grub.d/10_netbsd.in
+--- grub-2.00.orig/util/grub.d/10_netbsd.in 2012-03-05 04:47:35.000000000 +0900
++++ grub-2.00/util/grub.d/10_netbsd.in 2013-01-04 19:50:55.000000000 +0900
+@@ -77,10 +77,10 @@
+ prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,'
+ case "${loader}" in
+ knetbsd)
+- printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}"
++ printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
+ ;;
+ multiboot)
+- printf "\tmodule %s\n" "${kmodule_rel}"
++ printf "$grub_tabmodule %s\n" "${kmodule_rel}"
+ ;;
+ esac
+ }
+@@ -121,11 +121,11 @@
+ printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ case "${loader}" in
+ knetbsd)
+- printf "\tknetbsd %s -r %s %s\n" \
++ printf "$grub_tabknetbsd %s -r %s %s\n" \
+ "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
+ ;;
+ multiboot)
+- printf "\tmultiboot %s %s root=%s %s\n" \
++ printf "$grub_tabmultiboot %s %s root=%s %s\n" \
+ "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
+ ;;
+ esac
+@@ -159,7 +159,7 @@
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
+- submenu_indentation="\t"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_windows.in
+--- grub-2.00.orig/util/grub.d/10_windows.in 2012-03-05 06:11:43.000000000 +0900
++++ grub-2.00/util/grub.d/10_windows.in 2013-01-04 19:50:55.000000000 +0900
+@@ -45,7 +45,7 @@
+ sort | uniq | wc -l`" = 1 || return 1
+
+ # Search 'default=PARTITION'
+- get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'`
++ get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'`
+ test -n "$get_os_name_from_boot_ini_part" || return 1
+
+ # Search 'PARTITION="NAME" ...'
+@@ -87,8 +87,8 @@
+ menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
+ EOF
+
+- save_default_entry | sed -e 's,^,\t,'
+- prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
++ save_default_entry | sed -e 's,^,$grub_tab,'
++ prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,'
+ test -z "$needmap" || cat <<EOF
+ drivemap -s (hd0) \$root
+ EOF
+diff -Nur grub-2.00.orig/util/grub.d/10_xnu.in grub-2.00/util/grub.d/10_xnu.in
+--- grub-2.00.orig/util/grub.d/10_xnu.in 2012-05-29 19:31:03.000000000 +0900
++++ grub-2.00/util/grub.d/10_xnu.in 2013-01-04 19:50:55.000000000 +0900
+@@ -39,8 +39,8 @@
+ cat << EOF
+ menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/ /"
+- prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/ /"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
+ cat << EOF
+ load_video
+ set do_resume=0
+diff -Nur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_linux_xen.in
+--- grub-2.00.orig/util/grub.d/20_linux_xen.in 2012-06-04 04:57:42.000000000 +0900
++++ grub-2.00/util/grub.d/20_linux_xen.in 2013-01-04 19:50:55.000000000 +0900
+@@ -110,11 +110,11 @@
+ echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+ fi
+ if [ x$type != xrecovery ] ; then
+- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
++ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
+ fi
+
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
+ fi
+ printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
+ xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
+@@ -236,7 +236,7 @@
+ linux_entry "${OS}" "${version}" "${xen_version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+- submenu_indentation="\t\t"
++ submenu_indentation="$grub_tab$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+diff -Nur grub-2.00.orig/util/grub.d/30_os-prober.in grub-2.00/util/grub.d/30_os-prober.in
+--- grub-2.00.orig/util/grub.d/30_os-prober.in 2012-03-05 05:52:03.000000000 +0900
++++ grub-2.00/util/grub.d/30_os-prober.in 2013-01-04 19:50:55.000000000 +0900
+@@ -54,8 +54,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+ cat << EOF
+ load_video
+ set do_resume=0
+@@ -126,8 +126,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+
+ case ${LONGNAME} in
+ Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
+@@ -181,14 +181,14 @@
+ used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
+
+ if [ -z "${prepare_boot_cache}" ]; then
+- prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
++ prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
+ fi
+
+ if [ "x$is_first_entry" = xtrue ]; then
+ cat << EOF
+ menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
+ printf '%s\n' "${prepare_boot_cache}"
+ cat << EOF
+ linux ${LKERNEL} ${LPARAMS}
+@@ -208,8 +208,8 @@
+ cat << EOF
+ menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
+ EOF
+- save_default_entry | sed -e "s/^/\t\t/"
+- printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
++ save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
++ printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
+ cat << EOF
+ linux ${LKERNEL} ${LPARAMS}
+ EOF
+@@ -243,8 +243,8 @@
+ cat << EOF
+ menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
+ EOF
+- save_default_entry | sed -e "s/^/\t/"
+- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
++ save_default_entry | grub_add_tab
++ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
+ grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
+ mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
+ grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
diff --git a/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch b/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch
deleted file mode 100644
index fc1ed66..0000000
--- a/sys-boot/grub/files/grub-2.00-fbsd91-boot.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Fix to boot directly.
-
-Taken from http://people.freebsd.org/~nox/tmp/grub2-paste_180121.patch
-FYI, http://www.freebsd.org/cgi/query-pr.cgi?pr=170417&cat=ports
-
-=== modified file 'grub-core/loader/i386/bsd.c'
---- grub-core/loader/i386/bsd.c 2012-06-07 14:41:52 +0000
-+++ grub-core/loader/i386/bsd.c 2012-07-21 17:44:45 +0000
-@@ -1309,7 +1309,7 @@
- && phdr->p_type != PT_DYNAMIC)
- return 0;
-
-- paddr = phdr->p_paddr & 0xFFFFFF;
-+ paddr = phdr->p_paddr & 0xFFFFFFF;
-
- if (paddr < kern_start)
- kern_start = paddr;
-@@ -1333,7 +1333,7 @@
- }
-
- *do_load = 1;
-- phdr->p_paddr &= 0xFFFFFF;
-+ phdr->p_paddr &= 0xFFFFFFF;
- paddr = phdr->p_paddr;
-
- *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
-@@ -1351,7 +1351,7 @@
- && phdr->p_type != PT_DYNAMIC)
- return 0;
-
-- paddr = phdr->p_paddr & 0xffffff;
-+ paddr = phdr->p_paddr & 0xfffffff;
-
- if (paddr < kern_start)
- kern_start = paddr;
-@@ -1375,7 +1375,7 @@
- }
-
- *do_load = 1;
-- paddr = phdr->p_paddr & 0xffffff;
-+ paddr = phdr->p_paddr & 0xfffffff;
-
- *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
-
-@@ -1394,7 +1394,7 @@
- {
- grub_relocator_chunk_t ch;
-
-- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
-+ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
- err = grub_elf32_phdr_iterate (elf, filename,
- grub_bsd_elf32_size_hook, NULL);
- if (err)
-
-
diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild
index b4f64a5..e2035c6 100644
--- a/sys-boot/grub/grub-2.00-r1.ebuild
+++ b/sys-boot/grub/grub-2.00-r1.ebuild
@@ -237,7 +237,6 @@ src_prepare() {
epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612
epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137
epatch "${FILESDIR}/${P}-fbsd.patch"
- epatch "${FILESDIR}/${P}-fbsd91-boot.patch"
fi
# fix texinfo file name, bug 416035
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/
@ 2013-01-07 11:18 Yuta SATOH
0 siblings, 0 replies; 5+ messages in thread
From: Yuta SATOH @ 2013-01-07 11:18 UTC (permalink / raw
To: gentoo-commits
commit: 5cde2010f29f595a01da617d1f1dc71eee1b27d8
Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Jan 7 11:18:27 2013 +0000
Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Mon Jan 7 11:18:27 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=5cde2010
grub-2.00-r1: remove fixed in official tree, bug 442050
---
sys-boot/grub/Manifest | 11 -
sys-boot/grub/files/grub-2.00-config-quoting.patch | 113 ------
sys-boot/grub/files/grub-2.00-fbsd.patch | 382 --------------------
sys-boot/grub/files/grub-2.00-hardcoded-awk.patch | 15 -
sys-boot/grub/files/grub-2.00-no-gets.patch | 22 --
sys-boot/grub/files/grub-2.00-parallel-make.patch | 24 --
sys-boot/grub/files/grub-2.00-tftp-endian.patch | 24 --
sys-boot/grub/files/grub.conf.gentoo | 16 -
sys-boot/grub/files/grub.default | 38 --
sys-boot/grub/files/grub.default-2 | 43 ---
sys-boot/grub/grub-2.00-r1.ebuild | 352 ------------------
11 files changed, 0 insertions(+), 1040 deletions(-)
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
deleted file mode 100644
index 302f5c6..0000000
--- a/sys-boot/grub/Manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
-AUX grub-2.00-fbsd.patch 16465 SHA256 5464dda43bed28634e406a3b182db1d76e70059e0a3b3c276ee91ff27ca78cbd SHA512 d0fecaf83796971ef6f2cd43cab4c89faf1496d4241e249467d7839b366c616e15a8c6961d9224ed0e139d018d5d9f354cf59ddf2ef5e915a4b03e11dbdf568e WHIRLPOOL 963c61923503a57894634f0b3431e8e701a83f6514e5829f0ed91fc3c9011fa39870c319e1cbfee62341f1d37dfd0fdadcd4a028b725bb65d2f06fbedfd31166
-AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba
-AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b
-AUX grub-2.00-parallel-make.patch 996 SHA256 351abb76af8469d4ecc35d55917821a2ab2e5bddc0634e6a5df85eeec34800ce SHA512 a97a5cf654c1b17918043fc6fa347f1473d5ce24280b9aedefb078abc1f43a4daacd5fc8889cf1dac46d9cf1bf755736e91745a15ac71ed01069ae76e083bd6a WHIRLPOOL 448aa705f15752071be6319314a733be120b95daeb10eaeefb2f52802f9ead3442c7b0598225c7f2d970db72b9dcfbbeb559bb00d8260dacc12363343b53e297
-AUX grub-2.00-tftp-endian.patch 728 SHA256 4806fb14471fe6547cb69e6fab97e66c8245654acbc4738071cf2717368de458 SHA512 8fee95b06b50f8721d7013ecf8fb954e9b1ba83f99790e165ec334dfcd41fe7655f37868069a315acd4af97d3c4466aa36e0ab5a8b767faf862f1d71f88b3252 WHIRLPOOL 53779e4952049f069824eefcaaaa0e46fc9a7036ed0f9b67008e523f618105d760300ffcd315f861de786c63de02b2753d3ed14637b39fd7af47aadd02355695
-AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 SHA512 5ee586c151b025a153867d2854b73e2e18a6af38e9d65069b7114a55af776803ba947b4901b0806e79fa8f36aeac90daad608b9ec2a4a8526301d1beb36e4ef3 WHIRLPOOL fcaef85cd7c2c446c882874cf4ec8a2241d1fc97720973a0a0cd1add259da599d4dae4d0b429ba2dff0307ed2d4598d5939cbc1b11127a0dedb3a54249ec9f81
-AUX grub.default 1254 SHA256 181bdb7433ebcbde635e7058a1febaf0100e4e9c83ea4fd222d7010c375882d8 SHA512 1cdce5d9c606a2cba29ec859df96de9e8c292301ee3f26dff848816cda950088c0660dbd3401eec97b15841a2544116664eeda6cb0be753f6d160a7e62578dbc WHIRLPOOL 03514e95078f4f4d176e85ba3a739105a7cbf58a6c3e2ba4a2c660c48329dcc78b968391ecb2d9821084ba4ddddbe03e41d9d6c36685f1db1d4a1f00a1e5d393
-AUX grub.default-2 1470 SHA256 fcef668c1316a38f6a1c784c489c2052b23b8e2b79dc1a940b5bda831947af74 SHA512 5c331323ef17683fdfc59b0057a6e89a451039febc4ff6242c17cd3aeda0ef60930a79dc52e180bf534f94867a8b4545655808ae5a7362643542fea42b6a0d91 WHIRLPOOL 5f8a1192763ee9089e48a7eff13ef75947e7f4db20ff873ae86fd99920b107de827588558bdc26d2bf5ee3da4f51a44d53470aa65bf73ab565cf23e84097de5c
-DIST grub-2.00.tar.xz 5136412 SHA256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 SHA512 f0dbfc90639491e5c671d2df206dec0139171bf096a99ee236f7ebf21cdafc6e6d39a9607e14ad2a6aee7c199ecc63f0a39573d969318e1a0cd32f989aa6b44a WHIRLPOOL b9690c023ab507926b8615ce28bf9de82b793ebd02126a5ecd52a130ab4bc52e2ae650b02ae2d784d4089e2981be944ba8b4800cde742aab793ff0d9029843c8
-EBUILD grub-2.00-r1.ebuild 8730 SHA256 b9b978d6f17e73077c31d90ca84ae7c085f742a6ff00c6e24e5ac775dd132a50 SHA512 6ff12f41163f4d4d5e9f7a8d4d1040e30425144e8e79267854a1a1cd51378a59fe4d9d96de1e5b310dc7960a93a85cf811ae0e625b92c6332cff50b552f51299 WHIRLPOOL 2b151bbaff50c03acbe972b043892b05b9915fbc20b24ed956153e01464f6485638f910db42c10bf3e7c6995bd48e6747d6f8fb2dccd50ff029161994d90689e
diff --git a/sys-boot/grub/files/grub-2.00-config-quoting.patch b/sys-boot/grub/files/grub-2.00-config-quoting.patch
deleted file mode 100644
index 3b031c6..0000000
--- a/sys-boot/grub/files/grub-2.00-config-quoting.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=426364
-https://savannah.gnu.org/bugs/index.php?36839
---- util/grub-mkconfig_lib.in
-+++ util/grub-mkconfig_lib.in
-@@ -255,19 +255,19 @@
- echo "$version_find_latest_a"
- }
-
--# One layer of quotation is eaten by "", the second by sed, and the third by
--# printf; so this turns ' into \'. Note that you must use the output of
-+# One layer of quotation is eaten by "" and the second by
-+# sed; so this turns ' into \'. Note that you must use the output of
- # this function in a printf format string.
-
- grub_quote () {
-- sed "s/'/'\\\\\\\\''/g"
-+ sed "s/'/'\\\\''/g"
- }
-
- gettext_quoted () {
-- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
-+ gettext "$@" | grub_quote
- }
-
--# Run the first argument through gettext_quoted, and then pass that and all
-+# Run the first argument through gettext, and then pass that and all
- # remaining arguments to printf. This is a useful abbreviation and tends to
- # be easier to type.
- gettext_printf () {
-
-=== modified file 'util/grub.d/10_hurd.in'
---- util/grub.d/10_hurd.in
-+++ util/grub.d/10_hurd.in
-@@ -117,7 +117,7 @@
- opts=
- fi
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
- EOF
-
-@@ -133,7 +133,7 @@
- fi
-
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
- --multiboot-command-line='\${kernel-command-line}' \\
- --host-priv-port='\${host-port}' \\
---- util/grub.d/10_illumos.in
-+++ util/grub.d/10_illumos.in
-@@ -46,6 +46,7 @@
- ISADIR=
- fi
- zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
-+ echo '$(echo "$message" | grub_quote)'
- multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
- module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
- }
---- util/grub.d/10_kfreebsd.in
-+++ util/grub.d/10_kfreebsd.in
-@@ -100,7 +100,7 @@
- printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- kfreebsd ${rel_dirname}/${basename} ${args}
- EOF
-
---- util/grub.d/10_linux.in
-+++ util/grub.d/10_linux.in
-@@ -134,14 +134,14 @@
- fi
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
- EOF
- if test -n "${initrd}" ; then
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")"
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- initrd ${rel_dirname}/${initrd}
- EOF
- fi
---- util/grub.d/20_linux_xen.in
-+++ util/grub.d/20_linux_xen.in
-@@ -120,16 +120,16 @@
- xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
- lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$xmessage'
-+ echo '$(echo "$xmessage" | grub_quote)'
- multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
-- echo '$lmessage'
-+ echo '$(echo "$lmessage" | grub_quote)'
- module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
- EOF
- if test -n "${initrd}" ; then
- # TRANSLATORS: ramdisk isn't identifier. Should be translated.
- message="$(gettext_printf "Loading initial ramdisk ...")"
- sed "s/^/$submenu_indentation/" << EOF
-- echo '$message'
-+ echo '$(echo "$message" | grub_quote)'
- module ${rel_dirname}/${initrd}
- EOF
- fi
diff --git a/sys-boot/grub/files/grub-2.00-fbsd.patch b/sys-boot/grub/files/grub-2.00-fbsd.patch
deleted file mode 100644
index bcfbf26..0000000
--- a/sys-boot/grub/files/grub-2.00-fbsd.patch
+++ /dev/null
@@ -1,382 +0,0 @@
-Taken from
-http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4556
-http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4584
-http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4624
-http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4625
-
-diff -Nur grub-2.00.orig/grub-core/loader/i386/bsd.c grub-2.00/grub-core/loader/i386/bsd.c
---- grub-2.00.orig/grub-core/loader/i386/bsd.c 2012-06-07 22:06:00.000000000 +0900
-+++ grub-2.00/grub-core/loader/i386/bsd.c 2013-01-04 19:50:55.000000000 +0900
-@@ -1309,7 +1309,7 @@
- && phdr->p_type != PT_DYNAMIC)
- return 0;
-
-- paddr = phdr->p_paddr & 0xFFFFFF;
-+ paddr = phdr->p_paddr & 0xFFFFFFF;
-
- if (paddr < kern_start)
- kern_start = paddr;
-@@ -1333,7 +1333,7 @@
- }
-
- *do_load = 1;
-- phdr->p_paddr &= 0xFFFFFF;
-+ phdr->p_paddr &= 0xFFFFFFF;
- paddr = phdr->p_paddr;
-
- *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
-@@ -1351,7 +1351,7 @@
- && phdr->p_type != PT_DYNAMIC)
- return 0;
-
-- paddr = phdr->p_paddr & 0xffffff;
-+ paddr = phdr->p_paddr & 0xfffffff;
-
- if (paddr < kern_start)
- kern_start = paddr;
-@@ -1375,7 +1375,7 @@
- }
-
- *do_load = 1;
-- paddr = phdr->p_paddr & 0xffffff;
-+ paddr = phdr->p_paddr & 0xfffffff;
-
- *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
-
-@@ -1394,7 +1394,7 @@
- {
- grub_relocator_chunk_t ch;
-
-- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
-+ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
- err = grub_elf32_phdr_iterate (elf, filename,
- grub_bsd_elf32_size_hook, NULL);
- if (err)
-diff -Nur grub-2.00.orig/util/grub-mkconfig_lib.in grub-2.00/util/grub-mkconfig_lib.in
---- grub-2.00.orig/util/grub-mkconfig_lib.in 2012-06-28 00:27:53.000000000 +0900
-+++ grub-2.00/util/grub-mkconfig_lib.in 2013-01-04 19:50:55.000000000 +0900
-@@ -349,3 +349,10 @@
- cat
- fi
- }
-+
-+grub_tab=" "
-+
-+grub_add_tab () {
-+ sed -e "s/^/$grub_tab/"
-+}
-+
-diff -Nur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in
---- grub-2.00.orig/util/grub.d/10_hurd.in 2012-03-05 05:10:04.000000000 +0900
-+++ grub-2.00/util/grub.d/10_hurd.in 2013-01-04 19:50:55.000000000 +0900
-@@ -108,7 +108,7 @@
- EOF
- fi
-
-- prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
-+ prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading GNU Mach ...")"
-
- if [ x$type = xrecovery ] ; then
-@@ -122,9 +122,9 @@
- EOF
-
- if [ x$type != xrecovery ] ; then
-- save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
-+ save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/"
- fi
-- prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
-+ prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/"
- message="$(gettext_printf "Loading the Hurd ...")"
- if [ x$type = xrecovery ] ; then
- opts=
-@@ -158,7 +158,7 @@
-
- if [ "x$is_first_entry" = xtrue ]; then
- hurd_entry "$kernel" simple
-- submenu_indentation="\t"
-+ submenu_indentation="$grub_tab"
-
- # TRANSLATORS: %s is replaced with an OS name
- echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
-diff -Nur grub-2.00.orig/util/grub.d/10_illumos.in grub-2.00/util/grub.d/10_illumos.in
---- grub-2.00.orig/util/grub.d/10_illumos.in 2012-03-05 04:03:38.000000000 +0900
-+++ grub-2.00/util/grub.d/10_illumos.in 2013-01-04 19:50:55.000000000 +0900
-@@ -35,8 +35,8 @@
- esac
-
- echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
--save_default_entry | sed -e "s/^/\t/"
--prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"
-+save_default_entry | grub_add_tab
-+prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab
- message="$(gettext_printf "Loading kernel of Illumos ...")"
- cat << EOF
- insmod gzio
-diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in
---- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900
-+++ grub-2.00/util/grub.d/10_kfreebsd.in 2013-01-04 19:50:55.000000000 +0900
-@@ -54,7 +54,7 @@
- fi
-
- if [ -z "${prepare_module_dir_cache}" ]; then
-- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
-+ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | grub_add_tab)"
- fi
-
- printf '%s\n' "${prepare_module_dir_cache}"
-@@ -91,10 +91,10 @@
- echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
- fi
- if [ x$type != xrecovery ] ; then
-- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
-+ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
- fi
- if [ -z "${prepare_boot_cache}" ]; then
-- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
-+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
- fi
-
- printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
-@@ -112,7 +112,7 @@
-
- load_kfreebsd_module acpi true
-
-- for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do
-+ for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do
- case $abstraction in
- lvm) load_kfreebsd_module geom_linux_lvm false ;;
- esac
-@@ -122,10 +122,10 @@
- zfs)
- load_kfreebsd_module opensolaris false
-
-- ls "${dirname}/zfs/zpool.cache" > /dev/null
-+ ls "/boot/zfs/zpool.cache" > /dev/null
- printf '%s\n' "${prepare_boot_cache}"
- sed "s/^/$submenu_indentation/" << EOF
-- kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache
-+ kfreebsd_module $(make_system_path_relative_to_its_root /boot)/zfs/zpool.cache type=/boot/zfs/zpool.cache
- EOF
- ;;
- esac
-@@ -179,7 +179,7 @@
- case ${GRUB_FS} in
- zfs)
- # zpool name
-- kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE})
-+ kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE})
- # filesystem name (empty string for the main filesystem)
- kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")"
- ;;
-@@ -213,7 +213,7 @@
-
- if [ "x$is_first_entry" = xtrue ]; then
- kfreebsd_entry "${OS}" "${version}" simple
-- submenu_indentation="\t"
-+ submenu_indentation="$grub_tab"
-
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-diff -Nur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
---- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-19 06:24:38.000000000 +0900
-+++ grub-2.00/util/grub.d/10_linux.in 2013-01-04 19:50:55.000000000 +0900
-@@ -101,7 +101,7 @@
- echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
- fi
- if [ x$type != xrecovery ] ; then
-- save_default_entry | sed -e "s/^/\t/"
-+ save_default_entry | grub_add_tab
- fi
-
- # Use ELILO's generic "efifb" when it's known to be available.
-@@ -123,12 +123,12 @@
-
- if [ x$dirname = x/ ]; then
- if [ -z "${prepare_root_cache}" ]; then
-- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
-+ prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
- fi
- printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
- else
- if [ -z "${prepare_boot_cache}" ]; then
-- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
-+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
- fi
- printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- fi
-@@ -230,7 +230,7 @@
- linux_entry "${OS}" "${version}" simple \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-
-- submenu_indentation="\t"
-+ submenu_indentation="$grub_tab"
-
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-diff -Nur grub-2.00.orig/util/grub.d/10_netbsd.in grub-2.00/util/grub.d/10_netbsd.in
---- grub-2.00.orig/util/grub.d/10_netbsd.in 2012-03-05 04:47:35.000000000 +0900
-+++ grub-2.00/util/grub.d/10_netbsd.in 2013-01-04 19:50:55.000000000 +0900
-@@ -77,10 +77,10 @@
- prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,'
- case "${loader}" in
- knetbsd)
-- printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}"
-+ printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
- ;;
- multiboot)
-- printf "\tmodule %s\n" "${kmodule_rel}"
-+ printf "$grub_tabmodule %s\n" "${kmodule_rel}"
- ;;
- esac
- }
-@@ -121,11 +121,11 @@
- printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- case "${loader}" in
- knetbsd)
-- printf "\tknetbsd %s -r %s %s\n" \
-+ printf "$grub_tabknetbsd %s -r %s %s\n" \
- "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
- ;;
- multiboot)
-- printf "\tmultiboot %s %s root=%s %s\n" \
-+ printf "$grub_tabmultiboot %s %s root=%s %s\n" \
- "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
- ;;
- esac
-@@ -159,7 +159,7 @@
-
- if [ "x$is_first_entry" = xtrue ]; then
- netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
-- submenu_indentation="\t"
-+ submenu_indentation="$grub_tab"
-
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-diff -Nur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_windows.in
---- grub-2.00.orig/util/grub.d/10_windows.in 2012-03-05 06:11:43.000000000 +0900
-+++ grub-2.00/util/grub.d/10_windows.in 2013-01-04 19:50:55.000000000 +0900
-@@ -45,7 +45,7 @@
- sort | uniq | wc -l`" = 1 || return 1
-
- # Search 'default=PARTITION'
-- get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'`
-+ get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'`
- test -n "$get_os_name_from_boot_ini_part" || return 1
-
- # Search 'PARTITION="NAME" ...'
-@@ -87,8 +87,8 @@
- menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
- EOF
-
-- save_default_entry | sed -e 's,^,\t,'
-- prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
-+ save_default_entry | sed -e 's,^,$grub_tab,'
-+ prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,'
- test -z "$needmap" || cat <<EOF
- drivemap -s (hd0) \$root
- EOF
-diff -Nur grub-2.00.orig/util/grub.d/10_xnu.in grub-2.00/util/grub.d/10_xnu.in
---- grub-2.00.orig/util/grub.d/10_xnu.in 2012-05-29 19:31:03.000000000 +0900
-+++ grub-2.00/util/grub.d/10_xnu.in 2013-01-04 19:50:55.000000000 +0900
-@@ -39,8 +39,8 @@
- cat << EOF
- menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
- EOF
-- save_default_entry | sed -e "s/^/ /"
-- prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/ /"
-+ save_default_entry | grub_add_tab
-+ prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
- cat << EOF
- load_video
- set do_resume=0
-diff -Nur grub-2.00.orig/util/grub.d/20_linux_xen.in grub-2.00/util/grub.d/20_linux_xen.in
---- grub-2.00.orig/util/grub.d/20_linux_xen.in 2012-06-04 04:57:42.000000000 +0900
-+++ grub-2.00/util/grub.d/20_linux_xen.in 2013-01-04 19:50:55.000000000 +0900
-@@ -110,11 +110,11 @@
- echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
- fi
- if [ x$type != xrecovery ] ; then
-- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
-+ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
- fi
-
- if [ -z "${prepare_boot_cache}" ]; then
-- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
-+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
- fi
- printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
- xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
-@@ -236,7 +236,7 @@
- linux_entry "${OS}" "${version}" "${xen_version}" simple \
- "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
-
-- submenu_indentation="\t\t"
-+ submenu_indentation="$grub_tab$grub_tab"
-
- if [ -z "$boot_device_id" ]; then
- boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
-diff -Nur grub-2.00.orig/util/grub.d/30_os-prober.in grub-2.00/util/grub.d/30_os-prober.in
---- grub-2.00.orig/util/grub.d/30_os-prober.in 2012-03-05 05:52:03.000000000 +0900
-+++ grub-2.00/util/grub.d/30_os-prober.in 2013-01-04 19:50:55.000000000 +0900
-@@ -54,8 +54,8 @@
- cat << EOF
- menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
- EOF
-- save_default_entry | sed -e "s/^/\t/"
-- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
-+ save_default_entry | grub_add_tab
-+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
- cat << EOF
- load_video
- set do_resume=0
-@@ -126,8 +126,8 @@
- cat << EOF
- menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
- EOF
-- save_default_entry | sed -e "s/^/\t/"
-- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
-+ save_default_entry | grub_add_tab
-+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
-
- case ${LONGNAME} in
- Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
-@@ -181,14 +181,14 @@
- used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
-
- if [ -z "${prepare_boot_cache}" ]; then
-- prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
-+ prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
- fi
-
- if [ "x$is_first_entry" = xtrue ]; then
- cat << EOF
- menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
- EOF
-- save_default_entry | sed -e "s/^/\t/"
-+ save_default_entry | grub_add_tab
- printf '%s\n' "${prepare_boot_cache}"
- cat << EOF
- linux ${LKERNEL} ${LPARAMS}
-@@ -208,8 +208,8 @@
- cat << EOF
- menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
- EOF
-- save_default_entry | sed -e "s/^/\t\t/"
-- printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
-+ save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
-+ printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
- cat << EOF
- linux ${LKERNEL} ${LPARAMS}
- EOF
-@@ -243,8 +243,8 @@
- cat << EOF
- menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
- EOF
-- save_default_entry | sed -e "s/^/\t/"
-- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
-+ save_default_entry | grub_add_tab
-+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
- grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
- mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
- grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
diff --git a/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch b/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch
deleted file mode 100644
index 8019a3c..0000000
--- a/sys-boot/grub/files/grub-2.00-hardcoded-awk.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=424137
-https://savannah.gnu.org/bugs/?37558
-https://code.google.com/p/original-mawk/issues/detail?id=17
---- grub-core/Makefile.am 2012-07-07 12:29:01 +0000
-+++ grub-core/Makefile.am 2012-10-12 13:04:02 +0000
-@@ -349,7 +349,7 @@
-
- # generate global module dependencies list
- moddep.lst: syminfo.lst genmoddep.awk video.lst
-- cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
-+ cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
- platform_DATA += moddep.lst
- CLEANFILES += config.log syminfo.lst moddep.lst
-
-
diff --git a/sys-boot/grub/files/grub-2.00-no-gets.patch b/sys-boot/grub/files/grub-2.00-no-gets.patch
deleted file mode 100644
index c21d4b9..0000000
--- a/sys-boot/grub/files/grub-2.00-no-gets.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-hack until gzip pulls a newer gnulib version
-
-From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
-From: Eric Blake <eblake@redhat.com>
-Date: Thu, 29 Mar 2012 13:30:41 -0600
-Subject: [PATCH] stdio: don't assume gets any more
-
-Gnulib intentionally does not have a gets module, and now that C11
-and glibc have dropped it, we should be more proactive about warning
-any user on a platform that still has a declaration of this dangerous
-interface.
-
---- a/grub-core/gnulib/stdio.in.h
-+++ b/grub-core/gnulib/stdio.in.h
-@@ -125,7 +125,6 @@
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
- #undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/sys-boot/grub/files/grub-2.00-parallel-make.patch b/sys-boot/grub/files/grub-2.00-parallel-make.patch
deleted file mode 100644
index 8af8b36..0000000
--- a/sys-boot/grub/files/grub-2.00-parallel-make.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Fix parallel make problems.
-Upstream changesets 4547, 4552.
---- gentpl.py
-+++ gentpl.py
-@@ -487,7 +487,7 @@
- def manpage():
- r = "if COND_MAN_PAGES\n"
- r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
-- r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
-+ r += rule("[+ name +].[+ mansection +]", "[+ name +] grub-mkconfig_lib", """
- chmod a+x [+ name +]
- PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
- """)
---- grub-core/Makefile.am
-+++ grub-core/Makefile.am
-@@ -63,7 +63,7 @@
- rs_decoder.S: $(srcdir)/lib/reed_solomon.c
- $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
-
--kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
-+boot/i386/pc/startup_raw.S: $(builddir)/rs_decoder.S
- boot/mips/loongson/fwstart.S: $(builddir)/sm712_start.S
-
- CLEANFILES += grub_script.yy.c grub_script.yy.h
diff --git a/sys-boot/grub/files/grub-2.00-tftp-endian.patch b/sys-boot/grub/files/grub-2.00-tftp-endian.patch
deleted file mode 100644
index f4e5644..0000000
--- a/sys-boot/grub/files/grub-2.00-tftp-endian.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=438612
-
-=== modified file 'grub-core/net/tftp.c'
---- grub-core/net/tftp.c 2012-06-22 20:04:16 +0000
-+++ grub-core/net/tftp.c 2012-07-02 09:22:50 +0000
-@@ -143,7 +143,7 @@
-
- tftph_ack = (struct tftphdr *) nb_ack.data;
- tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
-- tftph_ack->u.ack.block = block;
-+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
-
- err = grub_net_send_udp_packet (data->sock, &nb_ack);
- if (err)
-@@ -225,7 +225,7 @@
- grub_priority_queue_pop (data->pq);
-
- if (file->device->net->packs.count < 50)
-- err = ack (data, tftph->u.data.block);
-+ err = ack (data, data->block + 1);
- else
- {
- file->device->net->stall = 1;
-
diff --git a/sys-boot/grub/files/grub.conf.gentoo b/sys-boot/grub/files/grub.conf.gentoo
deleted file mode 100644
index 0027099..0000000
--- a/sys-boot/grub/files/grub.conf.gentoo
+++ /dev/null
@@ -1,16 +0,0 @@
-# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
-# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
-# If you are not using Genkernel and you need help creating this file, you
-# should consult the handbook. Alternatively, consult the grub.conf.sample that
-# is included with the Grub documentation.
-
-default 0
-timeout 30
-#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
-
-#title Gentoo Linux 2.6.24-r5
-#root (hd0,0)
-#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
-#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
-
-# vim:ft=conf:
diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default
deleted file mode 100644
index 061e4d1..0000000
--- a/sys-boot/grub/files/grub.default
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default,v 1.3 2012/02/29 01:52:23 floppym Exp $
-#
-# To populate all changes in this file you need to regenerate your
-# grub configuration file afterwards:
-# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
-#
-# See the grub info page for documentation on possible variables and
-# their associated values.
-
-GRUB_DISTRIBUTOR="Gentoo"
-
-GRUB_DEFAULT=0
-GRUB_HIDDEN_TIMEOUT=0
-GRUB_HIDDEN_TIMEOUT_QUIET=true
-GRUB_TIMEOUT=10
-
-GRUB_CMDLINE_LINUX_DEFAULT=""
-GRUB_CMDLINE_LINUX=""
-
-# Uncomment to disable graphical terminal (grub-pc only)
-#GRUB_TERMINAL=console
-
-# The resolution used on graphical terminal.
-# Note that you can use only modes which your graphic card supports via VBE.
-# You can see them in real GRUB with the command `vbeinfo'.
-#GRUB_GFXMODE=640x480
-
-# Background image used on graphical terminal.
-# Can be in various bitmap formats.
-#GRUB_BACKGROUND="/boot/grub2/mybackground.png"
-
-# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
-#GRUB_DISABLE_LINUX_UUID=true
-
-# Uncomment to disable generation of recovery mode menu entries
-#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/files/grub.default-2 b/sys-boot/grub/files/grub.default-2
deleted file mode 100644
index 392a3ae..0000000
--- a/sys-boot/grub/files/grub.default-2
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.2 2012/06/28 22:36:53 floppym Exp $
-#
-# To populate all changes in this file you need to regenerate your
-# grub configuration file afterwards:
-# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
-#
-# See the grub info page for documentation on possible variables and
-# their associated values.
-
-GRUB_DISTRIBUTOR="Gentoo"
-
-GRUB_DEFAULT=0
-GRUB_HIDDEN_TIMEOUT=0
-GRUB_HIDDEN_TIMEOUT_QUIET=true
-GRUB_TIMEOUT=10
-
-GRUB_CMDLINE_LINUX_DEFAULT=""
-GRUB_CMDLINE_LINUX=""
-
-# Uncomment to disable graphical terminal (grub-pc only)
-#GRUB_TERMINAL=console
-
-# The resolution used on graphical terminal.
-# Note that you can use only modes which your graphic card supports via VBE.
-# You can see them in real GRUB with the command `vbeinfo'.
-#GRUB_GFXMODE=640x480
-
-# Path to theme spec txt file.
-# The starfield is by default provided with use truetype.
-# NOTE: when enabling custom theme, ensure you have required font/etc.
-#GRUB_THEME="/boot/grub2/themes/starfield/theme.txt"
-
-# Background image used on graphical terminal.
-# Can be in various bitmap formats.
-#GRUB_BACKGROUND="/boot/grub2/mybackground.png"
-
-# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
-#GRUB_DISABLE_LINUX_UUID=true
-
-# Uncomment to disable generation of recovery mode menu entries
-#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/grub-2.00-r1.ebuild b/sys-boot/grub/grub-2.00-r1.ebuild
deleted file mode 100644
index e2035c6..0000000
--- a/sys-boot/grub/grub-2.00-r1.ebuild
+++ /dev/null
@@ -1,352 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.3 2012/10/20 21:46:34 floppym Exp $
-
-EAPI=4
-
-if [[ ${PV} == "9999" ]] ; then
- EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
- LIVE_ECLASS="bzr"
- SRC_URI=""
- DO_AUTORECONF="true"
-else
- MY_P=${P/_/\~}
- if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
- SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
- else
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
- mirror://gentoo/${MY_P}.tar.xz"
- fi
- KEYWORDS="~amd64 ~x86"
- S=${WORKDIR}/${MY_P}
- DO_AUTORECONF="true"
-fi
-
-inherit eutils flag-o-matic multiprocessing pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
-unset LIVE_ECLASS
-
-DESCRIPTION="GNU GRUB boot loader"
-HOMEPAGE="http://www.gnu.org/software/grub/"
-
-LICENSE="GPL-3"
-SLOT="2"
-IUSE="custom-cflags debug device-mapper doc efiemu mount nls static sdl truetype libzfs"
-
-GRUB_PLATFORMS=(
- # everywhere:
- emu
- # mips only:
- qemu-mips yeeloong
- # amd64, x86, ppc, ppc64:
- ieee1275
- # amd64, x86:
- coreboot multiboot efi-32 pc qemu
- # amd64, ia64:
- efi-64
-)
-IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}"
-
-REQUIRED_USE="grub_platforms_qemu? ( truetype )"
-
-# os-prober: Used on runtime to detect other OSes
-# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
-RDEPEND="
- app-arch/xz-utils
- >=sys-libs/ncurses-5.2-r5
- debug? (
- sdl? ( media-libs/libsdl )
- )
- device-mapper? ( >=sys-fs/lvm2-2.02.45 )
- libzfs? ( sys-fs/zfs )
- mount? ( sys-fs/fuse )
- truetype? (
- media-libs/freetype
- media-fonts/dejavu
- >=media-fonts/unifont-5
- )
- ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
- ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
-"
-DEPEND="${RDEPEND}
- >=dev-lang/python-2.5.2
- sys-devel/flex
- sys-devel/bison
- sys-apps/help2man
- sys-apps/texinfo
- static? (
- truetype? (
- app-arch/bzip2[static-libs(+)]
- media-libs/freetype[static-libs(+)]
- sys-libs/zlib[static-libs(+)]
- )
- )
-"
-RDEPEND+="
- kernel_linux? (
- grub_platforms_efi-32? ( sys-boot/efibootmgr )
- grub_platforms_efi-64? ( sys-boot/efibootmgr )
- )
-"
-if [[ -n ${DO_AUTORECONF} ]] ; then
- DEPEND+=" >=sys-devel/autogen-5.10"
-else
- DEPEND+=" app-arch/xz-utils"
-fi
-
-export STRIP_MASK="*/grub/*/*.{mod,img}"
-
-QA_EXECSTACK="
- usr/bin/grub*
- usr/sbin/grub*
- usr/lib*/grub/*/*.mod
- usr/lib*/grub/*/kernel.exec
- usr/lib*/grub/*/kernel.img
- usr/lib*/grub/*/setjmp.module
-"
-
-QA_WX_LOAD="
- usr/lib*/grub/*/kernel.exec
- usr/lib*/grub/*/kernel.img
- usr/lib*/grub/*/*.image
-"
-
-QA_PRESTRIPPED="
- usr/lib.*/grub/.*/kernel.img
-"
-
-grub_run_phase() {
- local phase=$1
- local platform=$2
- [[ -z ${phase} || -z ${platform} ]] && die "${FUNCNAME} [phase] [platform]"
-
- [[ -d "${WORKDIR}/build-${platform}" ]] || \
- { mkdir "${WORKDIR}/build-${platform}" || die ; }
- pushd "${WORKDIR}/build-${platform}" > /dev/null || die
-
- echo ">>> Running ${phase} for platform \"${platform}\""
- echo ">>> Working in: \"${WORKDIR}/build-${platform}\""
-
- grub_${phase} ${platform}
-
- popd > /dev/null || die
-}
-
-grub_src_configure() {
- local platform=$1
- local with_platform=
- local enable_efiemu="--disable-efiemu"
-
- [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
-
- # Used below for efi cross-building
- tc-export CC NM OBJCOPY STRIP
-
- estack_push CTARGET "${CTARGET}"
- estack_push TARGET_CC "${TARGET_CC}"
- estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
- estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}"
-
- case ${platform} in
- efi-32)
- if [[ ${CHOST} == x86_64* ]]; then
- CTARGET="${CTARGET:-i386}"
- TARGET_CC="${TARGET_CC:-${CC}}"
- export TARGET_CC
- fi
- with_platform="--with-platform=efi"
- ;;
- efi-64)
- if [[ ${CHOST} == i?86* ]]; then
- CTARGET="${CTARGET:-x86_64}"
- TARGET_CC="${TARGET_CC:-${CC}}"
- TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
- TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
- export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
- fi
- with_platform="--with-platform=efi"
- ;;
- guessed) ;;
- *)
- with_platform="--with-platform=${platform}"
- case ${CTARGET:-${CHOST}} in
- i?86*|x86_64*)
- enable_efiemu=$(use_enable efiemu)
- ;;
- esac
- ;;
- esac
-
- ECONF_SOURCE="${S}" \
- econf \
- --libdir=/usr/lib \
- --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --disable-werror \
- --program-prefix= \
- --program-transform-name="s,grub,grub2," \
- --with-grubdir=grub2 \
- ${with_platform} \
- $(use_enable debug mm-debug) \
- $(use_enable debug grub-emu-usb) \
- $(use_enable device-mapper) \
- ${enable_efiemu} \
- $(use_enable mount grub-mount) \
- $(use_enable nls) \
- $(use_enable truetype grub-mkfont) \
- $(use_enable libzfs) \
- $(use sdl && use_enable debug grub-emu-sdl)
-
- estack_pop CTARGET CTARGET || die
- estack_pop TARGET_CC TARGET_CC || die
- estack_pop TARGET_CFLAGS TARGET_CFLAGS || die
- estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die
-}
-
-grub_src_compile() {
- default_src_compile
- pax-mark -mpes "${grub_binaries[@]}"
-}
-
-grub_build_docs() {
- emake -C docs html
-}
-
-grub_src_install() {
- default_src_install
-}
-
-grub_install_docs() {
- emake -C docs DESTDIR="${D}" install-html
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- # Bug 439082
- if $(tc-getLD) --version | grep -q "GNU gold"; then
- eerror "GRUB does not function correctly when built with the gold linker."
- eerror "Please select the bfd linker with binutils-config."
- die "GNU gold detected"
- fi
- fi
-}
-
-src_prepare() {
- if [[ ${PV} != 9999 ]]; then
- epatch "${FILESDIR}/${P}-parallel-make.patch" #424231
- epatch "${FILESDIR}/${P}-no-gets.patch" #424703
- epatch "${FILESDIR}/${P}-config-quoting.patch" #426364
- epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612
- epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137
- epatch "${FILESDIR}/${P}-fbsd.patch"
- fi
-
- # fix texinfo file name, bug 416035
- sed -i \
- -e 's/^\* GRUB:/* GRUB2:/' \
- -e 's/(grub)/(grub2)/' -- \
- "${S}"/docs/grub.texi
-
- epatch_user
-
- # autogen.sh does more than just run autotools
- if [[ -n ${DO_AUTORECONF} ]] ; then
- sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die
- (
- autopoint() { :; }
- . ./autogen.sh
- ) || die
- fi
-
- # install into the right dir for eselect #372735
- sed -i \
- -e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
- util/bash-completion.d/Makefile.in || die
-
- # get enabled platforms
- GRUB_ENABLED_PLATFORMS=""
- local i
- for i in ${GRUB_PLATFORMS[@]}; do
- use grub_platforms_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
- done
- [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && GRUB_ENABLED_PLATFORMS="guessed"
- einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
-}
-
-src_configure() {
- local i
-
- use custom-cflags || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
- use static && append-ldflags -static
- use elibc_FreeBSD && append-cppflags "-isystem /usr/include"
-
- # Sandbox bug 404013.
- use libzfs && addpredict /etc/dfs:/dev/zfs
-
- multijob_init
- for i in ${GRUB_ENABLED_PLATFORMS}; do
- multijob_child_init grub_run_phase ${FUNCNAME} ${i}
- done
- multijob_finish || die
-}
-
-src_compile() {
- # Used for pax marking in grub_src_compile
- local grub_binaries=(
- grub-editenv
- grub-fstest
- grub-menulst2cfg
- grub-mkimage
- grub-mklayout
- grub-mkpasswd-pbkdf2
- grub-mkrelpath
- grub-script-check
- grub-bios-setup
- grub-ofpathname
- grub-probe
- grub-sparc64-setup
- )
- use mount && grub_binaries+=( grub-mount )
- use truetype && grub_binaries+=( grub-mkfont )
-
- local i
-
- for i in ${GRUB_ENABLED_PLATFORMS}; do
- grub_run_phase ${FUNCNAME} ${i}
- done
-
- # Just build docs once
- use doc && grub_run_phase build_docs ${i}
-}
-
-src_install() {
- local i
-
- for i in ${GRUB_ENABLED_PLATFORMS}; do
- grub_run_phase ${FUNCNAME} ${i}
- done
-
- use doc && grub_run_phase install_docs ${i}
-
- mv "${ED}"usr/share/info/grub{,2}.info || die
-
- # can't be in docs array as we use default_src_install in different builddir
- dodoc AUTHORS ChangeLog NEWS README THANKS TODO
- insinto /etc/default
- newins "${FILESDIR}"/grub.default-2 grub
-}
-
-pkg_postinst() {
- # display the link to guide
- elog "For information on how to configure grub-2 please refer to the guide:"
- elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
- if ! has_version sys-boot/os-prober; then
- elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
- fi
- if ! has_version dev-libs/libisoburn; then
- elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
- fi
- if has_version sys-boot/grub:0; then
- ewarn "If you want to keep GRUB Legacy (grub-0.97) installed, please run"
- ewarn "the following to add sys-boot/grub:0 to your world file."
- ewarn "emerge --noreplace sys-boot/grub:0"
- fi
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-07 11:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 11:17 [gentoo-commits] proj/gentoo-bsd:master commit in: sys-boot/grub/files/, sys-boot/grub/ Yuta SATOH
-- strict thread matches above, loose matches on Subject: below --
2013-01-07 11:18 Yuta SATOH
2013-01-04 11:06 Yuta SATOH
2012-12-01 14:24 Yuta SATOH
2012-11-06 15:09 Yuta SATOH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox