aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
blob: 26f5aad4658e6688dc76ee5246f3b9c54b3c0bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 650c882d3c53db118b01dd5e15fa1bc0ddaa36f1 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Thu, 15 Apr 2021 11:28:05 -0400
Subject: [PATCH] cli: use external GO111MODULE and cross compiler

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 git/cli/scripts/build/binary | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: git/cli/scripts/build/binary
===================================================================
--- git.orig/cli/scripts/build/binary
+++ git/cli/scripts/build/binary
@@ -13,8 +13,6 @@
 
 echo "Building $GO_LINKMODE $(basename "${TARGET}")"
 
-export GO111MODULE=auto
-
 if [ "$(go env GOOS)" = "windows" ]; then
   if [ ! -x "$(command -v goversioninfo)" ]; then
     >&2 echo "goversioninfo not found, skipping manifesting binary"
@@ -24,6 +22,6 @@
   fi
 fi
 
-(set -x ; go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" -ldflags "${GO_LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}")
+(set -x ; ${GO} build -trimpath -o "${TARGET}" -tags "${GO_BUILDTAGS}" -ldflags "${GO_LDFLAGS}" ${GO_BUILDMODE} "${SOURCE}")
 
 ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker"