summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-05-30 18:46:17 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-05-30 18:46:17 +0200
commit56805c0994230a9fdab5014c9200a13cfc35dca7 (patch)
tree0df47dfb2ee81596339423391b46a7443d7c589b
parentremove old net-misc/iputils (diff)
downloadportage-56805c0994230a9fdab5014c9200a13cfc35dca7.tar.xz
sys-boot/grub: Refresh with upstream release
Package-Manager: portage-2.1.12.2
-rw-r--r--sys-boot/grub/ChangeLog12
-rw-r--r--sys-boot/grub/Manifest14
-rw-r--r--sys-boot/grub/files/1.99-call_proper_grub_probe.patch12
-rw-r--r--sys-boot/grub/files/1.99-do_not_stat_so_often.patch65
-rw-r--r--sys-boot/grub/files/1.99-improve_devmapper.patch279
-rw-r--r--sys-boot/grub/files/1.99-stat_root_device_properly-p1.patch21
-rw-r--r--sys-boot/grub/files/1.99-stat_root_device_properly-p2.patch21
-rw-r--r--sys-boot/grub/files/grub-0.97-gpt.patch315
-rw-r--r--sys-boot/grub/files/grub-1.95-build.patch15
-rw-r--r--sys-boot/grub/files/grub-1.96-genkernel.patch11
-rw-r--r--sys-boot/grub/files/grub.default6
-rw-r--r--sys-boot/grub/grub-0.97-r13.ebuild (renamed from sys-boot/grub/grub-0.97-r12.ebuild)98
12 files changed, 70 insertions, 799 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index 49be14ad..1f0c4bd0 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -2,6 +2,17 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*grub-0.97-r13 (30 May 2013)
+
+ 30 May 2013; Bertrand Jacquin <beber@meleeweb.net> +grub-0.97-r13.ebuild,
+ -files/1.99-call_proper_grub_probe.patch,
+ -files/1.99-do_not_stat_so_often.patch, -files/1.99-improve_devmapper.patch,
+ -files/1.99-stat_root_device_properly-p1.patch,
+ -files/1.99-stat_root_device_properly-p2.patch, -files/grub-0.97-gpt.patch,
+ -files/grub-1.95-build.patch, -files/grub-1.96-genkernel.patch,
+ -grub-0.97-r12.ebuild, files/grub.default:
+ sys-boot/grub: Refresh with upstream release
+
28 May 2013; Bertrand Jacquin <beber@meleeweb.net> grub-0.97-r12.ebuild:
remove prepalldocs
@@ -49,4 +60,3 @@
grub: fix netboot build
Gentoo #139277
-
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index 1060746c..b796ee58 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -1,8 +1,3 @@
-AUX 1.99-call_proper_grub_probe.patch 536 SHA256 0e27b4ba6a0deedef2f65822e3b76aea4a817cb7219b01c29c8f682c450bd5e8 WHIRLPOOL eda7dece32b1c3f74227b4f0e53e8846e30f0d56239c512ae17d852fa36825294b314d2c1af8d10807cf345201e31e37762fd556f2c2390ae9de9327129a8df0
-AUX 1.99-do_not_stat_so_often.patch 1731 SHA256 a33fdbcab7fa4ad66b26598d9a6f1703f419229058c1e9c9c14edb6272783727 WHIRLPOOL bb8e382e4822a03028340092e67ccfc84f5608a4600b329b85c1b325b01d6c0476223e0e102b0948e4ea4cf7cbf310c56468f3c703a72edb5383b8eda30f7f8d
-AUX 1.99-improve_devmapper.patch 7134 SHA256 b12624944d129820966146d55693b325d48d5d56901727142e386be082661778 WHIRLPOOL 5e168f740d81e20122acbe1cbfb37cbcb09ba27d1ed2edc537825664107aa416aae5d87ffb96207768a186ba2309e64925a9b9d0f67163fcee7568408e4bac59
-AUX 1.99-stat_root_device_properly-p1.patch 698 SHA256 1facf84e5195eb98b390e43e0a0d6f791e9500ef678b025e95f96d5a2769da5a WHIRLPOOL 92e0cd474b2277876037e602ed47b76b62fe2becc98a0704c9de7ca318f97d89c5a137473fbc558eeea7fed907e49293a61ae3c0a914ec365b2558db37cd4e04
-AUX 1.99-stat_root_device_properly-p2.patch 621 SHA256 431876459562c0aae6e854a97eeaf0cacdad8ceb5477788a4d691e4e6fa613eb WHIRLPOOL b94e253e2169e8b3a958cb49db81a86aa7d35de29b3fdfc9c58121f18496dcf440b4abe7b07c6d952f3f2172155958100b60795d96485108f874fa163d8c1883
AUX formilux/0002_all_save-default-entry-on-mbr.patch 2915 SHA256 7177b8f2c75886cf5f97cf623ab4b86bb7818effc4472f2f8f208b4269663d7a WHIRLPOOL 3a038809cae93b412bf712b2f76070b35d58ffb48e09c8d3729a6466e8dca03a7c08afdbf2c72520aa3551cfd48af27ac8bb0ad0cbf88e35bdb11717cfb23a6c
AUX formilux/0003_all_add-grub-mbr-default3.patch 6097 SHA256 3bc1c5488bd8e9b9038374b62bf88d0c4eedd2a32a2e8bf63c8a52039a4f8164 WHIRLPOOL b49e110f6b418f1660cbf430ad9517ffcac88aa468c4da2cce2d757c4cafd743f69a5b64a146ea479fa633f6a6f5de1de774cbb792feead705b8423eb37280b1
AUX formilux/0004_all_add-support-for-the-savemap-keyword.patch 2751 SHA256 9bed3175a97b1b35d4e4c08901d3b3c73ddb3b255736dd3165da1e9c0defc885 WHIRLPOOL 13cd9c09ae9daa4610231a358eb3756e7ecc582a419ae9990052a055513fd7c67398e9ae2cbc072d70f6e364b1288c1cbc87003ed1fe7d8967d9ed5cc864f81a
@@ -13,14 +8,11 @@ AUX formilux/0008_all_documentation-savemap.patch 10770 SHA256 da81461e3128fed1c
AUX formilux/0009_all_sample-config-files-using-savemap.patch 2750 SHA256 226287798b8669d069638d2df6918a028e5c7462794ae0febba70813e2efac9f WHIRLPOOL 0d4eb2ad32a1e09a376419425e5a5a2007f5397fdd0eecec5f1cea22ee1feb559b698e6d41105958aea7c7d74cf4856060d84e4d9b8e5bd2306b6a9097805c28
AUX formilux/0010_all_print-a-dot-for-each-disk-I-O-in-debug-mode.patch 1386 SHA256 93bea20c2b4676b893d1de6ac25d10bb83df7c8ac2f1f0e67fc2e5ece1193a7e WHIRLPOOL 731cff1039cf136c25e4b3eccf276f6a36817850c65d5a59f2783770332e540c7153409fa09b17105a73f525652737bc824b60b70e0e9948e3a342c0b3ef47c3
AUX formilux/0011_all_add-a-debug-message-booting-image-now-just-before.patch 483 SHA256 02ed78b94fb1e24b8c4c7df7f9182fad099bf1c420237cda39a490ea96dfa57e WHIRLPOOL 2e1e4d107586fdf02555dfbe80e62b372ef20125a389a9f005050dffb8bb4767c77e2d5312d64edb8b576e24b878ffd2913214604487532c294c63b246e20bc2
-AUX grub-0.97-gpt.patch 10682 SHA256 5e38046cfb727420e5b4b19d71c7fb4ddff22cbcc356c9f888763b0c1963d389 WHIRLPOOL 22b3d12124115ec78fff2b3699c44d3b2c0bb84bec673e36d66e73c9da89137d237b1c7681b671ce89b06b2f4d78f9999eca98f43aa284d2b610713fc4161226
-AUX grub-1.95-build.patch 522 SHA256 26d45247376f1e42b4197088161146173ea5bee3800282a707b331c49aed6ccf WHIRLPOOL df1b2482d0af05b3e6a681a567f3d77eca0b997b20fd4b84a5fbb50c6bf440e363d7a2dd4a8d98108261a3cacb2b548fec337823ae95ad43e44fd05b52af419e
-AUX grub-1.96-genkernel.patch 298 SHA256 8cbbaf1db68c39dfcc30b59779d820e9e9dca7ef957431791cdc0fc24e258eaf WHIRLPOOL 4f4a6e3f4451df9574abcc42ccbf6dafd603bbc7d90d46f72830b217e10db6007075af4db040c834ef7200173063f630c7160f13d5ea8545fce6fbef10b60cd1
AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 WHIRLPOOL fcaef85cd7c2c446c882874cf4ec8a2241d1fc97720973a0a0cd1add259da599d4dae4d0b429ba2dff0307ed2d4598d5939cbc1b11127a0dedb3a54249ec9f81
-AUX grub.default 1229 SHA256 1ca3065f28c72043036fdc19565e66b1315928c725765463b2c6037e04deb1c5 WHIRLPOOL ec83659ffca38b08f97ac3b272fa64794a13c11c5b153f901a5f38c28d616751c5876e445e21367e58e60ae28cb241499229df697f8deeff8e6f9487d35ab4d5
+AUX grub.default 1254 SHA256 97f10c0421641b03cdb1f63496a1b10fbdeeb4b97e74c6804929f908729fb440 WHIRLPOOL 9aa39029fdbe1b2f1498785ae84f76c571e4ae2e80cecfcdcc7dd2c9bd11cfa88f4ab4b69c00994e028a1f921edecd37613c3b5e1523e979f8f38f09608992f3
DIST grub-0.97-patches-1.14.tar.bz2 52916 SHA256 5c7ca31fd9b2123471daf2e46a1936c4044ad0c12e353d9d3d8c3f83a1c7a0e5 WHIRLPOOL 60abd5087e85d9969784b9f5a100934606a76da03b665533d9d4d1d13f4e2d15de233a71e67a32d18a5fbfe128c2c8bf04c0d4451de24e6ca4fbd8dd862e23ea
DIST grub-0.97.tar.gz 971783 SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b WHIRLPOOL 0ad7f5dc035e2a3ad5fd29b6388f06fd12a8cc694117b4cbd42b5302433aa522db23566222d35219fe17fb95edb5090553156198507f70208eda5d858fd52dd5
DIST splash.xpm.gz 33856 SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf WHIRLPOOL d95b7b588ea8ac7c2c8c53eb8057aef21c825da6411afe3b7e864c606aeffaaebce8ae41ce3e979f277bd6b48a9e82a1f2ea8afc836213b56523d8a854227d7b
-EBUILD grub-0.97-r12.ebuild 9274 SHA256 a1b9c18335dd50b435afae83fdf62b34ae3cdb410ef6b27fee8521f3f39fbb57 WHIRLPOOL a42bde4c7b4b3deeaf0f7a99c3c938a5f2bbcb67892a83be0c55b05dc09eaac32184767e792781a92be7a35582842e4517970425f5dc23f711c642fc2efb4367
-MISC ChangeLog 2155 SHA256 4019a9d1ae292d023430fa71d3dfcb8dbc5cf0a7bcfde65b376f37a5f2c5703b WHIRLPOOL 0f16f05a99f2d42443fb0ecf13d8419eadbe93d8fbc9cbd8aa8dd97a86f14a126590717d385f6c839d7c4ce19e014c51d549d9557fc76aca08f54accd05437a7
+EBUILD grub-0.97-r13.ebuild 9437 SHA256 2355a22199627ce512b8d2365cedaa9599c7d7c8051babcc6a1e32a2d42bf1c0 WHIRLPOOL 2224867d5b5b8c9334be78995c7aa6b7b5b75b7a0a444669e49c31008b85100397aa9e4b054f72ca84c379b7510cbd934db73cf4c4edd14c816f67ffe663bb3e
+MISC ChangeLog 2670 SHA256 4ebbf0287d71df334287816ae0e8b554b79db94ca7bc68c25594bd1471a81986 WHIRLPOOL 4b2cf8a6b5157fee6b4cd1965b4716a1021838ff74d0c6fa2c87e545ca2c0287c01ef67b66ec7dd97cc4e3d4a511e2fad1ace57230ef6d4e83c67856f81bfc1e
MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630
diff --git a/sys-boot/grub/files/1.99-call_proper_grub_probe.patch b/sys-boot/grub/files/1.99-call_proper_grub_probe.patch
deleted file mode 100644
index 6d65b5f8..00000000
--- a/sys-boot/grub/files/1.99-call_proper_grub_probe.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN grub-1.99/util/grub.d/30_os-prober.in grub-1.99.new/util/grub.d/30_os-prober.in
---- grub-1.99/util/grub.d/30_os-prober.in 2010-12-25 18:13:57.000000000 +0100
-+++ grub-1.99.new/util/grub.d/30_os-prober.in 2011-08-28 12:35:40.965038455 +0200
-@@ -168,7 +168,7 @@
- done
- ;;
- macosx)
-- OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
-+ OSXUUID="`${grub_probe} --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
- osx_entry xnu_kernel 32
- osx_entry xnu_kernel64 64
- ;;
diff --git a/sys-boot/grub/files/1.99-do_not_stat_so_often.patch b/sys-boot/grub/files/1.99-do_not_stat_so_often.patch
deleted file mode 100644
index ca8a0239..00000000
--- a/sys-boot/grub/files/1.99-do_not_stat_so_often.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- grub-core/kern/emu/getroot.c 2011-05-18 07:35:47 +0000
-+++ grub-core/kern/emu/getroot.c 2011-05-21 05:03:55 +0000
-@@ -358,7 +358,7 @@
-
- if (S_ISLNK (st.st_mode)) {
- #ifdef __linux__
-- if (strcmp (dir, "mapper") == 0) {
-+ if (strcmp (dir, "mapper") == 0 || strcmp (dir, "/dev/mapper") == 0) {
- /* Follow symbolic links under /dev/mapper/; the canonical name
- may be something like /dev/dm-0, but the names under
- /dev/mapper/ are more human-readable and so we prefer them if
-@@ -609,20 +609,27 @@
-
- if (os_dev)
- {
-- if (stat (os_dev, &st) >= 0)
-- dev = st.st_rdev;
-- else
-+ char *tmp = os_dev;
-+ os_dev = canonicalize_file_name (os_dev);
-+ free (tmp);
-+ }
-+
-+ if (os_dev)
-+ {
-+ if (strncmp (os_dev, "/dev/dm-", sizeof ("/dev/dm-") - 1) != 0)
-+ return os_dev;
-+ if (stat (os_dev, &st) < 0)
- grub_util_error ("cannot stat `%s'", os_dev);
- free (os_dev);
-- }
-- else
-- {
-- if (stat (dir, &st) >= 0)
-- dev = st.st_dev;
-- else
-- grub_util_error ("cannot stat `%s'", dir);
-- }
--
-+ dev = st.st_rdev;
-+ return grub_find_device ("/dev/mapper", dev);
-+ }
-+
-+ if (stat (dir, &st) < 0)
-+ grub_util_error ("cannot stat `%s'", dir);
-+
-+ dev = st.st_dev;
-+
- #ifdef __CYGWIN__
- /* Cygwin specific function. */
- os_dev = grub_find_device (dir, dev);
-
---- grub-core/kern/emu/hostdisk.c 2011-05-18 07:35:47 +0000
-+++ grub-core/kern/emu/hostdisk.c 2011-05-21 05:03:55 +0000
-@@ -1408,7 +1408,8 @@
- if (tree)
- dm_tree_free (tree);
- free (path);
-- char *ret = grub_find_device (NULL, (major << 8) | minor);
-+ char *ret = grub_find_device ("/dev/mapper",
-+ (major << 8) | minor);
- return ret;
- }
-
-
diff --git a/sys-boot/grub/files/1.99-improve_devmapper.patch b/sys-boot/grub/files/1.99-improve_devmapper.patch
deleted file mode 100644
index 5f0a930e..00000000
--- a/sys-boot/grub/files/1.99-improve_devmapper.patch
+++ /dev/null
@@ -1,279 +0,0 @@
---- grub-core/kern/emu/getroot.c 2011-04-21 09:26:29 +0000
-+++ grub-core/kern/emu/getroot.c 2011-05-18 07:35:47 +0000
-@@ -34,6 +34,10 @@
- #include <stdint.h>
- #include <grub/util/misc.h>
-
-+#ifdef HAVE_DEVICE_MAPPER
-+# include <libdevmapper.h>
-+#endif
-+
- #ifdef __GNU__
- #include <hurd.h>
- #include <hurd/lookup.h>
-@@ -634,32 +638,65 @@
- }
-
- static int
--grub_util_is_dmraid (const char *os_dev)
-+grub_util_is_lvm (const char *os_dev)
- {
-- if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/isw_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/hpt37x_", 19))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/hpt45x_", 19))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/via_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/lsi_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/pdc_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/jmicron_", 20))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/asr_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/sil_", 16))
-- return 1;
-- else if (! strncmp (os_dev, "/dev/mapper/ddf1_", 17))
-- return 1;
--
-- return 0;
-+ if ((strncmp ("/dev/mapper/", os_dev, 12) != 0))
-+ return 0;
-+
-+#ifdef HAVE_DEVICE_MAPPER
-+ {
-+ struct dm_tree *tree;
-+ uint32_t maj, min;
-+ struct dm_tree_node *node = NULL;
-+ const char *node_uuid;
-+ struct stat st;
-+
-+ if (stat (os_dev, &st) < 0)
-+ return 0;
-+
-+ tree = dm_tree_create ();
-+ if (! tree)
-+ {
-+ grub_printf ("Failed to create tree\n");
-+ grub_dprintf ("hostdisk", "dm_tree_create failed\n");
-+ return 0;
-+ }
-+
-+ maj = major (st.st_rdev);
-+ min = minor (st.st_rdev);
-+
-+ if (! dm_tree_add_dev (tree, maj, min))
-+ {
-+ grub_dprintf ("hostdisk", "dm_tree_add_dev failed\n");
-+ dm_tree_free (tree);
-+ return 0;
-+ }
-+
-+ node = dm_tree_find_node (tree, maj, min);
-+ if (! node)
-+ {
-+ grub_dprintf ("hostdisk", "dm_tree_find_node failed\n");
-+ dm_tree_free (tree);
-+ return 0;
-+ }
-+ node_uuid = dm_tree_node_get_uuid (node);
-+ if (! node_uuid)
-+ {
-+ grub_dprintf ("hostdisk", "%s has no DM uuid\n", os_dev);
-+ dm_tree_free (tree);
-+ return 0;
-+ }
-+ if (strncmp (node_uuid, "LVM-", 4) != 0)
-+ {
-+ dm_tree_free (tree);
-+ return 0;
-+ }
-+ dm_tree_free (tree);
-+ return 1;
-+ }
-+#else
-+ return 1;
-+#endif /* HAVE_DEVICE_MAPPER */
- }
-
- int
-@@ -671,13 +708,11 @@
- return GRUB_DEV_ABSTRACTION_NONE;
-
- /* Check for LVM. */
-- if (!strncmp (os_dev, "/dev/mapper/", 12)
-- && ! grub_util_is_dmraid (os_dev)
-- && strncmp (os_dev, "/dev/mapper/mpath", 17) != 0)
-+ if (grub_util_is_lvm (os_dev))
- return GRUB_DEV_ABSTRACTION_LVM;
-
- /* Check for RAID. */
-- if (!strncmp (os_dev, "/dev/md", 7))
-+ if (!strncmp (os_dev, "/dev/md", 7) && ! grub_util_device_is_mapped (os_dev))
- return GRUB_DEV_ABSTRACTION_RAID;
- #endif
-
-
-=== modified file 'grub-core/kern/emu/hostdisk.c'
---- grub-core/kern/emu/hostdisk.c 2011-05-09 16:59:35 +0000
-+++ grub-core/kern/emu/hostdisk.c 2011-05-18 07:35:47 +0000
-@@ -24,6 +24,7 @@
- #include <grub/err.h>
- #include <grub/emu/misc.h>
- #include <grub/emu/hostdisk.h>
-+#include <grub/emu/getroot.h>
- #include <grub/misc.h>
- #include <grub/i18n.h>
- #include <grub/list.h>
-@@ -331,18 +332,23 @@
- return GRUB_ERR_NONE;
- }
-
-+int
-+grub_util_device_is_mapped (const char *dev)
-+{
- #ifdef HAVE_DEVICE_MAPPER
--static int
--device_is_mapped (const char *dev)
--{
- struct stat st;
-
-+ if (!grub_device_mapper_supported ())
-+ return 0;
-+
- if (stat (dev, &st) < 0)
- return 0;
-
- return dm_is_dm_major (major (st.st_rdev));
-+#else
-+ return 0;
-+#endif /* HAVE_DEVICE_MAPPER */
- }
--#endif /* HAVE_DEVICE_MAPPER */
-
- #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
- /* FIXME: geom actually gives us the whole container hierarchy.
-@@ -418,7 +424,7 @@
- # endif /* !defined(HAVE_DIOCGDINFO) */
-
- # ifdef HAVE_DEVICE_MAPPER
-- if (grub_device_mapper_supported () && device_is_mapped (dev)) {
-+ if (grub_util_device_is_mapped (dev)) {
- struct dm_task *task = NULL;
- grub_uint64_t start, length;
- char *target_type, *params, *space;
-@@ -1149,6 +1155,54 @@
- return ret;
- }
-
-+#ifdef HAVE_DEVICE_MAPPER
-+static int
-+grub_util_get_dm_node_linear_info (const char *dev,
-+ int *maj, int *min)
-+{
-+ struct dm_task *dmt;
-+ void *next = NULL;
-+ uint64_t length, start;
-+ char *target, *params;
-+ char *ptr;
-+ int major, minor;
-+
-+ dmt = dm_task_create(DM_DEVICE_TABLE);
-+ if (!dmt)
-+ return 0;
-+
-+ if (!dm_task_set_name(dmt, dev))
-+ return 0;
-+ dm_task_no_open_count(dmt);
-+ if (!dm_task_run(dmt))
-+ return 0;
-+ next = dm_get_next_target(dmt, next, &start, &length,
-+ &target, &params);
-+ if (grub_strcmp (target, "linear") != 0)
-+ return 0;
-+ major = grub_strtoul (params, &ptr, 10);
-+ if (grub_errno)
-+ {
-+ grub_errno = GRUB_ERR_NONE;
-+ return 0;
-+ }
-+ if (*ptr != ':')
-+ return 0;
-+ ptr++;
-+ minor = grub_strtoul (ptr, 0, 10);
-+ if (grub_errno)
-+ {
-+ grub_errno = GRUB_ERR_NONE;
-+ return 0;
-+ }
-+ if (maj)
-+ *maj = major;
-+ if (min)
-+ *min = minor;
-+ return 1;
-+}
-+#endif
-+
- static char *
- convert_system_partition_to_system_disk (const char *os_dev, struct stat *st)
- {
-@@ -1325,9 +1379,39 @@
- node = NULL;
- goto devmapper_out;
- }
-- else if (strncmp (node_uuid, "DMRAID-", 7) != 0)
-- {
-+ if (strncmp (node_uuid, "LVM-", 4) == 0)
-+ {
-+ grub_dprintf ("hostdisk", "%s is an LVM\n", path);
-+ node = NULL;
-+ goto devmapper_out;
-+ }
-+ if (strncmp (node_uuid, "mpath-", 6) == 0)
-+ {
-+ /* Multipath partitions have partN-mpath-* UUIDs, and are
-+ linear mappings so are handled by
-+ grub_util_get_dm_node_linear_info. Multipath disks are not
-+ linear mappings and must be handled specially. */
-+ grub_dprintf ("hostdisk", "%s is a multipath disk\n", path);
-+ mapper_name = dm_tree_node_get_name (node);
-+ goto devmapper_out;
-+ }
-+ if (strncmp (node_uuid, "DMRAID-", 7) != 0)
-+ {
-+ int major, minor;
-+ const char *node_name;
- grub_dprintf ("hostdisk", "%s is not DM-RAID\n", path);
-+
-+ if ((node_name = dm_tree_node_get_name (node))
-+ && grub_util_get_dm_node_linear_info (node_name,
-+ &major, &minor))
-+ {
-+ if (tree)
-+ dm_tree_free (tree);
-+ free (path);
-+ char *ret = grub_find_device (NULL, (major << 8) | minor);
-+ return ret;
-+ }
-+
- node = NULL;
- goto devmapper_out;
- }
-
---- include/grub/emu/misc.h 2010-12-02 13:26:46 +0000
-+++ include/grub/emu/misc.h 2011-05-18 07:35:47 +0000
-@@ -54,6 +54,8 @@
-
- char *grub_make_system_path_relative_to_its_root (const char *path)
- __attribute__ ((warn_unused_result));
-+int
-+grub_util_device_is_mapped (const char *dev);
-
- void * EXPORT_FUNC(xmalloc) (grub_size_t size) __attribute__ ((warn_unused_result));
- void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size) __attribute__ ((warn_unused_result));
-
diff --git a/sys-boot/grub/files/1.99-stat_root_device_properly-p1.patch b/sys-boot/grub/files/1.99-stat_root_device_properly-p1.patch
deleted file mode 100644
index fc14c536..00000000
--- a/sys-boot/grub/files/1.99-stat_root_device_properly-p1.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- grub-core/kern/emu/getroot.c 2011-05-21 05:03:55 +0000
-+++ grub-core/kern/emu/getroot.c 2011-06-23 17:50:41 +0000
-@@ -616,13 +616,15 @@
-
- if (os_dev)
- {
-- if (strncmp (os_dev, "/dev/dm-", sizeof ("/dev/dm-") - 1) != 0)
-+ int dm = (strncmp (os_dev, "/dev/dm-", sizeof ("/dev/dm-") - 1) == 0);
-+ int root = (strcmp (os_dev, "/dev/root") == 0);
-+ if (!dm && !root)
- return os_dev;
- if (stat (os_dev, &st) < 0)
- grub_util_error ("cannot stat `%s'", os_dev);
- free (os_dev);
- dev = st.st_rdev;
-- return grub_find_device ("/dev/mapper", dev);
-+ return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
- }
-
- if (stat (dir, &st) < 0)
-
diff --git a/sys-boot/grub/files/1.99-stat_root_device_properly-p2.patch b/sys-boot/grub/files/1.99-stat_root_device_properly-p2.patch
deleted file mode 100644
index aa7fd186..00000000
--- a/sys-boot/grub/files/1.99-stat_root_device_properly-p2.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- grub-core/kern/emu/getroot.c 2011-06-23 17:50:41 +0000
-+++ grub-core/kern/emu/getroot.c 2011-06-24 02:32:54 +0000
-@@ -620,11 +620,13 @@
- int root = (strcmp (os_dev, "/dev/root") == 0);
- if (!dm && !root)
- return os_dev;
-- if (stat (os_dev, &st) < 0)
-- grub_util_error ("cannot stat `%s'", os_dev);
-+ if (stat (os_dev, &st) >= 0)
-+ {
-+ free (os_dev);
-+ dev = st.st_rdev;
-+ return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
-+ }
- free (os_dev);
-- dev = st.st_rdev;
-- return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
- }
-
- if (stat (dir, &st) < 0)
-
diff --git a/sys-boot/grub/files/grub-0.97-gpt.patch b/sys-boot/grub/files/grub-0.97-gpt.patch
deleted file mode 100644
index 7b1a55cd..00000000
--- a/sys-boot/grub/files/grub-0.97-gpt.patch
+++ /dev/null
@@ -1,315 +0,0 @@
-diff -ruBbd --unidirectional-new-file grub-0.96/stage2/builtins.c grub-0.96-patched/stage2/builtins.c
---- grub-0.96/stage2/builtins.c 2004-06-20 09:33:04.000000000 -0400
-+++ grub-0.96-patched/stage2/builtins.c 2007-01-04 13:56:06.000000000 -0500
-@@ -1229,14 +1229,15 @@
- for (drive = 0x80; drive < 0x88; drive++)
- {
- unsigned long part = 0xFFFFFF;
-- unsigned long start, len, offset, ext_offset;
-- int type, entry;
-+ unsigned long start, len, offset, ext_offset, gpt_offset;
-+ int type, entry, gpt_count, gpt_size;
- char buf[SECTOR_SIZE];
-
- current_drive = drive;
- while (next_partition (drive, 0xFFFFFF, &part, &type,
- &start, &len, &offset, &entry,
-- &ext_offset, buf))
-+ &ext_offset, &gpt_offset,
-+ &gpt_count, &gpt_size, buf))
- {
- if (type != PC_SLICE_TYPE_NONE
- && ! IS_PC_SLICE_TYPE_BSD (type)
-@@ -2806,8 +2807,8 @@
- {
- int new_type;
- unsigned long part = 0xFFFFFF;
-- unsigned long start, len, offset, ext_offset;
-- int entry, type;
-+ unsigned long start, len, offset, ext_offset, gpt_offset;
-+ int entry, type, gpt_count, gpt_size;
- char mbr[512];
-
- /* Get the drive and the partition. */
-@@ -2844,7 +2845,14 @@
- /* Look for the partition. */
- while (next_partition (current_drive, 0xFFFFFF, &part, &type,
- &start, &len, &offset, &entry,
-- &ext_offset, mbr))
-+ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr))
-+ /* The partition may not be a GPT partition. */
-+ if (gpt_offset != 0)
-+ {
-+ errnum = ERR_BAD_ARGUMENT;
-+ return 1;
-+ }
-+
- {
- if (part == current_partition)
- {
-diff -ruBbd --unidirectional-new-file grub-0.96/stage2/disk_io.c grub-0.96-patched/stage2/disk_io.c
---- grub-0.96/stage2/disk_io.c 2004-05-23 12:35:24.000000000 -0400
-+++ grub-0.96-patched/stage2/disk_io.c 2007-01-04 14:01:08.000000000 -0500
-@@ -21,6 +21,7 @@
-
- #include <shared.h>
- #include <filesys.h>
-+#include <gpt.h>
-
- #ifdef SUPPORT_NETBOOT
- # define GRUB 1
-@@ -502,8 +503,8 @@
- set_partition_hidden_flag (int hidden)
- {
- unsigned long part = 0xFFFFFF;
-- unsigned long start, len, offset, ext_offset;
-- int entry, type;
-+ unsigned long start, len, offset, ext_offset, gpt_offset;
-+ int entry, type, gpt_count, gpt_size;
- char mbr[512];
-
- /* The drive must be a hard disk. */
-@@ -524,7 +525,14 @@
- /* Look for the partition. */
- while (next_partition (current_drive, 0xFFFFFF, &part, &type,
- &start, &len, &offset, &entry,
-- &ext_offset, mbr))
-+ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr))
-+ /* The partition may not be a GPT partition. */
-+ if (gpt_offset != 0)
-+ {
-+ errnum = ERR_BAD_ARGUMENT;
-+ return 1;
-+ }
-+
- {
- if (part == current_partition)
- {
-@@ -577,11 +585,14 @@
- unsigned long *partition, int *type,
- unsigned long *start, unsigned long *len,
- unsigned long *offset, int *entry,
-- unsigned long *ext_offset, char *buf)
-+ unsigned long *ext_offset,
-+ unsigned long *gpt_offset, int *gpt_count,
-+ int *gpt_size, char *buf)
- {
- /* Forward declarations. */
- auto int next_bsd_partition (void);
- auto int next_pc_slice (void);
-+ auto int next_gpt_slice(void);
-
- /* Get next BSD partition in current PC slice. */
- int next_bsd_partition (void)
-@@ -666,6 +677,40 @@
- return 0;
- }
-
-+ /* If this is a GPT partition table, read it as such. */
-+ if (*entry == -1 && *offset == 0 && PC_SLICE_TYPE (buf, 0) == PC_SLICE_TYPE_GPT)
-+ {
-+ struct grub_gpt_header *hdr = (struct grub_gpt_header *) buf;
-+
-+ /* Read in the GPT Partition table header. */
-+ if (! rawread (drive, 1, 0, SECTOR_SIZE, buf))
-+ return 0;
-+
-+ if (hdr->magic == GPT_HEADER_MAGIC && hdr->version == 0x10000)
-+ {
-+ /* Let gpt_offset point to the first entry in the GPT
-+ partition table. This can also be used by callers of
-+ next_partition to determine if a entry comes from a
-+ GPT partition table or not. */
-+ *gpt_offset = hdr->partitions;
-+ *gpt_count = hdr->maxpart;
-+ *gpt_size = hdr->partentry_size;
-+
-+ return next_gpt_slice();
-+ }
-+ else
-+ {
-+ /* This is not a valid header for a GPT partition table.
-+ Re-read the MBR or the boot sector of the extended
-+ partition. */
-+ if (! rawread (drive, *offset, 0, SECTOR_SIZE, buf))
-+ return 0;
-+ }
-+ }
-+
-+ /* Not a GPT partition. */
-+ *gpt_offset = 0;
-+
- /* Increase the entry number. */
- (*entry)++;
-
-@@ -710,6 +755,43 @@
- return 1;
- }
-
-+ /* Get the next GPT slice. */
-+ int next_gpt_slice (void)
-+ {
-+ struct grub_gpt_partentry *gptentry = (struct grub_gpt_partentry *) buf;
-+ /* Make GPT partitions show up as PC slices. */
-+ int pc_slice_no = (*partition & 0xFF0000) >> 16;
-+
-+ /* If this is the first time... */
-+ if (pc_slice_no == 0xFF)
-+ {
-+ pc_slice_no = -1;
-+ *entry = -1;
-+ }
-+
-+ do {
-+ (*entry)++;
-+
-+ if (*entry >= *gpt_count)
-+ {
-+ errnum = ERR_NO_PART;
-+ return 0;
-+ }
-+ /* Read in the GPT Partition table entry. */
-+ if (! rawread (drive, (*gpt_offset) + GPT_ENTRY_SECTOR (*gpt_size, *entry), GPT_ENTRY_INDEX (*gpt_size, *entry), *gpt_size, buf))
-+ return 0;
-+ } while (! (gptentry->type1 && gptentry->type2));
-+
-+ pc_slice_no++;
-+ *start = gptentry->start;
-+ *len = gptentry->end - gptentry->start + 1;
-+ *type = PC_SLICE_TYPE_EXT2FS;
-+ *entry = pc_slice_no;
-+ *partition = (*entry << 16) | 0xFFFF;
-+
-+ return 1;
-+ }
-+
- /* Start the body of this function. */
-
- #ifndef STAGE1_5
-@@ -717,6 +799,9 @@
- return 0;
- #endif
-
-+ if (*partition != 0xFFFFFF && *gpt_offset != 0)
-+ return next_gpt_slice ();
-+
- /* If previous partition is a BSD partition or a PC slice which
- contains BSD partitions... */
- if ((*partition != 0xFFFFFF && IS_PC_SLICE_TYPE_BSD (*type & 0xff))
-@@ -755,6 +840,9 @@
- unsigned long dest_partition = current_partition;
- unsigned long part_offset;
- unsigned long ext_offset;
-+ unsigned long gpt_offset;
-+ int gpt_count;
-+ int gpt_size;
- int entry;
- char buf[SECTOR_SIZE];
- int bsd_part, pc_slice;
-@@ -766,7 +854,8 @@
- int ret = next_partition (current_drive, dest_partition,
- &current_partition, &current_slice,
- &part_start, &part_length,
-- &part_offset, &entry, &ext_offset, buf);
-+ &part_offset, &entry, &ext_offset,
-+ &gpt_offset, &gpt_count, &gpt_size, buf);
- bsd_part = (current_partition >> 8) & 0xFF;
- pc_slice = current_partition >> 16;
- return ret;
-diff -ruBbd --unidirectional-new-file grub-0.96/stage2/gpt.h grub-0.96-patched/stage2/gpt.h
---- grub-0.96/stage2/gpt.h 1969-12-31 19:00:00.000000000 -0500
-+++ grub-0.96-patched/stage2/gpt.h 2007-01-04 13:52:14.000000000 -0500
-@@ -0,0 +1,68 @@
-+/*
-+ * GRUB -- GRand Unified Bootloader
-+ * Copyright (C) 2002,2005,2006 Free Software Foundation, Inc.
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#ifndef _GPT_H
-+#define _GPT_H
-+
-+typedef signed char grub_int8_t;
-+typedef signed short grub_int16_t;
-+typedef signed int grub_int32_t;
-+typedef signed long long int grub_int64_t;
-+typedef unsigned char grub_uint8_t;
-+typedef unsigned short grub_uint16_t;
-+typedef unsigned int grub_uint32_t;
-+typedef unsigned long long int grub_uint64_t;
-+
-+struct grub_gpt_header
-+{
-+ grub_uint64_t magic;
-+ grub_uint32_t version;
-+ grub_uint32_t headersize;
-+ grub_uint32_t crc32;
-+ grub_uint32_t unused1;
-+ grub_uint64_t primary;
-+ grub_uint64_t backup;
-+ grub_uint64_t start;
-+ grub_uint64_t end;
-+ grub_uint8_t guid[16];
-+ grub_uint64_t partitions;
-+ grub_uint32_t maxpart;
-+ grub_uint32_t partentry_size;
-+ grub_uint32_t partentry_crc32;
-+} __attribute__ ((packed));
-+
-+struct grub_gpt_partentry
-+{
-+ grub_uint64_t type1;
-+ grub_uint64_t type2;
-+ grub_uint8_t guid[16];
-+ grub_uint64_t start;
-+ grub_uint64_t end;
-+ grub_uint8_t attrib;
-+ char name[72];
-+} __attribute__ ((packed));
-+
-+#define GPT_HEADER_MAGIC 0x5452415020494645UL
-+
-+#define GPT_ENTRY_SECTOR(size,entry) \
-+ ((((entry) * (size) + 1) & ~(SECTOR_SIZE - 1)) >> SECTOR_BITS)
-+#define GPT_ENTRY_INDEX(size,entry) \
-+ ((((entry) * (size) + 1) & (SECTOR_SIZE - 1)) - 1)
-+
-+#endif /* _GPT_H */
-diff -ruBbd --unidirectional-new-file grub-0.96/stage2/pc_slice.h grub-0.96-patched/stage2/pc_slice.h
---- grub-0.96/stage2/pc_slice.h 2003-07-09 07:45:53.000000000 -0400
-+++ grub-0.96-patched/stage2/pc_slice.h 2007-01-04 13:52:14.000000000 -0500
-@@ -115,6 +115,7 @@
- #define PC_SLICE_TYPE_LINUX_EXTENDED 0x85
- #define PC_SLICE_TYPE_VSTAFS 0x9e
- #define PC_SLICE_TYPE_DELL_UTIL 0xde
-+#define PC_SLICE_TYPE_GPT 0xee
- #define PC_SLICE_TYPE_LINUX_RAID 0xfd
-
-
-diff -ruBbd --unidirectional-new-file grub-0.96/stage2/shared.h grub-0.96-patched/stage2/shared.h
---- grub-0.96/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400
-+++ grub-0.96-patched/stage2/shared.h 2007-01-04 13:52:15.000000000 -0500
-@@ -934,7 +934,9 @@
- unsigned long *partition, int *type,
- unsigned long *start, unsigned long *len,
- unsigned long *offset, int *entry,
-- unsigned long *ext_offset, char *buf);
-+ unsigned long *ext_offset,
-+ unsigned long *gpt_offset, int *gpt_count,
-+ int *gpt_size, char *buf);
-
- /* Sets device to the one represented by the SAVED_* parameters. */
- int make_saved_active (void);
diff --git a/sys-boot/grub/files/grub-1.95-build.patch b/sys-boot/grub/files/grub-1.95-build.patch
deleted file mode 100644
index fff11a5c..00000000
--- a/sys-boot/grub/files/grub-1.95-build.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://bugs.gentoo.org/185361
-
-fix building in parallel
-
---- grub-1.95/conf/i386-pc.mk
-+++ grub-1.95/conf/i386-pc.mk
-@@ -739,7 +739,7 @@
- $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
- -include grub_emu-util_console.d
-
--grub_emu-util_grub_emu.o: util/grub-emu.c
-+grub_emu-util_grub_emu.o: util/grub-emu.c grub_modules_init.h
- $(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_emu_CFLAGS) -MD -c -o $@ $<
- -include grub_emu-util_grub_emu.d
-
diff --git a/sys-boot/grub/files/grub-1.96-genkernel.patch b/sys-boot/grub/files/grub-1.96-genkernel.patch
deleted file mode 100644
index 471fc66a..00000000
--- a/sys-boot/grub/files/grub-1.96-genkernel.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- util/grub.d/10_linux.in
-+++ util/grub.d/10_linux.in
-@@ -93,7 +93,7 @@
- echo "$a"
- }
-
--list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
-+list=`for i in /boot/kernel-* /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
-
diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default
index 580d2758..8c5167fa 100644
--- a/sys-boot/grub/files/grub.default
+++ b/sys-boot/grub/files/grub.default
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 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.2 2011/08/30 06:45:04 scarabeus Exp $
+# $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:
@@ -9,6 +9,8 @@
# 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
diff --git a/sys-boot/grub/grub-0.97-r12.ebuild b/sys-boot/grub/grub-0.97-r13.ebuild
index 75a48c49..103da07e 100644
--- a/sys-boot/grub/grub-0.97-r12.ebuild
+++ b/sys-boot/grub/grub-0.97-r13.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r12.ebuild,v 1.5 2012/08/07 21:00:21 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r13.ebuild,v 1.3 2012/07/24 15:49:35 vapier Exp $
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
@@ -16,7 +16,9 @@
# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \
# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2
-inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info pax-utils
+EAPI="4"
+
+inherit eutils mount-boot toolchain-funcs linux-info flag-o-matic autotools pax-utils multiprocessing
PATCHVER="1.14" # Should match the revision ideally
DESCRIPTION="GNU GRUB Legacy boot loader"
@@ -28,14 +30,16 @@ SRC_URI="mirror://gentoo/${P}.tar.gz
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 x86 ~x86-fbsd"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
IUSE="custom-cflags ncurses netboot static"
-RDEPEND="ncurses? (
- >=sys-libs/ncurses-5.2-r5
+LIB_DEPEND="ncurses? (
+ >=sys-libs/ncurses-5.2-r5[static-libs(+)]
amd64? ( app-emulation/emul-linux-x86-baselibs )
)"
-DEPEND="${RDEPEND}"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
pkg_setup() {
case $(tc-arch) in
@@ -43,10 +47,7 @@ pkg_setup() {
esac
}
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
+src_prepare() {
# Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
# discovered in bug 160801. We can change this, however, using larger values
# for this variable means that Grub needs more memory to run and boot. For a
@@ -73,11 +74,10 @@ src_unpack() {
fi
EPATCH_SUFFIX="patch" epatch "${FILESDIR}"/formilux
-
eautoreconf
}
-src_compile() {
+src_configure() {
filter-flags -fPIE #168834
use amd64 && multilib_toolchain_setup x86
@@ -104,36 +104,38 @@ src_compile() {
# Per bug 216625, the emul packages do not provide .a libs for performing
# suitable static linking
if use amd64 && use static ; then
- if [ -z "${GRUB_STATIC_PACKAGE_BUILDING}" ]; then
+ if [[ -z ${GRUB_STATIC_PACKAGE_BUILDING} ]] ; then
die "You must use the grub-static package if you want a static Grub on amd64!"
else
eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
eerror "is specifically intended for building the tarballs for the"
eerror "grub-static package via USE='static -ncurses'."
eerror "All bets are now off."
- ebeep 10
fi
fi
+ multijob_init
+
# build the net-bootable grub first, but only if "netboot" is set
if use netboot ; then
+ (
+ multijob_child_init
+ mkdir -p "${WORKDIR}"/netboot
+ pushd "${WORKDIR}"/netboot >/dev/null
+ ECONF_SOURCE=${S} \
econf \
- --libdir=/lib \
- --datadir=/usr/lib/grub \
- --exec-prefix=/ \
- --disable-auto-linux-mem-opt \
- --enable-diskless \
- --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
- --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
- --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
- --enable-{tulip,via-rhine,w89c840}
-
- emake w89c840_o_CFLAGS="-O" || die
-
- mv -f stage2/{nbgrub,pxegrub} "${S}"/
- mv -f stage2/stage2 stage2/stage2.netboot
-
- emake -j1 clean || die
+ --libdir=/lib \
+ --datadir=/usr/lib/grub \
+ --exec-prefix=/ \
+ --disable-auto-linux-mem-opt \
+ --enable-diskless \
+ --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
+ --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
+ --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
+ --enable-{tulip,via-rhine,w89c840}
+ popd >/dev/null
+ ) &
+ multijob_post_fork
fi
# Now build the regular grub
@@ -148,33 +150,35 @@ src_compile() {
# sanity check due to common failure
use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
- emake || die "making regular stuff"
+ multijob_finish
+}
+
+src_compile() {
+ use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O"
+ emake
}
src_test() {
# non-default block size also give false pass/fails.
unset BLOCK_SIZE
- emake -j1 check || die
+ emake -j1 check
}
src_install() {
- emake DESTDIR="${D}" install || die
+ default
if use netboot ; then
exeinto /usr/lib/grub/${CHOST}
- doexe nbgrub pxegrub stage2/stage2.netboot || die
+ doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub}
+ newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot
fi
- # bug 330745
- pax-mark -m "${D}"/sbin/grub
+ pax-mark -m "${D}"/sbin/grub #330745
- dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
newdoc docs/menu.lst grub.conf.sample
dodoc "${FILESDIR}"/grub.conf.gentoo
- [ -n "${GRUB_STATIC_PACKAGE_BUILDING}" ] && \
- mv \
- "${D}"/usr/share/doc/${PF} \
- "${D}"/usr/share/doc/grub-static-${PF/grub-}
+ [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \
+ mv "${D}"/usr/share/doc/{${PF},grub-static-${PF/grub-}}
insinto /usr/share/grub
doins "${DISTDIR}"/splash.xpm.gz
@@ -194,9 +198,8 @@ setup_boot_dir() {
# change menu.lst to grub.conf
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
- ewarn
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
- ewarn
+ echo
fi
if [[ ! -e ${dir}/menu.lst ]]; then
@@ -211,10 +214,13 @@ setup_boot_dir() {
ewarn "stage1 and stage2 will still be the old version, but"
ewarn "later stages will be the new version, which could"
ewarn "cause problems such as an unbootable system."
+ ewarn
ewarn "This means you must use either grub-install or perform"
- ewarn "root/setup manually! For more help, see the handbook:"
+ ewarn "root/setup manually."
+ ewarn
+ ewarn "For more help, see the handbook:"
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
- ebeep
+ echo
fi
einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"