as it breaks builds

Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
Peter Hunt 2021-04-05 12:33:09 -04:00
parent f7bafe6e7c
commit 7453b7073d
2 changed files with 21 additions and 1 deletions

View File

@ -25,11 +25,12 @@
Name: %{repo}
Epoch: 2
Version: 1.0.0
Release: 373.dev.git%{shortcommit0}%{?dist}
Release: 374.dev.git%{shortcommit0}%{?dist}
Summary: CLI for running Open Containers
License: ASL 2.0
URL: %{git0}
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
Patch1: trimpath.patch
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
#ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 %%{arm}}
@ -284,6 +285,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
%endif
%changelog
* Mon Apr 05 2021 Peter Hunt <pehunt@redhat.com> - 2:1.0.0-374.dev.git7e3c3e8
- Patch: revert https://github.com/opencontainers/runc/pull/2773
* Tue Feb 02 2021 RH Container Bot <rhcontainerbot@fedoraproject.org> - 2:1.0.0-373.dev.git7e3c3e8
- autobuilt 7e3c3e8

16
trimpath.patch Normal file
View File

@ -0,0 +1,16 @@
diff --git a/Makefile b/Makefile
index e13d8f1d..605d7109 100644
--- a/Makefile
+++ b/Makefile
@@ -23,9 +23,9 @@ ifeq ($(shell $(GO) env GOOS),linux)
GO_BUILDMODE := "-buildmode=pie"
endif
endif
-GO_BUILD := $(GO) build -trimpath $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
+GO_BUILD := $(GO) build $(MOD_VENDOR) $(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
-ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
-GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build -trimpath $(MOD_VENDOR) $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
+GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build $(MOD_VENDOR) $(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
-ldflags "-w -extldflags -static -X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) $(EXTRA_LDFLAGS)"
.DEFAULT: runc