ddns: Import upstream patch for NoIP.com

Message ID 20191105182341.5129-1-stefan.schantl@ipfire.org
State Staged
Commit 527c3f39b8af9399619eaca5b5e4feace9f0f2f3
Headers show
Series
  • ddns: Import upstream patch for NoIP.com
Related show

Commit Message

Stefan Schantl Nov. 5, 2019, 6:23 p.m. UTC
Reference: #11561.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 lfs/ddns                                      |  3 +
 .../ddns-012-noip-rename-provider.patch       | 65 +++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 src/patches/ddns-012-noip-rename-provider.patch

Comments

Michael Tremer Nov. 6, 2019, 3:36 p.m. UTC | #1
Hi,

You have already merged this patch, so I commented in Bugzilla.

However, here is it again for the record:

You cannot change the handle because all existing configurations - which arguably don’t work anyways now - won’t pick this provider to run an update.

-Michael

> On 5 Nov 2019, at 18:23, Stefan Schantl <stefan.schantl@ipfire.org> wrote:
> 
> Reference: #11561.
> 
> Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> ---
> lfs/ddns                                      |  3 +
> .../ddns-012-noip-rename-provider.patch       | 65 +++++++++++++++++++
> 2 files changed, 68 insertions(+)
> create mode 100644 src/patches/ddns-012-noip-rename-provider.patch
> 
> diff --git a/lfs/ddns b/lfs/ddns
> index a6ca2e35d..8bfa92f77 100644
> --- a/lfs/ddns
> +++ b/lfs/ddns
> @@ -71,6 +71,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> 	@$(PREBUILD)
> 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
> 
> +	# Add upstream patch for fixing noip.com
> +	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns-012-noip-rename-provider.patch
> +
> 	cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
> 	cd $(DIR_APP) && ./configure \
> 		--prefix=/usr \
> diff --git a/src/patches/ddns-012-noip-rename-provider.patch b/src/patches/ddns-012-noip-rename-provider.patch
> new file mode 100644
> index 000000000..acc5e66a7
> --- /dev/null
> +++ b/src/patches/ddns-012-noip-rename-provider.patch
> @@ -0,0 +1,65 @@
> +commit bfdba55a5eeb3dac5ed35ff72b6c74b941da6445
> +Author: Stefan Schantl <stefan.schantl@ipfire.org>
> +Date:   Tue Nov 5 19:09:53 2019 +0100
> +
> +    No-IP.com: Rename provider and handle to NoIP.com
> +    
> +    Fixes #11561.
> +    
> +    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
> +
> +diff --git a/README b/README
> +index 76f63bc..c75c448 100644
> +--- a/README
> ++++ b/README
> +@@ -75,7 +75,7 @@ SUPPORTED PROVIDERS:
> + 	loopia.se
> + 	myonlineportal.net
> + 	namecheap.com
> +-	no-ip.com
> ++	noip.com
> + 	now-dns.com
> + 	nsupdate.info
> + 	opendns.com
> +diff --git a/ddns.conf.sample b/ddns.conf.sample
> +index 5b3b845..528684f 100644
> +--- a/ddns.conf.sample
> ++++ b/ddns.conf.sample
> +@@ -119,8 +119,8 @@
> + # provider = namecheap.com
> + # password = pass
> + 
> +-# [test.no-ip.org]
> +-# provider = no-ip.com
> ++# [test.noip.org]
> ++# provider = noip.com
> + # username = user
> + # password = pass
> + 
> +diff --git a/src/ddns/providers.py b/src/ddns/providers.py
> +index f3c62c1..4789107 100644
> +--- a/src/ddns/providers.py
> ++++ b/src/ddns/providers.py
> +@@ -1344,16 +1344,16 @@ class DDNSProviderNamecheap(DDNSResponseParserXML, DDNSProvider):
> + 
> + 
> + class DDNSProviderNOIP(DDNSProtocolDynDNS2, DDNSProvider):
> +-	handle    = "no-ip.com"
> +-	name      = "No-IP"
> +-	website   = "http://www.no-ip.com/"
> ++	handle    = "noip.com"
> ++	name      = "NoIP"
> ++	website   = "http://www.noip.com/"
> + 	protocols = ("ipv4",)
> + 
> + 	# Information about the format of the HTTP request is to be found
> +-	# here: http://www.no-ip.com/integrate/request and
> +-	# here: http://www.no-ip.com/integrate/response
> ++	# here: http://www.noip.com/integrate/request and
> ++	# here: http://www.noip.com/integrate/response
> + 
> +-	url = "http://dynupdate.no-ip.com/nic/update"
> ++	url = "http://dynupdate.noip.com/nic/update"
> + 
> + 	def prepare_request_data(self, proto):
> + 		assert proto == "ipv4"
> -- 
> 2.20.1
>

Patch

diff --git a/lfs/ddns b/lfs/ddns
index a6ca2e35d..8bfa92f77 100644
--- a/lfs/ddns
+++ b/lfs/ddns
@@ -71,6 +71,9 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 
+	# Add upstream patch for fixing noip.com
+	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns-012-noip-rename-provider.patch
+
 	cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh
 	cd $(DIR_APP) && ./configure \
 		--prefix=/usr \
diff --git a/src/patches/ddns-012-noip-rename-provider.patch b/src/patches/ddns-012-noip-rename-provider.patch
new file mode 100644
index 000000000..acc5e66a7
--- /dev/null
+++ b/src/patches/ddns-012-noip-rename-provider.patch
@@ -0,0 +1,65 @@ 
+commit bfdba55a5eeb3dac5ed35ff72b6c74b941da6445
+Author: Stefan Schantl <stefan.schantl@ipfire.org>
+Date:   Tue Nov 5 19:09:53 2019 +0100
+
+    No-IP.com: Rename provider and handle to NoIP.com
+    
+    Fixes #11561.
+    
+    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
+
+diff --git a/README b/README
+index 76f63bc..c75c448 100644
+--- a/README
++++ b/README
+@@ -75,7 +75,7 @@ SUPPORTED PROVIDERS:
+ 	loopia.se
+ 	myonlineportal.net
+ 	namecheap.com
+-	no-ip.com
++	noip.com
+ 	now-dns.com
+ 	nsupdate.info
+ 	opendns.com
+diff --git a/ddns.conf.sample b/ddns.conf.sample
+index 5b3b845..528684f 100644
+--- a/ddns.conf.sample
++++ b/ddns.conf.sample
+@@ -119,8 +119,8 @@
+ # provider = namecheap.com
+ # password = pass
+ 
+-# [test.no-ip.org]
+-# provider = no-ip.com
++# [test.noip.org]
++# provider = noip.com
+ # username = user
+ # password = pass
+ 
+diff --git a/src/ddns/providers.py b/src/ddns/providers.py
+index f3c62c1..4789107 100644
+--- a/src/ddns/providers.py
++++ b/src/ddns/providers.py
+@@ -1344,16 +1344,16 @@ class DDNSProviderNamecheap(DDNSResponseParserXML, DDNSProvider):
+ 
+ 
+ class DDNSProviderNOIP(DDNSProtocolDynDNS2, DDNSProvider):
+-	handle    = "no-ip.com"
+-	name      = "No-IP"
+-	website   = "http://www.no-ip.com/"
++	handle    = "noip.com"
++	name      = "NoIP"
++	website   = "http://www.noip.com/"
+ 	protocols = ("ipv4",)
+ 
+ 	# Information about the format of the HTTP request is to be found
+-	# here: http://www.no-ip.com/integrate/request and
+-	# here: http://www.no-ip.com/integrate/response
++	# here: http://www.noip.com/integrate/request and
++	# here: http://www.noip.com/integrate/response
+ 
+-	url = "http://dynupdate.no-ip.com/nic/update"
++	url = "http://dynupdate.noip.com/nic/update"
+ 
+ 	def prepare_request_data(self, proto):
+ 		assert proto == "ipv4"