ssTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2024 05:20:02.5121 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR01MB5222 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; FORGED_MUA_SEAMONKEY_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; R_SPF_ALLOW(-0.20)[+ip4:52.103.0.0/17]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_FROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:52.96.0.0/12, country:US]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; RCVD_COUNT_TWO(0.00)[2]; RWL_MAILSPIKE_POSSIBLE(0.00)[52.103.65.3:from]; RCVD_IN_DNSWL_NONE(0.00)[52.103.65.3:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@FreeBSD.org]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; DKIM_TRACE(0.00)[hotmail.com:+] X-Rspamd-Queue-Id: 4VjQqs072nz4QKj Hello, especially those who add some kind of tweaks to poudriere :) In my case, I try to make it a hook script first, so it is not affected by errexit of shell. However, when modifying poudriere to incorporate the codes, some tmpfs are not mounted depending on USE_TMPFS value, so poudriere exits with an error when trying to handle them. So I will post a revised version of the hook script that includes ideas to counteract that, including this one. The file should be placed in a location that will be erased by poudriere-logclean. That would require another step to collect the results... I don't know if multiple concurrent executions of it will occur, but even if it does, it has been changed to work exclusively. And I am trying to use jq to get and add numbers. If you see a point that you think is an interesting idea, cut it out and use it :) Regards. Below is the script. #!/bin/sh case "${0##*/}" in pkgbuild.sh) case "${1}" in # ( success|failed) if ! [ ${LOCKF_HOOK_TMPFS:+1} ] ; then shopt="${-}" LOCKF_HOOK_TMPFS=1 lockf -k "${LOG}/.tmpfs.log" /bin/sh ${shopt:+"-${-}"} "${0}" ${1+"${@}"} elif [ ${MY_JOBID:+1} ] ; then # jq was installed by package textproc/jq if JQ=$(which jq 2>&${OUTPUT_REDIRECTED_STDERR:-2}) ; then realpath=$(realpath "${MASTERMNT}/../${MY_JOBID}/") pour_xo_sauce_on_df=$( mount -t tmpfs -p | cut -f 2 -w | grep -e "^${realpath}" | xargs df -b --libxo json | ${JQ} -c -r '[.["storage-system-information"].filesystem[].["used-blocks"]]|add//-0' ) tmpfs_at_end=$( echo "${pour_xo_sauce_on_df}" | awk '{ x += $0; } END { printf "%s %.2f %s", "TMPFS:", x*512/(1024**3), "GiB" }' ) elif ! tmpfs_at_end="$(env BLOCKSIZE=512 df -t tmpfs \ ${MASTERMNT}/../${MY_JOBID}/ \ ${MASTERMNT}/../${MY_JOBID}/.p/ \ ${MASTERMNT}/../${MY_JOBID}/usr/local/ \ 2>/dev/null | tail -3 \ | awk '{ tmpfs_use += $3; } END { printf "%s %.2f %s", "TMPFS:", tmpfs_use*512/(1024**3), "GiB" }')" ; then tmpfs_at_end="TMPFS: -0. GiB" fi if true ; then # output to stdout echo "${2} | ${3}: ${tmpfs_at_end}" >&${OUTPUT_REDIRECTED_STDOUT:-1} fi if false ; then # output to stderr echo "${2} | ${3}: ${tmpfs_at_end}" >&${OUTPUT_REDIRECTED_STDERR:-2} fi if true && [ ${OUTPUT_REDIRECTED:-0} -eq 1 ] ; then # output to ${LOG}/logs/${3}.log file echo "${tmpfs_at_end}" >&2 fi if true ; then # append to file echo "${2} | ${3}: ${tmpfs_at_end}" >>"${LOG}/.tmpfs.log" fi fi ;; # ( *) esac ;; # ( *) esac return 0 # end of script