head 1.3; access; symbols pkgsrc-2026Q2:1.3.0.2 pkgsrc-2026Q2-base:1.3 pkgsrc-2026Q1:1.2.0.4 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.2 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.1.0.6 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.4 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.2 pkgsrc-2025Q1-base:1.1; locks; strict; comment @# @; 1.3 date 2026.05.30.15.13.14; author gdt; state Exp; branches; next 1.2; commitid oQ5EdaTLNzUzNQHG; 1.2 date 2025.12.02.19.24.16; author bsiegert; state Exp; branches; next 1.1; commitid vqCaTBTHJZmqWRkG; 1.1 date 2025.02.25.20.09.16; author bsiegert; state Exp; branches; next ; commitid MsvIGULSr5qSbTKF; desc @@ 1.3 log @lang/go{118,120,123,124,125}: Respect MAKE_JOBS Fix copied from go126, as proposed on tech-pkg@@. @ text @# $NetBSD: Makefile,v 1.2 2025/12/02 19:24:16 bsiegert Exp $ .include "../../lang/go/version.mk" GO_BOOTSTRAP_REQD= 122 .include "../../lang/go/bootstrap.mk" GOVERSSUFFIX= 124 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 # 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* # 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.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/02/25 20:09:16 bsiegert Exp $ d99 4 d106 1 @ 1.1 log @go124: new package for 1.24.0, from wip. The latest Go release, version 1.24, arrives six months after Go 1.23. Most of its changes are in the implementation of the toolchain, runtime, and libraries. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. Go 1.24 now fully supports generic type aliases: a type alias may be parameterized like a defined type. Go modules can now track executable dependencies using tool directives in go.mod. Several performance improvements to the runtime have decreased CPU overheads by 2-3% on average across a suite of representative benchmarks. Results may vary by application. These improvements include a new builtin map implementation based on Swiss Tables, more efficient memory allocation of small objects, and a new runtime-internal mutex implementation. @ text @d1 1 a1 1 # $NetBSD: Makefile,v 1.5 2024/12/04 18:51:39 bsiegert Exp $ d12 1 a12 1 MASTER_SITES= https://storage.googleapis.com/golang/ @