head 1.6; access; symbols pkgsrc-2026Q3:1.6.0.2 pkgsrc-2026Q3-base:1.6 pkgsrc-2026Q2:1.5.0.2 pkgsrc-2026Q2-base:1.5 pkgsrc-2026Q1:1.4.0.2 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.3.0.2 pkgsrc-2025Q4-base:1.3 pkgsrc-2025Q3:1.1.0.2 pkgsrc-2025Q3-base:1.1; locks; strict; comment @# @; 1.6 date 2026.08.03.13.12.27; author wiz; state Exp; branches; next 1.5; commitid ofNvh6KsgZ3m2cQG; 1.5 date 2026.05.30.15.13.14; author gdt; state Exp; branches; next 1.4; commitid oQ5EdaTLNzUzNQHG; 1.4 date 2025.12.23.19.32.53; author bsiegert; state Exp; branches; next 1.3; commitid l8H94pv9RC93jznG; 1.3 date 2025.12.19.17.02.26; author bsiegert; state Exp; branches; next 1.2; commitid MncNXWjydPrTB2nG; 1.2 date 2025.12.02.19.24.16; author bsiegert; state Exp; branches; next 1.1; commitid vqCaTBTHJZmqWRkG; 1.1 date 2025.08.16.15.52.03; author bsiegert; state Exp; branches; next ; commitid KZyLpw7Amw1ReY6G; desc @@ 1.6 log @mk: switch the default for PATCH_DIST_STRIP from -p0 to -p1 adapt packages that didn't set PATCH_DIST_STRIP to use -p0, and remove the -p1 lines @ text @# $NetBSD: Makefile,v 1.5 2026/05/30 15:13:14 gdt Exp $ .include "../../lang/go/version.mk" GO_BOOTSTRAP_REQD= 122 .include "../../lang/go/bootstrap.mk" GOVERSSUFFIX= 125 DISTNAME= go${GO${GOVERSSUFFIX}_VERSION}.src PKGNAME= go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION} CATEGORIES= lang MASTER_SITES= https://go.dev/dl/ MAINTAINER= bsiegert@@NetBSD.org HOMEPAGE= https://golang.org/ COMMENT= The Go programming language LICENSE= modified-bsd WRKSRC= ${WRKDIR}/go USE_TOOLS+= bash perl pax # Patch to fix linker errors on i386 PATCH_SITES= https://github.com/golang/go/commit/ PATCHFILES= 9ba0948172cbb05308fb2a9db823a720f8ffb9ad.patch # cgo compiles under TMPDIR TMPDIR?= /tmp BUILDLINK_PASSTHRU_DIRS+= ${TMPDIR} INSTALLATION_DIRS= bin go${GOVERSSUFFIX} # These are scripts for upstream developers which are simply installed # as part of all the golang source code, but are not used at runtime. CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/lib/time/update.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/lib/wasm/go_js_wasm_exec CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/lib/wasm/go_wasip1_wasm_exec CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/bootstrap.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/buildall.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/compile/internal/ssa/_gen/cover.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/plan9/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/plan9/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/unix/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/unix/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/windows/mkerrors.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmd/vendor/golang.org/x/sys/windows/mkknownfolderids.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build-boring.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/crypto/internal/boring/build-goboring.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/go/doc/comment/mkstd.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/cmp.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/race.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.bash CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/runtime/race/mkcgo.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mkall.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mkerrors.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/mksysnum_plan9.sh CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/regexp/syntax/make_perl_groups.pl CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/syscall/*.pl # uses own linker, which does not support relro on NetBSD CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/go CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/bin/gofmt CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/asm CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/compile CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/link CHECK_RELRO_SKIP+= go${GOVERSSUFFIX}/pkg/bootstrap/bin/cgo # also does not support SSP at this time CHECK_SSP_SKIP= ${CHECK_RELRO_SKIP} # uses /bin/rc (for Plan 9) CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/include/plan9/mklibc.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/all.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/clean.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/make.rc CHECK_INTERPRETER_SKIP+= go${GOVERSSUFFIX}/src/run.rc SUBST_CLASSES+= paths 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} PRINT_PLIST_AWK+= /^bin\/go${GOVERSSUFFIX}/ { print "bin/go$${GOVERSSUFFIX}"; next; } PRINT_PLIST_AWK+= /^bin\/gofmt${GOVERSSUFFIX}/ { print "bin/gofmt$${GOVERSSUFFIX}"; next; } post-extract: ${RM} -r -f ${WRKSRC}/test/fixedbugs/issue27836* post-patch: ${RM} -f ${WRKSRC}/src/cmd/link/internal/x86/*.orig_dist # By default, go build invokes unreasonable parallelism. Rather than # ${MAKE_JOBS} of 1 thread as with make, we run just "go build" (1 # job) and tell it to not exceed ${MAKE_JOBS} threads. This is sound # because there is no make with -jN args also. do-build: cd ${WRKSRC}/src && \ env \ GOMAXPROCS=${MAKE_JOBS:U1} \ GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} \ ${GOOPT} \ GOCACHE=${WRKDIR}/.cache/go-build \ ${BASH} ./make.bash -v # for RELRO build: # cd ${WRKSRC}/src && env GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:Q} GO_LDFLAGS="-buildmode=pie" ${GOOPT} ${BASH} ./make.bash do-install: cd ${WRKSRC} && rm -rf pkg/obj pkg/bootstrap cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} find ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} -name \*.orig -exec rm {} \; .if ${USE_CROSS_COMPILE:tl} == "yes" cd ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX} && \ ${RM} -rf pkg/tool/${NATIVE_GO_PLATFORM} .endif .for cmd in go gofmt . if ${USE_CROSS_COMPILE:tl} == "yes" ${MV} ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX}/bin/${GO_PLATFORM}/${cmd} \ ${DESTDIR}${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} . endif ${LN} -sf ${PREFIX}/go${GOVERSSUFFIX}/bin/${cmd} ${DESTDIR}${PREFIX}/bin/${cmd}${GOVERSSUFFIX} .endfor do-test: cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${GOOPT} ${BASH} run.bash --no-rebuild --banner "" .include "../../mk/bsd.pkg.mk" @ 1.5 log @lang/go{118,120,123,124,125}: Respect MAKE_JOBS Fix copied from go126, as proposed on tech-pkg@@. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.4 2025/12/23 19:32:53 bsiegert Exp $ a24 1 PATCH_DIST_STRIP= -p1 @ 1.4 log @go125: fix comment The patch is for fixing linker errors on i386. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.3 2025/12/19 17:02:26 bsiegert Exp $ d107 4 d114 1 @ 1.3 log @go125: avoid linker panics on i386 Add a patch to fix https://github.com/golang/go/issues/76815, noticed in NetBSD/i386 bulk builds. In builds with cgo, the assembler can create a section twice by mistake, which confuses the linker. This should fix several package build failures observed in bulk builds. ok during freeze by maya@@ @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.2 2025/12/02 19:24:16 bsiegert Exp $ d22 1 a22 1 # Patch to stop requiring /proc to be mounted on NetBSD @ 1.2 log @go: update to 1.24.11 and 1.25.5 (security) These releases include 2 security fixes following the security policy: - crypto/x509: excessive resource consumption in printing error string for host certificate validation Within HostnameError.Error(), when constructing an error string, there is no limit to the number of hosts that will be printed out. Furthermore, the error string is constructed by repeated string concatenation, leading to quadratic runtime. Therefore, a certificate provided by a malicious actor can result in excessive resource consumption. HostnameError.Error() now limits the number of hosts and utilizes strings.Builder when constructing an error string. Thanks to Philippe Antoine (Catena cyber) for reporting this issue. This is CVE-2025-61729 and Go issue https://go.dev/issue/76445. - crypto/x509: excluded subdomain constraint does not restrict wildcard SANs An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com. This is CVE-2025-61727 and Go issue https://go.dev/issue/76442. View the release notes for more information: https://go.dev/doc/devel/release#go1.25.5 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2025/08/16 15:52:03 bsiegert Exp $ d22 5 d104 3 @ 1.1 log @New package, go125 Via wip. Release notes: https://go.dev/doc/go1.25 @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.1 2025/02/25 20:09:16 bsiegert Exp $ d12 1 a12 1 MASTER_SITES= https://storage.googleapis.com/golang/ @