commit 7b4e48e3b0b013feced6401eec698c74b00cc4f1 Author: Patsy Franklin pfrankli@redhat.com Date: Wed Apr 30 22:35:14 2014 -0400
Resolves: #1017084 - Rebase to make-4.0
.gitignore | 1 + make-3.81-memory.patch | 261 -------------------- make-3.82-aarch64.patch | 36 --- make-3.82-bugfixes.patch | 250 ------------------- make-3.82-copy-on-expand.patch | 77 ------ make-3.82-dont-prune-intermediate.patch | 57 ----- make-3.82-empty-members.patch | 52 ---- make-3.82-err-reporting.patch | 157 ------------ make-3.82-expensive_glob.patch | 116 --------- make-3.82-func_shell-rlimit.patch | 35 --- make-3.82-getcwd.patch | 14 - make-3.82-jobserver.patch | 19 -- make-3.82-newlines.patch | 30 --- make-3.82-parallel-remake.patch | 30 --- make-3.82-sort-blank.patch | 22 -- make-3.82-stem_glob.patch | 194 --------------- make-3.82-tests-SECONDARY.patch | 30 --- make-3.82-trace.patch | 111 --------- make-3.82-warn_undefined_function.patch | 84 ------- make-4.0-err-reporting.patch | 156 ++++++++++++ make-4.0-getcwd.patch | 12 + make-3.82-j8k.patch => make-4.0-j8k.patch | 16 +- make-4.0-newlines.patch | 19 ++ ...gettime.patch => make-4.0-noclock_gettime.patch | 0 ...weird-shell.patch => make-4.0-weird-shell.patch | 0 make.spec | 94 ++----- sources | 2 +- 27 files changed, 223 insertions(+), 1652 deletions(-) --- diff --git a/.gitignore b/.gitignore index e288575..549f119 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ make-3.81.tar.bz2 /make-*/ make-3.82.tar.bz2 *.rpm +/make-4.0.tar.bz2 diff --git a/make-4.0-err-reporting.patch b/make-4.0-err-reporting.patch new file mode 100644 index 0000000..1d24875 --- /dev/null +++ b/make-4.0-err-reporting.patch @@ -0,0 +1,156 @@ +diff -Nrup a/job.c b/job.c +--- a/job.c 2013-10-05 19:12:24.000000000 -0400 ++++ b/job.c 2014-02-03 18:15:48.681085207 -0500 +@@ -1020,7 +1020,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 %p (%s).\n"), + child, child->file->name)); +@@ -1956,6 +1956,7 @@ new_job (struct file *file) + #else + /* Set interruptible system calls, and read() for a job token. */ + set_child_handler_action_flags (1, waiting_jobs != NULL); ++ errno = 0; + got_token = read (job_rfd, &token, 1); + saved_errno = errno; + set_child_handler_action_flags (0, waiting_jobs != NULL); +@@ -1972,10 +1973,14 @@ new_job (struct file *file) + #ifndef WINDOWS32 + /* If the error _wasn't_ expected (EINTR or EBADF), punt. Otherwise, + go back and reap_children(), and try again. */ +- errno = saved_errno; +- if (errno != EINTR && errno != EBADF) +- pfatal_with_name (_("read jobs pipe")); +- if (errno == EBADF) ++ if (saved_errno != EINTR && saved_errno != EBADF) ++ { ++ if (got_token == 0) ++ fatal (NILF, _("read jobs pipe EOF")); ++ else ++ pfatal_with_name_err (_("read jobs pipe"), saved_errno); ++ } ++ if (saved_errno == EBADF) + DB (DB_JOBS, ("Read returned EBADF.\n")); + #endif + } +@@ -2117,7 +2122,9 @@ 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); ++ + } + lossage = errno; + load = 0; +diff -Nrup a/main.c b/main.c +--- a/main.c 2014-02-03 17:49:03.255939340 -0500 ++++ b/main.c 2014-02-03 18:06:25.768024183 -0500 +@@ -1580,7 +1580,7 @@ main (int argc, char **argv, char **envp + || (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.")); +@@ -1787,13 +1787,13 @@ main (int argc, char **argv, char **envp + strcat (template, DEFAULT_TMPFILE); + outfile = output_tmpfile (&stdin_nm, template); + if (outfile == 0) +- pfatal_with_name (_("fopen (temporary file)")); ++ pfatal_with_name_err (_("fopen (temporary file)"), errno); + while (!feof (stdin) && ! ferror (stdin)) + { + char buf[2048]; + unsigned int n = fread (buf, 1, sizeof (buf), stdin); + if (n > 0 && fwrite (buf, 1, n, outfile) != n) +- pfatal_with_name (_("fwrite (temporary file)")); ++ pfatal_with_name_err (_("fwrite (temporary file)"), errno); + } + fclose (outfile); + +@@ -2030,7 +2030,8 @@ main (int argc, char **argv, char **envp + char c = '+'; + + if (pipe (job_fds) < 0 || (job_rfd = dup (job_fds[0])) < 0) +- pfatal_with_name (_("creating jobs pipe")); ++ pfatal_with_name_err (_("creating jobs pipe"), errno); ++ + #endif + + /* Every make assumes that it always has one job it can run. For the +@@ -2050,7 +2051,8 @@ main (int argc, char **argv, char **envp + + EINTRLOOP (r, write (job_fds[1], &c, 1)); + if (r != 1) +- pfatal_with_name (_("init jobserver pipe")); ++ pfatal_with_name_err (_("init jobserver pipe"), errno); ++ + } + #endif + +@@ -2474,7 +2476,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); + + /* If there were no command-line goals, use the default. */ + if (goals == 0) +diff -Nrup a/makeint.h b/makeint.h +--- a/makeint.h 2014-02-03 17:49:03.265939424 -0500 ++++ b/makeint.h 2014-02-03 18:09:31.738695318 -0500 +@@ -436,6 +436,8 @@ void fatal (const gmk_floc *flocp, const + void die (int) __attribute__ ((noreturn)); + 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); + #define xstrlen(_s) ((_s)==NULL ? 0 : strlen (_s)) + void *xmalloc (unsigned int); + void *xcalloc (unsigned int); +diff -Nrup a/output.c b/output.c +--- a/output.c 2013-10-05 19:12:24.000000000 -0400 ++++ b/output.c 2014-02-03 18:22:48.617908701 -0500 +@@ -746,17 +746,31 @@ fatal (const gmk_floc *flocp, const char + /* Print an error message from errno. */ + + void ++perror_with_name_err (const char *str, const char *name, int errnum) ++{ ++ error (NILF, _("%s%s: %s"), str, name, strerror (errnum)); ++} ++ ++void + perror_with_name (const char *str, const char *name) + { +- error (NILF, _("%s%s: %s"), str, name, strerror (errno)); ++ perror_with_name_err (str, name, errno); + } + + /* Print an error message from errno and exit. */ + + void ++pfatal_with_name_err (const char *name, int errnum) ++{ ++ fatal (NILF, _("%s: %s"), name, strerror (errnum)); ++ ++ /* NOTREACHED */ ++} ++ ++void + pfatal_with_name (const char *name) + { +- fatal (NILF, _("%s: %s"), name, strerror (errno)); ++ pfatal_with_name_err (name, errno); + + /* NOTREACHED */ + } diff --git a/make-4.0-getcwd.patch b/make-4.0-getcwd.patch new file mode 100644 index 0000000..c0bb459 --- /dev/null +++ b/make-4.0-getcwd.patch @@ -0,0 +1,12 @@ +diff -Nrup a/makeint.h b/makeint.h +--- a/makeint.h 2013-10-09 00:22:40.000000000 -0400 ++++ b/makeint.h 2014-02-03 17:46:24.969618708 -0500 +@@ -528,7 +528,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 --git a/make-3.82-j8k.patch b/make-4.0-j8k.patch similarity index 54% rename from make-3.82-j8k.patch rename to make-4.0-j8k.patch index b5fa357..2ebcc5b 100644 --- a/make-3.82-j8k.patch +++ b/make-4.0-j8k.patch @@ -1,9 +1,9 @@ -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 - } +diff -Nrup a/main.c b/main.c +--- a/main.c 2013-10-09 00:22:40.000000000 -0400 ++++ b/main.c 2014-02-03 17:18:04.238609236 -0500 +@@ -1987,6 +1987,20 @@ main (int argc, char **argv, char **envp } + #endif
+#ifdef PIPE_BUF + if (job_slots > PIPE_BUF) @@ -14,13 +14,11 @@ diff -up make-3.82/main.c~ make-3.82/main.c +#endif + { + error (NILF, -+ _("More parallel jobs (-jN) than this platform can handle requested.")); ++ _("More parallel jobs (-jN) than this platform can handle requested.")); + error (NILF, _("Resetting to single job (-j1) mode.")); + job_slots = 1; + } + + #ifdef MAKE_JOBSERVER /* 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-4.0-newlines.patch b/make-4.0-newlines.patch new file mode 100644 index 0000000..add32c5 --- /dev/null +++ b/make-4.0-newlines.patch @@ -0,0 +1,19 @@ +diff -Nrup a/job.c b/job.c +--- a/job.c 2014-02-03 18:23:45.936436714 -0500 ++++ b/job.c 2014-02-04 00:17:53.232074893 -0500 +@@ -3269,13 +3269,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 --git a/make-3.82-noclock_gettime.patch b/make-4.0-noclock_gettime.patch similarity index 100% rename from make-3.82-noclock_gettime.patch rename to make-4.0-noclock_gettime.patch diff --git a/make-3.82-weird-shell.patch b/make-4.0-weird-shell.patch similarity index 100% rename from make-3.82-weird-shell.patch rename to make-4.0-weird-shell.patch diff --git a/make.spec b/make.spec index 3915f95..5544a01 100644 --- a/make.spec +++ b/make.spec @@ -2,64 +2,22 @@ Summary: A GNU tool which simplifies the build process for users Name: make Epoch: 1 -Version: 3.82 -Release: 19%{?dist} -License: GPLv2+ +Version: 4.0 +Release: 1%{?dist} +License: GPLv3+ Group: Development/Tools URL: http://www.gnu.org/software/make/ Source: ftp://ftp.gnu.org/gnu/make/make-%{version}.tar.bz2
-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 +Patch1: make-4.0-noclock_gettime.patch +Patch2: make-4.0-j8k.patch +Patch3: make-4.0-getcwd.patch +Patch4: make-4.0-err-reporting.patch
# Upstream: https://savannah.gnu.org/bugs/?30748 -Patch6: make-3.82-weird-shell.patch +Patch6: make-4.0-weird-shell.patch
-Patch7: make-3.82-newlines.patch -Patch8: make-3.82-jobserver.patch - -# Upstream: https://savannah.gnu.org/bugs/?30612 -# Upstream: https://savannah.gnu.org/bugs/?30723 -Patch9: make-3.82-bugfixes.patch - -Patch10: make-3.82-sort-blank.patch -Patch11: make-3.82-copy-on-expand.patch - -# Upstream: https://savannah.gnu.org/bugs/?33873 -Patch12: make-3.82-parallel-remake.patch - -# http://savannah.gnu.org/bugs/?34335 -Patch13: make-3.82-warn_undefined_function.patch - -# http://lists.gnu.org/archive/html/bug-make/2011-06/msg00032.html -Patch14: make-3.82-trace.patch - -# http://lists.gnu.org/archive/html/bug-make/2011-04/msg00002.html -Patch15: make-3.82-expensive_glob.patch - -# Upstream: https://savannah.gnu.org/bugs/?30653 -Patch16: make-3.82-dont-prune-intermediate.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=926115 -Patch17: make-3.82-aarch64.patch - -# Additional fix for https://savannah.gnu.org/bugs/?30612 -Patch18: make-3.82-empty-members.patch - -# Can't use a stem and a glob in the same dependency. -# https://savannah.gnu.org/bugs/?39310 -# https://bugzilla.redhat.com/show_bug.cgi?id=987672 -Patch19: make-3.82-stem_glob.patch - -# Stack limit not restored for processes spawned through $(shell) -# https://savannah.gnu.org/bugs/index.php?39851 -Patch20: make-3.82-func_shell-rlimit.patch - -# This to make the test targets/SECONDARY deterministic. The above -# patch causes this to occasionally fail. -Patch21: make-3.82-tests-SECONDARY.patch +Patch7: make-4.0-newlines.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info @@ -74,6 +32,13 @@ knowledge about the details of the build process. The details about how the program should be built are provided for make in the program's makefile.
+%package devel +Summary: Header file for externally visible definitions +Group: Development/Libraries + +%description devel +The make-devel package contains gnumake.h. + %prep %setup -q %patch1 -p1 @@ -82,20 +47,6 @@ makefile. %patch4 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p0 -%patch13 -p2 -%patch14 -p1 -%patch15 -p0 -%patch16 -p0 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1
rm -f tests/scripts/features/parallelism.orig
@@ -138,8 +89,17 @@ fi %{_bindir}/* %{_mandir}/man*/* %{_infodir}/*.info* +%{_includedir}/gnumake.h + +%files devel +%defattr(-,root,root) +%{_includedir}/gnumake.h
%changelog +* Wed Apr 30 2014 Patsy Franklin pfrankli@redhat.com 1:4.0-1 +- Rebase to make-4.0 + - Created make-devel sub-package to handle new dependency on gnumake.h. + * Thu Aug 22 2013 Petr Machata pmachata@redhat.com - 1:3.82-19 - make now restores rlimit to its original values before launching subprocess via $(shell) (make-3.82-func_shell-rlimit.patch) @@ -186,7 +146,7 @@ fi * Wed Oct 26 2011 Fedora Release Engineering rel-eng@lists.fedoraproject.org - 1:3.82-7 - Rebuilt for glibc bug#747377
-* Tue May 12 2011 Lubomir Rintel lkundrak@v3.sk - 1:3.82-6 +* Thu May 12 2011 Lubomir Rintel lkundrak@v3.sk - 1:3.82-6 - Fix free-after-use with nested assignments (#703104)
* Tue Feb 08 2011 Fedora Release Engineering rel-eng@lists.fedoraproject.org - 1:3.82-5 @@ -318,7 +278,7 @@ fi * Tue Feb 07 2006 Jesse Keating jkeating@redhat.com - 1:3.80-10.1 - rebuilt for new gcc4.1 snapshot and glibc changes
-* Mon Feb 02 2006 Petr Machata pmachata@redhat.com 3.80-10 +* Thu Feb 02 2006 Petr Machata pmachata@redhat.com 3.80-10 - H.J. Lu caught a typo in the patch and provided a new one. (#175376)
* Mon Jan 09 2006 Petr Machata pmachata@redhat.com 3.80-9 diff --git a/sources b/sources index d35b411..340e211 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1a11100f3c63fcf5753818e59d63088f make-3.82.tar.bz2 +571d470a7647b455e3af3f92d79f1c18 make-4.0.tar.bz2
scm-commits@lists.fedoraproject.org