From 56a9df0d91fdb540821261f8d8ae9c3b41cb5c4e Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 11 Mar 2020 21:46:16 -0400 Subject: [PATCH] Update to 4.3 Remove patches which have been applied upstream. Remove old patches that were to help with the 3.8->4.0 migration. Rebase the remaining patches. --- ...c-SV-50648-Detect-Guile-2.2-packages.patch | 55 ------ make-4.0-err-reporting.patch | 151 ---------------- make-4.0-getcwd.patch | 12 -- make-4.0-j8k.patch | 24 --- make-4.0-newlines.patch | 19 -- make-4.0-weird-shell.patch | 16 -- make-4.1-rh1277968.patch | 51 ------ make-4.2.1-glob-fix-2.patch | 67 ------- make-4.2.1-glob-fix-3.patch | 15 -- make-4.2.1-glob-fix.patch | 28 --- make-4.2.1-nonblocking-reads.patch | 164 ------------------ make-4.2.1-test-driver.patch | 19 -- ...-4.2-getcwd.patch => make-4.3-getcwd.patch | 6 +- make-4.2-j8k.patch => make-4.3-j8k.patch | 6 +- make-getcwd.patch | 25 --- make-newlines.patch | 32 ---- make.spec | 39 +---- sources | 2 +- 18 files changed, 16 insertions(+), 715 deletions(-) delete mode 100644 0001-configure.ac-SV-50648-Detect-Guile-2.2-packages.patch delete mode 100644 make-4.0-err-reporting.patch delete mode 100644 make-4.0-getcwd.patch delete mode 100644 make-4.0-j8k.patch delete mode 100644 make-4.0-newlines.patch delete mode 100644 make-4.0-weird-shell.patch delete mode 100644 make-4.1-rh1277968.patch delete mode 100644 make-4.2.1-glob-fix-2.patch delete mode 100644 make-4.2.1-glob-fix-3.patch delete mode 100644 make-4.2.1-glob-fix.patch delete mode 100644 make-4.2.1-nonblocking-reads.patch delete mode 100644 make-4.2.1-test-driver.patch rename make-4.2-getcwd.patch => make-4.3-getcwd.patch (57%) rename make-4.2-j8k.patch => make-4.3-j8k.patch (79%) delete mode 100644 make-getcwd.patch delete mode 100644 make-newlines.patch diff --git a/0001-configure.ac-SV-50648-Detect-Guile-2.2-packages.patch b/0001-configure.ac-SV-50648-Detect-Guile-2.2-packages.patch deleted file mode 100644 index ee59553..0000000 --- a/0001-configure.ac-SV-50648-Detect-Guile-2.2-packages.patch +++ /dev/null @@ -1,55 +0,0 @@ -From fbf71ec25a5986d9003ac16ee9e23675feac9053 Mon Sep 17 00:00:00 2001 -From: Paul Smith -Date: Sun, 16 Apr 2017 15:03:48 -0400 -Subject: [PATCH] * configure.ac: [SV 50648] Detect Guile 2.2 packages. - ---- - configure.ac | 26 ++++++++++++++++---------- - 1 file changed, 16 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1187ad4..a78fb93 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -160,22 +160,28 @@ AC_FUNC_ALLOCA - AC_FUNC_CLOSEDIR_VOID - - # See if the user wants to add (or not) GNU Guile support --PKG_PROG_PKG_CONFIG - AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile], - [Support GNU Guile for embedded scripting])]) - --# For some strange reason, at least on Ubuntu, each version of Guile --# comes with it's own PC file so we have to specify them as individual --# packages. Ugh. -+# Annoyingly, each version of Guile comes with it's own PC file so we have to -+# specify them as individual packages. Ugh. -+PKG_PROG_PKG_CONFIG -+ - AS_IF([test "x$with_guile" != xno], --[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes], -- [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes], -- [have_guile=no])]) -+[ guile_versions="2.2 2.0 1.8" -+ guile_version=no -+ have_guile=no -+ AC_MSG_CHECKING([for GNU Guile]) -+ for v in $guile_versions; do -+ PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], []) -+ done -+ AC_MSG_RESULT([$guile_version]) -+ if test "$have_guile" = yes; then -+ PKG_CHECK_MODULES(GUILE, [guile-$guile_version]) -+ AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support]) -+ fi - ]) - --AS_IF([test "$have_guile" = yes], -- [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])]) -- - AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes]) - - AC_FUNC_GETLOADAVG --- -2.21.0.rc1 - diff --git a/make-4.0-err-reporting.patch b/make-4.0-err-reporting.patch deleted file mode 100644 index fb015a7..0000000 --- a/make-4.0-err-reporting.patch +++ /dev/null @@ -1,151 +0,0 @@ -diff -Nrup a/job.c b/job.c ---- a/job.c 2015-10-29 17:19:17.209430335 -0400 -+++ b/job.c 2015-10-29 18:24:04.452169281 -0400 -@@ -1033,7 +1033,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)); -@@ -2008,6 +2008,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); -@@ -2024,10 +2025,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) -+ O (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 - } -@@ -2170,7 +2175,9 @@ load_too_high (void) - O (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 2015-10-29 17:19:17.198430225 -0400 -+++ b/main.c 2015-10-29 19:12:15.599567039 -0400 -@@ -1564,7 +1564,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); - - O (error, NILF, - _("warning: jobserver unavailable: using -j1. Add '+' to parent make rule.")); -@@ -1777,13 +1777,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); - -@@ -2019,7 +2019,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 -@@ -2039,7 +2040,7 @@ 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 - -@@ -2464,7 +2465,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 2015-10-29 17:19:17.168429926 -0400 -+++ b/makeint.h 2015-10-29 18:30:44.364147393 -0400 -@@ -458,6 +458,8 @@ void fatal (const gmk_floc *flocp, size_ - 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 2014-10-05 12:24:51.000000000 -0400 -+++ b/output.c 2015-10-29 19:04:05.332692965 -0400 -@@ -705,6 +705,13 @@ fatal (const gmk_floc *flocp, size_t len - /* Print an error message from errno. */ - - void -+perror_with_name_err (const char *str, const char *name, int errnum) -+{ -+ const char *err = strerror (errnum); -+ OSSS (error, NILF, _("%s%s: %s"), str, name, err); -+} -+ -+void - perror_with_name (const char *str, const char *name) - { - const char *err = strerror (errno); -@@ -714,6 +721,15 @@ perror_with_name (const char *str, const - /* Print an error message from errno and exit. */ - - void -+pfatal_with_name_err (const char *name, int errnum) -+{ -+ const char *err = strerror (errnum); -+ OSS (fatal, NILF, _("%s: %s"), name, err); -+ -+ /* NOTREACHED */ -+} -+ -+void - pfatal_with_name (const char *name) - { - const char *err = strerror (errno); diff --git a/make-4.0-getcwd.patch b/make-4.0-getcwd.patch deleted file mode 100644 index c0bb459..0000000 --- a/make-4.0-getcwd.patch +++ /dev/null @@ -1,12 +0,0 @@ -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-4.0-j8k.patch b/make-4.0-j8k.patch deleted file mode 100644 index a6fab1a..0000000 --- a/make-4.0-j8k.patch +++ /dev/null @@ -1,24 +0,0 @@ -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) -+#elif defined _POSIX_PIPE_BUF -+ if (job_slots > _POSIX_PIPE_BUF) -+#else -+ if (job_slots > 512) -+#endif -+ { -+ O (error, NILF, -+ _("More parallel jobs (-jN) than this platform can handle requested.")); -+ O (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 --git a/make-4.0-newlines.patch b/make-4.0-newlines.patch deleted file mode 100644 index add32c5..0000000 --- a/make-4.0-newlines.patch +++ /dev/null @@ -1,19 +0,0 @@ -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-4.0-weird-shell.patch b/make-4.0-weird-shell.patch deleted file mode 100644 index dfdaf89..0000000 --- a/make-4.0-weird-shell.patch +++ /dev/null @@ -1,16 +0,0 @@ -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-4.1-rh1277968.patch b/make-4.1-rh1277968.patch deleted file mode 100644 index aded614..0000000 --- a/make-4.1-rh1277968.patch +++ /dev/null @@ -1,51 +0,0 @@ -commit 292da6f6867b75a5af7ddbb639a1feae022f438f -Author: Paul Smith -Date: Mon Oct 20 01:54:56 2014 -0400 - - * main.c (main): [SV 43434] Handle NULL returns from ttyname(). - -diff --git a/main.c b/main.c -index b2d169c..0cdb8a8 100644 ---- a/main.c -+++ b/main.c -@@ -1429,13 +1429,18 @@ main (int argc, char **argv, char **envp) - #ifdef HAVE_ISATTY - if (isatty (fileno (stdout))) - if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT"))) -- define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)), -- o_default, 0)->export = v_export; -- -+ { -+ const char *tty = TTYNAME (fileno (stdout)); -+ define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME, -+ o_default, 0)->export = v_export; -+ } - if (isatty (fileno (stderr))) - if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR"))) -- define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)), -- o_default, 0)->export = v_export; -+ { -+ const char *tty = TTYNAME (fileno (stderr)); -+ define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME, -+ o_default, 0)->export = v_export; -+ } - #endif - - /* Reset in case the switches changed our minds. */ -diff --git a/makeint.h b/makeint.h -index 6223936..2009f41 100644 ---- a/makeint.h -+++ b/makeint.h -@@ -436,10 +436,11 @@ extern struct rlimit stack_limit; - /* The number of bytes needed to represent the largest integer as a string. */ - #define INTSTR_LENGTH CSTRLEN ("18446744073709551616") - -+#define DEFAULT_TTYNAME "true" - #ifdef HAVE_TTYNAME - # define TTYNAME(_f) ttyname (_f) - #else --# define TTYNAME(_f) "true" -+# define TTYNAME(_f) DEFAULT_TTYNAME - #endif - - diff --git a/make-4.2.1-glob-fix-2.patch b/make-4.2.1-glob-fix-2.patch deleted file mode 100644 index 911e315..0000000 --- a/make-4.2.1-glob-fix-2.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Sun, 24 Sep 2017 09:12:58 -0400 -Subject: glob: Do not assume glibc glob internals. - -It has been proposed that glibc glob start using gl_lstat, -which the API allows it to do. GNU 'make' should not get in -the way of this. See: -https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html - -* dir.c (local_lstat): New function, like local_stat. -(dir_setup_glob): Use it to initialize gl_lstat too, as the API -requires. ---- - dir.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/dir.c b/dir.c -index adbb8a9..c343e4c 100644 ---- a/dir.c -+++ b/dir.c -@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) - } - #endif - -+/* Similarly for lstat. */ -+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) -+# ifndef VMS -+# ifndef HAVE_SYS_STAT_H -+int lstat (const char *path, struct stat *sbuf); -+# endif -+# else -+ /* We are done with the fake lstat. Go back to the real lstat */ -+# ifdef lstat -+# undef lstat -+# endif -+# endif -+# define local_lstat lstat -+#elif defined(WINDOWS32) -+/* Windows doesn't support lstat(). */ -+# define local_lstat local_stat -+#else -+static int -+local_lstat (const char *path, struct stat *buf) -+{ -+ int e; -+ EINTRLOOP (e, lstat (path, buf)); -+ return e; -+} -+#endif -+ - void - dir_setup_glob (glob_t *gl) - { - gl->gl_opendir = open_dirstream; - gl->gl_readdir = read_dirstream; - gl->gl_closedir = free; -+ gl->gl_lstat = local_lstat; - gl->gl_stat = local_stat; -- /* We don't bother setting gl_lstat, since glob never calls it. -- The slot is only there for compatibility with 4.4 BSD. */ - } - - void --- -cgit v1.0-41-gc330 - diff --git a/make-4.2.1-glob-fix-3.patch b/make-4.2.1-glob-fix-3.patch deleted file mode 100644 index 879fe50..0000000 --- a/make-4.2.1-glob-fix-3.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nrup a/configure b/configure ---- a/configure 2018-03-18 23:53:43.991741060 -0400 -+++ b/configure 2018-03-18 23:52:52.456028175 -0400 -@@ -11481,10 +11481,9 @@ else - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif diff --git a/make-4.2.1-glob-fix.patch b/make-4.2.1-glob-fix.patch deleted file mode 100644 index be3abae..0000000 --- a/make-4.2.1-glob-fix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 48c8a116a914a325a0497721f5d8b58d5bba34d4 Mon Sep 17 00:00:00 2001 -From: Paul Smith -Date: Sun, 19 Nov 2017 15:09:16 -0500 -Subject: * configure.ac: Support GLIBC glob interface version 2 - ---- - configure.ac | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8c72568..4710832 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -404,10 +404,9 @@ AC_CACHE_CHECK([if system libc has GNU glob], [make_cv_sys_gnu_glob], - #include - #include - --#define GLOB_INTERFACE_VERSION 1 - #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 - # include --# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION -+# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 - gnu glob - # endif - #endif], --- -cgit v1.0-41-gc330 - diff --git a/make-4.2.1-nonblocking-reads.patch b/make-4.2.1-nonblocking-reads.patch deleted file mode 100644 index 76b9545..0000000 --- a/make-4.2.1-nonblocking-reads.patch +++ /dev/null @@ -1,164 +0,0 @@ -From b552b05251980f693c729e251f93f5225b400714 Mon Sep 17 00:00:00 2001 -From: Paul Smith -Date: Sat, 3 Jun 2017 16:20:51 -0400 -Subject: [SV 51159] Use a non-blocking read with pselect to avoid hangs. - -* posixos.c (set_blocking): Set blocking on a file descriptor. -(jobserver_setup): Set non-blocking on the jobserver read side. -(jobserver_parse_auth): Ditto. -(jobserver_acquire_all): Set blocking to avoid a busy-wait loop. -(jobserver_acquire): If the non-blocking read() returns without -taking a token then try again. - -diff --git a/posixos.c b/posixos.c -index e642d7f..dbafa51 100644 ---- a/posixos.c -+++ b/posixos.c -@@ -62,6 +62,24 @@ make_job_rfd (void) - #endif - } - -+static void -+set_blocking (int fd, int blocking) -+{ -+ // If we're not using pselect() don't change the blocking -+#ifdef HAVE_PSELECT -+ int flags; -+ EINTRLOOP (flags, fcntl (fd, F_GETFL)); -+ if (flags >= 0) -+ { -+ int r; -+ flags = blocking ? (flags & ~O_NONBLOCK) : (flags | O_NONBLOCK); -+ EINTRLOOP (r, fcntl (fd, F_SETFL, flags)); -+ if (r < 0) -+ pfatal_with_name ("fcntl(O_NONBLOCK)"); -+ } -+#endif -+} -+ - unsigned int - jobserver_setup (int slots) - { -@@ -86,6 +104,9 @@ jobserver_setup (int slots) - pfatal_with_name (_("init jobserver pipe")); - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -121,6 +142,9 @@ jobserver_parse_auth (const char *auth) - return 0; - } - -+ /* When using pselect() we want the read to be non-blocking. */ -+ set_blocking (job_fds[0], 0); -+ - return 1; - } - -@@ -169,7 +193,10 @@ jobserver_acquire_all (void) - { - unsigned int tokens = 0; - -- /* Close the write side, so the read() won't hang. */ -+ /* Use blocking reads to wait for all outstanding jobs. */ -+ set_blocking (job_fds[0], 1); -+ -+ /* Close the write side, so the read() won't hang forever. */ - close (job_fds[1]); - job_fds[1] = -1; - -@@ -236,18 +263,12 @@ jobserver_pre_acquire (void) - unsigned int - jobserver_acquire (int timeout) - { -- sigset_t empty; -- fd_set readfds; - struct timespec spec; - struct timespec *specp = NULL; -- int r; -- char intake; -+ sigset_t empty; - - sigemptyset (&empty); - -- FD_ZERO (&readfds); -- FD_SET (job_fds[0], &readfds); -- - if (timeout) - { - /* Alarm after one second (is this too granular?) */ -@@ -256,28 +277,52 @@ jobserver_acquire (int timeout) - specp = &spec; - } - -- r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -- -- if (r == -1) -+ while (1) - { -- /* Better be SIGCHLD. */ -- if (errno != EINTR) -- pfatal_with_name (_("pselect jobs pipe")); -- return 0; -- } -+ fd_set readfds; -+ int r; -+ char intake; - -- if (r == 0) -- /* Timeout. */ -- return 0; -+ FD_ZERO (&readfds); -+ FD_SET (job_fds[0], &readfds); - -- /* The read FD is ready: read it! */ -- EINTRLOOP (r, read (job_fds[0], &intake, 1)); -- if (r < 0) -- pfatal_with_name (_("read jobs pipe")); -+ r = pselect (job_fds[0]+1, &readfds, NULL, NULL, specp, &empty); -+ if (r < 0) -+ switch (errno) -+ { -+ case EINTR: -+ /* SIGCHLD will show up as an EINTR. */ -+ return 0; -+ -+ case EBADF: -+ /* Someone closed the jobs pipe. -+ That shouldn't happen but if it does we're done. */ -+ O (fatal, NILF, _("job server shut down")); - -- /* What does it mean if read() returns 0? It shouldn't happen because only -- the master make can reap all the tokens and close the write side...?? */ -- return r > 0; -+ default: -+ pfatal_with_name (_("pselect jobs pipe")); -+ } -+ -+ if (r == 0) -+ /* Timeout. */ -+ return 0; -+ -+ /* The read FD is ready: read it! This is non-blocking. */ -+ EINTRLOOP (r, read (job_fds[0], &intake, 1)); -+ -+ if (r < 0) -+ { -+ /* Someone sniped our token! Try again. */ -+ if (errno == EAGAIN) -+ continue; -+ -+ pfatal_with_name (_("read jobs pipe")); -+ } -+ -+ /* read() should never return 0: only the master make can reap all the -+ tokens and close the write side...?? */ -+ return r > 0; -+ } - } - - #else diff --git a/make-4.2.1-test-driver.patch b/make-4.2.1-test-driver.patch deleted file mode 100644 index e43e8ea..0000000 --- a/make-4.2.1-test-driver.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit d9d4e06084a4c7da480bd49a3487aadf6ba77b54 -Author: Enrique Olaizola -Date: Sat May 27 14:24:33 2017 -0400 - - * tests/run_make_tests.pl: [SV 50902] Find Perl modules - -diff -Nrup a/tests/run_make_tests.pl b/tests/run_make_tests.pl ---- a/tests/run_make_tests.pl 2016-04-04 01:38:37.000000000 -0400 -+++ b/tests/run_make_tests.pl 2018-04-25 14:19:19.692178798 -0400 -@@ -58,6 +58,9 @@ if ($^O eq 'VMS') - *CORE::GLOBAL::rmdir = \&vms_rmdir; - } - -+use FindBin; -+use lib "$FindBin::Bin"; -+ - require "test_driver.pl"; - require "config-flags.pm"; - diff --git a/make-4.2-getcwd.patch b/make-4.3-getcwd.patch similarity index 57% rename from make-4.2-getcwd.patch rename to make-4.3-getcwd.patch index 6c47238..7f6f18f 100644 --- a/make-4.2-getcwd.patch +++ b/make-4.3-getcwd.patch @@ -1,6 +1,6 @@ -diff -Nrup a/makeint.h b/makeint.h ---- a/makeint.h 2016-05-21 16:22:32.000000000 -0400 -+++ b/makeint.h 2016-09-22 16:12:38.606702160 -0400 +diff -Nrup a/src/makeint.h b/src/makeint.h +--- a/src/makeint.h 2016-05-21 16:22:32.000000000 -0400 ++++ b/src/makeint.h 2016-09-22 16:12:38.606702160 -0400 @@ -596,7 +596,7 @@ long int lseek (); # endif diff --git a/make-4.2-j8k.patch b/make-4.3-j8k.patch similarity index 79% rename from make-4.2-j8k.patch rename to make-4.3-j8k.patch index 2b9d7fc..60a0c7f 100644 --- a/make-4.2-j8k.patch +++ b/make-4.3-j8k.patch @@ -1,6 +1,6 @@ -diff -Nrup a/main.c b/main.c ---- a/main.c 2016-05-31 03:17:26.000000000 -0400 -+++ b/main.c 2016-09-22 16:18:52.283889265 -0400 +diff -Nrup a/src/main.c b/src/main.c +--- a/src/main.c 2016-05-31 03:17:26.000000000 -0400 ++++ b/src/main.c 2016-09-22 16:18:52.283889265 -0400 @@ -2051,6 +2051,21 @@ main (int argc, char **argv, char **envp } #endif diff --git a/make-getcwd.patch b/make-getcwd.patch deleted file mode 100644 index 837d20a..0000000 --- a/make-getcwd.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3271ba0553cd8805ea0669edd67b16f4ecee332e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sat, 24 Oct 2015 18:18:04 -0400 -Subject: [PATCH] getcwd - ---- - makeint.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git makeint.h makeint.h -index fdcae75bd2..98c022deac 100644 ---- makeint.h -+++ makeint.h -@@ -548,7 +548,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 --- -2.5.0 - diff --git a/make-newlines.patch b/make-newlines.patch deleted file mode 100644 index e6ff326..0000000 --- a/make-newlines.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5467b24cddaa4c5d108f98b8266fe787d778c9d0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sat, 24 Oct 2015 18:19:30 -0400 -Subject: [PATCH] newlines - ---- - job.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git job.c job.c -index 2989249063..7e5bae2a56 100644 ---- job.c -+++ job.c -@@ -3320,13 +3320,14 @@ construct_command_argv_internal (char *line, char **restp, const char *shell, - #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; --- -2.5.0 - diff --git a/make.spec b/make.spec index 825d4e8..9eb031b 100644 --- a/make.spec +++ b/make.spec @@ -2,45 +2,21 @@ Summary: A GNU tool which simplifies the build process for users Name: make Epoch: 1 -Version: 4.2.1 -Release: 16%{?dist} +Version: 4.3 +Release: 1%{?dist} License: GPLv3+ 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.gz -Patch0: make-4.2-getcwd.patch -Patch1: make-4.0-newlines.patch +Patch0: make-4.3-getcwd.patch # Assume we don't have clock_gettime in configure, so that # make is not linked against -lpthread (and thus does not # limit stack to 2MB). -Patch2: make-4.0-noclock_gettime.patch +Patch1: make-4.0-noclock_gettime.patch # BZs #142691, #17374 -Patch3: make-4.2-j8k.patch - -# Upstream: https://savannah.gnu.org/bugs/?30748 -# The default value of .SHELL_FLAGS is -c. -Patch4: make-4.0-weird-shell.patch - -# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/patch/?id=193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 -# Fixes wrong assumptions of glibc's glob internals. -Patch5: make-4.2.1-glob-fix-2.patch -# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/patch/?id=48c8a116a914a325a0497721f5d8b58d5bba34d4 -# Fixes incorrect use of glibc 2.27 glob internals. -Patch6: make-4.2.1-glob-fix.patch -Patch7: make-4.2.1-glob-fix-3.patch - -# Perl 5.26 removed the implicit CWD in @INC. -Patch8: make-4.2.1-test-driver.patch - -# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/commit/?id=fbf71ec25a5986d9003ac16ee9e23675feac9053 -# Adds support of guile 2.2 -Patch9: 0001-configure.ac-SV-50648-Detect-Guile-2.2-packages.patch - -# Upstream patch: https://git.savannah.gnu.org/cgit/make.git/commit/?id=b552b05251980f693c729e251f93f5225b400714 -# Avoids hangs in parallel builds -Patch10: make-4.2.1-nonblocking-reads.patch +Patch2: make-4.3-j8k.patch # autoreconf BuildRequires: autoconf, automake, gettext-devel @@ -99,6 +75,9 @@ echo ============END TESTING=========== %{_includedir}/gnumake.h %changelog +* Wed Mar 11 2020 DJ Delorie - 1:4.3-1 +- Rebase to make-4.3. Remove obsolete patches. + * Wed Jan 29 2020 Fedora Release Engineering - 1:4.2.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index a7cd471..8e40c4f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -15b012617e7c44c0ed482721629577ac make-4.2.1.tar.bz2 +fc7a67ea86ace13195b0bce683fd4469 make-4.3.tar.gz