[pve-devel] applied: [PATCH proxmox-acme] plugin-caller: add missing methods from acme.sh
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jul 16 17:59:07 CEST 2021
On 15.07.21 15:56, Stoiko Ivanov wrote:
> As reported in our community forum [0] certain dns plugins use code
> from `acme.sh`, which is currently not in our proxmox-acme.
>
> I initially only added _sign and it's callees, but then though about
> trying to get all missing methods somehow (only resethttp() was
> missing in addition).
>
> The heuristic used to get all missing methods was grepping for '\b_'
> in all dns plugins and then removing:
> * declarations in proxmox_acme (already present)
> * methods declared in the plugins themselves
> * $_.* (or ${_.*) - variable use
> * comments
>
> in shell:
> ```
> present=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
> src/proxmox-acme | | sed -r 's/\|$//')
> local=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
> src/acme.sh/dnsapi/dns*.sh | sed -r 's/\|$//')
> grep '\b_' src/acme.sh/dnsapi/* | grep -Ev \
> "$present|$local|_[a-zA-Z0-9_-]+=|\\$\{?_|^src/acme.sh/dnsapi/.*sh:#"
> ```
>
what a bit of awk and grep can do, nice! ;-)
> [0] https://forum.proxmox.com/threads/proxmox-acme-with-transip-plugin-_sign-command-not-found.92582/
>
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> could not really test it - without transip account
>
> src/proxmox-acme | 114 +++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
>
>
applied, thanks!
More information about the pve-devel
mailing list