summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2022-09-15 09:01:55 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2022-09-15 09:01:55 -0400
commitc278a0594889c5a9764ca1a8207bd0514d3d128a (patch)
treeb9f2f7094f1048cc12995a36de920b0e237a2fe8 /recipes-containers
parent79ff2a5b00900b95076ca838a79d90ede59abdad (diff)
downloadmeta-virtualization-c278a0594889c5a9764ca1a8207bd0514d3d128a.tar.gz
riddler: remove TMPDIR references
convert the riddler recipe to a structure that doesn't need a symlinked vendor directory. go records these links in the binary, making our output non-reproducible. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch8
-rw-r--r--recipes-containers/riddler/riddler_git.bb24
2 files changed, 11 insertions, 21 deletions
diff --git a/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch b/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch
index 0c4f3fd2..9432c63c 100644
--- a/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch
+++ b/recipes-containers/riddler/files/0001-build-use-to-select-cross-compiler.patch
@@ -5,13 +5,13 @@ Subject: [PATCH] build: use to select cross compiler
5 5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> 6Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
7--- 7---
8 git/src/import/Makefile | 10 +++++----- 8 git/Makefile | 10 +++++-----
9 1 file changed, 5 insertions(+), 5 deletions(-) 9 1 file changed, 5 insertions(+), 5 deletions(-)
10 10
11diff --git git/src/import/Makefile git/src/import/Makefile 11diff --git git/Makefile git/Makefile
12index c6976af..f3c8d17 100644 12index c6976af..f3c8d17 100644
13--- git/src/import/Makefile 13--- git/Makefile
14+++ git/src/import/Makefile 14+++ git/Makefile
15@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet 15@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet
16 16
17 build: 17 build:
diff --git a/recipes-containers/riddler/riddler_git.bb b/recipes-containers/riddler/riddler_git.bb
index 191becfe..f172f5bd 100644
--- a/recipes-containers/riddler/riddler_git.bb
+++ b/recipes-containers/riddler/riddler_git.bb
@@ -1,17 +1,17 @@
1HOMEPAGE = "https://github.com/jfrazelle/riddler" 1HOMEPAGE = "https://github.com/jfrazelle/riddler"
2SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec." 2SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
5 5
6SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https \ 6SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https;destsuffix=git/src/github.com/jessfraz/riddler \
7 file://0001-build-use-to-select-cross-compiler.patch \ 7 file://0001-build-use-to-select-cross-compiler.patch \
8 " 8 "
9 9
10SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6" 10SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
11PV = "0.1.0+git${SRCPV}" 11PV = "0.1.0+git${SRCPV}"
12GO_IMPORT = "import"
13 12
14S = "${WORKDIR}/git" 13S = "${WORKDIR}/git/src/github.com/jessfraz/riddler"
14GO_IMPORT = "github.com/jessfraz/riddler"
15 15
16inherit goarch 16inherit goarch
17inherit go 17inherit go
@@ -27,17 +27,7 @@ EXTRA_OEMAKE="BUILDTAGS=''"
27do_compile() { 27do_compile() {
28 export GOARCH="${TARGET_GOARCH}" 28 export GOARCH="${TARGET_GOARCH}"
29 export GOROOT="${STAGING_LIBDIR}/go" 29 export GOROOT="${STAGING_LIBDIR}/go"
30 # Setup vendor directory so that it can be used in GOPATH. 30 export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/"
31 #
32 # Go looks in a src directory under any directory in GOPATH but riddler
33 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
34 #
35 # We also need to link in the ipallocator directory as that is not under
36 # a src directory.
37 ln -sfn . "${S}/src/import/vendor/src"
38 mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/riddler"
39 ln -sfn "${S}/src/import/parse" "${S}/src/import/vendor/src/github.com/jessfraz/riddler/parse"
40 export GOPATH="${S}/src/import/vendor"
41 31
42 # Pass the needed cflags/ldflags so that cgo 32 # Pass the needed cflags/ldflags so that cgo
43 # can find the needed headers files and libraries 33 # can find the needed headers files and libraries
@@ -49,12 +39,12 @@ do_compile() {
49 export GO111MODULE=off 39 export GO111MODULE=off
50 export GOBUILDFLAGS="-trimpath" 40 export GOBUILDFLAGS="-trimpath"
51 41
52 cd ${S}/src/import 42 cd ${S}
53 43
54 oe_runmake static 44 oe_runmake static
55} 45}
56 46
57do_install() { 47do_install() {
58 install -d ${D}/${sbindir} 48 install -d ${D}/${sbindir}
59 install ${S}/src/import/riddler ${D}/${sbindir}/riddler 49 install ${S}/riddler ${D}/${sbindir}/riddler
60} 50}