diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-10-05 05:28:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-10-05 05:28:59 +0000 |
commit | 97848b0ad957d8c6a43965f2b5313b0f759b0c1c (patch) | |
tree | 51bb285fe6a3f42f42678336e2081894371b0ae0 /sys-devel | |
parent | Bump (diff) | |
download | historical-97848b0ad957d8c6a43965f2b5313b0f759b0c1c.tar.gz historical-97848b0ad957d8c6a43965f2b5313b0f759b0c1c.tar.bz2 historical-97848b0ad957d8c6a43965f2b5313b0f759b0c1c.zip |
Add some more fixes from upstream #431250 by Vladimir.
Package-Manager: portage-2.2.0_alpha131/cvs/Linux x86_64
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/make/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/make/Manifest | 24 | ||||
-rw-r--r-- | sys-devel/make/files/make-3.82-construct-command-line.patch | 71 | ||||
-rw-r--r-- | sys-devel/make/files/make-3.82-intermediate-parallel.patch | 62 | ||||
-rw-r--r-- | sys-devel/make/files/make-3.82-long-cmdline.patch | 105 | ||||
-rw-r--r-- | sys-devel/make/files/make-3.82-long-command-line.patch | 54 | ||||
-rw-r--r-- | sys-devel/make/make-3.82-r4.ebuild | 10 |
7 files changed, 219 insertions, 116 deletions
diff --git a/sys-devel/make/ChangeLog b/sys-devel/make/ChangeLog index 18e38db018cb..7151b4a966a0 100644 --- a/sys-devel/make/ChangeLog +++ b/sys-devel/make/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/make # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/ChangeLog,v 1.101 2012/09/02 18:52:35 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/ChangeLog,v 1.102 2012/10/05 05:28:59 vapier Exp $ + + 05 Oct 2012; Mike Frysinger <vapier@gentoo.org> + +files/make-3.82-construct-command-line.patch, + +files/make-3.82-intermediate-parallel.patch, + +files/make-3.82-long-command-line.patch, -files/make-3.82-long-cmdline.patch, + make-3.82-r4.ebuild: + Add some more fixes from upstream #431250 by Vladimir. 02 Sep 2012; Raúl Porcel <armin76@gentoo.org> make-3.82-r3.ebuild: alpha/ia64/m68k/s390/sh/sparc stable wrt #419941 diff --git a/sys-devel/make/Manifest b/sys-devel/make/Manifest index a0c2394a3645..6196ac85d6d4 100644 --- a/sys-devel/make/Manifest +++ b/sys-devel/make/Manifest @@ -10,9 +10,11 @@ AUX make-3.81-tests-lang.patch 1788 SHA256 0d2f6b061ed2b09babbb851d1bcebcd20bc23 AUX make-3.81-tests-recursion.patch 514 SHA256 727a42dd884d296d421342f374b95ac05eeaef67c5f5efe755f1242944aab74b SHA512 8119045661bb08d468a0975f6e0a9606768bb6122c9c5cdb9e8b74926cd37e0e1a5a60486aab306106d1c1de0b3a83b072a6999b3ba33d6a0befc333f658da00 WHIRLPOOL 77eef52ca8b00539c8d7cbd1cfcf9e930d48707c706897a082bc40f2c1cab82d14b3ec1d7eb5be5b248cee4999cb8d9234429fca6e0af71f914c214a8390582b AUX make-3.82-MAKEFLAGS-reexec.patch 456 SHA256 0180a94ab07bb9c1348ab30301afcbbe382a281c4c6f143de16e3bea3d96e00c SHA512 675c528ea92c9df487c0a9d9058a304f970543f71991c70cc1399f3b6582316dac8b387aa1a744b0d6dcbe215775efea4e936b09553bccbfced3dcbc28af5532 WHIRLPOOL 5da896f02f24c5813a25cfccc4029b4f0a674c2f10d86057bdc59bf4f8be24bfba2886a91c63feadf5805ab26c85098c6c3c5be7c4b1ceddc1edee6328874a88 AUX make-3.82-archives-many-objs.patch 2110 SHA256 268db7c9e98f540ac9d5466bba17946f400463c1fd934d419e37fafaea7f0dd7 SHA512 c3669a4a2104621e3dab921793635c1443ec389ef160d1171d3181d58a1568d88ff35044b70298edef504f63e449ddb7fb27f9528cf588ca643dcdc3e40ebab7 WHIRLPOOL fc4e7b40bf67638c2e5ec476dd49a7ffd2dcd5aba465367ffbd734bec6b1c0a5b792cc704ba6414802318601ee558236d17b49bfdd7405610b0bb5f3bc0f9c06 +AUX make-3.82-construct-command-line.patch 2307 SHA256 5ba054cd764f493acc5f3f8acda9028e6fd2324508ca4dae7fbce04e491da0a5 SHA512 7c72bd7b9da986a8a37b047b7944a07b729fb16cd3413bce0e17008f2bbc4afabc48835580c4302d1381552873d1f07c93fbc4dfb6862eab0e46c62b0d35f557 WHIRLPOOL 59dae0e195a2fb6cdfb103f41870d31bae4d506df96b6e4abfbe96e39b35a6b6be9a25a7ce6663a67c3a842a09e8023e4c20754601dae1921514df77b6e3289a AUX make-3.82-copy-on-expand.patch 1812 SHA256 866a3942f9c747aecc5dd6c313f1fbd2f8f0b457a28197756c5713aefa45f543 SHA512 e7e31edfe3f11a91a4e2d0377a15328d6b54ab7b614c9d0c8ab6b18b5a8a5e2fa852ac7469bee685fcbdaa46d22f81fd585d0683a762afaa4160d7a7d5a558c8 WHIRLPOOL 4b8f123509131c495f15aacab0f906c864204c06554d07c5ac91d225ac6e4998d3fa1014a9780d8e3ef8a2c360c19a55bd84cd726f0ae0f150efdf92d3c60f11 AUX make-3.82-glob-speedup.patch 2833 SHA256 525896b152bb314cbf3c465575394584305ded895429bf4ade919d69dedfec06 SHA512 de6bacc4e389c2308a92b77b6f21f752ed078af6f5320481f84e8344532825a5b2225ddb9c8eba40badf9d377d1e5546906ab265e5c08a815cce01b0832dfe1c WHIRLPOOL ac2101cc81778c6a425566224594a89a958ce1d7dbd9bfb1e71bdea3ed794aa4c7de0b970f1603240f0f1072ef61c18a5fd839badd904dd2f551579dd45d7399 -AUX make-3.82-long-cmdline.patch 3004 SHA256 60d886307ba5a52b4cf9455278310f89a653f465ede00518ce0bf77f6ddd391a SHA512 b43303acdf540f6e985b2714f265ae923f551e67be1254d0344eb3ed9a4ccb399ab527a2500a9fe685b3489e47144674f889ee4c28b1acbdaa544206de5d61c3 WHIRLPOOL 9d96ce9d13fa73953d24a9d3c24186323c5c657df5dcf3c11a5bd51f664338eb65326245a9365d15fd3935ddb7354411fadbbf5664c35852ec523b6fe7edc482 +AUX make-3.82-intermediate-parallel.patch 1863 SHA256 05ba85e34ed727ea5bbeebcbeab467da1ec97edf7a9543b246896daa02b72a55 SHA512 6cebec44deda36e1a25fd5b0641ecfb90dc708d7d5dca2dd6108cc2bf0be142f26e96a5979a7b456c6f29517853e1abb7a755b078fef3c0f452437c7f0c38379 WHIRLPOOL 4ad303da4f73241ccb6a58f116b19d8f64fbe22bf2a6e0885c5df15ae95d3197fecda2a71a7b8f3be7a2de4362fd9de84359b7ee317154478b54b49389a994de +AUX make-3.82-long-command-line.patch 1598 SHA256 da196f8050c717d42110e9328b3413a61719a7064e5b76bb1a539f492e6a1613 SHA512 b86336d6e337a8d7524a90ec75944772aab48cba45ab003adc5b71c3a4604350ecb16c398a003cd3ac7ff900d841b915d771626e9a8485778ce72e43510f107c WHIRLPOOL 8d9e9454cddef12e7def055add4a695f1c62ad13e57afec4219e3e88d290d12368dd27fb491f47fe8400ba8528755fc2faf90fae64e47daa79618358f8b17814 AUX make-3.82-memory-corruption.patch 899 SHA256 8bb84e638f40514045f0c57b0ee9da24024679f624614e4d954ce7e8f6414d3b SHA512 a65428bf6a1ff3bbe811cbf633577f15399bdaeab11fab0e66a104987df4dffc7779753aaaaad0534e591ca6df2fbebfca6522b35487e6bf9166b0681c271ae8 WHIRLPOOL 0200c90954a948108b21e5cec6c95f02479bc0d189cc9cf76de6b0f4c3647225fde83e775b07f23cc4d0e040c02c3ca5972c2f75ac1da8f2ec4896ff21a6ea2f AUX make-3.82-oneshell.patch 931 SHA256 017bd61d9ed44a9cda3f7dc2c49d65be33b9b3a225580ad36e9caf5c8481f184 SHA512 85784dfcfeee2b7d7d3d659edc39a268165ab3f9dbd3d716ffcc7ba52cb44c3011cf5aa3e57cdab12f2f8aeec4ff00ffe82959aef242951f4dc1a7c6d4b55d89 WHIRLPOOL 287b8cefc2abfbe4a7825499f6c15db192be1b7941c25a1d5d260fc795a38bbb97923a8da5fe0035697c3dae36bd26b2633d316f6c9c9882be23aee51ece2d62 AUX make-3.82-parallel-remake.patch 1422 SHA256 e2b63a63a44fb692798d237f888ad35a0899144fc5c6700270dee8ee455ac231 SHA512 640489810aa387524d5b7b0c38b22d13c423e1ca04c2a8915d1736904aa6e158f999eda5d6b0f17c21a85f97b490e73c85fd2d205d494c98099e379842a1fccc WHIRLPOOL cfc8ba57e22524ba675aa916eafcdc5b4bd2121f7d1dfd6cb73a2fadc365975af8360e61b70260632fa13292537ed7ea169861745deb3cd7956a6ff4ff364738 @@ -25,14 +27,24 @@ EBUILD make-3.81-r2.ebuild 1307 SHA256 e9869620c7d244c93b029362a4e370320ac8c17a4 EBUILD make-3.81.ebuild 1142 SHA256 a64392d4eab939ce0b5da99775ab1e216d9c32827f0e595d2f10a72c6a2e6c6f SHA512 718f2485de85c7650297e812606b1e9c6ded70b3b5cb0790ff6322bcdd854315df60e53f758d7d6d37d5674e575839abaf2017125eeb6e9b307da88bc509624d WHIRLPOOL 680cd8719e7ee66823b0e8a5ed4c98023219210ce905b40bb975774ea3fcabf75f943c2c3409e1b96031263c23053ffa0c5013622db82e33378c9064a0f4c15e EBUILD make-3.82-r1.ebuild 1241 SHA256 449e8f16fab46f04f9d21b52e4712af3922ceaa3bc2b1e8630932d7bb36c9ae7 SHA512 028e96393149ea59b1c84afbb2daaeae57232c2d603f959b67bde06d128d4f84e611dfb296256d83aa8d562556edbf402bd454aed20698eac90e4010743d1899 WHIRLPOOL 53c4781723d629206b58e12cde9ce7996893a2035f473fd8751e36b1794b5961c161e544c087feca860c8c038ab13c4a248425fc646c7e29fd75f7d1d97b4537 EBUILD make-3.82-r3.ebuild 1307 SHA256 86260b468454eb17687dcaac59d288dd1ab192a354b87ba4e9db617342b676f2 SHA512 3000360b794c7f6db2e249a189e386b74410f6e124f2cefa6947db839fb9135ea13944f8c6e34a3644bd776ac45f1df1b4c9883355dca0ebc922dedf9d601fcf WHIRLPOOL 2b9f5e865b984a3a164b95d028e6127cc2e439ba7e8e16019aa954bb6bab8390170b8188ebec336175c96fd671d80a2d5f65490ed5d11b3af88be5a6d6c40b93 -EBUILD make-3.82-r4.ebuild 1486 SHA256 202a992e2c938dfa98b7f4bc80d91ea5ce601986fbdaa3d7401a4da21f93978f SHA512 2ac66b556a385cf548735dff6185cbb0411bfe7036ac052bc6eb499233a6a6d05fb17688bf5f398c91dd60b25eb77eaca86626d35b7d8a04e0d41ceb1ba410eb WHIRLPOOL f83a728708fc12348645125697989326f4fce9c82bb3a539d5b405df95ef996a7dadc7924cce148178c6ed97dbed8a34af041ee02d3094559cf5f8c881a3b220 +EBUILD make-3.82-r4.ebuild 1593 SHA256 c863391f87917a3e0b0c222bc597c25e5e5a0903f7d7805f819fc006b1542a76 SHA512 ac3a75a113d7acd1795a145b977f5cabff6cb9a155d3b0f9abc9aef7afa373a6fcfa540f6d59122be425a462195edf0e9d8484839eb1cf4ff87da708508788b4 WHIRLPOOL 5ff21d62c6fe70b92162a0954932faf8db0803681c7bb7f365d0eea465ea823ee1407b7b8763fd04a3117a306429c3a477806c3f1c82ddc0d539d5021c9c72b8 EBUILD make-3.82.ebuild 1183 SHA256 1f2ca73bb4d269ad882400528a2eeb2e22fbcee64fb8a589b074009b5df6ea52 SHA512 cc6cc43313c4381fe770ef6d6838d2e66da5ffab950f607f19ffc2f62958f5f15b411292be621ce3ce90f323866807bf03996209f2c694db54921177247d968c WHIRLPOOL 431e29680e0fcbad27939d2a5f37b793b0d605b34289776877ffe4673ab99712101cb5637b702e99b76f63e67625b5914962cd5ab3fe4a1f165dc01412949c96 -MISC ChangeLog 13138 SHA256 0ea5f5171407e7f0a798a29c33a947146bbb1c0e500a10158918fb0a0b34805b SHA512 1fcbead33dc191bd845482e7b1788bf286d67507aeca8d2cbb62993a8169a4d658474660bebfca466351259659996ebf416046b6e9a012c4f2eadc3810842145 WHIRLPOOL a453d133e07d144c94cf785a5f5878881a9e6ba1b9e9b1dc5e51e67aa5cf4f5330f8e07ffe45bade926d9d593a6c81e947ba576fd42211269c8191fb96e74eaa +MISC ChangeLog 13446 SHA256 85b4defa25584b49aa3db8833c28c567ad301784299927b7ab86301be2f46329 SHA512 d040f09265f228f1d51002f1f5837b982bdbc3e168a62dc25c79f8a7c5e48a9abdf81da448d745bbb949a0a962846c3de5ccebba32edf48b735f84e2be1fa701 WHIRLPOOL e1862b697ff248fff6fac3484dfa7d1383b2d2fa3563a9a0615829f1d8027c12f4d322e7a5925685f29175a098b361dd9d9401e33e98b571daa697d05532659e MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlBDqvoACgkQuQc30/atMkAbBwCgh2Ae1QWNpvZ4N+rANJgkj/nW -/wMAnAs3wYC5/tF7jQrAbkiSCS8S91r9 -=O8Ah +iQIcBAEBCAAGBQJQbnAhAAoJELEHsLL7fEFWNDQP/R5SaCfUU0M2PRsgnp4kK6PH +x+b800DCSG0zeokcwYqCCfw0zOt+UR8sfQFHYrdrQtJaYaA84OJOXgBYfutyaSWu +EMrtNG2Ih7myZxR2xAxu3IUDCribC+M88LBrSNdLVcW00E4c/x0ftNrS8vh9Paxu +XwJ+TOLEF2LrJdH1IJlcpjUiuiZkmkDZ1Mya3Y7fY0tr5LLczZqBbW0uj+GI12js +1OwFy+Jy9sx/QfSRxY4IHj0aHPKPUVIg2SSmQbvcED4pHGJP9wvU4Gl/Li6XU0VR +E4+/8HrGbYVn8d1zciE4pDGDMTafQujJ3UIOavuMYq4oWCp2Gm6BgynpEG6RvsH5 +Mce2ebZrdPJYq8r9LvE71FwSRMG6TkRN8+3H7btqPTu1hXEGntE+4ziHqKqbpsK/ +PJ0G+hDlO4KkKoQiaOmBAA1nrOGmhoVE8nIhb1upaVu/G/aR3I752iDG+/cZy8vJ +Ek1gEQYWu6uSlBg+4G6TYZbeNIsCkxnuSNKVUdIAhqnt33aaNO2LJMw4Wu0fkMF9 +FYXUewIVtPMQqdPJS1eU43HqYTsKJ+sI9YmoXtbM0Kd0/NGpVQ4Gq0mC7av9RHPN +FhXXkkzhwx4u5rcQMvUBcd/xQUzrgjhd+F/uk3MASFbynhG5jEO6J+5V+9TrHsLy +NaKrfsHJwrq6WLAT4/ok +=yYIA -----END PGP SIGNATURE----- diff --git a/sys-devel/make/files/make-3.82-construct-command-line.patch b/sys-devel/make/files/make-3.82-construct-command-line.patch new file mode 100644 index 000000000000..c504c45291ba --- /dev/null +++ b/sys-devel/make/files/make-3.82-construct-command-line.patch @@ -0,0 +1,71 @@ +https://savannah.gnu.org/bugs/?23922 + +From 6f3684710a0f832533191f8657a57bc2fbba90ba Mon Sep 17 00:00:00 2001 +From: eliz <eliz> +Date: Sat, 7 May 2011 08:29:13 +0000 +Subject: [PATCH] job.c (construct_command_argv_internal): Don't assume + shellflags is always non-NULL. Escape-protect characters + special to the shell when copying the value of SHELL into + new_line. Fixes Savannah bug #23922. + +--- + ChangeLog | 7 +++++++ + job.c | 23 ++++++++++++++++------- + 2 files changed, 23 insertions(+), 7 deletions(-) + +diff --git a/job.c b/job.c +index 67b402d..c2ce84d 100644 +--- a/job.c ++++ b/job.c +@@ -2844,12 +2844,12 @@ construct_command_argv_internal (char *line, char **restp, char *shell, + + unsigned int shell_len = strlen (shell); + unsigned int line_len = strlen (line); +- unsigned int sflags_len = strlen (shellflags); ++ unsigned int sflags_len = shellflags ? strlen (shellflags) : 0; + char *command_ptr = NULL; /* used for batch_mode_shell mode */ + char *new_line; + + # ifdef __EMX__ /* is this necessary? */ +- if (!unixy_shell) ++ if (!unixy_shell && shellflags) + shellflags[0] = '/'; /* "/c" */ + # endif + +@@ -2911,19 +2911,28 @@ construct_command_argv_internal (char *line, char **restp, char *shell, + + new_argv = xmalloc (4 * sizeof (char *)); + new_argv[0] = xstrdup(shell); +- new_argv[1] = xstrdup(shellflags); ++ new_argv[1] = xstrdup(shellflags ? shellflags : ""); + new_argv[2] = line; + new_argv[3] = NULL; + return new_argv; + } + +- new_line = alloca (shell_len + 1 + sflags_len + 1 ++ new_line = alloca ((shell_len*2) + 1 + sflags_len + 1 + + (line_len*2) + 1); + ap = new_line; +- memcpy (ap, shell, shell_len); +- ap += shell_len; ++ /* Copy SHELL, escaping any characters special to the shell. If ++ we don't escape them, construct_command_argv_internal will ++ recursively call itself ad nauseam, or until stack overflow, ++ whichever happens first. */ ++ for (p = shell; *p != '\0'; ++p) ++ { ++ if (strchr (sh_chars, *p) != 0) ++ *(ap++) = '\\'; ++ *(ap++) = *p; ++ } + *(ap++) = ' '; +- memcpy (ap, shellflags, sflags_len); ++ if (shellflags) ++ memcpy (ap, shellflags, sflags_len); + ap += sflags_len; + *(ap++) = ' '; + command_ptr = ap; +-- +1.7.12 + diff --git a/sys-devel/make/files/make-3.82-intermediate-parallel.patch b/sys-devel/make/files/make-3.82-intermediate-parallel.patch new file mode 100644 index 000000000000..df9b8d475b95 --- /dev/null +++ b/sys-devel/make/files/make-3.82-intermediate-parallel.patch @@ -0,0 +1,62 @@ +https://savannah.gnu.org/bugs/?30653 +https://bugs.gentoo.org/431250 + +From d1ba0ee36b2bdd91434b5df90f0f4cceda7d6979 Mon Sep 17 00:00:00 2001 +From: psmith <psmith> +Date: Mon, 10 Sep 2012 02:36:05 +0000 +Subject: [PATCH] Force intermediate targets to be considered if their + non-intermediate parent needs to be remade. Fixes Savannah + bug #30653. + +--- + ChangeLog | 4 ++++ + remake.c | 4 ++++ + tests/scripts/features/parallelism | 17 +++++++++++++++++ + 3 files changed, 25 insertions(+) + +diff --git a/remake.c b/remake.c +index c0bf709..b1ddd23 100644 +--- a/remake.c ++++ b/remake.c +@@ -612,6 +612,10 @@ update_file_1 (struct file *file, unsigned int depth) + d->file->dontcare = file->dontcare; + } + ++ /* We may have already considered this file, when we didn't know ++ we'd need to update it. Force update_file() to consider it and ++ not prune it. */ ++ d->file->considered = !considered; + + dep_status |= update_file (d->file, depth); + +diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism +index d4250f0..76d24a7 100644 +--- a/tests/scripts/features/parallelism ++++ b/tests/scripts/features/parallelism +@@ -214,6 +214,23 @@ rm main.x"); + rmfiles(qw(foo.y foo.y.in main.bar)); + } + ++# Ensure intermediate/secondary files are not pruned incorrectly. ++# See Savannah bug #30653 ++ ++utouch(-15, 'file2'); ++utouch(-10, 'file4'); ++utouch(-5, 'file1'); ++ ++run_make_test(q! ++.INTERMEDIATE: file3 ++file4: file3 ; @mv -f $< $@ ++file3: file2 ; touch $@ ++file2: file1 ; @touch $@ ++!, ++ '--no-print-directory -j2', "touch file3"); ++ ++#rmfiles('file1', 'file2', 'file3', 'file4'); ++ + if ($all_tests) { + # Jobserver FD handling is messed up in some way. + # Savannah bug #28189 +-- +1.7.12 + diff --git a/sys-devel/make/files/make-3.82-long-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch deleted file mode 100644 index f8a3ccc56a42..000000000000 --- a/sys-devel/make/files/make-3.82-long-cmdline.patch +++ /dev/null @@ -1,105 +0,0 @@ -http://bugs.gentoo.org/301116 -http://bugs.gentoo.org/300867 - -tweaked a little to avoid regenerating autotools, then rebased onto make-3.82 - -2009-07-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> - - * configure.in: Check for sys/user.h and linux/binfmts.h - headers. - * job.c: Include them if available. - (construct_command_argv_internal): When constructing the command - line with 'sh -c', use multiple arguments together with eval - expansion to evade the Linux per-argument length limit - MAX_ARG_STRLEN if it is defined. - Problem reported against Automake by Xan Lopez <xan@gnome.org>. - ---- job.c.orig 2010-01-15 18:36:53.000000000 +0200 -+++ job.c 2010-01-15 18:41:09.000000000 +0200 -@@ -29,6 +29,15 @@ - - #include <string.h> - -+#if defined(__linux__) /* defined (HAVE_LINUX_BINFMTS_H) && defined (HAVE_SYS_USER_H) */ -+#include <sys/user.h> -+#include <unistd.h> -+#ifndef PAGE_SIZE -+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+#include <linux/binfmts.h> -+#endif -+ - /* Default shell to use. */ - #ifdef WINDOWS32 - #include <windows.h> -@@ -2697,6 +2702,15 @@ - argument list. */ - - unsigned int shell_len = strlen (shell); -+#ifdef MAX_ARG_STRLEN -+ static char eval_line[] = "eval\\ \\\"set\\ x\\;\\ shift\\;\\ "; -+#define ARG_NUMBER_DIGITS 5 -+#define EVAL_LEN (sizeof(eval_line)-1 + shell_len + 4 \ -+ + (7 + ARG_NUMBER_DIGITS) * 2 * line_len / (MAX_ARG_STRLEN - 2)) -+#else -+#define EVAL_LEN 0 -+#endif -+ char *args_ptr; - unsigned int line_len = strlen (line); - unsigned int sflags_len = strlen (shellflags); - char *command_ptr = NULL; /* used for batch_mode_shell mode */ -@@ -2700,7 +2700,7 @@ - } - - new_line = alloca (shell_len + 1 + sflags_len + 1 -- + (line_len*2) + 1); -+ + (line_len*2) + 1 + EVAL_LEN); - ap = new_line; - memcpy (ap, shell, shell_len); - ap += shell_len; -@@ -2712,6 +2727,30 @@ - ap += sflags_len; - *(ap++) = ' '; - command_ptr = ap; -+ -+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN) -+ if (unixy_shell && line_len > MAX_ARG_STRLEN) -+ { -+ unsigned j; -+ memcpy (ap, eval_line, sizeof (eval_line) - 1); -+ ap += sizeof (eval_line) - 1; -+ for (j = 1; j <= 2 * line_len / (MAX_ARG_STRLEN - 2); j++) -+ ap += sprintf (ap, "\\$\\{%u\\}", j); -+ *ap++ = '\\'; -+ *ap++ = '"'; -+ *ap++ = ' '; -+ /* Copy only the first word of SHELL to $0. */ -+ for (p = shell; *p != '\0'; ++p) -+ { -+ if (isspace ((unsigned char)*p)) -+ break; -+ *ap++ = *p; -+ } -+ *ap++ = ' '; -+ } -+#endif -+ args_ptr = ap; -+ - for (p = line; *p != '\0'; ++p) - { - if (restp != NULL && *p == '\n') -@@ -2760,6 +2799,14 @@ - } - #endif - *ap++ = *p; -+ -+#if !defined (WINDOWS32) && defined (MAX_ARG_STRLEN) -+ if (unixy_shell && line_len > MAX_ARG_STRLEN && (ap - args_ptr > MAX_ARG_STRLEN - 2)) -+ { -+ *ap++ = ' '; -+ args_ptr = ap; -+ } -+#endif - } - if (ap == new_line + shell_len + sflags_len + 2) - /* Line was empty. */ diff --git a/sys-devel/make/files/make-3.82-long-command-line.patch b/sys-devel/make/files/make-3.82-long-command-line.patch new file mode 100644 index 000000000000..9266786e4da7 --- /dev/null +++ b/sys-devel/make/files/make-3.82-long-command-line.patch @@ -0,0 +1,54 @@ +https://savannah.gnu.org/bugs/?36451 + +From a95796de3a491d8acfc8ea94c217b90531161786 Mon Sep 17 00:00:00 2001 +From: psmith <psmith> +Date: Sun, 9 Sep 2012 23:25:07 +0000 +Subject: [PATCH] Keep the command line on the heap to avoid stack overflow. + Fixes Savannah bug #36451. + +--- + ChangeLog | 3 +++ + job.c | 13 +++++++++---- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/job.c b/job.c +index 754576b..f7b7d51 100644 +--- a/job.c ++++ b/job.c +@@ -2984,8 +2984,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell, + return new_argv; + } + +- new_line = alloca ((shell_len*2) + 1 + sflags_len + 1 +- + (line_len*2) + 1); ++ new_line = xmalloc ((shell_len*2) + 1 + sflags_len + 1 ++ + (line_len*2) + 1); + ap = new_line; + /* Copy SHELL, escaping any characters special to the shell. If + we don't escape them, construct_command_argv_internal will +@@ -3052,8 +3052,11 @@ construct_command_argv_internal (char *line, char **restp, char *shell, + *ap++ = *p; + } + if (ap == new_line + shell_len + sflags_len + 2) +- /* Line was empty. */ +- return 0; ++ { ++ /* Line was empty. */ ++ free (new_line); ++ return 0; ++ } + *ap = '\0'; + + #ifdef WINDOWS32 +@@ -3194,6 +3197,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell, + fatal (NILF, _("%s (line %d) Bad shell context (!unixy && !batch_mode_shell)\n"), + __FILE__, __LINE__); + #endif ++ ++ free (new_line); + } + #endif /* ! AMIGA */ + +-- +1.7.12 + diff --git a/sys-devel/make/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r4.ebuild index 776e77572bc5..f0ff076f06a2 100644 --- a/sys-devel/make/make-3.82-r4.ebuild +++ b/sys-devel/make/make-3.82-r4.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/make-3.82-r4.ebuild,v 1.1 2011/12/03 00:57:25 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/make/make-3.82-r4.ebuild,v 1.2 2012/10/05 05:28:59 vapier Exp $ EAPI="2" @@ -12,7 +12,7 @@ SRC_URI="mirror://gnu//make/${P}.tar.bz2" LICENSE="GPL-3" SLOT="0" -#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" IUSE="nls static" DEPEND="nls? ( sys-devel/gettext )" @@ -26,7 +26,9 @@ src_prepare() { epatch "${FILESDIR}"/${P}-copy-on-expand.patch epatch "${FILESDIR}"/${P}-oneshell.patch epatch "${FILESDIR}"/${P}-parallel-remake.patch - epatch "${FILESDIR}"/${P}-long-cmdline.patch #300867 #301116 + epatch "${FILESDIR}"/${P}-intermediate-parallel.patch #431250 + epatch "${FILESDIR}"/${P}-construct-command-line.patch + epatch "${FILESDIR}"/${P}-long-command-line.patch } src_configure() { |