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>
This commit is contained in:
Bruce Ashfield 2022-09-15 09:01:55 -04:00
parent 79ff2a5b00
commit c278a05948
2 changed files with 11 additions and 21 deletions

View File

@ -5,13 +5,13 @@ Subject: [PATCH] build: use to select cross compiler
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
git/src/import/Makefile | 10 +++++-----
git/Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git git/src/import/Makefile git/src/import/Makefile
diff --git git/Makefile git/Makefile
index c6976af..f3c8d17 100644
--- git/src/import/Makefile
+++ git/src/import/Makefile
--- git/Makefile
+++ git/Makefile
@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet
build:

View File

@ -1,17 +1,17 @@
HOMEPAGE = "https://github.com/jfrazelle/riddler"
SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https \
SRC_URI = "git://github.com/jfrazelle/riddler;branch=master;protocol=https;destsuffix=git/src/github.com/jessfraz/riddler \
file://0001-build-use-to-select-cross-compiler.patch \
"
SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
PV = "0.1.0+git${SRCPV}"
GO_IMPORT = "import"
S = "${WORKDIR}/git"
S = "${WORKDIR}/git/src/github.com/jessfraz/riddler"
GO_IMPORT = "github.com/jessfraz/riddler"
inherit goarch
inherit go
@ -27,17 +27,7 @@ EXTRA_OEMAKE="BUILDTAGS=''"
do_compile() {
export GOARCH="${TARGET_GOARCH}"
export GOROOT="${STAGING_LIBDIR}/go"
# Setup vendor directory so that it can be used in GOPATH.
#
# Go looks in a src directory under any directory in GOPATH but riddler
# uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
#
# We also need to link in the ipallocator directory as that is not under
# a src directory.
ln -sfn . "${S}/src/import/vendor/src"
mkdir -p "${S}/src/import/vendor/src/github.com/jessfraz/riddler"
ln -sfn "${S}/src/import/parse" "${S}/src/import/vendor/src/github.com/jessfraz/riddler/parse"
export GOPATH="${S}/src/import/vendor"
export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/"
# Pass the needed cflags/ldflags so that cgo
# can find the needed headers files and libraries
@ -49,12 +39,12 @@ do_compile() {
export GO111MODULE=off
export GOBUILDFLAGS="-trimpath"
cd ${S}/src/import
cd ${S}
oe_runmake static
}
do_install() {
install -d ${D}/${sbindir}
install ${S}/src/import/riddler ${D}/${sbindir}/riddler
install ${S}/riddler ${D}/${sbindir}/riddler
}