Closed MarceloRuiz closed 2 years ago
they are in acme-dnsapi
Sorry, my bad... I somehow assumed that installing luci-app-acme would have had all the packages needed as dependencies because it provides the UI for this particular reason. Another thing that I noticed is that there were errors regarding using 'sed -i' in the acme.sh script, but the package was not installed.
i am just another user, probably rename issue w error examples, that busybox sed does not cut it
Andrew @.***> writes:
i am just another user, probably rename issue w error examples, that busybox sed does not cut it
We're not doing anything particularly fancy with sed - what's the error, exactly?
There are multiple lines on the log that say 'No -i support in sed'. Here is one example:
[Tue Nov 2 11:07:46 EDT 2021] Retrying post
[Tue Nov 2 11:07:46 EDT 2021] POST
[Tue Nov 2 11:07:46 EDT 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/829713678'
[Tue Nov 2 11:07:46 EDT 2021] _WGET='wget -q --content-on-error '
[Tue Nov 2 11:07:47 EDT 2021] No -i support in sed
Just to be clear, the sed -i related errors are gone after installing 'sed' using opkg.
My point regarding dependencies was that if 'luci-app-acme' provides an option to use dns validation, maybe it should mark 'acme-dnsapi' and 'sed' as dependencies so they are installed automatically. Should I create a new issue for this?
MarceloRuiz @.***> writes:
There are multiple lines on the log that say 'No -i support in sed'. Here is one example:
[Tue Nov 2 11:07:46 EDT 2021] Retrying post [Tue Nov 2 11:07:46 EDT 2021] POST [Tue Nov 2 11:07:46 EDT 2021] _post_url='https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/829713678' [Tue Nov 2 11:07:46 EDT 2021] _WGET='wget -q --content-on-error ' [Tue Nov 2 11:07:47 EDT 2021] No -i support in sed
Just to be clear, the sed -i related errors are gone after installing 'sed' using opkg.
But the question is more why is your busybox 'sed' not supporting -i? Works just fine on my openwrt install:
sed -i BusyBox v1.33.1 (2021-08-31 22:20:08 UTC) multi-call binary.
Usage: sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]... or: sed [-i[SFX]] [-nrE] CMD [FILE]...
-e CMD Add CMD to sed commands to be executed
-f FILE Add FILE contents to sed commands to be executed
-i[SFX] Edit files in-place (otherwise sends to stdout)
Optionally back files up, appending SFX
-n Suppress automatic printing of pattern space
-r,-E Use extended regex syntax
If no -e or -f, the first non-option argument is the sed command string. Remaining arguments are input files (stdin if none).
My point regarding dependencies was that if 'luci-app-acme' provides an option to use dns validation, maybe it should mark 'acme-dnsapi' and 'sed' as dependencies so they are installed automatically. Should I create a new issue for this?
No, the split was on purpose (into acme and acme-dnsapi): if you don't need the DNS API it should be possible to install acme without it. If we introduce a dependency this will no longer be possible.
The sed issue should be fixed, though; see above.
I have no idea of what is going on with sed, because I get the same output you get:
root@wrt1900ac:~# sed -i
BusyBox v1.33.1 (2021-10-09 02:34:51 UTC) multi-call binary.
Usage: sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...
or: sed [-i[SFX]] [-nrE] CMD [FILE]...
-e CMD Add CMD to sed commands to be executed
-f FILE Add FILE contents to sed commands to be executed
-i[SFX] Edit files in-place (otherwise sends to stdout)
Optionally back files up, appending SFX
-n Suppress automatic printing of pattern space
-r,-E Use extended regex syntax
If no -e or -f, the first non-option argument is the sed command string.
Remaining arguments are input files (stdin if none).
Regarding the package splitting, I understand the advantages of having 'acme-dnsapi' separated from 'acme'. I thought the separation was there for users that don't use luci. If we consider things from the average user point of view, I think the expectation is that once someone installs 'luci-app-acme' everything related to it should be provided for it to just work out-of-the-box. Maybe another solution would be that when someone selects DNS as the validation method, the UI could check if 'acme-dnsapi' is installed and provide a clear error message (I know the message 'Using this mode requires the acme-dnsapi package to be installed.' is there, but if an error message just appears when the user makes the selection, it will certainly catch his/hers attention). Anyway, I know all the information is in the UI and that it was clearly my fault not to catch the need to install 'acme-dnsapi'.
MarceloRuiz @.***> writes:
I have no idea of what is going on with sed, because I get the same output you get:
Ah, this message is actually coming from acme.sh itself, because it looks for a different pattern in the 'sed' help output:
https://github.com/acmesh-official/acme.sh/blob/master/acme.sh#L905-L912
But as you can also see from the text immediately after the debug message, it's actually completely harmless, as it'll just fall back to a different replacement method... So it's safe to just ignore this particular error message.
@toho Thanks for clarifying the error can be ignored. Does luci-app-acme provide any way to configure deploy hooks and notifications? I noticed those directories that are part of the original 'acme.sh' script installation are missing.
MarceloRuiz @.***> writes:
@toho Thanks for clarifying the error can be ignored. Does luci-app-acme provide any way to configure deploy hooks and notifications? I noticed those directories that are part of the original 'acme.sh' script installation are missing.
Nope :)
Maintainer: @tohojo Environment: arm, wrt1900ac, openwrt-21.02 branch (git-21.231.26241-422c175) / OpenWrt 21.02.0 r16279-5cc0535800
Description:
Acme fails to create the certificate with dns challenge:
'acme.sh' and 'run-acme.sh' are installed in '/usr/lib/acme/' but the directory does not contain anything else, but if I run './acme.sh --upgrade' the script downloads everything to '/root/.acme.sh/', and this directory contains the dnsapi folder that contains the missing scripts:
Are the files/folders installed by the acme upgrade missing in the default installation directory? If there are somewhere else, it seems that 'acme.sh' cannot find them