]> code.ossystems Code Review - openembedded-core.git/commitdiff
dhcp: not override site.h
authorHongxu Jia <hongxu.jia@windriver.com>
Mon, 12 Jan 2015 05:42:16 +0000 (13:42 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Jan 2015 11:35:28 +0000 (11:35 +0000)
Previously, site.h was overridden for setting _PATH_DHCPD_CONF
and _PATH_DHCLIENT_CONF, it caused other MACROs were missing,
so we use a patch to instead.

The macros NSUPDATE and COMPACT_LEASES existed in site.h

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
meta/recipes-connectivity/dhcp/dhcp.inc
meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch [new file with mode: 0644]
meta/recipes-connectivity/dhcp/dhcp/site.h [deleted file]

index 4949e0201eaf58e574aec9e5508cf88125c4955c..6ced77500a297b806ec849d3e943f9d3b4418541 100644 (file)
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1
 DEPENDS = "openssl bind"
 
 SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
-           file://site.h \
+           file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
            file://init-relay file://default-relay \
            file://init-server file://default-server \
            file://dhclient.conf file://dhcpd.conf \
@@ -36,10 +36,6 @@ EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
                 --with-libbind=${STAGING_LIBDIR}/ \
                "
 
-do_compile_prepend () {
-       cp -f ${WORKDIR}/site.h ${S}/includes
-}
-
 do_install_append () {
        install -d ${D}${sysconfdir}/init.d
        install -d ${D}${sysconfdir}/default
diff --git a/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
new file mode 100644 (file)
index 0000000..12d3c9b
--- /dev/null
@@ -0,0 +1,26 @@
+define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
+
+Upstream-Status: inappropriate <oe specific>
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ includes/site.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/includes/site.h b/includes/site.h
+index d87b309..17bc40d 100644
+--- a/includes/site.h
++++ b/includes/site.h
+@@ -139,7 +139,8 @@
+ /* Define this if you want the dhcpd.conf file to go somewhere other than
+    the default location.   By default, it goes in /etc/dhcpd.conf. */
+-/* #define _PATH_DHCPD_CONF   "/etc/dhcpd.conf" */
++#define _PATH_DHCPD_CONF      "/etc/dhcp/dhcpd.conf"
++#define _PATH_DHCLIENT_CONF   "/etc/dhcp/dhclient.conf"
+ /* Network API definitions.   You do not need to choose one of these - if
+    you don't choose, one will be chosen for you in your system's config
+-- 
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/site.h b/meta/recipes-connectivity/dhcp/dhcp/site.h
deleted file mode 100644 (file)
index 2289554..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * define config file location in ${S}/includes/site.h
- * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
- *
- * 7/22/2010 - qhe
- */
-
-/* Define this if you want DNS update functionality to be available. */
-
-#define NSUPDATE
-
-/* Define this if you aren't debugging and you want to save memory
-   (potentially a _lot_ of memory) by allocating leases in chunks rather
-   than one at a time. */
-
-#define COMPACT_LEASES
-
-
-/* local */
-#define _PATH_DHCPD_CONF     "/etc/dhcp/dhcpd.conf"
-#define _PATH_DHCLIENT_CONF  "/etc/dhcp/dhclient.conf"