mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
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:
parent
79ff2a5b00
commit
c278a05948
|
@ -5,13 +5,13 @@ Subject: [PATCH] build: use to select cross compiler
|
||||||
|
|
||||||
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
||||||
---
|
---
|
||||||
git/src/import/Makefile | 10 +++++-----
|
git/Makefile | 10 +++++-----
|
||||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
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
|
index c6976af..f3c8d17 100644
|
||||||
--- git/src/import/Makefile
|
--- git/Makefile
|
||||||
+++ git/src/import/Makefile
|
+++ git/Makefile
|
||||||
@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet
|
@@ -10,11 +10,11 @@ all: clean build static fmt lint test vet
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
HOMEPAGE = "https://github.com/jfrazelle/riddler"
|
HOMEPAGE = "https://github.com/jfrazelle/riddler"
|
||||||
SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
|
SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
|
||||||
LICENSE = "MIT"
|
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 \
|
file://0001-build-use-to-select-cross-compiler.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
|
SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
|
||||||
PV = "0.1.0+git${SRCPV}"
|
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 goarch
|
||||||
inherit go
|
inherit go
|
||||||
|
@ -27,17 +27,7 @@ EXTRA_OEMAKE="BUILDTAGS=''"
|
||||||
do_compile() {
|
do_compile() {
|
||||||
export GOARCH="${TARGET_GOARCH}"
|
export GOARCH="${TARGET_GOARCH}"
|
||||||
export GOROOT="${STAGING_LIBDIR}/go"
|
export GOROOT="${STAGING_LIBDIR}/go"
|
||||||
# Setup vendor directory so that it can be used in GOPATH.
|
export GOPATH="${S}/src/import/vendor:${WORKDIR}/git/"
|
||||||
#
|
|
||||||
# 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"
|
|
||||||
|
|
||||||
# Pass the needed cflags/ldflags so that cgo
|
# Pass the needed cflags/ldflags so that cgo
|
||||||
# can find the needed headers files and libraries
|
# can find the needed headers files and libraries
|
||||||
|
@ -49,12 +39,12 @@ do_compile() {
|
||||||
export GO111MODULE=off
|
export GO111MODULE=off
|
||||||
export GOBUILDFLAGS="-trimpath"
|
export GOBUILDFLAGS="-trimpath"
|
||||||
|
|
||||||
cd ${S}/src/import
|
cd ${S}
|
||||||
|
|
||||||
oe_runmake static
|
oe_runmake static
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/${sbindir}
|
install -d ${D}/${sbindir}
|
||||||
install ${S}/src/import/riddler ${D}/${sbindir}/riddler
|
install ${S}/riddler ${D}/${sbindir}/riddler
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user