diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-09-12 15:34:59 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-09-12 15:46:00 -0400 |
commit | 9ef3fa52d049d5c9ffebcbcbd9d2dd7598fd6685 (patch) | |
tree | cc0449d5e8478ce2246c18ac4fe601cbc38c727f /recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch | |
parent | 08a59b4d934f601307d0a3cb9ab3a835904baecb (diff) | |
download | meta-virtualization-9ef3fa52d049d5c9ffebcbcbd9d2dd7598fd6685.tar.gz |
containerd: improve reproducibility
We get the following QA warning on build:
WARNING: containerd-opencontainers-v1.6.8+gitAUTOINC+579a6380ec-r0 do_package_qa: QA Issue: File /usr/bin/containerd-shim-runc-v2 in package containerd-opencontainers contains reference to TMPDIR
File /usr/bin/containerd-ctr in package containerd-opencontainers contains reference to TMPDIR
File /usr/bin/containerd-shim-runc-v1 in package containerd-opencontainers contains reference to TMPDIR
File /usr/bin/containerd in package containerd-opencontainers contains reference to TMPDIR
File /usr/bin/containerd-shim in package containerd-opencontainers contains reference to TMPDIR [buildpaths]
This is the first step in fixing the QA warning, by dropping our
debug patch, passing -trimpath and not defining GO_DEBUG.
This leaves a final reference similar to:
path _/opt/poky/build/tmp/work/core2-64-poky-linux/containerd-opencontainers/v1.6.8+gitAUTOINC+579a6380ec-r0/git/src/import/cmd/ctr
That is being stored in the .rodata of the binaries.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch')
-rw-r--r-- | recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch b/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch new file mode 100644 index 00000000..f1dea5a4 --- /dev/null +++ b/recipes-containers/containerd/containerd-opencontainers/0001-build-don-t-use-gcflags-to-define-trimpath.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 9174091fa1624dbb09ce812792a4102dff693541 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Mon, 12 Sep 2022 15:40:08 -0400 | ||
4 | Subject: [PATCH] build: don't use gcflags to define trimpath | ||
5 | |||
6 | We can pass trimpath in via environment variables. The gcflags | ||
7 | definition of trimpath is for older go versions and is using the | ||
8 | complete path for trimming. If the variable is captured in the | ||
9 | resulting binary, we have a reproducibility and QA issue. | ||
10 | |||
11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
12 | --- | ||
13 | Makefile | 1 - | ||
14 | 1 file changed, 1 deletion(-) | ||
15 | |||
16 | diff --git git.orig/src/import/Makefile git.orig/src/import/Makefile | ||
17 | index 4a6c13042..debb57925 100644 | ||
18 | --- git.orig/src/import/Makefile | ||
19 | +++ git.orig/src/import/Makefile | ||
20 | @@ -130,7 +130,6 @@ TESTFLAGS_RACE= | ||
21 | # See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809 | ||
22 | GO_GCFLAGS=$(shell \ | ||
23 | set -- ${GOPATHS}; \ | ||
24 | - echo "-gcflags=-trimpath=$${1}/src"; \ | ||
25 | ) | ||
26 | |||
27 | BINARIES=$(addprefix bin/,$(COMMANDS)) | ||
28 | -- | ||
29 | 2.19.1 | ||
30 | |||