Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Add USE_MASTERMNT_HASH option for Poudriere to force using hashes in nullfs mounts.
--- common.sh 2016-08-30 02:31:12.000000000 +0300
+++ common.sh 2016-08-31 00:13:16.851149000 +0300
@@ -212,7 +212,7 @@
mnttest="${mnt}/compat/linux/proc"
if [ -n "${mnamelen}" ] && \
- [ ${#mnttest} -ge $((${mnamelen} - 1)) ]; then
+ [ ${#mnttest} -ge $((${mnamelen} - 1)) -o ${USE_MASTERMNT_HASH} = "yes" ]; then
hashed_name=$(sha256 -qs "${MASTERNAME}" | \
awk '{print substr($0, 0, 6)}')
mnt="${POUDRIERE_DATA}/.m/${hashed_name}/ref"
@@ -4841,6 +4841,7 @@
: ${USE_PROCFS:=yes}
: ${USE_FDESCFS:=yes}
: ${MUTABLE_BASE:=yes}
+: ${USE_MASTERMNT_HASH:=no}
# Be sure to update poudriere.conf to document the default when changing these
: ${MAX_EXECUTION_TIME:=86400} # 24 hours for 1 command
Owner

gynter commented Aug 17, 2015

Temporary fix for mount_nullfs file name too long issue. File to patch is /usr/local/share/poudriere/common.sh and set USE_MASTERMNT_HASH=yes in poudriere.conf.

Owner

gynter commented Aug 30, 2016

Updated according to current master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment