Download raw body.
security/acme.sh: new port (version 3.0.9)
17.11.2024 17:13, Kirill A. Korinsky пишет:
> On Sat, 16 Nov 2024 21:29:29 +0100,
> Klemens Nanni <kn@openbsd.org> wrote:
>>
>> Unless upstream ships files that break in other shells without noone
>> noticing, these might be bugs in our sh(1).
>>
>
> Interesting, that upstream usually use _login and _logout. Probably it is a
> kind well known issue.
>
>> Can you please add comments to patches/patch-* describing what's going on?
>>
>
> Imported with remarks which error is fixed by that patch.
Thanks.
I was aiming for an explanation of the change, something like this.
The other patch I haven't found the for yet.
Feedback? OK?
Index: patches/patch-dnsapi_dns_netcup_sh
===================================================================
RCS file: /cvs/ports/security/acme.sh/patches/patch-dnsapi_dns_netcup_sh,v
diff -u -p -r1.1.1.1 patch-dnsapi_dns_netcup_sh
--- patches/patch-dnsapi_dns_netcup_sh 17 Nov 2024 14:10:23 -0000 1.1.1.1
+++ patches/patch-dnsapi_dns_netcup_sh 17 Nov 2024 19:25:00 -0000
@@ -1,7 +1,10 @@
-Fix syntax error by our sh:
+ksh(1) defaults to alias login='exec login' which expands before definition
+of the equally named function, i.e. 'exec login() ...' causing
dnsapi/dns_netcup.sh[128]: syntax error: `(' unexpected
+Rename it to _login() for sh(1) -n to pass.
+
Index: dnsapi/dns_netcup.sh
--- dnsapi/dns_netcup.sh.orig
+++ dnsapi/dns_netcup.sh
@@ -32,12 +35,3 @@ Index: dnsapi/dns_netcup.sh
tmp=$(_post "{\"action\": \"login\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apipassword\": \"$NC_Apipw\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4)
_debug "$tmp"
-@@ -134,7 +134,7 @@ login() {
- return 1
- fi
- }
--logout() {
-+_logout() {
- tmp=$(_post "{\"action\": \"logout\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apisessionid\": \"$sid\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
- _debug "$tmp"
- if [ "$(_getfield "$tmp" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then
security/acme.sh: new port (version 3.0.9)