pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/go117 go117: Rework illumos getgrouplist hack.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b8c596862b1
branches:  trunk
changeset: 458365:7b8c596862b1
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue Sep 14 10:12:16 2021 +0000

description:
go117: Rework illumos getgrouplist hack.

The previous change only worked for the build of go itself, any dependencies
that used the same go code were broken.  Fixes www/gitea and others.

Needs to be fixed properly by creating a native illumos bootstrap kit.

diffstat:

 lang/go117/Makefile                                        |  15 +++++++---
 lang/go117/distinfo                                        |   3 +-
 lang/go117/patches/patch-src_os_user_getgrouplist__unix.go |  19 --------------
 3 files changed, 11 insertions(+), 26 deletions(-)

diffs (74 lines):

diff -r 4e8bf431a89f -r 7b8c596862b1 lang/go117/Makefile
--- a/lang/go117/Makefile       Tue Sep 14 08:30:10 2021 +0000
+++ b/lang/go117/Makefile       Tue Sep 14 10:12:16 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2021/09/07 13:31:14 jperkin Exp $
+# $NetBSD: Makefile,v 1.3 2021/09/14 10:12:16 jperkin Exp $
 
 .include "../../lang/go/version.mk"
 .include "../../lang/go/bootstrap.mk"
@@ -18,10 +18,6 @@
 WRKSRC=                ${WRKDIR}/go
 USE_TOOLS+=    bash:run perl:run pax
 
-.if ${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris"
-CWRAPPERS_APPEND.cc+=  -DILLUMOS
-.endif
-
 # cgo compiles under TMPDIR
 TMPDIR?=       /tmp
 BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR}
@@ -76,6 +72,15 @@
 SUBST_FILES.paths=     src/crypto/x509/root_solaris.go
 SUBST_VARS.paths=      PKG_SYSCONFDIR
 
+# Required until we bootstrap from a native illumos kit.  This is obviously
+# terrible and should be fixed properly.
+.if ${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris"
+SUBST_CLASSES+=                grplist
+SUBST_STAGE.grplist=   pre-configure
+SUBST_FILES.grplist=   src/os/user/getgrouplist_unix.go
+SUBST_SED.grplist=     -e 's,return getgrouplist.*,return 0;,'
+.endif
+
 PLIST_SUBST+=  GOVERSSUFFIX=${GOVERSSUFFIX}
 
 PLIST_VARS+=   pty route
diff -r 4e8bf431a89f -r 7b8c596862b1 lang/go117/distinfo
--- a/lang/go117/distinfo       Tue Sep 14 08:30:10 2021 +0000
+++ b/lang/go117/distinfo       Tue Sep 14 10:12:16 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2021/09/07 13:31:47 jperkin Exp $
+$NetBSD: distinfo,v 1.4 2021/09/14 10:12:16 jperkin Exp $
 
 SHA1 (go1.17.src.tar.gz) = dd6eb7b66af665cba58adc606bd7502194ad4462
 RMD160 (go1.17.src.tar.gz) = 296e9b97d97b2f9c793085ccf3835504965bd276
@@ -8,5 +8,4 @@
 SHA1 (patch-src_cmd_dist_util.go) = 2d9c2f59e27672d56f5f1a0e3f9d5101a05546a7
 SHA1 (patch-src_crypto_x509_root__bsd.go) = 27636e0d8c121ccec6c46a3a82cd0e0469473a6e
 SHA1 (patch-src_crypto_x509_root__solaris.go) = cce8d78a5a3712a0e7a620ead232a779e4a4b21e
-SHA1 (patch-src_os_user_getgrouplist__unix.go) = cc977d20d2c41a894bf8dfaed38195b7b47e088d
 SHA1 (patch-src_syscall_zsysnum__solaris__amd64.go) = ec28a0fa37ba9599ec1651c8e9337a2efc48a26b
diff -r 4e8bf431a89f -r 7b8c596862b1 lang/go117/patches/patch-src_os_user_getgrouplist__unix.go
--- a/lang/go117/patches/patch-src_os_user_getgrouplist__unix.go        Tue Sep 14 08:30:10 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-src_os_user_getgrouplist__unix.go,v 1.1 2021/09/07 13:31:15 jperkin Exp $
-
-Until we switch to a native illumos bootstrap we will need to work around this
-file being bootstrapped from GOHOSTOS=solaris.
-
---- src/os/user/getgrouplist_unix.go.orig      2021-08-16 16:29:54.000000000 +0000
-+++ src/os/user/getgrouplist_unix.go
-@@ -15,7 +15,11 @@ package user
- #include <grp.h>
- 
- static int mygetgrouplist(const char* user, gid_t group, gid_t* groups, int* ngroups) {
-+#ifdef ILLUMOS
-+      return 0;
-+#else
-       return getgrouplist(user, group, groups, ngroups);
-+#endif
- }
- */
- import "C"



Home | Main Index | Thread Index | Old Index