net-vpn/zeronet fails with 'fowners failed'
asakovets opened this issue · 3 comments
The problem is with these lines:
fowners ${PN}:${PN} \
"${ZERONET_CONF_FILE}" \
"${ZERONET_LOG_DIR}" \
"${ZERONET_LOG_DIR}/"* \
|| die '"fowners" failed.'
Log directory does not contain any files when ebuild is being processed (well, there is .keep file created by keepdir command, but it is a dot file) and "${ZERONET_LOG_DIR}/"*
expands to itself, unless dotglob shell option is enabled. This fails with 'No such file' error. I noticed your comments above, but fowners -R
works perfectly for me. Could you please check it out once more?
Yikes! Thanks for the prompt heads up. I recently added this as fowners -R
silently fails to change ownership of files already owned by root
– which is catastrophic for ZeroNet, which itself silently fails on startup if any logfiles in ${ZERONET_LOG_DIR}
are not owned by zeronet:zeronet
. just... ugh.
But you're horribly right. I'd gotten so accustomed to sane globbing under zsh
that I failed to consider this obviously bad Bashism. Let's patch that up before anyone else's emerge
explosively blows up. 😑
Note to self: nullglob
is probably a saner shopt
than dotglob
here, as it's safer for Bash to simply remove the "${ZERONET_LOG_DIR}/"*
glob entirely when there are no matches rather than depend on implementation details like .keep
files.
Anyway. Who cares? Let's patch this party up already!
Thanks again, @sakovetsa. You rock the overlay. Boom! 💥