From b6ad2b6ad75a57c4223cdfb29a458c64de7de6af Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 21 Feb 2018 12:15:10 -0600 Subject: [PATCH] patch packpack to support custom environment vars --- utils/packpack/environment | 3 +++ utils/packpack/envvars.patch | 25 +++++++++++++++++++++++++ utils/packpack/startpackpack.sh | 9 ++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 utils/packpack/environment create mode 100644 utils/packpack/envvars.patch diff --git a/utils/packpack/environment b/utils/packpack/environment new file mode 100644 index 000000000..4c8305d6f --- /dev/null +++ b/utils/packpack/environment @@ -0,0 +1,3 @@ +DEB_BUILD_OPTIONS="parallel=4" +DEBUILD_LINTIAN="no" + diff --git a/utils/packpack/envvars.patch b/utils/packpack/envvars.patch new file mode 100644 index 000000000..b1406a09b --- /dev/null +++ b/utils/packpack/envvars.patch @@ -0,0 +1,25 @@ +From 871835ecc4ee380fe42d1ef2a58dca9dc4e9af5f Mon Sep 17 00:00:00 2001 +From: Andrew Bauer +Date: Wed, 21 Feb 2018 12:07:12 -0600 +Subject: [PATCH] allow one to load custom environment variables + +--- + packpack | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/packpack b/packpack +index 6f4c80f..abab604 100755 +--- a/packpack ++++ b/packpack +@@ -128,6 +128,11 @@ chmod a+x ${BUILDDIR}/userwrapper.sh + env | grep -E "^PRODUCT=|^VERSION=|^RELEASE=|^ABBREV=|^TARBALL_|^CHANGELOG_|^CCACHE_|^PACKAGECLOUD_|^SMPFLAGS=|^OS=|^DIST=" \ + > ${BUILDDIR}/env + ++# Load user environment variables ++if [ -f "${USER_ENV_FILE}" ]; then ++ cat ${USER_ENV_FILE} >> ${BUILDDIR}/env ++fi ++ + # + # Setup cache directory + # diff --git a/utils/packpack/startpackpack.sh b/utils/packpack/startpackpack.sh index 7a7dc7d2f..49446a9bf 100755 --- a/utils/packpack/startpackpack.sh +++ b/utils/packpack/startpackpack.sh @@ -108,6 +108,12 @@ commonprep () { patch -p1 < utils/packpack/packpack-rpm.patch fi + # Patch packpack + patch --dry-run --silent -f -p1 < utils/packpack/envvars.patch + if [ $? -eq 0 ]; then + patch -p1 < utils/packpack/envvars.patch + fi + # The rpm specfile requires we download the tarball and manually move it into place # Might as well do this for Debian as well, rather than git submodule init CRUDVER="3.0.10" @@ -231,7 +237,8 @@ execpackpack () { parms="-f utils/packpack/redhat_package.mk redhat_package" else parms="" - export SMPFLAGS="-j4 --lintian-opts --no-lintian" + export SMPFLAGS="-j4" + export USER_ENV_FILE="utils/packpack/environment" fi if [ "${TRAVIS}" == "true" ]; then