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TFoWFI5?= =?utf-8?Q?7iJBHneS6b4+NPjkwJRE?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-d8e84.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 5c298cb8-a023-42bc-2dc0-08dc788c803a X-MS-Exchange-CrossTenant-AuthSource: SI2PR01MB5036.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-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