mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 23:23:32 +01:00
dehydrated -c silently fails to renew certificates using zsh
#590
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jehops on GitHub (Dec 31, 2022).
Environment:
Sample output:
Strangely, if I change this snippet
to
then things seem to work and the output looks like this
@Jehops commented on GitHub (Dec 31, 2022):
The problem doesn't happen on FreeBSD 13.1, so it seems this is likely a FreeBSD/ZSH bug.@hillmich commented on GitHub (Jan 9, 2023):
Thank you very much for pointing out the problem and providing a solution!
I observe the same problem on
13.1-RELEASE-p5with dehydrated0.7.1and zshzsh 5.9 (amd64-portbld-freebsd13.1). You're workaround fixed it here as well.@Jehops commented on GitHub (Jan 9, 2023):
I just now ran a very simple test in a
13.1-RELEASE-p2jail, and that system does indeed seem to be affected. My original 13.1 test must have been flawed.Recipe:
poudriere testport -i -j 13amd64 security/dehydratedto give a shell prompt in a pristine13.1-RELEASE-p2jail plus dehydrated and its dependencies installed./usr/local/bin/dehydrated -cand the output is only# INFO: Using main config file /usr/local/etc/dehydrated/config.dehydratedso that it containslocal is_wordsplit_disabled="$(unsetopt....@areilly commented on GitHub (Jan 14, 2023):
This happens on my FreeBSD 13.1-STABLE system with dehydrated 0.7.1 from ports too. The last previous successful run was November 4th, so something must have changed in the installed zsh in that time, I suppose? I'm also running zsh 5.9 (amd64-portbld-freebsd13.1) which is current in ports.
Hmm. The dehydrated-io-dehydrated-v0.7.1_GH0.tar.gz file in ports/distfiles is dated 5 November, so that is the likely source of change.
I can't figure out why the suggested fix works, which worries me a bit. It should not be necessary assign a local variable on the same line as it is declared.
The line-split in question was introduced in this change, apparently:
e963438c5aThat change appears to have introduced quite a bit of unnecessary quoting, too.
The whole shwordsplit dance appears to be unnecessary in dehydrated, as it is turned on globally on line 11:
-n "${ZSH_VERSION:-}" && set -o SH_WORD_SPLIT && set +o FUNCTION_ARGZERO && set -o NULL_GLOB && set -o noglob
I've found that just commenting out the lines involving is_wordsplit_disabled works fine too...