all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script
@ 2023-02-21 13:13 Stoiko Ivanov
  2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 1/2] proxmox-acme: add empty _clearaccountconf_mutable helper Stoiko Ivanov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2023-02-21 13:13 UTC (permalink / raw)
  To: pve-devel

I think I've seen similar reports a few times in our community-forum, but
never followed through - or thought it was fixed by some other issue:
https://forum.proxmox.com/threads/.122961/

While fixing the concrete issue for dns_cf.sh I tried to enhance our
check-missing-function helper to catch such issues (now it caught the
missing _clearaccountconf_mutable).

Patches are ordered inversely to their implementation, so that `make deb`
does not fail on the first commit.

Stoiko Ivanov (2):
  proxmox-acme: add empty _clearaccountconf_mutable helper
  tests: add non-word boundary to present functions

 src/proxmox-acme                    | 4 ++++
 src/test/check-missing-functions    | 4 ++--
 src/test/missing-functions.expected | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH proxmox-acme 1/2] proxmox-acme: add empty _clearaccountconf_mutable helper
  2023-02-21 13:13 [pve-devel] [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Stoiko Ivanov
@ 2023-02-21 13:13 ` Stoiko Ivanov
  2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 2/2] tests: add non-word boundary to present functions Stoiko Ivanov
  2023-02-21 16:29 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2023-02-21 13:13 UTC (permalink / raw)
  To: pve-devel

it is used by dns_cf.sh.
reported in our community forum:
https://forum.proxmox.com/threads/.122961/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/proxmox-acme | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/proxmox-acme b/src/proxmox-acme
index 8d022c6..a796547 100644
--- a/src/proxmox-acme
+++ b/src/proxmox-acme
@@ -724,6 +724,10 @@ _clearaccountconf() {
   return 0
 }
 
+_clearaccountconf_mutable() {
+  return 0
+}
+
 _cleardomainconf() {
   return 0
 }
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH proxmox-acme 2/2] tests: add non-word boundary to present functions
  2023-02-21 13:13 [pve-devel] [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Stoiko Ivanov
  2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 1/2] proxmox-acme: add empty _clearaccountconf_mutable helper Stoiko Ivanov
@ 2023-02-21 13:13 ` Stoiko Ivanov
  2023-02-21 16:29 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2023-02-21 13:13 UTC (permalink / raw)
  To: pve-devel

noticed that _clearaccountconf_mutable is used in dns_cf.sh, but not
present (it gets masked since we provide _clearaccountconf)

tested with this example.

additionally update missing-functions.expected - _error is not
present in upstream `acme.sh` but used in dns_aws.sh (I expect an
error which is only hit very seldomly)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/test/check-missing-functions    | 4 ++--
 src/test/missing-functions.expected | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/check-missing-functions b/src/test/check-missing-functions
index cb819fc..dfc32d3 100755
--- a/src/test/check-missing-functions
+++ b/src/test/check-missing-functions
@@ -3,11 +3,11 @@
 set -e
 
 # functions already in src/proxmox-acme
-PRESENT=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+PRESENT=$(awk 'BEGIN{ORS="\\W|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
 	../proxmox-acme | sed -r 's/\|$//')
 
 # functions defined in all plugins
-LOCAL=$(awk 'BEGIN{ORS="|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
+LOCAL=$(awk 'BEGIN{ORS="\\W|";} /^_/{ gsub(/\(\) {/, ""); print $0}' \
 	../acme.sh/dnsapi/dns*.sh | sed -r 's/\|$//')
 
 grep -P '(?<!["$])\b_[a-zA-Z0-9_-]+ ' ../acme.sh/dnsapi/dns_*sh | \
diff --git a/src/test/missing-functions.expected b/src/test/missing-functions.expected
index 467f9ac..5c2b053 100644
--- a/src/test/missing-functions.expected
+++ b/src/test/missing-functions.expected
@@ -1,3 +1,4 @@
+../acme.sh/dnsapi/dns_aws.sh:      _error "invalid domain"
 ../acme.sh/dnsapi/dns_cpanel.sh:  for _domain in $_domains; do
 ../acme.sh/dnsapi/dns_cyon.sh:  printf "%s" "${_dns_entries}" | while read -r _hash _identifier; do
 ../acme.sh/dnsapi/dns_do.sh:      for _rrid in ${_rr_list}; do
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script
  2023-02-21 13:13 [pve-devel] [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Stoiko Ivanov
  2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 1/2] proxmox-acme: add empty _clearaccountconf_mutable helper Stoiko Ivanov
  2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 2/2] tests: add non-word boundary to present functions Stoiko Ivanov
@ 2023-02-21 16:29 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-02-21 16:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stoiko Ivanov

Am 21/02/2023 um 14:13 schrieb Stoiko Ivanov:
> I think I've seen similar reports a few times in our community-forum, but
> never followed through - or thought it was fixed by some other issue:
> https://forum.proxmox.com/threads/.122961/
> 
> While fixing the concrete issue for dns_cf.sh I tried to enhance our
> check-missing-function helper to catch such issues (now it caught the
> missing _clearaccountconf_mutable).
> 
> Patches are ordered inversely to their implementation, so that `make deb`
> does not fail on the first commit.
> 
> Stoiko Ivanov (2):
>   proxmox-acme: add empty _clearaccountconf_mutable helper
>   tests: add non-word boundary to present functions
> 
>  src/proxmox-acme                    | 4 ++++
>  src/test/check-missing-functions    | 4 ++--
>  src/test/missing-functions.expected | 1 +
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 


applied series, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-21 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21 13:13 [pve-devel] [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Stoiko Ivanov
2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 1/2] proxmox-acme: add empty _clearaccountconf_mutable helper Stoiko Ivanov
2023-02-21 13:13 ` [pve-devel] [PATCH proxmox-acme 2/2] tests: add non-word boundary to present functions Stoiko Ivanov
2023-02-21 16:29 ` [pve-devel] applied: [PATCH proxmox-acme 0/2] add missing _clearaccountconf_mutable and improve check-missing script Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal