dhcp: Add choice for "with ddns" and "no ddns".
PATCH 1/1 dhcp: Add choice for "with ddns" and "no ddns".
Disable DNS update functionality can solve this issue:
dhcpd is listening on additional random ports.
To meet different requests, add a choice in dhcp's bb file:
"with ddns" version should add "ddns" to PACKAGECONFIG, and it is the default;
"no ddns" version should set PACKAGECONFIG to be without "ddns".
--- ...001-DDNS-disable-DNS-update-functionality.patch | 28 ++++++++++++++++++++++ meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb | 13 +++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-connectivity/dhcp/dhcp/0001-DDNS-disable-DNS-update-functionality.patch
meta/recipes-connectivity/dhcp/dhcp/0001-DDNS-disable-DNS-update-functionality.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 1d804738080d52c0977947c7271d2db49bd6f90d Mon Sep 17 00:00:00 2001 +From: Li Zhou <[email protected]> +Date: Wed, 8 Feb 2017 10:02:59 +0800 +Subject: [PATCH] DDNS: disable DNS update functionality + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Li Zhou <[email protected]> +--- + includes/site.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/includes/site.h b/includes/site.h +index abb66e4..cefc12e 100644 +--- a/includes/site.h ++++ b/includes/site.h +@@ -121,7 +121,7 @@ + + /* Define this if you want DNS update functionality to be available. */ + +-#define NSUPDATE ++/* #define NSUPDATE */ + + /* Define this if you want to enable the DHCP server attempting to + find a nameserver to use for DDNS updates. */ +-- +1.9.1 +
meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb +10 -3
@@ -1,5 +1,14 @@ require dhcp.inc +# If don't want DNS update functionality to be available becauses dhcpd will +# be listening on additional random ports, please set PACKAGECONFIG to be +# without ddns. +PACKAGECONFIG ?= "ddns" +PACKAGECONFIG[ddns] = ",,," +PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" + +SITE_H_PATCH = "${@bb.utils.contains('PACKAGECONFIG', 'ddns', '', 'file://0001-DDNS-disable-DNS-update-functionality.patch', d)}" + SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ file://link-with-lcrypto.patch \ file://fixsepbuild.patch \
@@ -9,10 +18,8 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ file://libxml2-configure-argument.patch \ file://tweak-to-support-external-bind.patch \ file://remove-dhclient-script-bash-dependency.patch \ + ${SITE_H_PATCH} \ " SRC_URI[md5sum] = "2b5e5b2fa31c2e27e487039d86f83d3f" SRC_URI[sha256sum] = "eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
Signature · 1 line
1.9.1
Ping.
Quoted 79 lines · Li Zhou
Disable DNS update functionality can solve this issue:
dhcpd is listening on additional random ports.
To meet different requests, add a choice in dhcp's bb file:
"with ddns" version should add "ddns" to PACKAGECONFIG, and it is the default;
"no ddns" version should set PACKAGECONFIG to be without "ddns".Signed-off-by Li Zhou <[email protected]>--- ...001-DDNS-disable-DNS-update-functionality.patch | 28 ++++++++++++++++++++++ meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb | 13 +++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)create mode 100644
meta/recipes-connectivity/dhcp/dhcp/0001-DDNS-disable-DNS-update-functionality.patchmeta/recipes-connectivity/dhcp/dhcp/0001-DDNS-disable-DNS-update-functionality.patch new file +28
-0@@ -0,0 +1,28 @@ +From 1d804738080d52c0977947c7271d2db49bd6f90d Mon Sep 17 00:00:00 2001 +From: Li Zhou <[email protected]> +Date: Wed, 8 Feb 2017 10:02:59 +0800 +Subject: [PATCH] DDNS: disable DNS update functionality + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Li Zhou <[email protected]> +--- + includes/site.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/includes/site.h b/includes/site.h +index abb66e4..cefc12e 100644 +--- a/includes/site.h ++++ b/includes/site.h +@@ -121,7 +121,7 @@ + + /* Define this if you want DNS update functionality to be available. */ + +-#define NSUPDATE ++/* #define NSUPDATE */ + + /* Define this if you want to enable the DHCP server attempting to + find a nameserver to use for DDNS updates. */ +-- +1.9.1 +meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb +10
-3@@ -1,5 +1,14 @@ require dhcp.inc +# If don't want DNS update functionality to be available becauses dhcpd will +# be listening on additional random ports, please set PACKAGECONFIG to be +# without ddns. +PACKAGECONFIG ?= "ddns" +PACKAGECONFIG[ddns] = ",,," +PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2" + +SITE_H_PATCH = "${@bb.utils.contains('PACKAGECONFIG', 'ddns', '', 'file://0001-DDNS-disable-DNS-update-functionality.patch', d)}" + SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ file://link-with-lcrypto.patch \ file://fixsepbuild.patch \@@ -9,10 +18,8 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \ file://libxml2-configure-argument.patch \ file://tweak-to-support-external-bind.patch \ file://remove-dhclient-script-bash-dependency.patch \ + ${SITE_H_PATCH} \ " SRC_URI[md5sum] = "2b5e5b2fa31c2e27e487039d86f83d3f" SRC_URI[sha256sum] = "eb95936bf15d2393c55dd505bc527d1d4408289cec5a9fa8abb99f7577e7f954" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[bind-httpstats] = "--with-libxml2,--without-libxml2,libxml2"
Signature · 3 lines
Best Regards! Zhou Li Phone number: 86-10-84778511
Quoted 3 lines · Li Zhou
+-#define NSUPDATE
++/* #define NSUPDATE */
Instead of having a patch that is conditional on PACKAGECONFIG (so prone to being left out of testing), can the patch be rewritten so that it exposes an option or respects a variable that is set by the recipe itself?
Ross