From b75623d8dbe3ec0c8fbb972f10d42c73e347e85c Mon Sep 17 00:00:00 2001 From: Nick Owens Date: Wed, 24 Aug 2016 19:38:30 -0700 Subject: [PATCH] app-emulation/runc: patch out installing deps in makefile runc invokes go build -i, which installs dependencies to GOROOT. the build is run without privilege to write there, so it fails. --- ...o-not-install-dependencies-of-target.patch | 27 +++++++++++++++++++ ...ild => runc-1.0.0_rc1_p20160615-r1.ebuild} | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/app-emulation/runc/files/0001-Makefile-do-not-install-dependencies-of-target.patch rename sdk_container/src/third_party/coreos-overlay/app-emulation/runc/{runc-1.0.0_rc1_p20160615.ebuild => runc-1.0.0_rc1_p20160615-r1.ebuild} (94%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/files/0001-Makefile-do-not-install-dependencies-of-target.patch b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/files/0001-Makefile-do-not-install-dependencies-of-target.patch new file mode 100644 index 0000000000..4bb83fd95a --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/files/0001-Makefile-do-not-install-dependencies-of-target.patch @@ -0,0 +1,27 @@ +From 7a09c7817af44c87772c728655b71c6cfc9d1bc9 Mon Sep 17 00:00:00 2001 +From: Nick Owens +Date: Wed, 24 Aug 2016 19:34:42 -0700 +Subject: [PATCH] Makefile: do not install dependencies of target + +in order to install one must have permission to write to GOROOT which is +not the case in the CoreOS sdk. +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 0852c71..283aceb 100644 +--- a/Makefile ++++ b/Makefile +@@ -23,7 +23,7 @@ MAN_INSTALL_PATH := ${PREFIX}/share/man/man8/ + VERSION := ${shell cat ./VERSION} + + all: $(RUNC_LINK) +- go build -i -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -tags "$(BUILDTAGS)" -o runc . ++ go build -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -tags "$(BUILDTAGS)" -o runc . + + static: $(RUNC_LINK) + CGO_ENABLED=1 go build -i -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -o runc . +-- +2.9.3 + diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615-r1.ebuild similarity index 94% rename from sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615-r1.ebuild index c30b31e983..d87ae79698 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/runc/runc-1.0.0_rc1_p20160615-r1.ebuild @@ -29,7 +29,7 @@ RDEPEND=" " src_prepare() { - eapply_user + epatch "${FILESDIR}/0001-Makefile-do-not-install-dependencies-of-target.patch" } src_compile() {