[make] - Upstream 3.82: - Drop rlimit, fdleak, strcpy-overlap, recursion-test, double-free patches, m

Petr Machata pmachata at fedoraproject.org
Thu Aug 12 13:32:47 UTC 2010


commit 8105161bd73c4ed6519821a916dd9eb7c6387e0e
Author: Petr Machata <pmachata at redhat.com>
Date:   Thu Aug 12 15:25:36 2010 +0200

    - Upstream 3.82:
      - Drop rlimit, fdleak, strcpy-overlap, recursion-test, double-free
        patches, make supports this functionality now
      - Disable the memory patch for the time being
      - Port remaining patches
      - Add weird-shell patch, upstream bug 30748
    - Resolves: #618998

 .gitignore                                         |    2 +
 make-3.79.1-noclock_gettime.patch                  |   13 ---
 make-3.80-getcwd.patch                             |   15 ---
 make-3.81-double-free.patch                        |   13 ---
 make-3.81-fdleak.patch                             |   60 -----------
 make-3.81-jobserver.patch                          |   18 ---
 make-3.81-newlines.patch                           |   23 ----
 make-3.81-recursion-test.patch                     |   13 ---
 make-3.81-rlimit.patch                             |  111 --------------------
 make-3.81-strcpy-overlap.patch                     |   16 ---
 ...eporting.patch => make-3.82-err-reporting.patch |   93 +++++++++--------
 make-3.82-getcwd.patch                             |   14 +++
 make-3.80-j8k.patch => make-3.82-j8k.patch         |   13 ++-
 make-3.82-jobserver.patch                          |   19 ++++
 make-3.82-newlines.patch                           |   30 ++++++
 make-3.82-noclock_gettime.patch                    |   14 +++
 make-3.82-weird-shell.patch                        |   16 +++
 make-3.82.tar.bz2.sig                              |  Bin 0 -> 72 bytes
 make.spec                                          |   45 ++++----
 sources                                            |    1 +
 20 files changed, 176 insertions(+), 353 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ff79ec2..d2cb947 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 make-3.81.tar.bz2
+make-*/
+make-3.82.tar.bz2
diff --git a/make-3.81-err-reporting.patch b/make-3.82-err-reporting.patch
similarity index 58%
rename from make-3.81-err-reporting.patch
rename to make-3.82-err-reporting.patch
index eaee702..2f5b3c6 100644
--- a/make-3.81-err-reporting.patch
+++ b/make-3.82-err-reporting.patch
@@ -1,7 +1,7 @@
-diff -urp make-3.81/misc.c make-3.81-pm/misc.c
---- make-3.81/misc.c	2006-04-01 08:36:40.000000000 +0200
-+++ make-3.81-pm/misc.c	2008-09-22 12:45:18.000000000 +0200
-@@ -311,17 +311,31 @@ strerror (int errnum)
+diff -urp make-3.82/misc.c make-3.82-pm/misc.c
+--- make-3.82/misc.c	2010-07-19 09:10:54.000000000 +0200
++++ make-3.82-pm/misc.c	2010-08-11 15:26:45.000000000 +0200
+@@ -342,17 +342,31 @@ strerror (int errnum)
  /* Print an error message from errno.  */
  
  void
@@ -35,10 +35,10 @@ diff -urp make-3.81/misc.c make-3.81-pm/misc.c
  
    /* NOTREACHED */
  }
-diff -urp make-3.81/main.c make-3.81-pm/main.c
---- make-3.81/main.c	2008-09-22 12:45:07.000000000 +0200
-+++ make-3.81-pm/main.c	2008-09-22 12:45:18.000000000 +0200
-@@ -1502,13 +1502,13 @@ main (int argc, char **argv, char **envp
+diff -urp make-3.82/main.c make-3.82-pm/main.c
+--- make-3.82/main.c	2010-08-11 15:34:12.000000000 +0200
++++ make-3.82-pm/main.c	2010-08-11 15:30:11.000000000 +0200
+@@ -1536,13 +1536,13 @@ main (int argc, char **argv, char **envp
  	    strcat (template, DEFAULT_TMPFILE);
  	    outfile = open_tmpfile (&stdin_nm, template);
  	    if (outfile == 0)
@@ -52,18 +52,18 @@ diff -urp make-3.81/main.c make-3.81-pm/main.c
 -		  pfatal_with_name (_("fwrite (temporary file)"));
 +		  pfatal_with_name_err (_("fwrite (temporary file)"), errno);
  	      }
- 	    (void) fclose (outfile);
+ 	    fclose (outfile);
  
-@@ -1681,7 +1681,7 @@ main (int argc, char **argv, char **envp
-     else if ((job_rfd = dup (job_fds[0])) < 0)
-       {
-         if (errno != EBADF)
--          pfatal_with_name (_("dup jobserver"));
-+          pfatal_with_name_err (_("dup jobserver"), errno);
+@@ -1747,7 +1747,7 @@ main (int argc, char **argv, char **envp
+       else if ((job_rfd = dup (job_fds[0])) < 0)
+         {
+           if (errno != EBADF)
+-            pfatal_with_name (_("dup jobserver"));
++            pfatal_with_name_err (_("dup jobserver"), errno);
  
-         error (NILF,
-                _("warning: jobserver unavailable: using -j1.  Add `+' to parent make rule."));
-@@ -1721,7 +1721,7 @@ main (int argc, char **argv, char **envp
+           error (NILF,
+                  _("warning: jobserver unavailable: using -j1.  Add `+' to parent make rule."));
+@@ -1788,7 +1788,7 @@ main (int argc, char **argv, char **envp
        char c = '+';
  
        if (pipe (job_fds) < 0 || (job_rfd = dup (job_fds[0])) < 0)
@@ -72,7 +72,7 @@ diff -urp make-3.81/main.c make-3.81-pm/main.c
  
        /* Every make assumes that it always has one job it can run.  For the
           submakes it's the token they were given by their parent.  For the
-@@ -1736,7 +1736,7 @@ main (int argc, char **argv, char **envp
+@@ -1803,7 +1803,7 @@ main (int argc, char **argv, char **envp
  
            EINTRLOOP (r, write (job_fds[1], &c, 1));
            if (r != 1)
@@ -81,40 +81,42 @@ diff -urp make-3.81/main.c make-3.81-pm/main.c
          }
  
        /* Fill in the jobserver_fds struct for our children.  */
-@@ -2151,7 +2151,7 @@ main (int argc, char **argv, char **envp
+@@ -2226,7 +2226,7 @@ main (int argc, char **argv, char **envp
    /* If there is a temp file from reading a makefile from stdin, get rid of
       it now.  */
    if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT)
 -    perror_with_name (_("unlink (temporary file): "), stdin_nm);
 +    perror_with_name_err (_("unlink (temporary file): "), stdin_nm, errno);
  
-   {
-     int status;
-diff -urp make-3.81/make.h make-3.81-pm/make.h
---- make-3.81/make.h	2008-09-22 12:45:07.000000000 +0200
-+++ make-3.81-pm/make.h	2008-09-22 12:45:18.000000000 +0200
-@@ -414,6 +414,8 @@ extern void die PARAMS ((int)) __attribu
- extern void log_working_directory PARAMS ((int));
- extern void pfatal_with_name PARAMS ((const char *)) __attribute__ ((noreturn));
- extern void perror_with_name PARAMS ((const char *, const char *));
-+extern void pfatal_with_name_err PARAMS ((const char *, int errnum)) __attribute__ ((noreturn));
-+extern void perror_with_name_err PARAMS ((const char *, const char *, int errnum));
- extern char *savestring PARAMS ((const char *, unsigned int));
- extern char *concat PARAMS ((const char *, const char *, const char *));
- extern char *xmalloc PARAMS ((unsigned int));
-diff -urp make-3.81/job.c make-3.81-pm/job.c
---- make-3.81/job.c	2006-03-20 04:03:04.000000000 +0100
-+++ make-3.81-pm/job.c	2008-09-22 12:45:18.000000000 +0200
-@@ -859,7 +859,7 @@ free_child (struct child *child)
+   /* If there were no command-line goals, use the default.  */
+   if (goals == 0)
+Только в make-3.82-pm: job.c~
+Только в make-3.82-pm: main.c~
+diff -urp make-3.82/make.h make-3.82-pm/make.h
+--- make-3.82/make.h	2010-08-11 15:34:12.000000000 +0200
++++ make-3.82-pm/make.h	2010-08-11 15:31:26.000000000 +0200
+@@ -385,6 +385,8 @@ void die (int) __attribute__ ((noreturn)
+ void log_working_directory (int);
+ void pfatal_with_name (const char *) __attribute__ ((noreturn));
+ void perror_with_name (const char *, const char *);
++void pfatal_with_name_err (const char *, int errnum) __attribute__ ((noreturn));
++void perror_with_name_err (const char *, const char *, int errnum);
+ void *xmalloc (unsigned int);
+ void *xcalloc (unsigned int);
+ void *xrealloc (void *, unsigned int);
+diff -urp make-3.82/job.c make-3.82-pm/job.c
+--- make-3.82/job.c	2010-07-24 10:27:50.000000000 +0200
++++ make-3.82-pm/job.c	2010-08-11 15:33:54.000000000 +0200
+@@ -917,7 +917,7 @@ free_child (struct child *child)
  
        EINTRLOOP (r, write (job_fds[1], &token, 1));
        if (r != 1)
 -	pfatal_with_name (_("write jobserver"));
 +	pfatal_with_name_err (_("write jobserver"), errno);
  
-       DB (DB_JOBS, (_("Released token for child 0x%08lx (%s).\n"),
-                     (unsigned long int) child, child->file->name));
-@@ -1699,6 +1699,7 @@ new_job (struct file *file)
+       DB (DB_JOBS, (_("Released token for child %p (%s).\n"),
+                     child, child->file->name));
+@@ -1768,6 +1768,7 @@ new_job (struct file *file)
  
          /* Set interruptible system calls, and read() for a job token.  */
  	set_child_handler_action_flags (1, waiting_jobs != NULL);
@@ -122,7 +124,7 @@ diff -urp make-3.81/job.c make-3.81-pm/job.c
  	got_token = read (job_rfd, &token, 1);
  	saved_errno = errno;
  	set_child_handler_action_flags (0, waiting_jobs != NULL);
-@@ -1713,10 +1714,14 @@ new_job (struct file *file)
+@@ -1782,10 +1783,14 @@ new_job (struct file *file)
  
          /* If the error _wasn't_ expected (EINTR or EBADF), punt.  Otherwise,
             go back and reap_children(), and try again.  */
@@ -141,12 +143,15 @@ diff -urp make-3.81/job.c make-3.81-pm/job.c
            DB (DB_JOBS, ("Read returned EBADF.\n"));
        }
  #endif
-@@ -1831,7 +1836,7 @@ load_too_high (void)
+@@ -1909,7 +1914,8 @@ load_too_high (void)
  	    error (NILF,
                     _("cannot enforce load limits on this operating system"));
  	  else
 -	    perror_with_name (_("cannot enforce load limit: "), "getloadavg");
-+	    perror_with_name_err (_("cannot enforce load limit: "), "getloadavg", errno);
++	    perror_with_name_err (_("cannot enforce load limit: "),
++				  "getloadavg", errno);
  	}
        lossage = errno;
        load = 0;
+Только в make-3.82-pm: make.h~
+Только в make-3.82-pm: misc.c.orig
diff --git a/make-3.82-getcwd.patch b/make-3.82-getcwd.patch
new file mode 100644
index 0000000..b688732
--- /dev/null
+++ b/make-3.82-getcwd.patch
@@ -0,0 +1,14 @@
+diff -up make-3.82/make.h\~ make-3.82/make.h
+--- make-3.82/make.h~	2010-07-20 15:12:06.000000000 +0200
++++ make-3.82/make.h	2010-08-11 15:19:09.000000000 +0200
+@@ -472,7 +472,7 @@ long int lseek ();
+ #endif  /* Not GNU C library or POSIX.  */
+ 
+ #ifdef  HAVE_GETCWD
+-# if !defined(VMS) && !defined(__DECC)
++# if !defined(VMS) && !defined(__DECC) && !defined(getcwd)
+ char *getcwd ();
+ # endif
+ #else
+
+Diff finished.  Wed Aug 11 15:19:12 2010
diff --git a/make-3.80-j8k.patch b/make-3.82-j8k.patch
similarity index 63%
rename from make-3.80-j8k.patch
rename to make-3.82-j8k.patch
index 1acd4f9..b5fa357 100644
--- a/make-3.80-j8k.patch
+++ b/make-3.82-j8k.patch
@@ -1,8 +1,9 @@
---- make-3.80/main.c.jj	2002-08-09 21:27:17.000000000 -0400
-+++ make-3.80/main.c	2004-12-13 12:48:25.000000000 -0500
-@@ -1549,6 +1549,20 @@ int main (int argc, char ** argv)
-       }
-   }
+diff -up make-3.82/main.c\~ make-3.82/main.c
+--- make-3.82/main.c~	2010-07-19 09:10:53.000000000 +0200
++++ make-3.82/main.c	2010-08-11 15:12:09.000000000 +0200
+@@ -1765,6 +1765,20 @@ main (int argc, char **argv, char **envp
+         }
+     }
  
 +#ifdef PIPE_BUF
 +  if (job_slots > PIPE_BUF)
@@ -21,3 +22,5 @@
    /* If we have >1 slot but no jobserver-fds, then we're a top-level make.
       Set up the pipe and install the fds option for our children.  */
  
+
+Diff finished.  Wed Aug 11 15:12:32 2010
diff --git a/make-3.82-jobserver.patch b/make-3.82-jobserver.patch
new file mode 100644
index 0000000..2a85503
--- /dev/null
+++ b/make-3.82-jobserver.patch
@@ -0,0 +1,19 @@
+diff -up make-3.82/main.c\~ make-3.82/main.c
+--- make-3.82/main.c~	2010-08-12 14:59:20.000000000 +0200
++++ make-3.82/main.c	2010-08-12 15:00:07.000000000 +0200
+@@ -1756,8 +1756,11 @@ main (int argc, char **argv, char **envp
+ 
+       if (job_slots > 0)
+         {
+-          close (job_fds[0]);
+-          close (job_fds[1]);
++	  if (restarts == 0)
++	    {
++	      close (job_fds[0]);
++	      close (job_fds[1]);
++	    }
+           job_fds[0] = job_fds[1] = -1;
+           free (jobserver_fds->list);
+           free (jobserver_fds);
+
+Diff finished.  Thu Aug 12 15:00:22 2010
diff --git a/make-3.82-newlines.patch b/make-3.82-newlines.patch
new file mode 100644
index 0000000..d86018a
--- /dev/null
+++ b/make-3.82-newlines.patch
@@ -0,0 +1,30 @@
+diff -up make-3.82/job.c\~ make-3.82/job.c
+--- make-3.82/job.c~	2010-08-12 14:57:15.000000000 +0200
++++ make-3.82/job.c	2010-08-12 14:58:23.000000000 +0200
+@@ -2876,7 +2876,7 @@ construct_command_argv_internal (char *l
+       }
+ 
+     new_line = alloca (shell_len + 1 + sflags_len + 1
+-                             + (line_len*2) + 1);
++                             + (line_len*4) + 1);
+     ap = new_line;
+     memcpy (ap, shell, shell_len);
+     ap += shell_len;
+@@ -2904,13 +2904,14 @@ construct_command_argv_internal (char *l
+ #endif
+ 	    if (PRESERVE_BSNL)
+ 	      {
+-		*(ap++) = '\\';
++		*(ap++) = '\'';
+ 		/* Only non-batch execution needs another backslash,
+ 		   because it will be passed through a recursive
+ 		   invocation of this function.  */
+ 		if (!batch_mode_shell)
+ 		  *(ap++) = '\\';
+ 		*(ap++) = '\n';
++		*(ap++) = '\'';
+ 	      }
+ 	    ++p;
+ 	    continue;
+
+Diff finished.  Thu Aug 12 14:58:34 2010
diff --git a/make-3.82-noclock_gettime.patch b/make-3.82-noclock_gettime.patch
new file mode 100644
index 0000000..f63e1fc
--- /dev/null
+++ b/make-3.82-noclock_gettime.patch
@@ -0,0 +1,14 @@
+diff -up make-3.82/configure\~ make-3.82/configure
+--- make-3.82/configure~	2010-07-28 07:41:51.000000000 +0200
++++ make-3.82/configure	2010-08-11 15:07:50.000000000 +0200
+@@ -7215,7 +7215,7 @@ return clock_gettime ();
+   return 0;
+ }
+ _ACEOF
+-for ac_lib in '' rt posix4; do
++for ac_lib in '' posix4; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+
+Diff finished.  Wed Aug 11 15:07:59 2010
diff --git a/make-3.82-weird-shell.patch b/make-3.82-weird-shell.patch
new file mode 100644
index 0000000..dfdaf89
--- /dev/null
+++ b/make-3.82-weird-shell.patch
@@ -0,0 +1,16 @@
+diff -up make-3.82/job.c\~ make-3.82/job.c
+--- make-3.82/job.c~	2010-08-11 16:13:33.000000000 +0200
++++ make-3.82/job.c	2010-08-12 14:20:08.000000000 +0200
+@@ -2442,7 +2442,11 @@ construct_command_argv_internal (char *l
+ 
+   /* See if it is safe to parse commands internally.  */
+   if (shell == 0)
+-    shell = default_shell;
++    {
++      shell = default_shell;
++      if (shellflags == 0)
++	shellflags = "-c";
++    }
+ #ifdef WINDOWS32
+   else if (strcmp (shell, default_shell))
+   {
diff --git a/make-3.82.tar.bz2.sig b/make-3.82.tar.bz2.sig
new file mode 100644
index 0000000..60fcc6c
Binary files /dev/null and b/make-3.82.tar.bz2.sig differ
diff --git a/make.spec b/make.spec
index a8e9076..fbf922a 100644
--- a/make.spec
+++ b/make.spec
@@ -2,24 +2,20 @@
 Summary: A GNU tool which simplifies the build process for users
 Name: make
 Epoch: 1
-Version: 3.81
-Release: 21%{?dist}
+Version: 3.82
+Release: 1%{?dist}
 License: GPLv2+
 Group: Development/Tools
 URL: http://www.gnu.org/software/make/
 Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
-Patch: make-3.79.1-noclock_gettime.patch
-Patch4: make-3.80-j8k.patch
-Patch5: make-3.80-getcwd.patch
-Patch6: make-3.81-err-reporting.patch
-Patch7: make-3.81-memory.patch
-Patch8: make-3.81-rlimit.patch
-Patch9: make-3.81-newlines.patch
-Patch10: make-3.81-jobserver.patch
-Patch11: make-3.81-fdleak.patch
-Patch12: make-3.81-strcpy-overlap.patch
-Patch13: make-3.81-recursion-test.patch
-Patch14: make-3.81-double-free.patch
+Patch1: make-3.82-noclock_gettime.patch
+Patch2: make-3.82-j8k.patch
+Patch3: make-3.82-getcwd.patch
+Patch4: make-3.82-err-reporting.patch
+Patch5: make-3.81-memory.patch
+Patch6: make-3.82-weird-shell.patch
+Patch7: make-3.82-newlines.patch
+Patch8: make-3.82-jobserver.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
@@ -35,18 +31,14 @@ makefile.
 
 %prep
 %setup -q
-%patch -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 %patch4 -p1
-%patch5 -p1
+#%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p0
-%patch13 -p1
-%patch14 -p1
 
 %build
 %configure
@@ -89,6 +81,15 @@ fi
 %{_infodir}/*.info*
 
 %changelog
+* Wed Aug 11 2010 Petr Machata <pmachata at redhat.com> - 1:3.82-1
+- Upstream 3.82:
+  - Drop rlimit, fdleak, strcpy-overlap, recursion-test, double-free
+    patches, make supports this functionality now
+  - Disable the memory patch for the time being
+  - Port remaining patches
+  - Add weird-shell patch, upstream bug 30748
+- Resolves: #618998
+
 * Wed Aug 11 2010 Petr Machata <pmachata at redhat.com> - 1:3.81-21
 - Add BR procps
 - Resolves: #616813
diff --git a/sources b/sources
index c58cbd6..ee44db7 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
 354853e0b2da90c527e35aabb8d6f1e6  make-3.81.tar.bz2
+1a11100f3c63fcf5753818e59d63088f  make-3.82.tar.bz2


More information about the scm-commits mailing list