* [pve-devel] [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script
@ 2022-03-04 15:10 Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 1/2] plugin-caller: add _readdomainconf stub Stoiko Ivanov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2022-03-04 15:10 UTC (permalink / raw)
To: pve-devel
The first patch addresses a issue reported in our community forum.
The second patch is meant as a suggestion - and can happily be dropped.
Since it's the second time I ran into trying to find a sensible diff of what
is missing in proxmox-acme, but present in upstream acme.sh and adapted
the grep - I thought it might make sense to have it in the repo.
Stoiko Ivanov (2):
plugin-caller: add _readdomainconf stub
add shellscript to find needed functions not provided by proxmox-acme
check-missing-functions | 13 +++++++++++++
src/proxmox-acme | 5 +++++
2 files changed, 18 insertions(+)
create mode 100755 check-missing-functions
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH proxmox-acme 1/2] plugin-caller: add _readdomainconf stub
2022-03-04 15:10 [pve-devel] [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Stoiko Ivanov
@ 2022-03-04 15:10 ` Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 2/2] add shellscript to find needed functions not provided by proxmox-acme Stoiko Ivanov
2022-04-26 8:49 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2022-03-04 15:10 UTC (permalink / raw)
To: pve-devel
it's used by the dns_hetzner (and dns_nsd) plugins.
reported in our community-forum (and tested there as well):
https://forum.proxmox.com/threads/.105879/
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/proxmox-acme | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/proxmox-acme b/src/proxmox-acme
index a00d23a..637a405 100644
--- a/src/proxmox-acme
+++ b/src/proxmox-acme
@@ -696,6 +696,11 @@ _readaccountconf_mutable() {
_readaccountconf "$1"
}
+# key
+_readdomainconf() {
+ echo "${!1}"
+}
+
# no-ops:
_clearaccountconf() {
return 0
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH proxmox-acme 2/2] add shellscript to find needed functions not provided by proxmox-acme
2022-03-04 15:10 [pve-devel] [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 1/2] plugin-caller: add _readdomainconf stub Stoiko Ivanov
@ 2022-03-04 15:10 ` Stoiko Ivanov
2022-04-26 8:49 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2022-03-04 15:10 UTC (permalink / raw)
To: pve-devel
based on the heuristic I used a while ago. Adapted to catch the
functions missed the last time.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
check-missing-functions | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100755 check-missing-functions
diff --git a/check-missing-functions b/check-missing-functions
new file mode 100755
index 0000000..a76aefc
--- /dev/null
+++ b/check-missing-functions
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# functions already in src/proxmox-acme
+PRESENT=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+ src/proxmox-acme | sed -r 's/\|$//')
+# functions defined in all plugins
+LOCAL=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+ src/acme.sh/dnsapi/dns*.sh | sed -r 's/\|$//')
+
+grep -E '\b_[a-zA-Z0-9_-]+ ' src/acme.sh/dnsapi/dns_*sh | \
+ grep -Ev "$PRESENT|$LOCAL|\b_[a-zA-Z0-9_-]+=|^src/acme.sh/dnsapi/.*sh: *#"
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script
2022-03-04 15:10 [pve-devel] [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 1/2] plugin-caller: add _readdomainconf stub Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 2/2] add shellscript to find needed functions not provided by proxmox-acme Stoiko Ivanov
@ 2022-04-26 8:49 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2022-04-26 8:49 UTC (permalink / raw)
To: Proxmox VE development discussion, Stoiko Ivanov
On 04.03.22 16:10, Stoiko Ivanov wrote:
> The first patch addresses a issue reported in our community forum.
>
> The second patch is meant as a suggestion - and can happily be dropped.
> Since it's the second time I ran into trying to find a sensible diff of what
> is missing in proxmox-acme, but present in upstream acme.sh and adapted
> the grep - I thought it might make sense to have it in the repo.
>
> Stoiko Ivanov (2):
> plugin-caller: add _readdomainconf stub
> add shellscript to find needed functions not provided by proxmox-acme
>
> check-missing-functions | 13 +++++++++++++
> src/proxmox-acme | 5 +++++
> 2 files changed, 18 insertions(+)
> create mode 100755 check-missing-functions
>
applied, thanks!
Reduced false-positives in a followup, moved to the src/test directory and added to the
test make target to compare the output with a known-ok false-positive list tracked in git.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-26 8:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 15:10 [pve-devel] [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 1/2] plugin-caller: add _readdomainconf stub Stoiko Ivanov
2022-03-04 15:10 ` [pve-devel] [PATCH proxmox-acme 2/2] add shellscript to find needed functions not provided by proxmox-acme Stoiko Ivanov
2022-04-26 8:49 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing readdomainconf and helper script Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox