- 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
This commit is contained in:
Petr Machata 2010-08-12 15:25:36 +02:00
parent 83d3b5a753
commit 8105161bd7
20 changed files with 176 additions and 353 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
make-3.81.tar.bz2 make-3.81.tar.bz2
make-*/
make-3.82.tar.bz2

View File

@ -1,13 +0,0 @@
diff -urp make-3.81/configure make-3.81-pm/configure
--- make-3.81/configure 2006-04-01 08:40:00.000000000 +0200
+++ make-3.81-pm/configure 2008-09-22 10:50:40.000000000 +0200
@@ -8018,7 +8018,7 @@ fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_clock_gettime" = no; then
- for ac_lib in rt posix4; do
+ for ac_lib in posix4; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
Only in make-3.81-pm/: configure.orig

View File

@ -1,15 +0,0 @@
Only in make-3.81-pm/: configure.orig
diff -urp make-3.81/make.h make-3.81-pm/make.h
--- make-3.81/make.h 2006-02-16 00:54:43.000000000 +0100
+++ make-3.81-pm/make.h 2008-09-22 10:53:35.000000000 +0200
@@ -488,7 +488,7 @@ extern 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)
extern char *getcwd ();
# endif
#else
Only in make-3.81-pm/: make.h~
Only in make-3.81-pm/: make.h.orig

View File

@ -1,13 +0,0 @@
diff -up /home/petr/fedora/make/devel/make-3.81/read.c\~ /home/petr/fedora/make/devel/make-3.81/read.c
--- make-3.81/read.c~ 2010-07-01 16:01:34.000000000 +0200
+++ make-3.81/read.c 2010-07-01 16:02:29.000000000 +0200
@@ -3136,6 +3136,7 @@ multi_glob (struct nameseq *chain, unsig
}
free (memname);
+ memname = 0;
}
else
#endif /* !NO_ARCHIVES */
Diff finished. Thu Jul 1 16:02:44 2010

View File

@ -1,60 +0,0 @@
diff -urp make-3.81/read.c make-3.81-leak/read.c
--- make-3.81/read.c 2006-03-17 15:24:20.000000000 +0100
+++ make-3.81-leak/read.c 2008-09-16 16:43:12.000000000 +0200
@@ -296,6 +300,37 @@ restore_conditionals (struct conditional
conditionals = saved;
}
+/* If possible, open the file and mark it close-on-exec, so that make
+ doesn't leak the descriptor to binaries called via $(shell ...).*/
+static FILE *
+open_makefile (char *filename)
+{
+ FILE *fp;
+
+#if HAVE_FDOPEN
+ int fd = open (filename, O_RDONLY);
+ int save;
+ if (fd < 0)
+ return NULL;
+
+ fp = fdopen (fd, "r");
+ if (fp == NULL)
+ {
+ save = errno;
+ close (fd);
+ errno = save;
+ return NULL;
+ }
+
+ CLOSE_ON_EXEC (fd);
+
+#else
+ fp = fopen (filename, "r");
+#endif
+
+ return fp;
+}
+
static int
eval_makefile (char *filename, int flags)
{
@@ -335,7 +376,8 @@ eval_makefile (char *filename, int flags
filename = expanded;
}
- ebuf.fp = fopen (filename, "r");
+ ebuf.fp = open_makefile (filename);
+
/* Save the error code so we print the right message later. */
makefile_errno = errno;
@@ -348,7 +390,7 @@ eval_makefile (char *filename, int flags
for (i = 0; include_directories[i] != 0; ++i)
{
included = concat (include_directories[i], "/", filename);
- ebuf.fp = fopen (included, "r");
+ ebuf.fp = open_makefile (included);
if (ebuf.fp)
{
filename = included;

View File

@ -1,18 +0,0 @@
diff -urp make-3.81/main.c make-3.81-pm/main.c
--- make-3.81/main.c 2007-09-24 15:28:34.000000000 +0200
+++ make-3.81-pm/main.c 2007-09-24 15:32:50.000000000 +0200
@@ -1669,8 +1669,12 @@ 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);

View File

@ -1,23 +0,0 @@
--- make-3.81-orig/job.c 2007-02-21 19:10:54.000000000 +0100
+++ make-3.81-pm/job.c 2007-02-22 18:13:59.000000000 +0100
@@ -2706,7 +2706,7 @@
unsigned int line_len = strlen (line);
char *new_line = (char *) alloca (shell_len + (sizeof (minus_c) - 1)
- + (line_len * 2) + 1);
+ + (line_len * 4) + 1);
char *command_ptr = NULL; /* used for batch_mode_shell mode */
# ifdef __EMX__ /* is this necessary? */
@@ -2740,9 +2740,10 @@
#endif
if (PRESERVE_BSNL)
{
- *(ap++) = '\\';
+ *(ap++) = '\'';
*(ap++) = '\\';
*(ap++) = '\n';
+ *(ap++) = '\'';
}
++p;

View File

@ -1,13 +0,0 @@
--- make-3.81/tests/scripts/features/recursion~ 2005-02-10 01:10:58.000000000 +0100
+++ make-3.81/tests/scripts/features/recursion 2010-05-26 15:30:30.000000000 +0200
@@ -16,7 +16,7 @@ last:
@echo MAKELEVEL = $(MAKELEVEL)
@echo THE END
',
- ('CFLAGS=-O -w' . ($parallel_jobs ? '-j 2' : '')),
+ ('CFLAGS=-O -w' . ($parallel_jobs ? ' -j 2' : '')),
($vos
? "#MAKE#: Entering directory `#PWD#'
make 'CFLAGS=-O' -f #MAKEFILE# foo
Diff finished. Wed May 26 15:30:43 2010

View File

@ -1,111 +0,0 @@
diff -urp make-3.81/job.c make-3.81-pm/job.c
--- make-3.81/job.c 2008-03-25 18:15:38.000000000 +0100
+++ make-3.81-pm/job.c 2008-03-25 17:51:11.000000000 +0100
@@ -2079,6 +2079,9 @@ exec_command (char **argv, char **envp)
# else
/* Run the program. */
+#ifdef SET_STACK_SIZE
+ restore_original_stack_rlimit ();
+#endif
environ = envp;
execvp (argv[0], argv);
diff -urp make-3.81/main.c make-3.81-pm/main.c
--- make-3.81/main.c 2008-03-25 18:15:38.000000000 +0100
+++ make-3.81-pm/main.c 2008-03-25 18:14:04.000000000 +0100
@@ -44,12 +44,53 @@ Foundation, Inc., 51 Franklin St, Fifth
# include <fcntl.h>
#endif
-#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
-# define SET_STACK_SIZE
-#endif
-
#ifdef SET_STACK_SIZE
# include <sys/resource.h>
+/* Whether the rlimit was set successfuly */
+static int setrlimit_succeeded = 0;
+/* Original rlim_cur */
+static rlim_t setrlimit_orig_cur = 0;
+
+/* Get rid of any avoidable limit on stack size so that alloca does
+ not fail. */
+void
+set_max_stack_rlimit (void)
+{
+ struct rlimit rlim;
+
+ /* Back off if the limit is still set, probably due to failure in
+ restore_original_stack_rlimit. */
+ if (setrlimit_succeeded)
+ return;
+
+ if (getrlimit (RLIMIT_STACK, &rlim) == 0)
+ {
+ setrlimit_orig_cur = rlim.rlim_cur;
+ rlim.rlim_cur = rlim.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &rlim) != -1)
+ setrlimit_succeeded = 1;
+ }
+}
+
+/* Set the rlimit back to its original value. To be called before
+ process spawn. */
+void
+restore_original_stack_rlimit (void)
+{
+ struct rlimit rlim;
+
+ if (!setrlimit_succeeded)
+ return;
+
+ if (getrlimit (RLIMIT_STACK, &rlim) == 0)
+ {
+ rlim.rlim_cur = setrlimit_orig_cur;
+ setrlimit (RLIMIT_STACK, &rlim);
+ /* Don't reset the setrlimit_succeeded flag. This can be called
+ after vfork, in which case the flag is in memory shared with
+ the parent. */
+ }
+}
#endif
#ifdef _AMIGA
@@ -915,17 +956,7 @@ main (int argc, char **argv, char **envp
#endif
#ifdef SET_STACK_SIZE
- /* Get rid of any avoidable limit on stack size. */
- {
- struct rlimit rlim;
-
- /* Set the stack limit huge so that alloca does not fail. */
- if (getrlimit (RLIMIT_STACK, &rlim) == 0)
- {
- rlim.rlim_cur = rlim.rlim_max;
- setrlimit (RLIMIT_STACK, &rlim);
- }
- }
+ set_max_stack_rlimit ();
#endif
#ifdef HAVE_ATEXIT
diff -urp make-3.81/make.h make-3.81-pm/make.h
--- make-3.81/make.h 2008-03-25 18:15:38.000000000 +0100
+++ make-3.81-pm/make.h 2008-03-25 17:51:10.000000000 +0100
@@ -346,6 +346,13 @@ extern int strcmpi (const char *,const c
#define N_(msgid) gettext_noop (msgid)
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
+/* Handle rlimit */
+#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
+# define SET_STACK_SIZE
+void set_max_stack_rlimit (void);
+void restore_original_stack_rlimit (void);
+#endif
+
/* Handle other OSs. */
#if defined(HAVE_DOS_PATHS)
# define PATH_SEPARATOR_CHAR ';'
diff -urp make-3.81/w32/Makefile make-3.81-pm/w32/Makefile

View File

@ -1,16 +0,0 @@
Index: job.c
===================================================================
RCS file: /sources/make/make/job.c,v
retrieving revision 1.193
diff -u -r1.193 job.c
--- job.c 9 Jun 2009 15:35:38 -0000 1.193
+++ job.c 31 Jul 2009 11:42:16 -0000
@@ -1600,7 +1600,7 @@
/* There are no more references in this line to worry about.
Copy the remaining uninteresting text to the output. */
if (out != in)
- strcpy (out, in);
+ memmove (out, in, strlen (in) + 1);
/* Finally, expand the line. */
lines[i] = allocated_variable_expand_for_file (cmds->command_lines[i],

View File

@ -1,7 +1,7 @@
diff -urp make-3.81/misc.c make-3.81-pm/misc.c diff -urp make-3.82/misc.c make-3.82-pm/misc.c
--- make-3.81/misc.c 2006-04-01 08:36:40.000000000 +0200 --- make-3.82/misc.c 2010-07-19 09:10:54.000000000 +0200
+++ make-3.81-pm/misc.c 2008-09-22 12:45:18.000000000 +0200 +++ make-3.82-pm/misc.c 2010-08-11 15:26:45.000000000 +0200
@@ -311,17 +311,31 @@ strerror (int errnum) @@ -342,17 +342,31 @@ strerror (int errnum)
/* Print an error message from errno. */ /* Print an error message from errno. */
void void
@ -35,10 +35,10 @@ diff -urp make-3.81/misc.c make-3.81-pm/misc.c
/* NOTREACHED */ /* NOTREACHED */
} }
diff -urp make-3.81/main.c make-3.81-pm/main.c diff -urp make-3.82/main.c make-3.82-pm/main.c
--- make-3.81/main.c 2008-09-22 12:45:07.000000000 +0200 --- make-3.82/main.c 2010-08-11 15:34:12.000000000 +0200
+++ make-3.81-pm/main.c 2008-09-22 12:45:18.000000000 +0200 +++ make-3.82-pm/main.c 2010-08-11 15:30:11.000000000 +0200
@@ -1502,13 +1502,13 @@ main (int argc, char **argv, char **envp @@ -1536,13 +1536,13 @@ main (int argc, char **argv, char **envp
strcat (template, DEFAULT_TMPFILE); strcat (template, DEFAULT_TMPFILE);
outfile = open_tmpfile (&stdin_nm, template); outfile = open_tmpfile (&stdin_nm, template);
if (outfile == 0) 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 (_("fwrite (temporary file)"));
+ pfatal_with_name_err (_("fwrite (temporary file)"), errno); + pfatal_with_name_err (_("fwrite (temporary file)"), errno);
} }
(void) fclose (outfile); fclose (outfile);
@@ -1681,7 +1681,7 @@ main (int argc, char **argv, char **envp @@ -1747,7 +1747,7 @@ main (int argc, char **argv, char **envp
else if ((job_rfd = dup (job_fds[0])) < 0) else if ((job_rfd = dup (job_fds[0])) < 0)
{ {
if (errno != EBADF) if (errno != EBADF)
- pfatal_with_name (_("dup jobserver")); - pfatal_with_name (_("dup jobserver"));
+ pfatal_with_name_err (_("dup jobserver"), errno); + pfatal_with_name_err (_("dup jobserver"), errno);
error (NILF, error (NILF,
_("warning: jobserver unavailable: using -j1. Add `+' to parent make rule.")); _("warning: jobserver unavailable: using -j1. Add `+' to parent make rule."));
@@ -1721,7 +1721,7 @@ main (int argc, char **argv, char **envp @@ -1788,7 +1788,7 @@ main (int argc, char **argv, char **envp
char c = '+'; char c = '+';
if (pipe (job_fds) < 0 || (job_rfd = dup (job_fds[0])) < 0) 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 /* 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 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)); EINTRLOOP (r, write (job_fds[1], &c, 1));
if (r != 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. */ /* 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 /* If there is a temp file from reading a makefile from stdin, get rid of
it now. */ it now. */
if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT) if (stdin_nm && unlink (stdin_nm) < 0 && errno != ENOENT)
- perror_with_name (_("unlink (temporary file): "), stdin_nm); - perror_with_name (_("unlink (temporary file): "), stdin_nm);
+ perror_with_name_err (_("unlink (temporary file): "), stdin_nm, errno); + perror_with_name_err (_("unlink (temporary file): "), stdin_nm, errno);
{ /* If there were no command-line goals, use the default. */
int status; if (goals == 0)
diff -urp make-3.81/make.h make-3.81-pm/make.h Только в make-3.82-pm: job.c~
--- make-3.81/make.h 2008-09-22 12:45:07.000000000 +0200 Только в make-3.82-pm: main.c~
+++ make-3.81-pm/make.h 2008-09-22 12:45:18.000000000 +0200 diff -urp make-3.82/make.h make-3.82-pm/make.h
@@ -414,6 +414,8 @@ extern void die PARAMS ((int)) __attribu --- make-3.82/make.h 2010-08-11 15:34:12.000000000 +0200
extern void log_working_directory PARAMS ((int)); +++ make-3.82-pm/make.h 2010-08-11 15:31:26.000000000 +0200
extern void pfatal_with_name PARAMS ((const char *)) __attribute__ ((noreturn)); @@ -385,6 +385,8 @@ void die (int) __attribute__ ((noreturn)
extern void perror_with_name PARAMS ((const char *, const char *)); void log_working_directory (int);
+extern void pfatal_with_name_err PARAMS ((const char *, int errnum)) __attribute__ ((noreturn)); void pfatal_with_name (const char *) __attribute__ ((noreturn));
+extern void perror_with_name_err PARAMS ((const char *, const char *, int errnum)); void perror_with_name (const char *, const char *);
extern char *savestring PARAMS ((const char *, unsigned int)); +void pfatal_with_name_err (const char *, int errnum) __attribute__ ((noreturn));
extern char *concat PARAMS ((const char *, const char *, const char *)); +void perror_with_name_err (const char *, const char *, int errnum);
extern char *xmalloc PARAMS ((unsigned int)); void *xmalloc (unsigned int);
diff -urp make-3.81/job.c make-3.81-pm/job.c void *xcalloc (unsigned int);
--- make-3.81/job.c 2006-03-20 04:03:04.000000000 +0100 void *xrealloc (void *, unsigned int);
+++ make-3.81-pm/job.c 2008-09-22 12:45:18.000000000 +0200 diff -urp make-3.82/job.c make-3.82-pm/job.c
@@ -859,7 +859,7 @@ free_child (struct child *child) --- 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)); EINTRLOOP (r, write (job_fds[1], &token, 1));
if (r != 1) if (r != 1)
- pfatal_with_name (_("write jobserver")); - pfatal_with_name (_("write jobserver"));
+ pfatal_with_name_err (_("write jobserver"), errno); + pfatal_with_name_err (_("write jobserver"), errno);
DB (DB_JOBS, (_("Released token for child 0x%08lx (%s).\n"), DB (DB_JOBS, (_("Released token for child %p (%s).\n"),
(unsigned long int) child, child->file->name)); child, child->file->name));
@@ -1699,6 +1699,7 @@ new_job (struct file *file) @@ -1768,6 +1768,7 @@ new_job (struct file *file)
/* Set interruptible system calls, and read() for a job token. */ /* Set interruptible system calls, and read() for a job token. */
set_child_handler_action_flags (1, waiting_jobs != NULL); 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); got_token = read (job_rfd, &token, 1);
saved_errno = errno; saved_errno = errno;
set_child_handler_action_flags (0, waiting_jobs != NULL); 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, /* If the error _wasn't_ expected (EINTR or EBADF), punt. Otherwise,
go back and reap_children(), and try again. */ 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")); DB (DB_JOBS, ("Read returned EBADF.\n"));
} }
#endif #endif
@@ -1831,7 +1836,7 @@ load_too_high (void) @@ -1909,7 +1914,8 @@ load_too_high (void)
error (NILF, error (NILF,
_("cannot enforce load limits on this operating system")); _("cannot enforce load limits on this operating system"));
else else
- perror_with_name (_("cannot enforce load limit: "), "getloadavg"); - 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; lossage = errno;
load = 0; load = 0;
Только в make-3.82-pm: make.h~
Только в make-3.82-pm: misc.c.orig

14
make-3.82-getcwd.patch Normal file
View File

@ -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

View File

@ -1,8 +1,9 @@
--- make-3.80/main.c.jj 2002-08-09 21:27:17.000000000 -0400 diff -up make-3.82/main.c\~ make-3.82/main.c
+++ make-3.80/main.c 2004-12-13 12:48:25.000000000 -0500 --- make-3.82/main.c~ 2010-07-19 09:10:53.000000000 +0200
@@ -1549,6 +1549,20 @@ int main (int argc, char ** argv) +++ 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 +#ifdef PIPE_BUF
+ if (job_slots > 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. /* 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. */ Set up the pipe and install the fds option for our children. */
Diff finished. Wed Aug 11 15:12:32 2010

19
make-3.82-jobserver.patch Normal file
View File

@ -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

30
make-3.82-newlines.patch Normal file
View File

@ -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

View File

@ -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

View File

@ -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))
{

BIN
make-3.82.tar.bz2.sig Normal file

Binary file not shown.

View File

@ -2,24 +2,20 @@
Summary: A GNU tool which simplifies the build process for users Summary: A GNU tool which simplifies the build process for users
Name: make Name: make
Epoch: 1 Epoch: 1
Version: 3.81 Version: 3.82
Release: 21%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: Development/Tools Group: Development/Tools
URL: http://www.gnu.org/software/make/ URL: http://www.gnu.org/software/make/
Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2 Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
Patch: make-3.79.1-noclock_gettime.patch Patch1: make-3.82-noclock_gettime.patch
Patch4: make-3.80-j8k.patch Patch2: make-3.82-j8k.patch
Patch5: make-3.80-getcwd.patch Patch3: make-3.82-getcwd.patch
Patch6: make-3.81-err-reporting.patch Patch4: make-3.82-err-reporting.patch
Patch7: make-3.81-memory.patch Patch5: make-3.81-memory.patch
Patch8: make-3.81-rlimit.patch Patch6: make-3.82-weird-shell.patch
Patch9: make-3.81-newlines.patch Patch7: make-3.82-newlines.patch
Patch10: make-3.81-jobserver.patch Patch8: make-3.82-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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info Requires(preun): /sbin/install-info
@ -35,18 +31,14 @@ makefile.
%prep %prep
%setup -q %setup -q
%patch -p1 %patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 #%patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p0
%patch13 -p1
%patch14 -p1
%build %build
%configure %configure
@ -89,6 +81,15 @@ fi
%{_infodir}/*.info* %{_infodir}/*.info*
%changelog %changelog
* Wed Aug 11 2010 Petr Machata <pmachata@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@redhat.com> - 1:3.81-21 * Wed Aug 11 2010 Petr Machata <pmachata@redhat.com> - 1:3.81-21
- Add BR procps - Add BR procps
- Resolves: #616813 - Resolves: #616813

View File

@ -1 +1,2 @@
354853e0b2da90c527e35aabb8d6f1e6 make-3.81.tar.bz2 354853e0b2da90c527e35aabb8d6f1e6 make-3.81.tar.bz2
1a11100f3c63fcf5753818e59d63088f make-3.82.tar.bz2