From 0b25c9e0cbf005dffdf5b6ccd0fdd66ab834d48e Mon Sep 17 00:00:00 2001 From: Nuru Date: Fri, 16 Aug 2019 19:06:05 -0700 Subject: [PATCH] Better isolation for package builds (#230) --- tasks/Makefile.apk | 5 +++-- vendor/kops/Makefile | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/Makefile.apk b/tasks/Makefile.apk index 1fa8859639..5f26f0d39d 100644 --- a/tasks/Makefile.apk +++ b/tasks/Makefile.apk @@ -6,15 +6,16 @@ export APK_PACKAGES_PATH ?= /tmp/packages export APK_TMP_DIR := $(realpath $(shell mktemp -d ../../tmp/build.XXXXXX)) export APK_PACKAGE_NAME ?= $(PACKAGE_NAME) export APK_PACKAGE ?= $(APK_PACKAGES_PATH)/vendor/x86_64/$(APK_PACKAGE_NAME)-$(PACKAGE_VERSION)-r$(PACKAGE_RELEASE).apk +export SRCDEST := $(APK_TMP_DIR)/cache apk/prepare:: - mkdir -p $(APK_PACKAGES_PATH) $(APK_TMP_DIR) + mkdir -p $(APK_PACKAGES_PATH) $(APK_TMP_DIR) $(SRCDEST) chmod 777 $(APK_PACKAGES_PATH) $(APK_TMP_DIR) cp -a $(APK_TEMPLATE_PATH)/$(APK_BUILD_TEMPLATE) $(APK_TMP_DIR)/APKBUILD cp -a . "$(APK_TMP_DIR)" chsh -s /bin/sh nobody chown nobody -R $(APK_TMP_DIR) - chmod 777 /var/cache/distfiles + chmod 777 $(SRCDEST) apk/checksum: cd $(APK_TMP_DIR) && \ diff --git a/vendor/kops/Makefile b/vendor/kops/Makefile index 573ceb0798..db3eb0bd11 100644 --- a/vendor/kops/Makefile +++ b/vendor/kops/Makefile @@ -2,6 +2,7 @@ include ../../tasks/Makefile.package include ../../tasks/Makefile.apk # Package details +# This package tracks the most advanced production-ready version of kops export VENDOR ?= kubernetes export DOWNLOAD_URL ?= $(PACKAGE_REPO_URL)/releases/download/$(PACKAGE_VERSION)/$(PACKAGE_NAME)-$(OS)-$(ARCH) export APK_BUILD_TEMPLATE ?= APKBUILD.github-binary