diff options
author | jperkin <jperkin@pkgsrc.org> | 2021-09-14 10:12:16 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2021-09-14 10:12:16 +0000 |
commit | fd3c414e4aea94ecab6f56cd4c23e4e2636e9cf7 (patch) | |
tree | f1f0750fc3ada0072803658adcffbc5ae526c9b3 /lang/go117 | |
parent | 01a77e26cb115946e4f5a6881e96ac5d884a76c2 (diff) | |
download | pkgsrc-fd3c414e4aea94ecab6f56cd4c23e4e2636e9cf7.tar.gz |
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 (limited to 'lang/go117')
-rw-r--r-- | lang/go117/Makefile | 15 | ||||
-rw-r--r-- | lang/go117/distinfo | 3 | ||||
-rw-r--r-- | lang/go117/patches/patch-src_os_user_getgrouplist__unix.go | 19 |
3 files changed, 11 insertions, 26 deletions
diff --git a/lang/go117/Makefile b/lang/go117/Makefile index f36025a01c9..60315f04366 100644 --- a/lang/go117/Makefile +++ b/lang/go117/Makefile @@ -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 @@ LICENSE= modified-bsd 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_STAGE.paths= pre-configure 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 --git a/lang/go117/distinfo b/lang/go117/distinfo index fc3a8f61c76..c7549144d82 100644 --- a/lang/go117/distinfo +++ b/lang/go117/distinfo @@ -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-misc_ios_clangwrap.sh) = 0a06403609cb7bce2e6f65444fd322f486761afe 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 --git a/lang/go117/patches/patch-src_os_user_getgrouplist__unix.go b/lang/go117/patches/patch-src_os_user_getgrouplist__unix.go deleted file mode 100644 index e1aa51c2fe2..00000000000 --- a/lang/go117/patches/patch-src_os_user_getgrouplist__unix.go +++ /dev/null @@ -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" |