From 34f66fea296bf07f35cc723675d63f07d529688d Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:57 -0700 Subject: [PATCH 1/6] coreos-devel/board-packages: Conditional open-vm-tools Make the DEPEND of app-emulation/open-vm-tools conditional on amd64. Signed-off-by: Geoff Levand --- .../coreos-devel/board-packages/board-packages-0.0.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild index 9f4298b565..90df011e87 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild @@ -15,7 +15,7 @@ IUSE="" DEPEND="" RDEPEND=" - app-emulation/open-vm-tools + amd64? ( app-emulation/open-vm-tools ) coreos-base/coreos coreos-base/coreos-dev dev-lang/python-oem From 2131ff539f25337e75d24f1231634b8c05cae421 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:57 -0700 Subject: [PATCH 2/6] coreos-base/coreos: Conditional xenserver-pv-version Make the RDEPEND of app-emulation/xenserver-pv-version conditional on amd64. Signed-off-by: Geoff Levand --- .../coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild index aadc2e4cc7..fc450d9f80 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild @@ -91,7 +91,7 @@ RDEPEND="${RDEPEND} app-emulation/actool app-emulation/rkt app-emulation/xenstore - app-emulation/xenserver-pv-version + amd64? ( app-emulation/xenserver-pv-version ) sys-apps/findutils sys-apps/which app-admin/flannel From 928c03bd098420163b14dcfa6867024dc47a2639 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:57 -0700 Subject: [PATCH 3/6] app-emulation/docker: Fix cross compile builds Set go environment variables needed for cross compiling. Signed-off-by: Geoff Levand --- .../app-emulation/docker/docker-9999.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild index c1f45a56b6..280e04359b 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild @@ -154,6 +154,10 @@ src_prepare() { epatch_user } +go_get_arch() { + echo ${ARCH} +} + src_compile() { # if we treat them right, Docker's build scripts will set up a # reasonable GOPATH for us @@ -190,6 +194,11 @@ src_compile() { unset DOCKER_EXPERIMENTAL fi + export GOARCH=$(go_get_arch) + export CGO_ENABLED=1 + export CC=$(tc-getCC) + export CXX=$(tc-getCXX) + # time to build! ./hack/make.sh dynbinary || die 'dynbinary failed' From c5a40440c27081953277589483f8eff450962a21 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:57 -0700 Subject: [PATCH 4/6] app-emulation/docker: Set DOCKER_GITCOMMIT to unknown Fixes build errors like these when building docker-9999: error: .git directory missing and DOCKER_GITCOMMIT not specified Signed-off-by: Geoff Levand --- .../coreos-overlay/app-emulation/docker/docker-9999.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild index 280e04359b..2e0de42339 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-emulation/docker/docker-9999.ebuild @@ -12,7 +12,7 @@ CROS_WORKON_LOCALNAME="docker" CROS_WORKON_REPO="git://github.com" if [[ ${PV} == *9999 ]]; then - DOCKER_GITCOMMIT="" + DOCKER_GITCOMMIT="unknown" KEYWORDS="" else CROS_WORKON_COMMIT="0baf60984522744eed290348f33f396c046b2f3a" # v1.7.0 From 94c7ed9a8892c631555fee9a25c7d1cb7d924c4b Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:58 -0700 Subject: [PATCH 5/6] eclass/coreos-kernel: Remove architecture specifics The bzImage format is architecture specific. The default x86_64 make target will generate a bzImage, so using the default make target should be sufficient for x86_64 builds. Fixes build errors like these: make: *** No rule to make target 'bzImage'. Signed-off-by: Geoff Levand --- .../third_party/coreos-overlay/eclass/coreos-kernel.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass index e9bc5272e9..cbfe6bb286 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass @@ -65,7 +65,7 @@ get_bootengine_lib() { # @FUNCTION: update_bootengine_cpio # @DESCRIPTION: # Append files in the given directory to the bootengine cpio. -# Allows us to stick kernel modules into the initramfs built into bzImage. +# Allows us to stick kernel modules into the initramfs built into the image. update_bootengine_cpio() { local extra_root="$1" local cpio_path="${KBUILD_OUTPUT}/bootengine.cpio" @@ -153,7 +153,7 @@ coreos-kernel_src_compile() { update_bootengine_cpio "${bootengine_root}" # Build the final kernel image - kmake bzImage + kmake } coreos-kernel_src_install() { From 30f4e3f0182999bb17db70a95e638993f50ed627 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Wed, 17 Jun 2015 16:57:58 -0700 Subject: [PATCH 6/6] eclass/coreos-kernel: Clear LDFLAGS for kernel The LDFLAGS setting for package building is generally not suitable for building the kernel, and on some architectures will even lead to kernel build errors. Fixes errors like these on kernel architectures that do not set the LDFLAGS variable: ld: unrecognized option '-Wl,-O1' Signed-off-by: Geoff Levand --- .../src/third_party/coreos-overlay/eclass/coreos-kernel.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass index cbfe6bb286..32e8068b88 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass @@ -84,7 +84,7 @@ update_bootengine_cpio() { kmake() { local kernel_arch=$(tc-arch-kernel) - emake ARCH="${kernel_arch}" CROSS_COMPILE="${CHOST}-" "$@" + emake LDFLAGS="" ARCH="${kernel_arch}" CROSS_COMPILE="${CHOST}-" "$@" } # Discard the module signing key, we use new keys for each build.