parent
25e2965483
commit
500404e059
@ -1,15 +1,25 @@
|
||||
AUX defaults 1019 RMD160 ac86956eec27bfb7f02564b94b387cda3c9fb2a5 SHA1 108b4b0aa3fb2a50c9aa6d20e4fb7c239f35feb1 SHA256 70031c9dd25afb304b5206d135292af0fe33f71e82b8bc49dae9264e177b8c40
|
||||
AUX grub-1.99-chroot.patch 7430 RMD160 6f01cae9e7a89445705a9ac2c368e3905d26492a SHA1 45579618642a2c57bfb726c01e1341ae628e12c3 SHA256 8dde001253e53bf9d8ad729f5b6241432900206cdd2ab17c43a8ee465ea9cf2e
|
||||
AUX grub-1.99-latest_version_backport.patch 3812 RMD160 a00f8a03d45a74fbc65752a67b67cf181553a0da SHA1 9cc4b425f630248b31669a9c79f44b7bccb374f3 SHA256 1603015a438d5d4ac7ce5ec7d3804df26a51695cf4281ceb2092e584721fc393
|
||||
AUX grub-1.99-lvm_mapper-r1.patch 2422 RMD160 875a891990b84f3992f2e45bfbc85452c0bebefd SHA1 ebc79cc131279f793ad1bb77acf29e12a7c76a09 SHA256 4eacca556d8f4e4fbd96f5dfc90d9828f6e5ab519b50b11fa7e82740113275c5
|
||||
AUX grub-1.99-lvm_mapper.patch 1012 RMD160 172b26f017765ce72b2266942544f6a2198ca13b SHA1 2380431c33fea1099aa62bb81428cf137c54603f SHA256 828b25d9f58baf156240b4e3da7a8c8b8a9db74219115b70f200d4ee6f2ac819
|
||||
AUX grub.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776
|
||||
DIST grub-1.99.tar.gz 4652619 RMD160 63293381ac2ed2479ac65896d4744b866e6d216c SHA1 6d0536da38224e7caf94cf2531a5f921ac057b9b SHA256 b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff
|
||||
EBUILD grub-1.99-r1.ebuild 2797 RMD160 24fecf3fe4bf0576c656d9a4deba2bce83c03c7e SHA1 40ef7b3d73b397257fd6ea128630858281c19289 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8
|
||||
EBUILD grub-1.99-r2.ebuild 2797 RMD160 24fecf3fe4bf0576c656d9a4deba2bce83c03c7e SHA1 40ef7b3d73b397257fd6ea128630858281c19289 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8
|
||||
EBUILD grub-1.99-r3.ebuild 2860 RMD160 e4ec49efa44ad6409e081e3eba8a03aef03f1dfd SHA1 257ef539017d5c510c4cbc76ee50f41c4392b5be SHA256 5200cfaa4956bfdb75f4386c38ea4f02f2439c549ea4a5676cfc67db06ed7359
|
||||
EBUILD grub-1.99-r4.ebuild 2863 RMD160 76a53389310ae7f99e94dd6a3fe4b010e033f896 SHA1 22e0d0ef68b4c86ebc7f11c266bcb809d6e544ee SHA256 61097caa686d4ad465dc7b0f781dfed6ab9d4fa74898ccc5396871f68245777b
|
||||
EBUILD grub-1.99-r5.ebuild 2935 RMD160 7f448c3bc6120f2155d94f9ced9a990452f1c13e SHA1 ecd21b1917f76f1172bbe4d8af0e24435b7aff53 SHA256 717af30c0305eb0c89fe121528160810efcbadff987172cc34ce2018d5d182c1
|
||||
EBUILD grub-1.99.ebuild 2797 RMD160 24fecf3fe4bf0576c656d9a4deba2bce83c03c7e SHA1 40ef7b3d73b397257fd6ea128630858281c19289 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8
|
||||
MISC ChangeLog 1275 RMD160 812eb4c8745e2e6c5144aab9cf22b6a4be6b7347 SHA1 95fe4d5085610c608e7eab171266b2b5e9d2005a SHA256 72979dcf1b9a759974c31e423b30b72c6c70c31ed0e37cab7bd3bcc7293acff7
|
||||
MISC metadata.xml 349 RMD160 8e5ecd3c757f94fbccafc8120f4c8a04567135b4 SHA1 3ff0251dbb2863c4fbf0913b901bc27ed73a1acd SHA256 fcb983296ee1568339772668bcf236db0a24aabba6c328343d7bdb790978cbb9
|
||||
AUX defaults 1019 SHA256 70031c9dd25afb304b5206d135292af0fe33f71e82b8bc49dae9264e177b8c40 SHA512 a11eb2225ca528b8c020c11edc54564063ab953f6f71115dcc72b0f65bf01da902f2e966b148660c07e45be3122d183e3f1abc206113d88fa4596a5420b54d1b WHIRLPOOL 083b86e03b8b32c2a1ca374e900d7df5fc2ab9d52c18694bdc1b0ed929aa59903eeee0f16f4bea7d4d588602934fb7d6d60bc86b1677cffba1f07dcdaa2f52a8
|
||||
AUX grub-1.99-chroot.patch 7430 SHA256 8dde001253e53bf9d8ad729f5b6241432900206cdd2ab17c43a8ee465ea9cf2e SHA512 97c48f2c3c67db429a20de4a00ffe2e28f2a4d607b01e1565175a2621f11e3485d7ed3e5969ab38fe03ce2bb3aa6af3920dde1a29a56a749eb6af61e4a4fe8f0 WHIRLPOOL 3a1f3209cc58f62c9cb8f6b68b523501c767e1dc0f95edb8a50089692182414f98a4c8f821e506a9b5638dd9c1d70c941839c679759d57f92e4d1170616e27da
|
||||
AUX grub-1.99-latest_version_backport.patch 3812 SHA256 1603015a438d5d4ac7ce5ec7d3804df26a51695cf4281ceb2092e584721fc393 SHA512 d879fb43999b81f11eb7c35dae3cba44dec54cbc688c5dd60dc5d88f378be3739b3b81abc5dfb1aef6ca831c30538e5dab3f94700751efdcdf53c0900730cae0 WHIRLPOOL d1c6dc61525895031dab0cd1e77500aba665e31754e8135c6ecd250310480bbc26234987786a1cadb74953320e9176ef37cf0e38e3f36d6b04b784c3e74c25f9
|
||||
AUX grub-1.99-lvm_mapper-r1.patch 2422 SHA256 4eacca556d8f4e4fbd96f5dfc90d9828f6e5ab519b50b11fa7e82740113275c5 SHA512 61c9895d9780424816ca24754ef86859b31e32a1d2ba37f2cfdca31fc631b43e7207286f41750187e59abcaf27ba7a139dec151366beb898a0254d01782c718e WHIRLPOOL e4396bf0d97ad7fb31a6f07b57c8456a2f76ccecd6c10834a9125767b5ff8738ce9e107d71e56098637620badc1b42782a327d5894208936a2cda19a2761cc53
|
||||
AUX grub-1.99-lvm_mapper.patch 1012 SHA256 828b25d9f58baf156240b4e3da7a8c8b8a9db74219115b70f200d4ee6f2ac819 SHA512 19b3bd617925f58255deae890887f8286061f30c2028aed2022f230b64375480a6d14427b6e3b1bebb044b3cfdb477d78f23434856f7f41ac0a5e509829923aa WHIRLPOOL 853aabe55e34e6730070456bc8de7c0d02c9a7412a6edd482e4c6c29b8c5139f439d6bb91e872164b555edd8faae46b5f61acb90a7f07b5814d73225c445ad90
|
||||
AUX grub-2.00-compression.patch 2051 SHA256 003cc6b8762adbff14c1d0f7a0c2ddb145e80d73e899439fb8ab12e133a60feb SHA512 2b57ddb395cb5aa37bc3d721f3d4c527a1d5165c0b5e1c2efec7d169ae2438ad063ee67da68eff4069f0451983e599ec40ed92a0bc33348a21ad622738bbc213 WHIRLPOOL 2c61bfd65ed1d53e42a1ec881f3a7e42904924097460f692952a0fbfa46cfbb029374a2e6cfdcb1f2eb1216e994b56265e6e0e72912ecda7de90daddc03931c2
|
||||
AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a
|
||||
AUX grub-2.00-freebsd.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 1907 SHA256 7d8eda92eeeeb87001bc44dd1390b96c927c45542af2984c5d80f9ca3a552362 SHA512 cc2c47858ca2fa76b081ca78b6090fe61f0b41d6aad21f07e269dd9f98355b7c148f62659418257c24aa370634060ead2c3a612aae07c6f53e9ba13a25a1d7fc WHIRLPOOL 9b5aad7db3ec5c60151984861690b64e90d6adbeb1dec4257d33873156ae6ce6ded432377520cfb9cbbbbf2f30e69e134d6dbc0007355cfa74521042500d844e
|
||||
AUX grub-2.00-tftp-endian.patch 728 SHA256 4806fb14471fe6547cb69e6fab97e66c8245654acbc4738071cf2717368de458 SHA512 8fee95b06b50f8721d7013ecf8fb954e9b1ba83f99790e165ec334dfcd41fe7655f37868069a315acd4af97d3c4466aa36e0ab5a8b767faf862f1d71f88b3252 WHIRLPOOL 53779e4952049f069824eefcaaaa0e46fc9a7036ed0f9b67008e523f618105d760300ffcd315f861de786c63de02b2753d3ed14637b39fd7af47aadd02355695
|
||||
AUX grub-2.00-zfs-feature-flag-support.patch 31186 SHA256 596d509a22d1f3c2bf27864ff285d7ae8e39b3912347163a14afb36812de8605 SHA512 e262f33de0e3ef97c9bcfc294ba40638dd66b369a4a72bcee42c2d5aafa223eec96b1ed841b97c09b40db798dec38504397ad6000eb3b98eb8b29457e0dfefa3 WHIRLPOOL 70314defe1fc0704a2e3ff2579916a8a206b9437517096b3b1129991dd3364a994991f6bed0d5ace51b78c9ba469afeb4de88d445600783c91456a1278c9ac23
|
||||
AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 SHA512 5ee586c151b025a153867d2854b73e2e18a6af38e9d65069b7114a55af776803ba947b4901b0806e79fa8f36aeac90daad608b9ec2a4a8526301d1beb36e4ef3 WHIRLPOOL fcaef85cd7c2c446c882874cf4ec8a2241d1fc97720973a0a0cd1add259da599d4dae4d0b429ba2dff0307ed2d4598d5939cbc1b11127a0dedb3a54249ec9f81
|
||||
DIST grub-1.99.tar.gz 4652619 SHA256 b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff SHA512 673f33f86c6dafffb6801d2a625ac594839cc025cb63acfa2d66681b217306f7f90d76330a21f6672515a2bbc8812dbe4dd92441e6f1b2bca382e5e169277187 WHIRLPOOL fce61d615142f00cdea6aa06d80af442560f0b6b3d4afafbf5319c2b318a25fe566393afeef08c6f12c6b1e4e08055095a6897e92759e43dbd370e668bef6646
|
||||
DIST grub-2.00.tar.xz 5136412 SHA256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 SHA512 f0dbfc90639491e5c671d2df206dec0139171bf096a99ee236f7ebf21cdafc6e6d39a9607e14ad2a6aee7c199ecc63f0a39573d969318e1a0cd32f989aa6b44a WHIRLPOOL b9690c023ab507926b8615ce28bf9de82b793ebd02126a5ecd52a130ab4bc52e2ae650b02ae2d784d4089e2981be944ba8b4800cde742aab793ff0d9029843c8
|
||||
EBUILD grub-1.99-r1.ebuild 2797 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8 SHA512 5a95409fa2839733e612c3bdb2c40104944ef605d5a98b8c7c495f0657de67b964a4f3219117a400a312cdc594d2abb419a265410bd14ce2149b70ea56bb3655 WHIRLPOOL b828fe74524048c60ee707735852d0d2a6ac93655d8db8890e89eeae587056007a65f08eeb61f6d9d1e53db71c29e8aed93d42d471facf1a50c894cac779a588
|
||||
EBUILD grub-1.99-r2.ebuild 2797 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8 SHA512 5a95409fa2839733e612c3bdb2c40104944ef605d5a98b8c7c495f0657de67b964a4f3219117a400a312cdc594d2abb419a265410bd14ce2149b70ea56bb3655 WHIRLPOOL b828fe74524048c60ee707735852d0d2a6ac93655d8db8890e89eeae587056007a65f08eeb61f6d9d1e53db71c29e8aed93d42d471facf1a50c894cac779a588
|
||||
EBUILD grub-1.99-r3.ebuild 2860 SHA256 5200cfaa4956bfdb75f4386c38ea4f02f2439c549ea4a5676cfc67db06ed7359 SHA512 e81c45bd73ae8b3594adc236c51eba947212f78151a8f5dac8fc1a27ea5250213731982595d22084b95a3c015d8de4ab9f8541f36c9116b1cb2048baaf935c39 WHIRLPOOL c24355c3f92359fbe69b3352455790dc8970ed8a91641cf4241fc17db1211519a52e5f0a7c8a9d5b8f5a712e374896404c0f48fd7407d48e781906371f0af40c
|
||||
EBUILD grub-1.99-r4.ebuild 2863 SHA256 61097caa686d4ad465dc7b0f781dfed6ab9d4fa74898ccc5396871f68245777b SHA512 39dfd0ed40e367fcdec0b8c4829491bbe2baa8bedc622300176dbb11adcef3e46d64f029100cc835a2ec0182c796c989636e077a5e19d305496c6415c851f8a3 WHIRLPOOL e58672910a7cb767c65672e8dd304c2696bc6b6f935c7752bc269634a2406fe58afa8d9bb538cd43b31adb94abd718bd1db86ce6e6a13d202de4fd81d47702af
|
||||
EBUILD grub-1.99-r5.ebuild 2935 SHA256 717af30c0305eb0c89fe121528160810efcbadff987172cc34ce2018d5d182c1 SHA512 3866a64c1469056e9180b9362ef3e4c84e97b037cee63056411ccecc0c946556344302493ec08661e581d06b4669892d4b5d40c42da5f7b19a848068daf17fee WHIRLPOOL 2fed2d09041fdb2e987b3965749f9ef13dca95241d083897c10e8f9f420c82e7bba6f329aaf6738696c25ef0273987b55a9f979273849ff51caea2cf246a1f25
|
||||
EBUILD grub-1.99.ebuild 2797 SHA256 5256e478fc7a50b5df7b98900d7cc72bac82cc46681a235a44012809f7009bf8 SHA512 5a95409fa2839733e612c3bdb2c40104944ef605d5a98b8c7c495f0657de67b964a4f3219117a400a312cdc594d2abb419a265410bd14ce2149b70ea56bb3655 WHIRLPOOL b828fe74524048c60ee707735852d0d2a6ac93655d8db8890e89eeae587056007a65f08eeb61f6d9d1e53db71c29e8aed93d42d471facf1a50c894cac779a588
|
||||
EBUILD grub-2.00-r3.ebuild 9524 SHA256 5875eb10b124e29a263c7bd6fd57efca427e63d7d0b1d06c376d8863205e4688 SHA512 21a874ba38a6f5908de903eac86b29c92f4596e053f7d91ff58c371ca79ccd9da4a8946ac7cc6837a40848b02cd8886a61c45675cddff889b99f604c3548a233 WHIRLPOOL a7451ce152f61ab0bc21c6344084d5e0171b30220ff73c71c8594874a7f313db3703bf9c317bec3dcc94e3652ad9c59bd19e640ff727070a36387681049d935a
|
||||
MISC ChangeLog 1275 SHA256 72979dcf1b9a759974c31e423b30b72c6c70c31ed0e37cab7bd3bcc7293acff7 SHA512 6464c2e7ea5f8b645cd98b7325cb2ecbbd05ea4afd85909d40d5b1cbcd27fc2983194bee0b95248b6d2261f650e365afe8f888a25171927dd291dd0814043ae6 WHIRLPOOL caaf41d9abc9df6b0fde8a212d0bdae30989b65f74834cc277b542320e48601065878cd2052f61feb9e08d1d4c4d2c2d2da5de0a7aeaf6b5c79c0948a81e6f94
|
||||
MISC metadata.xml 349 SHA256 fcb983296ee1568339772668bcf236db0a24aabba6c328343d7bdb790978cbb9 SHA512 00ea2ff785a2de7aab609ec1997a397c5dc1dec103a84b0d7768aedb0e06de2ba81d719c0ae603c068d626f2238dd4f518cc8abdd2eb0cb8a0c1c05da28f85fb WHIRLPOOL 11b1eea531604cae84dff299c944b73a3567b112d94413772744865ba4176e20447a94197065912a4c7559791664af3bac2c9ba2ddc790ecda4607fdff5467c6
|
||||
|
@ -0,0 +1,84 @@
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=424527
|
||||
https://savannah.gnu.org/bugs/index.php?36770
|
||||
|
||||
=== modified file 'grub-core/lib/xzembed/xz_dec_stream.c'
|
||||
--- grub-core/lib/xzembed/xz_dec_stream.c 2012-02-29 13:56:51 +0000
|
||||
+++ grub-core/lib/xzembed/xz_dec_stream.c 2012-07-22 14:27:03 +0000
|
||||
@@ -403,18 +403,25 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
- do {
|
||||
+ if (b->in_pos == b->in_size)
|
||||
+ return XZ_OK;
|
||||
+
|
||||
+ if (!crc32 && s->hash_size == 0)
|
||||
+ s->pos += 8;
|
||||
+
|
||||
+ while (s->pos < (crc32 ? 32 : s->hash_size * 8)) {
|
||||
if (b->in_pos == b->in_size)
|
||||
return XZ_OK;
|
||||
|
||||
#ifndef GRUB_EMBED_DECOMPRESSOR
|
||||
- if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++])
|
||||
+ if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos])
|
||||
return XZ_DATA_ERROR;
|
||||
#endif
|
||||
+ b->in_pos++;
|
||||
|
||||
s->pos += 8;
|
||||
|
||||
- } while (s->pos < (crc32 ? 32 : s->hash_size * 8));
|
||||
+ }
|
||||
|
||||
#ifndef GRUB_EMBED_DECOMPRESSOR
|
||||
if (s->hash)
|
||||
@@ -529,8 +536,6 @@
|
||||
s->hash->init(s->index.hash.hash_context);
|
||||
s->hash->init(s->block.hash.hash_context);
|
||||
}
|
||||
- if (!s->hash)
|
||||
- return XZ_OPTIONS_ERROR;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
=== modified file 'grub-core/normal/autofs.c'
|
||||
--- grub-core/normal/autofs.c 2012-05-01 13:26:36 +0000
|
||||
+++ grub-core/normal/autofs.c 2012-07-22 14:23:46 +0000
|
||||
@@ -32,11 +32,21 @@
|
||||
autoload_fs_module (void)
|
||||
{
|
||||
grub_named_list_t p;
|
||||
+ int ret = 0;
|
||||
+ grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX];
|
||||
+
|
||||
+ grub_memcpy (grub_file_filters_was, grub_file_filters_enabled,
|
||||
+ sizeof (grub_file_filters_enabled));
|
||||
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
|
||||
+ sizeof (grub_file_filters_enabled));
|
||||
|
||||
while ((p = fs_module_list) != NULL)
|
||||
{
|
||||
if (! grub_dl_get (p->name) && grub_dl_load (p->name))
|
||||
- return 1;
|
||||
+ {
|
||||
+ ret = 1;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
if (grub_errno)
|
||||
grub_print_error ();
|
||||
@@ -46,7 +56,10 @@
|
||||
grub_free (p);
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_was,
|
||||
+ sizeof (grub_file_filters_enabled));
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/* Read the file fs.lst for auto-loading. */
|
||||
|
@ -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
|
@ -0,0 +1,382 @@
|
||||
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`"
|
@ -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
|
||||
|
||||
|
@ -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@
|
@ -0,0 +1,46 @@
|
||||
Fix parallel make problems.
|
||||
Upstream changesets 4547, 4552, 4578.
|
||||
--- gentpl.py
|
||||
+++ gentpl.py
|
||||
@@ -484,10 +484,10 @@
|
||||
def installdir(default="bin"):
|
||||
return "[+ IF installdir +][+ installdir +][+ ELSE +]" + default + "[+ ENDIF +]"
|
||||
|
||||
-def manpage():
|
||||
+def manpage(adddeps):
|
||||
r = "if COND_MAN_PAGES\n"
|
||||
r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
|
||||
- r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
|
||||
+ r += rule("[+ name +].[+ mansection +]", "[+ name +] " + adddeps, """
|
||||
chmod a+x [+ name +]
|
||||
PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
|
||||
""")
|
||||
@@ -503,7 +503,7 @@
|
||||
r += gvar_add("TESTS", "[+ name +]")
|
||||
r += "[+ ELSE +]"
|
||||
r += var_add(installdir() + "_PROGRAMS", "[+ name +]")
|
||||
- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
|
||||
+ r += "[+ IF mansection +]" + manpage("") + "[+ ENDIF +]"
|
||||
r += "[+ ENDIF +]"
|
||||
|
||||
r += var_set(cname() + "_SOURCES", platform_sources(platform))
|
||||
@@ -532,7 +532,7 @@
|
||||
r += gvar_add ("TESTS", "[+ name +]")
|
||||
r += "[+ ELSE +]"
|
||||
r += var_add(installdir() + "_SCRIPTS", "[+ name +]")
|
||||
- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
|
||||
+ r += "[+ IF mansection +]" + manpage("grub-mkconfig_lib") + "[+ ENDIF +]"
|
||||
r += "[+ ENDIF +]"
|
||||
|
||||
r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
|
||||
--- 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
|
@ -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;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,368 @@
|
||||
# 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-2.00-r2.ebuild,v 1.5 2013/02/18 16:45:17 mr_bones_ 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 )
|
||||
grub_platforms_yeeloong? ( 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"
|
||||
fi
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
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= \
|
||||
${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}-freebsd.patch" #442050
|
||||
epatch "${FILESDIR}/${P}-compression.patch" #424527
|
||||
epatch "${FILESDIR}/${P}-zfs-feature-flag-support.patch" #455358
|
||||
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_preinst() {
|
||||
has_version "<sys-boot/grub-2.00-r2:2" && \
|
||||
[[ "$(df -TP /boot | awk 'NR>1{print $2}')" = 'zfs' ]]
|
||||
display_zfs_feature_flag_warning=$?
|
||||
}
|
||||
|
||||
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
|
||||
if [[ $display_zfs_feature_flag_warning -eq 0 ]]; then
|
||||
zfs_pool=$(df -TP /boot | awk 'NR>1{print $1}')
|
||||
zfs_pool=${zfs_pool%%/*}
|
||||
ewarn "The previous version of sys-boot/grub lacked support for ZFS feature flags."
|
||||
ewarn "Your /boot is on ZFS. Running \"zpool upgrade ${zfs_pool}\" or \"zpool upgrade -a\""
|
||||
ewarn "to upgrade your pool to support feature flags will prevent your system from booting."
|
||||
ewarn "You should use grub2-install to reinstall your boot code. This will avoid problems."
|
||||
fi
|
||||
}
|
Loading…
Reference in new issue