ddns: Add upstream patch to fix argparse list-token-providers command.

Message ID 20210512180643.5920-1-stefan.schantl@ipfire.org
State Accepted
Commit cf3806f27ca0d53ed0e1c28e4e23e4cd53816da6
Headers
Series ddns: Add upstream patch to fix argparse list-token-providers command. |

Commit Message

Stefan Schantl May 12, 2021, 6:06 p.m. UTC
  Fixes #12607.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 lfs/ddns                                      |  1 +
 ...13-fix-argparse-list-token-providers.patch | 23 +++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 src/patches/ddns-013-fix-argparse-list-token-providers.patch
  

Comments

Michael Tremer May 13, 2021, 8:47 a.m. UTC | #1
Hello,

> On 12 May 2021, at 19:06, Stefan Schantl <stefan.schantl@ipfire.org> wrote:
> 
> Fixes #12607.
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
> lfs/ddns                                      |  1 +
> ...13-fix-argparse-list-token-providers.patch | 23 +++++++++++++++++++
> 2 files changed, 24 insertions(+)
> create mode 100644 src/patches/ddns-013-fix-argparse-list-token-providers.patch
> 
> diff --git a/lfs/ddns b/lfs/ddns
> index 98b374ed1..538cf7256 100644
> --- a/lfs/ddns
> +++ b/lfs/ddns
> @@ -77,6 +77,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-duckdns-new-api.patch
> 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-add-option-to-list-token-provider.patch
> 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-proper-encode-string.patch
> +	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-fix-argparse-list-token-providers.patch
> 
> 	cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
> 	cd $(DIR_APP) && ./configure \
> diff --git a/src/patches/ddns-013-fix-argparse-list-token-providers.patch b/src/patches/ddns-013-fix-argparse-list-token-providers.patch
> new file mode 100644
> index 000000000..065dbb666
> --- /dev/null
> +++ b/src/patches/ddns-013-fix-argparse-list-token-providers.patch
> @@ -0,0 +1,23 @@
> +commit 5e075681008174839a47cae698ae459c0ea3a30a
> +Author: Stefan Schantl <stefan.schantl@ipfire.org>
> +Date:   Wed May 12 19:59:01 2021 +0200
> +
> +    Fix argsparse string for listing token providers.
> +    
> +    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> +
> +diff --git a/ddns.in b/ddns.in
> +index 538e4b0..20edd28 100755
> +--- a/ddns.in
> ++++ b/ddns.in
> +@@ -49,8 +49,8 @@ def main():
> + 	p_list_providers = subparsers.add_parser("list-providers",
> + 		help=_("List all available providers"))
> + 
> +-	# list-token-provider
> +-	p_list_token_provider = subparsers.add_parser("list-token-provider",
> ++	# list-token-providers
> ++	p_list_token_provider = subparsers.add_parser("list-token-providers",
> + 		help=_("List all providers which supports authentication via token"))

There is another typo here. It is should be “support”.

> + 
> + 	# update
> -- 
> 2.20.1
>
  

Patch

diff --git a/lfs/ddns b/lfs/ddns
index 98b374ed1..538cf7256 100644
--- a/lfs/ddns
+++ b/lfs/ddns
@@ -77,6 +77,7 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-duckdns-new-api.patch
 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-add-option-to-list-token-provider.patch
 	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-proper-encode-string.patch
+	cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/ddns-013-fix-argparse-list-token-providers.patch
 
 	cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
 	cd $(DIR_APP) && ./configure \
diff --git a/src/patches/ddns-013-fix-argparse-list-token-providers.patch b/src/patches/ddns-013-fix-argparse-list-token-providers.patch
new file mode 100644
index 000000000..065dbb666
--- /dev/null
+++ b/src/patches/ddns-013-fix-argparse-list-token-providers.patch
@@ -0,0 +1,23 @@ 
+commit 5e075681008174839a47cae698ae459c0ea3a30a
+Author: Stefan Schantl <stefan.schantl@ipfire.org>
+Date:   Wed May 12 19:59:01 2021 +0200
+
+    Fix argsparse string for listing token providers.
+    
+    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
+
+diff --git a/ddns.in b/ddns.in
+index 538e4b0..20edd28 100755
+--- a/ddns.in
++++ b/ddns.in
+@@ -49,8 +49,8 @@ def main():
+ 	p_list_providers = subparsers.add_parser("list-providers",
+ 		help=_("List all available providers"))
+ 
+-	# list-token-provider
+-	p_list_token_provider = subparsers.add_parser("list-token-provider",
++	# list-token-providers
++	p_list_token_provider = subparsers.add_parser("list-token-providers",
+ 		help=_("List all providers which supports authentication via token"))
+ 
+ 	# update