summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2021-07-14 18:38:58 +0000
committerjperkin <jperkin@pkgsrc.org>2021-07-14 18:38:58 +0000
commit9711c7b0d44b5a433981c6ce57964e54177ef5d7 (patch)
tree077f4e4748f5d244f14946ee22b267a5a7744f73 /lang
parent8722cb3eb387215a66e728af272b2f50a2e54be0 (diff)
downloadpkgsrc-9711c7b0d44b5a433981c6ce57964e54177ef5d7.tar.gz
go-bin: Hide the signing removal behind DARWIN_CHROOTED.
Unfortunately stripping the signatures breaks running the binaries outside a chroot according to schmonz, so we're left with no choice but to make this user-configurable. It took a lot of effort for me not to name this variable something far ruder. This will still mean the go-bin package is ultimately useless when shipped as part of a package set, but really we only need it for bootstrapping a real version which should work fine.
Diffstat (limited to 'lang')
-rw-r--r--lang/go-bin/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/lang/go-bin/Makefile b/lang/go-bin/Makefile
index 89ad9a21986..ddb6d76a1a2 100644
--- a/lang/go-bin/Makefile
+++ b/lang/go-bin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2021/07/14 14:31:21 jperkin Exp $
+# $NetBSD: Makefile,v 1.8 2021/07/14 18:38:58 jperkin Exp $
PKGNAME= go-bin-1.14.2
PKGREVISION= 4
@@ -85,7 +85,12 @@ INSTALLATION_DIRS+= go-bin
do-install:
cd ${WRKSRC} && ${PAX} -rw . ${DESTDIR}${PREFIX}/go-bin
-.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
+#
+# Removing the signatures is required to operate inside a chroot, but breaks
+# running them outside. We're left with no choice but to make it configurable
+# by the user.
+#
+.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64) && defined(DARWIN_CHROOTED)
for f in ${DESTDIR}${PREFIX}/go-bin/bin/* \
${DESTDIR}${PREFIX}/go-bin/pkg/tool/darwin_arm64/*; do \
/usr/bin/codesign --remove-signature $$f; \