public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Stoiko Ivanov <s.ivanov@proxmox.com>
Subject: [pve-devel] applied: [PATCH proxmox-acme] plugin-caller: add missing methods from acme.sh
Date: Fri, 16 Jul 2021 17:59:07 +0200	[thread overview]
Message-ID: <fda78f71-f0ba-f02c-cf61-04929cbc0b95@proxmox.com> (raw)
In-Reply-To: <20210715135657.3424178-1-s.ivanov@proxmox.com>

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@proxmox.com>
> ---
> could not really test it - without transip account
> 
>  src/proxmox-acme | 114 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 114 insertions(+)
> 
>

applied, thanks!




      reply	other threads:[~2021-07-16 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 13:56 [pve-devel] " Stoiko Ivanov
2021-07-16 15:59 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fda78f71-f0ba-f02c-cf61-04929cbc0b95@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.ivanov@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal