From b0cb5236953fe74df3e7e81bf5d476a7ba9338ce Mon Sep 17 00:00:00 2001 From: Archana Polampalli Date: Fri, 9 May 2025 10:22:26 +0000 Subject: go: upgrade 1.24.1 -> 1.24.2 Fixes CVE-2025-22871 https://github.com/golang/go/compare/go1.24.1...go1.24.2 (From OE-Core rev: 0507f4709fb379e369f0abd5c37b9cee8de1fcb1) Signed-off-by: Archana Polampalli Signed-off-by: Steve Sakoman --- meta/recipes-devtools/go/go-1.24.1.inc | 20 --------- meta/recipes-devtools/go/go-1.24.2.inc | 20 +++++++++ .../recipes-devtools/go/go-binary-native_1.24.1.bb | 50 ---------------------- .../recipes-devtools/go/go-binary-native_1.24.2.bb | 50 ++++++++++++++++++++++ .../go/go-cross-canadian_1.24.1.bb | 2 - .../go/go-cross-canadian_1.24.2.bb | 2 + meta/recipes-devtools/go/go-cross_1.24.1.bb | 2 - meta/recipes-devtools/go/go-cross_1.24.2.bb | 2 + meta/recipes-devtools/go/go-crosssdk_1.24.1.bb | 2 - meta/recipes-devtools/go/go-crosssdk_1.24.2.bb | 2 + meta/recipes-devtools/go/go-runtime_1.24.1.bb | 3 -- meta/recipes-devtools/go/go-runtime_1.24.2.bb | 3 ++ meta/recipes-devtools/go/go_1.24.1.bb | 18 -------- meta/recipes-devtools/go/go_1.24.2.bb | 18 ++++++++ 14 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 meta/recipes-devtools/go/go-1.24.1.inc create mode 100644 meta/recipes-devtools/go/go-1.24.2.inc delete mode 100644 meta/recipes-devtools/go/go-binary-native_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go-binary-native_1.24.2.bb delete mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb delete mode 100644 meta/recipes-devtools/go/go-cross_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go-cross_1.24.2.bb delete mode 100644 meta/recipes-devtools/go/go-crosssdk_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go-crosssdk_1.24.2.bb delete mode 100644 meta/recipes-devtools/go/go-runtime_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go-runtime_1.24.2.bb delete mode 100644 meta/recipes-devtools/go/go_1.24.1.bb create mode 100644 meta/recipes-devtools/go/go_1.24.2.bb (limited to 'meta/recipes-devtools/go') diff --git a/meta/recipes-devtools/go/go-1.24.1.inc b/meta/recipes-devtools/go/go-1.24.1.inc deleted file mode 100644 index 4cf66e705a..0000000000 --- a/meta/recipes-devtools/go/go-1.24.1.inc +++ /dev/null @@ -1,20 +0,0 @@ -require go-common.inc - -FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:" - -LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a" - -SRC_URI += "\ - file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \ - file://0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ - file://0003-ld-add-soname-to-shareable-objects.patch \ - file://0004-make.bash-override-CC-when-building-dist-and-go_boot.patch \ - file://0005-cmd-dist-separate-host-and-target-builds.patch \ - file://0006-cmd-go-make-GOROOT-precious-by-default.patch \ - file://0007-exec.go-filter-out-build-specific-paths-from-linker-.patch \ - file://0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \ - file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ - file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \ - file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \ -" -SRC_URI[main.sha256sum] = "8244ebf46c65607db10222b5806aeb31c1fcf8979c1b6b12f60c677e9a3c0656" diff --git a/meta/recipes-devtools/go/go-1.24.2.inc b/meta/recipes-devtools/go/go-1.24.2.inc new file mode 100644 index 0000000000..cb4ae9ef80 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.24.2.inc @@ -0,0 +1,20 @@ +require go-common.inc + +FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go:" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a" + +SRC_URI += "\ + file://0001-cmd-go-make-content-based-hash-generation-less-pedan.patch \ + file://0002-cmd-go-Allow-GOTOOLDIR-to-be-overridden-in-the-envir.patch \ + file://0003-ld-add-soname-to-shareable-objects.patch \ + file://0004-make.bash-override-CC-when-building-dist-and-go_boot.patch \ + file://0005-cmd-dist-separate-host-and-target-builds.patch \ + file://0006-cmd-go-make-GOROOT-precious-by-default.patch \ + file://0007-exec.go-filter-out-build-specific-paths-from-linker-.patch \ + file://0008-src-cmd-dist-buildgo.go-do-not-hardcode-host-compile.patch \ + file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ + file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \ + file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \ +" +SRC_URI[main.sha256sum] = "9dc77ffadc16d837a1bf32d99c624cb4df0647cee7b119edd9e7b1bcc05f2e00" diff --git a/meta/recipes-devtools/go/go-binary-native_1.24.1.bb b/meta/recipes-devtools/go/go-binary-native_1.24.1.bb deleted file mode 100644 index ffe3d50b7b..0000000000 --- a/meta/recipes-devtools/go/go-binary-native_1.24.1.bb +++ /dev/null @@ -1,50 +0,0 @@ -# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org. - -SUMMARY = "Go programming language compiler (upstream binary for bootstrap)" -HOMEPAGE = " http://golang.org/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a" - -PROVIDES = "go-native" - -# Checksums available at https://go.dev/dl/ -SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" -SRC_URI[go_linux_amd64.sha256sum] = "cb2396bae64183cdccf81a9a6df0aea3bce9511fc21469fb89a0c00470088073" -SRC_URI[go_linux_arm64.sha256sum] = "8df5750ffc0281017fb6070fba450f5d22b600a02081dceef47966ffaf36a3af" -SRC_URI[go_linux_ppc64le.sha256sum] = "0fb522efcefabae6e37e69bdc444094e75bfe824ea6d4cc3cbc70c7ae1b16858" - -UPSTREAM_CHECK_URI = "https://golang.org/dl/" -UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" - -CVE_PRODUCT = "golang:go" - -S = "${WORKDIR}/go" - -inherit goarch native - -do_compile() { - : -} - -make_wrapper() { - rm -f ${D}${bindir}/$1 - cat <${D}${bindir}/$1 -#!/bin/bash -here=\`dirname \$0\` -export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" -\$here/../lib/go/bin/$1 "\$@" -END - chmod +x ${D}${bindir}/$1 -} - -do_install() { - find ${S} -depth -type d -name testdata -exec rm -rf {} + - - install -d ${D}${bindir} ${D}${libdir}/go - cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/ - - for f in ${S}/bin/* - do - make_wrapper `basename $f` - done -} diff --git a/meta/recipes-devtools/go/go-binary-native_1.24.2.bb b/meta/recipes-devtools/go/go-binary-native_1.24.2.bb new file mode 100644 index 0000000000..65ef93e2e0 --- /dev/null +++ b/meta/recipes-devtools/go/go-binary-native_1.24.2.bb @@ -0,0 +1,50 @@ +# This recipe is for bootstrapping our go-cross from a prebuilt binary of Go from golang.org. + +SUMMARY = "Go programming language compiler (upstream binary for bootstrap)" +HOMEPAGE = " http://golang.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7998cb338f82d15c0eff93b7004d272a" + +PROVIDES = "go-native" + +# Checksums available at https://go.dev/dl/ +SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" + +SRC_URI[go_linux_amd64.sha256sum] = "68097bd680839cbc9d464a0edce4f7c333975e27a90246890e9f1078c7e702ad" +SRC_URI[go_linux_arm64.sha256sum] = "756274ea4b68fa5535eb9fe2559889287d725a8da63c6aae4d5f23778c229f4b" +SRC_URI[go_linux_ppc64le.sha256sum] = "5fff857791d541c71d8ea0171c73f6f99770d15ff7e2ad979104856d01f36563" +UPSTREAM_CHECK_URI = "https://golang.org/dl/" +UPSTREAM_CHECK_REGEX = "go(?P\d+(\.\d+)+)\.linux" + +CVE_PRODUCT = "golang:go" + +S = "${WORKDIR}/go" + +inherit goarch native + +do_compile() { + : +} + +make_wrapper() { + rm -f ${D}${bindir}/$1 + cat <${D}${bindir}/$1 +#!/bin/bash +here=\`dirname \$0\` +export GOROOT="${GOROOT:-\`readlink -f \$here/../lib/go\`}" +\$here/../lib/go/bin/$1 "\$@" +END + chmod +x ${D}${bindir}/$1 +} + +do_install() { + find ${S} -depth -type d -name testdata -exec rm -rf {} + + + install -d ${D}${bindir} ${D}${libdir}/go + cp --preserve=mode,timestamps -R ${S}/ ${D}${libdir}/ + + for f in ${S}/bin/* + do + make_wrapper `basename $f` + done +} diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.24.1.bb b/meta/recipes-devtools/go/go-cross-canadian_1.24.1.bb deleted file mode 100644 index 7ac9449e47..0000000000 --- a/meta/recipes-devtools/go/go-cross-canadian_1.24.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-cross-canadian.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb b/meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb new file mode 100644 index 0000000000..7ac9449e47 --- /dev/null +++ b/meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb @@ -0,0 +1,2 @@ +require go-cross-canadian.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross_1.24.1.bb b/meta/recipes-devtools/go/go-cross_1.24.1.bb deleted file mode 100644 index 80b5a03f6c..0000000000 --- a/meta/recipes-devtools/go/go-cross_1.24.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-cross.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-cross_1.24.2.bb b/meta/recipes-devtools/go/go-cross_1.24.2.bb new file mode 100644 index 0000000000..80b5a03f6c --- /dev/null +++ b/meta/recipes-devtools/go/go-cross_1.24.2.bb @@ -0,0 +1,2 @@ +require go-cross.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-crosssdk_1.24.1.bb b/meta/recipes-devtools/go/go-crosssdk_1.24.1.bb deleted file mode 100644 index 1857c8a577..0000000000 --- a/meta/recipes-devtools/go/go-crosssdk_1.24.1.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-crosssdk.inc -require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-crosssdk_1.24.2.bb b/meta/recipes-devtools/go/go-crosssdk_1.24.2.bb new file mode 100644 index 0000000000..1857c8a577 --- /dev/null +++ b/meta/recipes-devtools/go/go-crosssdk_1.24.2.bb @@ -0,0 +1,2 @@ +require go-crosssdk.inc +require go-${PV}.inc diff --git a/meta/recipes-devtools/go/go-runtime_1.24.1.bb b/meta/recipes-devtools/go/go-runtime_1.24.1.bb deleted file mode 100644 index 63464a1501..0000000000 --- a/meta/recipes-devtools/go/go-runtime_1.24.1.bb +++ /dev/null @@ -1,3 +0,0 @@ -require go-${PV}.inc -require go-runtime.inc - diff --git a/meta/recipes-devtools/go/go-runtime_1.24.2.bb b/meta/recipes-devtools/go/go-runtime_1.24.2.bb new file mode 100644 index 0000000000..63464a1501 --- /dev/null +++ b/meta/recipes-devtools/go/go-runtime_1.24.2.bb @@ -0,0 +1,3 @@ +require go-${PV}.inc +require go-runtime.inc + diff --git a/meta/recipes-devtools/go/go_1.24.1.bb b/meta/recipes-devtools/go/go_1.24.1.bb deleted file mode 100644 index 46f5fbc6be..0000000000 --- a/meta/recipes-devtools/go/go_1.24.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -require go-${PV}.inc -require go-target.inc - -inherit linuxloader - -CGO_LDFLAGS:append = " -no-pie" - -export GO_LDSO = "${@get_linuxloader(d)}" -export CC_FOR_TARGET = "gcc" -export CXX_FOR_TARGET = "g++" - -# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its -# variants. -python() { - if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): - d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel") -} - diff --git a/meta/recipes-devtools/go/go_1.24.2.bb b/meta/recipes-devtools/go/go_1.24.2.bb new file mode 100644 index 0000000000..46f5fbc6be --- /dev/null +++ b/meta/recipes-devtools/go/go_1.24.2.bb @@ -0,0 +1,18 @@ +require go-${PV}.inc +require go-target.inc + +inherit linuxloader + +CGO_LDFLAGS:append = " -no-pie" + +export GO_LDSO = "${@get_linuxloader(d)}" +export CC_FOR_TARGET = "gcc" +export CXX_FOR_TARGET = "g++" + +# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its +# variants. +python() { + if 'mips' in d.getVar('TARGET_ARCH') or 'riscv32' in d.getVar('TARGET_ARCH'): + d.appendVar('INSANE_SKIP:%s' % d.getVar('PN'), " textrel") +} + -- cgit v1.2.3-54-g00ecf