Skip to content

Commit

Permalink
Better isolation for package builds (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Aug 17, 2019
1 parent 6d2c39d commit 0b25c9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/Makefile.apk
Original file line number Diff line number Diff line change
Expand Up @@ -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) && \
Expand Down
1 change: 1 addition & 0 deletions vendor/kops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b25c9e

Please sign in to comment.