From 4144f0d5a6a5cc70df16ff95369c05b5a12b7c30 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 15 Sep 2025 07:06:21 +0000 Subject: [PATCH] dev-lang/go: Sync with Gentoo It's from Gentoo commit e763bfcebb51282bd7bb8dc35003d804e4174974. Signed-off-by: Flatcar Buildbot --- .../portage-stable/dev-lang/go/Manifest | 4 +- .../dev-lang/go/files/go-1.25-no-dwarf5.patch | 15 ++++++ .../go/{go-1.25.0.ebuild => go-1.24.7.ebuild} | 2 +- .../{go-1.23.12.ebuild => go-1.25.1.ebuild} | 50 ++++--------------- 4 files changed, 27 insertions(+), 44 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.25-no-dwarf5.patch rename sdk_container/src/third_party/portage-stable/dev-lang/go/{go-1.25.0.ebuild => go-1.24.7.ebuild} (96%) rename sdk_container/src/third_party/portage-stable/dev-lang/go/{go-1.23.12.ebuild => go-1.25.1.ebuild} (67%) diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest index ff963aa9b0..a3390b9a8a 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest @@ -1,3 +1,3 @@ -DIST go1.23.12.src.tar.gz 28185486 BLAKE2B a4d66382a56b89987084e06cc7d18fa48eb870cb1cb4202c86f7a8136f2dd1e2f592a8f3129384c426635aae74d4dae073520a124163497f143a047c61aa753d SHA512 c7f2125328da13aa956b58e5238ff4bba6bd94f2e93dac88c1b96c0556c1de3de28c512197a780366806bba92fb4ec03f1ccd14b606b8544b16bb08df106cb50 DIST go1.24.6.src.tar.gz 30794139 BLAKE2B b51693de6047402baa555e3d6c0c37511de60270c538797ea09317c604345b7577c0a24aa0f9f3963340538965f130360d4d98ed91470df83e790c95972af265 SHA512 65f535c722f4a0f6111c9ed829677621e456a5bc969ccb99009da1ade096b2b1a648a44ccfa913543677c220baeaf1afe634ba8ba165d9474ac9433ac249c914 -DIST go1.25.0.src.tar.gz 31974753 BLAKE2B fc2c2d386e4e3cf4f9f7bd7abea68cce873fceb446c1c3522d9e0b2a2b20e7fea40d51e2707b82227e86a1db658e033123bcb94a25bb2fe759b61bd04662332d SHA512 45030cd02ab0ed4feb74e12ad9dde544bf2255c4d1a48655fca5b643bbe690c75ea3dfac74a0e3e3c707c5af5e9171ae383a7a322e70fe824f9a47b6ffd42201 +DIST go1.24.7.src.tar.gz 30794506 BLAKE2B 850ffc97c83843c83d4dfb672dbe18c16b6feda5b76b70213241d583b5ef6c2c8d0bf532e15fa58cb4fceaaf1f66b52166d3badfc294ebecd1076ddd9c7a572e SHA512 656bb879244ba888af18b6e609fb2c4bc067b919827b9026c3ee44b3e2d0c7bffde262945de989880066196846b669c215da2e8c5d9adfb8491bb5d52af0d49a +DIST go1.25.1.src.tar.gz 31974863 BLAKE2B a9f0d27a292b8197ed2307bcfe90af0adccaa1e0e8de0d59df5b65f57ac7dd2cbaee1905401f81af994934fa83070e42c24ff6090affe56461198e89457842c7 SHA512 e77ae799a0dcd4ded40a196c3645da5b7e808e417831d2c5441387b0fd0ed5f946b678305294c52fda0a258889225c24c6073bb0973c3531ba4aa107b6afe849 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.25-no-dwarf5.patch b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.25-no-dwarf5.patch new file mode 100644 index 0000000000..72c2bab24a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-1.25-no-dwarf5.patch @@ -0,0 +1,15 @@ +diff --git a/go.env b/go.env +index 6ff2b921d4..e8959a72c7 100644 +--- a/go.env ++++ b/go.env +@@ -2,6 +2,10 @@ + # Values set by 'go env -w' and written to the user's go/env file override these. + # The environment overrides everything else. + ++#This can be removed when debugedit is fixed to support dwarf5 ++# https://sourceware.org/bugzilla/show_bug.cgi?id=33204 ++GOEXPERIMENT=nodwarf5 ++ + # Use the Go module mirror and checksum database by default. + # See https://proxy.golang.org for details. + GOPROXY=https://proxy.golang.org,direct diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.24.7.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.0.ebuild rename to sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.24.7.ebuild index ea320f14b6..9a85939da6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.24.7.ebuild @@ -20,7 +20,7 @@ case ${PV} in *) SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " S="${WORKDIR}"/go -# KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" ;; esac diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.1.ebuild similarity index 67% rename from sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.12.ebuild rename to sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.1.ebuild index 460ae2af01..5eb7ca8d21 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.12.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.25.1.ebuild @@ -7,7 +7,7 @@ export CBUILD=${CBUILD:-${CHOST}} export CTARGET=${CTARGET:-${CHOST}} # See "Bootstrap" in release notes -GO_BOOTSTRAP_MIN=1.20.14 +GO_BOOTSTRAP_MIN=1.22.12 MY_PV=${PV/_/} inherit go-env toolchain-funcs @@ -20,12 +20,8 @@ case ${PV} in *) SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " S="${WORKDIR}"/go - case ${PV} in - *_beta*|*_rc*) ;; - *) - KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" - ;; - esac + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; esac DESCRIPTION="A concurrent garbage collected and typesafe programming language" @@ -53,10 +49,6 @@ QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" QA_PREBUILT="*" QA_PRESTRIPPED="*.syso" -# Do not strip this package. Stripping is unsupported upstream and may -# fail. -RESTRICT=" strip" - DOCS=( CONTRIBUTING.md PATENTS @@ -75,6 +67,7 @@ go_cross_compile() { PATCHES=( "${FILESDIR}"/go-1.24-skip-gdb-tests.patch "${FILESDIR}"/go-1.24-dont-force-gold-arm.patch + "${FILESDIR}"/go-1.25-no-dwarf5.patch "${FILESDIR}"/go-never-download-newer-toolchains.patch ) @@ -106,30 +99,22 @@ src_compile() { src_test() { go_cross_compile && return 0 - cd src - - # https://github.com/golang/go/issues/42005 - rm cmd/link/internal/ld/fallocate_test.go || die - PATH="${GOBIN}:${PATH}" \ ./run.bash -no-rebuild -k || die "tests failed" - cd .. - rm -fr pkg/*_race || die - rm -fr pkg/obj/go-build || die } src_install() { dodir /usr/lib/go # The use of cp is deliberate in order to retain permissions - cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + cp -R . "${ED}"/usr/lib/go einstalldocs - insinto /usr/lib/go - doins go.env VERSION* - # testdata directories are not needed on the installed system - rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + # The other files we remove are installed by einstalldocs + rm -r $(find "${ED}"/usr/lib/go -iname testdata -type d -print) || die + rm "${ED}"/usr/lib/go/{CONTRIBUTING.md,PATENTS,README.md} || die + rm "${ED}"/usr/lib/go/{SECURITY.md,codereview.cfg,LICENSE} || die local bin_path if go_cross_compile; then @@ -142,21 +127,4 @@ src_install() { f=${x##*/} dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} done - - # install the @golang-rebuild set for Portage - insinto /usr/share/portage/config/sets - newins "${FILESDIR}"/go-sets.conf go.conf -} - -pkg_postinst() { - [[ -z ${REPLACING_VERSIONS} ]] && return - elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" - elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" - elog "due to the static linking nature of go." - elog "If this is not done, the packages compiled with the older" - elog "version of the compiler will not be updated until they are" - elog "updated individually, which could mean they will have" - elog "vulnerabilities." - elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" - elog "See https://bugs.gentoo.org/752153 for more info" }