nerdctl: reproducibility, path -trmpath to build

To avoid go embedding references to the build dir into binaries,
we pass -trimpath to the build.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2022-09-12 14:36:56 -04:00
parent 7106007c14
commit 08a59b4d93

View File

@ -64,7 +64,7 @@ do_compile() {
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export GOFLAGS="-mod=vendor" export GOFLAGS="-mod=vendor -trimpath"
# this moves all the fetches into the proper vendor structure # this moves all the fetches into the proper vendor structure
# expected for build # expected for build