pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/go121



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Fri Dec  8 14:57:37 UTC 2023

Modified Files:
        pkgsrc/lang/go121: Makefile distinfo
Added Files:
        pkgsrc/lang/go121/patches: patch-src_cmd_dist_build.go

Log Message:
go121: do not trim paths in the installed go tool

This fixes running "go build", "go env", etc. when /proc is not mounted on
NetBSD.

First reported by wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/go121/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/go121/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/go121/patches/patch-src_cmd_dist_build.go

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

Modified files:

Index: pkgsrc/lang/go121/Makefile
diff -u pkgsrc/lang/go121/Makefile:1.1 pkgsrc/lang/go121/Makefile:1.2
--- pkgsrc/lang/go121/Makefile:1.1      Sat Aug 26 16:35:29 2023
+++ pkgsrc/lang/go121/Makefile  Fri Dec  8 14:57:37 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2023/08/26 16:35:29 bsiegert Exp $
+# $NetBSD: Makefile,v 1.2 2023/12/08 14:57:37 bsiegert Exp $
 
 .include "../../lang/go/version.mk"
 # Minimum Go version for bootstrapping is 1.17.13.
@@ -8,6 +8,7 @@ GO_BOOTSTRAP_REQD=      118
 
 GOVERSSUFFIX=  121
 
+PKGREVISION=   1
 DISTNAME=      go${GO${GOVERSSUFFIX}_VERSION}.src
 PKGNAME=       go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION}
 CATEGORIES=    lang

Index: pkgsrc/lang/go121/distinfo
diff -u pkgsrc/lang/go121/distinfo:1.5 pkgsrc/lang/go121/distinfo:1.6
--- pkgsrc/lang/go121/distinfo:1.5      Tue Dec  5 19:28:27 2023
+++ pkgsrc/lang/go121/distinfo  Fri Dec  8 14:57:37 2023
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.5 2023/12/05 19:28:27 bsiegert Exp $
+$NetBSD: distinfo,v 1.6 2023/12/08 14:57:37 bsiegert Exp $
 
 BLAKE2s (go1.21.5.src.tar.gz) = 135b193ba58f49e8e66530da5b7618dbf06a66f66b4436e76faaa9eac5b8d67e
 SHA512 (go1.21.5.src.tar.gz) = c064b7cb3c47d8fb99fc181a3cddf327a4b7a8c6af39a8ac568e9d74cd44903141680903ca48673bb02a7a159cce4f32a94f3b37fc65a9549d3518ad7c731fa3
 Size (go1.21.5.src.tar.gz) = 26986890 bytes
 SHA1 (patch-misc_ios_clangwrap.sh) = 0a06403609cb7bce2e6f65444fd322f486761afe
+SHA1 (patch-src_cmd_dist_build.go) = cbb9576f832806b0cbef121ea38ba6a54db95bc3
 SHA1 (patch-src_crypto_x509_root__bsd.go) = 0b5dead901450967109303f873a2696c65ccac35
 SHA1 (patch-src_crypto_x509_root__solaris.go) = d636a1599ede225ac339388fba2b6e253112d461
 SHA1 (patch-src_syscall_zsysnum__solaris__amd64.go) = ec28a0fa37ba9599ec1651c8e9337a2efc48a26b

Added files:

Index: pkgsrc/lang/go121/patches/patch-src_cmd_dist_build.go
diff -u /dev/null pkgsrc/lang/go121/patches/patch-src_cmd_dist_build.go:1.1
--- /dev/null   Fri Dec  8 14:57:38 2023
+++ pkgsrc/lang/go121/patches/patch-src_cmd_dist_build.go       Fri Dec  8 14:57:37 2023
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_cmd_dist_build.go,v 1.1 2023/12/08 14:57:37 bsiegert Exp $
+
+Build with debugging symbols and paths built in. Otherwise, the go tool
+needs /proc mounted to find its goroot directory.
+
+--- src/cmd/dist/build.go.orig 2023-11-29 21:21:46.000000000 +0000
++++ src/cmd/dist/build.go
+@@ -1317,14 +1317,6 @@ func toolenv() []string {
+               // as the original build system.
+               env = append(env, "CGO_ENABLED=0")
+       }
+-      if isRelease || os.Getenv("GO_BUILDER_NAME") != "" {
+-              // Add -trimpath for reproducible builds of releases.
+-              // Include builders so that -trimpath is well-tested ahead of releases.
+-              // Do not include local development, so that people working in the
+-              // main branch for day-to-day work on the Go toolchain itself can
+-              // still have full paths for stack traces for compiler crashes and the like.
+-              env = append(env, "GOFLAGS=-trimpath -ldflags=-w -gcflags=cmd/...=-dwarf=false")
+-      }
+       return env
+ }
+ 



Home | Main Index | Thread Index | Old Index