public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Priit Laes" <plaes@plaes.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/
Date: Wed, 10 Oct 2012 14:26:01 +0000 (UTC)	[thread overview]
Message-ID: <1349879051.6aaf5378fee6898d9684099df19c0f4d7dfe28ce.plaes@gentoo> (raw)

commit:     6aaf5378fee6898d9684099df19c0f4d7dfe28ce
Author:     Priit Laes <plaes <AT> plaes <DOT> org>
AuthorDate: Wed Oct 10 14:24:11 2012 +0000
Commit:     Priit Laes <plaes <AT> plaes <DOT> org>
CommitDate: Wed Oct 10 14:24:11 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=6aaf5378

sys-devel/make: Revbump to include gx86 changes

---
 .../files/make-3.82-construct-command-line.patch   |   71 ++++++++++++++++++++
 .../files/make-3.82-intermediate-parallel.patch    |   62 +++++++++++++++++
 ...e.patch => make-3.82-long-cmdline-webkit.patch} |   30 ++++----
 ...line.patch => make-3.82-long-cmdline.patch.old} |    0
 .../make/files/make-3.82-long-command-line.patch   |   54 +++++++++++++++
 ...ld.patch => make-3.82-parallel-build.patch.old} |    0
 .../{make-3.82-r4.ebuild => make-3.82-r5.ebuild}   |   11 +++-
 7 files changed, 211 insertions(+), 17 deletions(-)

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 0000000..c504c45
--- /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 0000000..df9b8d4
--- /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-webkit.patch
similarity index 80%
copy from sys-devel/make/files/make-3.82-long-cmdline.patch
copy to sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
index f8a3ccc..685fdb7 100644
--- a/sys-devel/make/files/make-3.82-long-cmdline.patch
+++ b/sys-devel/make/files/make-3.82-long-cmdline-webkit.patch
@@ -14,8 +14,8 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
 	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
+--- job.c.orig	2012-10-10 15:23:11.000000000 +0300
++++ job.c	2012-10-10 15:27:10.000000000 +0300
 @@ -29,6 +29,15 @@
  
  #include <string.h>
@@ -32,7 +32,7 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
  /* Default shell to use.  */
  #ifdef WINDOWS32
  #include <windows.h>
-@@ -2697,6 +2702,15 @@
+@@ -2791,6 +2800,15 @@
         argument list.  */
  
      unsigned int shell_len = strlen (shell);
@@ -46,18 +46,18 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
 +#endif
 +    char *args_ptr;
      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 */
-@@ -2700,7 +2700,7 @@
+@@ -2866,7 +2884,7 @@
        }
  
-     new_line = alloca (shell_len + 1 + sflags_len + 1
--                             + (line_len*2) + 1);
-+                             + (line_len*2) + 1 + EVAL_LEN);
+     new_line = xmalloc ((shell_len*2) + 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 @@
+     /* Copy SHELL, escaping any characters special to the shell.  If
+        we don't escape them, construct_command_argv_internal will
+@@ -2884,6 +2902,30 @@
      ap += sflags_len;
      *(ap++) = ' ';
      command_ptr = ap;
@@ -81,14 +81,14 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
 +	    *ap++ = *p;
 +	  }
 +	*ap++ = ' ';
-+      }
++	   }
 +#endif
-+    args_ptr = ap;
++	 args_ptr = ap;
 +
      for (p = line; *p != '\0'; ++p)
        {
  	if (restp != NULL && *p == '\n')
-@@ -2760,6 +2799,14 @@
+@@ -2931,6 +2973,14 @@
            }
  #endif
  	*ap++ = *p;
@@ -102,4 +102,4 @@ tweaked a little to avoid regenerating autotools, then rebased onto make-3.82
 +#endif
        }
      if (ap == new_line + shell_len + sflags_len + 2)
-       /* Line was empty.  */
+       {

diff --git a/sys-devel/make/files/make-3.82-long-cmdline.patch b/sys-devel/make/files/make-3.82-long-cmdline.patch.old
similarity index 100%
rename from sys-devel/make/files/make-3.82-long-cmdline.patch
rename to sys-devel/make/files/make-3.82-long-cmdline.patch.old

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 0000000..9266786
--- /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/files/make-3.82-parallel-build.patch b/sys-devel/make/files/make-3.82-parallel-build.patch.old
similarity index 100%
rename from sys-devel/make/files/make-3.82-parallel-build.patch
rename to sys-devel/make/files/make-3.82-parallel-build.patch.old

diff --git a/sys-devel/make/make-3.82-r4.ebuild b/sys-devel/make/make-3.82-r5.ebuild
similarity index 80%
rename from sys-devel/make/make-3.82-r4.ebuild
rename to sys-devel/make/make-3.82-r5.ebuild
index 93dc851..d480d0f 100644
--- a/sys-devel/make/make-3.82-r4.ebuild
+++ b/sys-devel/make/make-3.82-r5.ebuild
@@ -25,9 +25,16 @@ src_prepare() {
 	epatch "${FILESDIR}"/${P}-glob-speedup.patch #382845
 	epatch "${FILESDIR}"/${P}-copy-on-expand.patch
 	epatch "${FILESDIR}"/${P}-oneshell.patch
-	epatch "${FILESDIR}"/${P}-parallel-build.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
+
+	# Custom patches from our overlay
+	epatch "${FILESDIR}"/${P}-long-cmdline-webkit.patch #300867 #301116
+
+	# Applied partially
+	# epatch "${FILESDIR}"/${P}-parallel-build.patch.old
 }
 
 src_configure() {


             reply	other threads:[~2012-10-10 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 14:26 Priit Laes [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-12-26 22:04 [gentoo-commits] proj/gnome:master commit in: sys-devel/make/files/, sys-devel/make/ Gilles Dartiguelongue
2012-08-24 21:35 Priit Laes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349879051.6aaf5378fee6898d9684099df19c0f4d7dfe28ce.plaes@gentoo \
    --to=plaes@plaes.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox