From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E66A476B11 for ; Fri, 16 Jul 2021 18:00:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D683913501 for ; Fri, 16 Jul 2021 17:59:33 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4C4FD134F0 for ; Fri, 16 Jul 2021 17:59:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1665B42165 for ; Fri, 16 Jul 2021 17:59:32 +0200 (CEST) Message-ID: Date: Fri, 16 Jul 2021 17:59:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0 Content-Language: en-US To: Proxmox VE development discussion , Stoiko Ivanov References: <20210715135657.3424178-1-s.ivanov@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210715135657.3424178-1-s.ivanov@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.383 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_SBL_A 0.1 Contains URL's A record listed in the Spamhaus SBL blocklist [acme.sh] Subject: [pve-devel] applied: [PATCH proxmox-acme] plugin-caller: add missing methods from acme.sh X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2021 16:00:03 -0000 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 > --- > could not really test it - without transip account > > src/proxmox-acme | 114 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 114 insertions(+) > > applied, thanks!