pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/gmake



Module Name:    pkgsrc
Committed By:   sevan
Date:           Fri Jun 12 23:50:16 UTC 2020

Modified Files:
        pkgsrc/devel/gmake: Makefile PLIST distinfo
        pkgsrc/devel/gmake/patches: patch-src_hash.c
Added Files:
        pkgsrc/devel/gmake/patches: patch-configure patch-configure.ac
            patch-dir.c patch-makeint.h patch-posixos.c

Log Message:
Revert to v4.2.1
4.3 introduces some incompatible changes which causes fallout with a lot of
packages.

Heads up by ryoon@ about the doc/TODO which I did not read before updating.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 pkgsrc/devel/gmake/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/gmake/PLIST
cvs rdiff -u -r1.38 -r1.39 pkgsrc/devel/gmake/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/devel/gmake/patches/patch-configure \
    pkgsrc/devel/gmake/patches/patch-configure.ac \
    pkgsrc/devel/gmake/patches/patch-dir.c \
    pkgsrc/devel/gmake/patches/patch-posixos.c
cvs rdiff -u -r0 -r1.10 pkgsrc/devel/gmake/patches/patch-makeint.h
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/gmake/patches/patch-src_hash.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/gmake/Makefile
diff -u pkgsrc/devel/gmake/Makefile:1.110 pkgsrc/devel/gmake/Makefile:1.111
--- pkgsrc/devel/gmake/Makefile:1.110   Fri Jun 12 14:48:38 2020
+++ pkgsrc/devel/gmake/Makefile Fri Jun 12 23:50:16 2020
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.110 2020/06/12 14:48:38 sevan Exp $
+# $NetBSD: Makefile,v 1.111 2020/06/12 23:50:16 sevan Exp $
 
-DISTNAME=      make-4.3
+DISTNAME=      make-4.2.1
 PKGNAME=       g${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GNU:=make/}
+EXTRACT_SUFX=  .tar.bz2
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://www.gnu.org/software/make/make.html

Index: pkgsrc/devel/gmake/PLIST
diff -u pkgsrc/devel/gmake/PLIST:1.14 pkgsrc/devel/gmake/PLIST:1.15
--- pkgsrc/devel/gmake/PLIST:1.14       Fri Jun 12 15:22:17 2020
+++ pkgsrc/devel/gmake/PLIST    Fri Jun 12 23:50:16 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.14 2020/06/12 15:22:17 sevan Exp $
+@comment $NetBSD: PLIST,v 1.15 2020/06/12 23:50:16 sevan Exp $
 bin/gmake
 gnu/bin/make
 gnu/man/man1/make.1
@@ -6,7 +6,6 @@ include/gnumake.h
 info/make.info
 man/man1/gmake.1
 ${PLIST.nls}share/locale/be/LC_MESSAGES/make.mo
-${PLIST.nls}share/locale/bg/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/cs/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/da/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/de/LC_MESSAGES/make.mo
@@ -24,13 +23,10 @@ ${PLIST.nls}share/locale/ko/LC_MESSAGES/
 ${PLIST.nls}share/locale/lt/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/nl/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/pl/LC_MESSAGES/make.mo
-${PLIST.nls}share/locale/pt/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/pt_BR/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/ru/LC_MESSAGES/make.mo
-${PLIST.nls}share/locale/sr/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/sv/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/tr/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/uk/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/vi/LC_MESSAGES/make.mo
 ${PLIST.nls}share/locale/zh_CN/LC_MESSAGES/make.mo
-${PLIST.nls}share/locale/zh_TW/LC_MESSAGES/make.mo

Index: pkgsrc/devel/gmake/distinfo
diff -u pkgsrc/devel/gmake/distinfo:1.38 pkgsrc/devel/gmake/distinfo:1.39
--- pkgsrc/devel/gmake/distinfo:1.38    Fri Jun 12 15:22:17 2020
+++ pkgsrc/devel/gmake/distinfo Fri Jun 12 23:50:16 2020
@@ -1,8 +1,13 @@
-$NetBSD: distinfo,v 1.38 2020/06/12 15:22:17 sevan Exp $
+$NetBSD: distinfo,v 1.39 2020/06/12 23:50:16 sevan Exp $
 
-SHA1 (make-4.3.tar.gz) = 3c40e5b49b893dbb14f1e2e1f8fe89b7298cc51d
-RMD160 (make-4.3.tar.gz) = 2f2d49f85200433a7a5119bd9d56758a3033c2c0
-SHA512 (make-4.3.tar.gz) = 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b
-Size (make-4.3.tar.gz) = 2317073 bytes
+SHA1 (make-4.2.1.tar.bz2) = 7d9d11eb36cfb752da1fb11bb3e521d2a3cc8830
+RMD160 (make-4.2.1.tar.bz2) = 7cf74e2fd9764ffeb48f40a49077099874ad8a54
+SHA512 (make-4.2.1.tar.bz2) = 9cf00869a2f938492554f71d8cb288b5b009b3bd0489ef164f2c8f6532fc37db5c7e20af1dea288536e7c9710ee0bc6e1ddcdfc4928a8540e6e43661741825b8
+Size (make-4.2.1.tar.bz2) = 1407126 bytes
 SHA1 (patch-af) = 8ff060ecba9d664044eabd98741253881d8c9bbe
-SHA1 (patch-src_hash.c) = 755de04a4f9a63f5bfc2520026344d6dc8654992
+SHA1 (patch-configure) = e3122c5c1bbe59ec4c233f42feb6d7952a1e1215
+SHA1 (patch-configure.ac) = 7d22c8f5e5d349687885f55120fa2f7c1251e399
+SHA1 (patch-dir.c) = 1616d8e26c0761c8734063806fa581ae8884b4e8
+SHA1 (patch-makeint.h) = cb5f0889d84874a16fc10bc6f91e18c2277194cc
+SHA1 (patch-posixos.c) = 4c566b23442bcc87f776181be531957c254162de
+SHA1 (patch-src_hash.c) = 2c0168db7afec3da98b30392290e5b9464ea7b5e

Index: pkgsrc/devel/gmake/patches/patch-src_hash.c
diff -u pkgsrc/devel/gmake/patches/patch-src_hash.c:1.2 pkgsrc/devel/gmake/patches/patch-src_hash.c:1.3
--- pkgsrc/devel/gmake/patches/patch-src_hash.c:1.2     Fri Jun 12 15:22:18 2020
+++ pkgsrc/devel/gmake/patches/patch-src_hash.c Fri Jun 12 23:50:16 2020
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_hash.c,v 1.2 2020/06/12 15:22:18 sevan Exp $
+$NetBSD: patch-src_hash.c,v 1.3 2020/06/12 23:50:16 sevan Exp $
 
 PCC says: hash.c:326: error: Constant "4294967295" is out of range
 
---- src/hash.c.orig    2020-06-12 14:40:24.838680043 +0000
-+++ src/hash.c
-@@ -321,7 +321,7 @@ round_up_2 (unsigned long n)
+--- hash.c.orig        2006-02-11 21:00:39.000000000 +0100
++++ hash.c
+@@ -323,7 +323,7 @@ round_up_2 (unsigned long n)
    n |= (n >> 8);
    n |= (n >> 16);
  

Added files:

Index: pkgsrc/devel/gmake/patches/patch-configure
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-configure:1.3
--- /dev/null   Fri Jun 12 23:50:16 2020
+++ pkgsrc/devel/gmake/patches/patch-configure  Fri Jun 12 23:50:16 2020
@@ -0,0 +1,20 @@
+$NetBSD: patch-configure,v 1.3 2020/06/12 23:50:16 sevan Exp $
+
+Support GLIBC glob interface version 2.
+
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116
+
+--- configure.orig     2014-10-05 16:25:21.000000000 +0000
++++ configure
+@@ -11060,10 +11060,9 @@ else
+ #include <glob.h>
+ #include <fnmatch.h>
+ 
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+    gnu glob
+ # endif
+ #endif
Index: pkgsrc/devel/gmake/patches/patch-configure.ac
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-configure.ac:1.3
--- /dev/null   Fri Jun 12 23:50:16 2020
+++ pkgsrc/devel/gmake/patches/patch-configure.ac       Fri Jun 12 23:50:16 2020
@@ -0,0 +1,20 @@
+$NetBSD: patch-configure.ac,v 1.3 2020/06/12 23:50:16 sevan Exp $
+
+Support GLIBC glob interface version 2.
+
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=48c8a116
+
+--- configure.ac.orig  2014-10-05 16:24:51.000000000 +0000
++++ configure.ac
+@@ -401,10 +401,9 @@ AC_CACHE_CHECK([if system libc has GNU g
+ #include <glob.h>
+ #include <fnmatch.h>
+ 
+-#define GLOB_INTERFACE_VERSION 1
+ #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+ # include <gnu-versions.h>
+-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
++# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2
+    gnu glob
+ # endif
+ #endif],
Index: pkgsrc/devel/gmake/patches/patch-dir.c
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-dir.c:1.3
--- /dev/null   Fri Jun 12 23:50:16 2020
+++ pkgsrc/devel/gmake/patches/patch-dir.c      Fri Jun 12 23:50:16 2020
@@ -0,0 +1,51 @@
+$NetBSD: patch-dir.c,v 1.3 2020/06/12 23:50:16 sevan Exp $
+
+Support GLIBC glob interface version 2.
+
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=193f1e81
+
+--- dir.c.orig 2014-10-05 16:24:51.000000000 +0000
++++ dir.c
+@@ -1212,15 +1212,40 @@ local_stat (const char *path, struct sta
+ }
+ #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
Index: pkgsrc/devel/gmake/patches/patch-posixos.c
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-posixos.c:1.3
--- /dev/null   Fri Jun 12 23:50:16 2020
+++ pkgsrc/devel/gmake/patches/patch-posixos.c  Fri Jun 12 23:50:16 2020
@@ -0,0 +1,162 @@
+$NetBSD: patch-posixos.c,v 1.3 2020/06/12 23:50:16 sevan Exp $
+
+http://git.savannah.gnu.org/cgit/make.git/commit/?id=b552b05251980f693c729e251f93f5225b400714
+
+[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.
+
+--- posixos.c.orig     2016-05-21 20:21:52.000000000 +0000
++++ posixos.c
+@@ -59,6 +59,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)
+ {
+@@ -78,6 +96,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;
+ }
+ 
+@@ -113,6 +134,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;
+ }
+ 
+@@ -161,7 +185,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;
+ 
+@@ -239,18 +266,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?)  */
+@@ -259,28 +280,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"));
++ 
++          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"));
++        }
+ 
+-  /* 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;
++      /* read() should never return 0: only the master make can reap all the
++         tokens and close the write side...??  */
++      return r > 0;
++    }
+ }
+ 
+ #else

Index: pkgsrc/devel/gmake/patches/patch-makeint.h
diff -u /dev/null pkgsrc/devel/gmake/patches/patch-makeint.h:1.10
--- /dev/null   Fri Jun 12 23:50:16 2020
+++ pkgsrc/devel/gmake/patches/patch-makeint.h  Fri Jun 12 23:50:16 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-makeint.h,v 1.10 2020/06/12 23:50:16 sevan Exp $
+
+* Do not override stack limits by default.
+  It can dramatically increase the memory use of multi-threaded programs.
+
+--- makeint.h.orig     2016-05-21 20:22:32.000000000 +0000
++++ makeint.h
+@@ -442,9 +442,6 @@ extern int unixy_shell;
+ #define NEXT_TOKEN(s)   while (ISSPACE (*(s))) ++(s)
+ #define END_OF_TOKEN(s) while (! STOP_SET (*(s), MAP_SPACE|MAP_NUL)) ++(s)
+ 
+-#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>
+ extern struct rlimit stack_limit;



Home | Main Index | Thread Index | Old Index