Commit Graph

21 Commits

Author SHA1 Message Date
Alexander Kanavin
e1f059f34e meta: set S to be in UNPACKDIR in recipes that explicitly set S
(From OE-Core rev: 7321cc17ae5483f17fe9cdffea7b62acd9d9c3a2)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Peter Marko
ea635ace50 go: set status of CVE-2024-3566
NVD ([1]) tracks this as:
cpe:2.3🅰️golang:go:*:*:*:*:*:*:*:*
Running on/with
  cpe:2.3microsoft:windows:-:*:*:*:*:*:*:*

Yocto cve-check ignores the "Running on/with", so it needs to be ignored
explicitly.

[1] https://nvd.nist.gov/vuln/detail/CVE-2024-3566

(From OE-Core rev: c8ce6710d864d237fdf67d2c3d3aa0f0970a2a05)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-19 22:00:10 +01:00
Hongxu Jia
9729465f1d go: remove support for GOROOT_FINAL
After upstream go applied commit [cmd: remove support for
GOROOT_FINAL][1], GOROOT_FINAL variable is dropped and use
option -trimpath to instead [2]

The option -trimpath has already been added to GOBUILDFLAGS
in go.bbclass

[1] 507d1b22f4
[2] https://github.com/golang/go/issues/62047

(From OE-Core rev: 791ab77ac05f658ecd61525a3d9b1afaf8ac6e06)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-03-03 18:01:29 +00:00
Ross Burton
7cf0c30096 go: set vendor in CVE_PRODUCT
It's not uncommon for specific third party modules to use "go" as the
product[1]. However, the canonical CPE for the official Go
language/runtime is always golang:go[2], so use that explicitly.

[1] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-49292
[2] e.g. https://nvd.nist.gov/vuln/detail/CVE-2023-39320

(From OE-Core rev: fc3e9cce9e1a5aa5dc9a5ad4abdd4eb61f868d37)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:34:27 +00:00
Peter Marko
3a861f2204 go: use go as CVE product for all golang recipe veriants
All golang vulnerabilities are reported under product 'go'.

By default there is no vulnerability reported for images with
golang components because none of used golang packages
have correct CVE product set:
* go-binary-native
* go-runtime
* go-cross-*

(From OE-Core rev: 09f3a27a809bbec9b08c4e4a2b846b68f386c35c)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-14 17:10:00 +00:00
Alexander Kanavin
0111724c34 go: correctly set debug-prefix-map and build directory
Go has its own system for creating temporary build
sub-directories with randomized names, and setting
up debug-prefix-map on the fly to prevent those
directories leaking into target binaries. OE's own
settings were clashing with it, so this change
carefully avoids the two stepping on each other.

Additionally, the top level build directory cannot
be named 'go-something'.

(From OE-Core rev: 9985b17a30bb9b9f1bc82a44662687db5cead66e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-05 17:18:15 +00:00
Alexander Kanavin
a44ba6ae65 go: log build id computations
go writes build-specific ids into binaries it produces
and has a custom system for calculating them from
file hashes, environment variables and other inputs
(not that dissimilar to sstate cache, actually). This can
go wrong :) in various ways (for purposes of reproducibility
in particular), so this enables useful logs to see what
happens and why.

(From OE-Core rev: a587be1d18fc55fe57d1aa5aa7c9e26af887109e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-05 17:18:15 +00:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Alexander Kanavin
3127ef1b43 Revert "go: Use dl.google.com for SRC_URI"
This reverts commit 4118415d4b.

This was found to be unnecessary, and broke upstream version checks.

(From OE-Core rev: cee436d1eb94663f3604c80b6ad87292f6901498)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-12 23:06:03 +01:00
Khem Raj
4118415d4b go: Use dl.google.com for SRC_URI
golang.org/dl is resolving to this anyway

(From OE-Core rev: 8470e38ac1d9f9bb6d8a4ee43724af452d080057)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-23 10:12:10 +01:00
wangmy
3d389d46d7 go: update SRC_URI to use https protocol
(From OE-Core rev: 2a1eb731ed3bcb049192550e362b771c3a9ea6eb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:26 +01:00
Khem Raj
0b468662b8 Revert "go: Reset unneeded GOARCH variables for native recipe"
This reverts commit 4825eede606b075d0d529b38d6162999f1dec506.

(From OE-Core rev: 18b90967bd367263280ec871be84e67e3eed11fa)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-15 09:10:46 +00:00
Khem Raj
067476fc55 go: Reset unneeded GOARCH variables for native recipe
These variables depend on TUNE_FEATURES variable and that creeps into
dependencies for native as well as a result, which means go-native gets
recompiled everytime machine/arch is changed.

Fixes sstate differences found e.g.

basehash changed from 600fb6be571fa4853232a7fed78945ee19b324e54b1b94cff93ef472b6290103 to 994de861190a56064d3e186d9c411152127e230bf2f77b17e59b2c5932a41249
List of dependencies for variable TUNE_FEATURES changed from '{'TUNE_FEATURES_tune-core2-32', 'DEFAULTTUNE'}' to '{'TUNE_FEATURES_tune-armv7vethf-neon', 'DEFAULTTUNE'}'
changed items: {'TUNE_FEATURES_tune-core2-32', 'TUNE_FEATURES_tune-armv7vethf-neon'}

(From OE-Core rev: 4825eede606b075d0d529b38d6162999f1dec506)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-06 14:41:28 +00:00
Alex Kube
d4aa199836 go: Extract common environment setup.
Add default values for go environment variables to go-common.inc.
Override where appropriate in other go*.inc files, and use
host/target tuples from goarch for setting CC flags.

(From OE-Core rev: 1e3f040b1f68fa1f808851ecd9623544e935e9ad)

Signed-off-by: Alex Kube <alexander.j.kube@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 17:57:22 +00:00
Khem Raj
e53aa46f43 go: Add recipes for 1.12 release and make it default
- Refresh patches
- Enable GOCACHE required as of Go 1.12

(From OE-Core rev: f559fd6df2978f9093672794420eada2b7452987)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09 14:43:11 +00:00
Matt Madison
020915eb9b go: move common settings to go-common.inc
Eliminate some redundancy in the recipes by moving
some commonly-used variable settings to the common
include file.  Also removed a duplicate inherit
from go-target.inc that was already in go-common.inc.

(From OE-Core rev: e72d2a7b7ee7913095a35ae92c3ca364de00c8a7)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Matt Madison
7a4ca89b55 go: update go 1.9 -> go 1.10
* Patches and recipes reworked for go 1.10's significant
  changes to its bootstrap and build steps.

* Update go1.4 source tarball used for go-native
  bootstrapping to the version recommended
  in the current go documentation

* Remove test data from installed sources to eliminate
  some packaging QA warnings

* Set GOCACHE to 'off' to disable 1.10's build caching
  in the go recipes and bbclass

* Update go_do_compile to compile both static and
  dynamic objects dynamic linking is in use, since
  go1.10's build tool is pickier about this

(From OE-Core rev: 4fd749ca6450a4870be1c1e13802f084b6eb0db6)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-06 06:43:10 -08:00
Alexander Kanavin
908f072b74 go: fix upstream version check
(From OE-Core rev: 9a91e5ce7d41ce11571853158ae4358c0da7b51e)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-16 18:05:39 +00:00
Matt Madison
f866673f87 go: ensure use of BUILD_CC when building bootstrap tools
For cross-canadian builds, we were accidentally using
the crosssdk C compiler when building the Go compiler
bootstrap.  Add a patch to the make script to let us
use BUILD_CC, and prepend do_compile to set it in
the local environment to ensure that the trailing
blank gets stripped, since that confuses Go.

[YOCTO #12341]

(From OE-Core rev: 0dbb860924fc157880b52d8e08bad3c6c6b019b8)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02 11:25:33 +00:00
Matt Madison
4a11f8e98c go-native: remove dependency on go-bootstrap-native
The go1.4 toolchain is only required for bootstrapping
go-native, and should not be used for anything else,
so build it as part of the go-native build. This way,
we don't have to carry around its built artifacts in
the native sysroot.

The go-cross and target toolchains can then just depend
on go-native, using that for their 'bootstrap' toolchain.

Also removed some unnecessary package-related noexec
settings, since native recipes inherit nopackages.

(From OE-Core rev: 9dc9d457fb9a456bc18c7789b91f40e1f6a999fe)

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-12 23:55:29 +01:00
Khem Raj
760e81678c go: Add recipes for golang compilers and tools
* This is converging the recipes for go from
  meta-virtualization and oe-meta-go

* Add recipes for go 1.7

* go.bbclass is added to ease out writing
  recipes for go packages

* go-examples: Add an example, helloworld written in go
  This should serve as temlate for writing go recipes

* Disable for musl, at least for now

* Disable for x32/ppc32 which is not supported

(From OE-Core rev: 78615e9260fb5d6569de4883521b049717fa4340)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 15:51:55 +00:00