Last active
August 10, 2019 17:13
-
-
Save gynter/c414ec798bf81665a391 to your computer and use it in GitHub Desktop.
Add PATCH_DATA option for Poudriere.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- common.sh 2017-11-22 17:11:41.079851000 +0200 | |
+++ common.sh 2017-11-22 17:16:38.908693000 +0200 | |
@@ -1703,6 +1703,15 @@ | |
err 1 "Failed to mount the packages directory " | |
} | |
+mount_patches() { | |
+ local mnt | |
+ | |
+ _my_path mnt | |
+ ${NULLMOUNT} "$@" ${PATCH_DATA} \ | |
+ ${mnt}/patches || | |
+ err 1 "Failed to mount the patches directory " | |
+} | |
+ | |
do_portbuild_mounts() { | |
[ $# -lt 3 ] && eargs do_portbuild_mounts mnt jname ptname setname | |
local mnt=$1 | |
@@ -1719,6 +1728,7 @@ | |
"${mnt}/${LOCALBASE:-/usr/local}" \ | |
"${mnt}/distfiles" \ | |
"${mnt}/packages" \ | |
+ "${mnt}/patches" \ | |
"${mnt}/.npkg" \ | |
"${mnt}/var/db/ports" \ | |
"${mnt}${HOME}/.ccache" | |
@@ -1744,6 +1754,11 @@ | |
${NULLMOUNT} -o ro ${portsdir} ${mnt}${PORTSDIR} || | |
err 1 "Failed to mount the ports directory " | |
mount_packages -o ro | |
+ | |
+ if [ "${PATCH_DATA}" != "no" ]; then | |
+ mount_patches -o ro | |
+ fi | |
+ | |
${NULLMOUNT} ${DISTFILES_CACHE} ${mnt}/distfiles || | |
err 1 "Failed to mount the distfiles cache directory" | |
@@ -2374,6 +2389,11 @@ | |
msg "Mounting ports/packages/distfiles" | |
mkdir -p ${PACKAGES}/ | |
+ | |
+ if [ "${PATCH_DATA}" != "no" -a ! -d "${PATCH_DATA}" ]; then | |
+ mkdir -p ${PATCH_DATA}/ | |
+ fi | |
+ | |
was_a_bulk_run && stash_packages | |
do_portbuild_mounts ${tomnt} ${name} ${ptname} ${setname} | |
@@ -7358,6 +7378,7 @@ | |
: ${HTML_JSON_UPDATE_INTERVAL:=2} | |
: ${HTML_TRACK_REMAINING:=no} | |
: ${FORCE_MOUNT_HASH:=no} | |
+: ${PATCH_DATA:=no} | |
DRY_RUN=0 | |
# Be sure to update poudriere.conf to document the default when changing these |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated according to current master branch. Requires a previously applied patch from here: https://gist.github.com/gynter/86ed7a6cae20927d6ef0#gistcomment-2265897