Skip to content

Commit

Permalink
golang: Update to 1.23.4
Browse files Browse the repository at this point in the history
Patch original go.env to use GOTOOLCHAIN=local (recommended by upstream)

Changelog [here](https://go.dev/doc/devel/release#go1.23.minor)

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Dec 13, 2024
1 parent a4dea9c commit 8e052b1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 19 deletions.
Binary file modified g/golang/manifest.x86_64.bin
Binary file not shown.
6 changes: 3 additions & 3 deletions g/golang/manifest.x86_64.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -11728,7 +11728,7 @@
"/usr/lib/golang/test/writebarrier.go",
"/usr/lib/golang/test/zerodivide.go",
"/usr/lib/golang/test/zerosize.go",
"/usr/share/defaults/etc/profile.d/golang-env.sh"
"/usr/share/defaults/etc/profile.d/golang-GOROOT.sh"
],
"name": "golang",
"provides": [
Expand All @@ -11739,6 +11739,6 @@
}
},
"source-name": "golang",
"source-release": "10",
"source-version": "1.23.3"
"source-release": "11",
"source-version": "1.23.4"
}
2 changes: 0 additions & 2 deletions g/golang/pkg/go.env

This file was deleted.

11 changes: 11 additions & 0 deletions g/golang/pkg/go.env-toolchain-local.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This ensures that go will use the locally installed toolchain, and is the
recommended setting for distributions according to upstream.

--- a/go.env 2024-12-13 14:45:14.618692811 +0000
+++ b/go.env 2024-12-13 14:46:20.148353559 +0000
@@ -9,4 +9,4 @@

# Automatically download newer toolchains as directed by go.mod files.
# See https://go.dev/doc/toolchain for details.
-GOTOOLCHAIN=auto
+GOTOOLCHAIN=local
33 changes: 19 additions & 14 deletions g/golang/stone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# SPDX-License-Identifier: MPL-2.0
#
name : golang
version : 1.23.3
release : 10
version : 1.23.4
release : 11
homepage : https://go.dev
upstreams :
- https://go.dev/dl/go1.23.3.linux-amd64.tar.gz : a0afb9744c00648bafb1b90b4aba5bdb86f424f02f9275399ce0c20b93a2c3a8
- https://go.dev/dl/go1.23.4.linux-amd64.tar.gz : 6924efde5de86fe277676e929dc9917d466efa02fb934197bc2eba35d5680971
summary : The Go programming language
description : |
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Expand All @@ -22,19 +22,25 @@ packages :
paths:
- /usr/lib/*.a
environment : |
export GOROOT="%(libdir)/%(name)"
# needed for bootstrap in the build phase
export GOROOT_BOOTSTRAP="%(libdir)/%(name)"
# Should this be set by boulder automatically?
export XDG_CACHE_HOME="%(workdir)/.cache"
setup : |
%patch %(pkgdir)/stateless/x509-certificate-path.patch
%patch %(pkgdir)/go.env-toolchain-local.patch
build : |
# some tests just fail (some need networking)
cd src && ./make.bash -v
pushd src
./make.bash -v
popd
# install to ./ for easier copying into the final destination later
GOROOT=${PWD} PATH=${PWD}/bin:${PATH} go install -buildmode=shared std
# TODO: Properly filter unwanted content to achieve a clean package.
install : |
GOROOT=${PWD} PATH=${PWD}/bin:${PATH} go install -buildmode=shared std
# Don't need these
rm -rf .cache go
# Testdata searches for /libexec/ld-elf.so.1.
# This is just data fed into tests, but boulder scans it regardless.
Expand All @@ -49,19 +55,18 @@ install : |
ln -srvf %(installroot)%(libdir)/%(name)/bin/gofmt %(installroot)%(bindir)/
ln -srvf %(installroot)%(libdir)/%(name)/bin/go %(installroot)%(bindir)/
# needed assets
# Assets needed for proper installation
find -mindepth 1 -maxdepth 1 -type d -not -name bin -exec cp -a {} %(installroot)/%(libdir)/%(name) \;
# Ensure that the present toolchain version is always used for building other go recipes
%install_file %(pkgdir)/go.env %(installroot)%(libdir)/%(name)/go.env
# ensure go.env is visible in build
cat %(installroot)%(libdir)/%(name)/go.env
# verify that the present toolchain version is always used for building other go recipes
cat go.env
%install_file go.env %(installroot)%(libdir)/%(name)/go.env
# HACK!
# Ensure that relevant env vars are set in user sessions
%install_dir %(installroot)%(vendordir)/etc/profile.d
# GOROOT needs to be set or bad things will happen, because make.bash uses -trimpath
echo 'export GOROOT=%(libdir)/%(name)' >> %(installroot)%(vendordir)/etc/profile.d/golang-env.sh
cat %(installroot)%(vendordir)/etc/profile.d/golang-env.sh
echo 'export GOROOT=%(libdir)/%(name)' > %(installroot)%(vendordir)/etc/profile.d/golang-GOROOT.sh
cat %(installroot)%(vendordir)/etc/profile.d/golang-GOROOT.sh
# check : |
# cd src && ./run.bash -v -v -v -k

0 comments on commit 8e052b1

Please sign in to comment.