From e5494879d50cdb264fcbfdb08258b6068ea90aef Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Oct 24 2015 22:41:26 +0000 Subject: Update to 4.1 Drop some unecessary elements of the spec file. Drop patches which have been applied upstream or solved in another way, or don't apply anymore. --- diff --git a/.gitignore b/.gitignore index 549f119..fa291d0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ make-3.81.tar.bz2 make-3.82.tar.bz2 *.rpm /make-4.0.tar.bz2 +/make-4.1.tar.bz2 diff --git a/make-3.82.tar.bz2.sig b/make-3.82.tar.bz2.sig deleted file mode 100644 index 60fcc6c..0000000 Binary files a/make-3.82.tar.bz2.sig and /dev/null differ diff --git a/make-4.0-err-reporting.patch b/make-4.0-err-reporting.patch deleted file mode 100644 index 1d24875..0000000 --- a/make-4.0-err-reporting.patch +++ /dev/null @@ -1,156 +0,0 @@ -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 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 2ebcc5b..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 -+ { -+ error (NILF, -+ _("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 --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-noclock_gettime.patch b/make-4.0-noclock_gettime.patch deleted file mode 100644 index f63e1fc..0000000 --- a/make-4.0-noclock_gettime.patch +++ /dev/null @@ -1,14 +0,0 @@ -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-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-getcwd.patch b/make-getcwd.patch new file mode 100644 index 0000000..837d20a --- /dev/null +++ b/make-getcwd.patch @@ -0,0 +1,25 @@ +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 new file mode 100644 index 0000000..e6ff326 --- /dev/null +++ b/make-newlines.patch @@ -0,0 +1,32 @@ +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 432215d..4d61bda 100644 --- a/make.spec +++ b/make.spec @@ -2,27 +2,20 @@ Summary: A GNU tool which simplifies the build process for users Name: make Epoch: 1 -Version: 4.0 -Release: 5.1%{?dist} +Version: 4.1 +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-4.0-noclock_gettime.patch -Patch2: make-4.0-j8k.patch -Patch3: make-4.0-getcwd.patch -Patch4: make-4.0-err-reporting.patch +Patch0: make-getcwd.patch +Patch1: make-newlines.patch -# Upstream: https://savannah.gnu.org/bugs/?30748 -Patch6: make-4.0-weird-shell.patch - -Patch7: make-4.0-newlines.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/install-info Requires(preun): /sbin/install-info BuildRequires: procps +BuildRequires: git %description A GNU tool for controlling the generation of executables and other @@ -40,13 +33,7 @@ Group: Development/Libraries The make-devel package contains gnumake.h. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch6 -p1 -%patch7 -p1 +%autosetup -p0 -Sgit rm -f tests/scripts/features/parallelism.orig @@ -55,8 +42,7 @@ rm -f tests/scripts/features/parallelism.orig make %{?_smp_mflags} %install -rm -rf ${RPM_BUILD_ROOT} -make DESTDIR=$RPM_BUILD_ROOT install +%make_install ln -sf make ${RPM_BUILD_ROOT}/%{_bindir}/gmake ln -sf make.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1/gmake.1 rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir @@ -68,9 +54,6 @@ echo ============TESTING=============== /usr/bin/env LANG=C make check && true echo ============END TESTING=========== -%clean -rm -rf ${RPM_BUILD_ROOT} - %post if [ -f %{_infodir}/make.info.gz ]; then # for --excludedocs /sbin/install-info %{_infodir}/make.info.gz %{_infodir}/dir --entry="* Make: (make). The GNU make utility." || : @@ -84,18 +67,20 @@ if [ $1 = 0 ]; then fi %files -f %{name}.lang -%defattr(-,root,root) -%doc NEWS README COPYING AUTHORS +%license COPYING +%doc NEWS README AUTHORS %{_bindir}/* %{_mandir}/man*/* %{_infodir}/*.info* %{_includedir}/gnumake.h %files devel -%defattr(-,root,root) %{_includedir}/gnumake.h %changelog +* Sat Oct 24 2015 Zbigniew Jędrzejewski-Szmek - 1:4.1-1 +- Update to latest version + * Wed Jun 17 2015 Fedora Release Engineering - 1:4.0-5.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 340e211..5bb2d44 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -571d470a7647b455e3af3f92d79f1c18 make-4.0.tar.bz2 +57a7a224a822f94789a587ccbcedff69 make-4.1.tar.bz2