summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2013-04-21 14:36:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-29 14:45:08 +0100
commit75de6116914e96840a6c0db77b62d1bdb42c3558 (patch)
treedf15554f6cf27df8bb58ef79b79f1387ab581e44 /meta/recipes-connectivity/dhcp/dhcp
parent791653f774977a269dfdcccdcad793ade2461cf6 (diff)
downloadpoky-75de6116914e96840a6c0db77b62d1bdb42c3558.tar.gz
dhcp: Update to 4.2.5-P1
(From OE-Core rev: 0358a0bd39b8a40984bc15312d030f8cfd60805f) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch86
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fix-client-path.patch23
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch103
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fixincludes.patch12
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch90
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch25
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/noattrmode.patch21
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/site.h21
8 files changed, 381 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
new file mode 100644
index 0000000000..b4a666d106
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
@@ -0,0 +1,86 @@
1Upstream-Status: Inappropriate [distribution]
2
3--- client/scripts/bsdos
4+++ client/scripts/bsdos
5@@ -47,6 +47,11 @@
6 . /etc/dhcp/dhclient-exit-hooks
7 fi
8 # probably should do something with exit status of the local script
9+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
10+ dbus-send --system --dest=com.redhat.dhcp \
11+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
12+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
13+ fi
14 exit $exit_status
15 }
16
17--- client/scripts/freebsd
18+++ client/scripts/freebsd
19@@ -57,6 +57,11 @@
20 . /etc/dhcp/dhclient-exit-hooks
21 fi
22 # probably should do something with exit status of the local script
23+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
24+ dbus-send --system --dest=com.redhat.dhcp \
25+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
26+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
27+ fi
28 exit $exit_status
29 }
30
31--- client/scripts/linux
32+++ client/scripts/linux
33@@ -69,6 +69,11 @@
34 . /etc/dhcp/dhclient-exit-hooks
35 fi
36 # probably should do something with exit status of the local script
37+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
38+ dbus-send --system --dest=com.redhat.dhcp \
39+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
40+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
41+ fi
42 exit $exit_status
43 }
44
45--- client/scripts/netbsd
46+++ client/scripts/netbsd
47@@ -47,6 +47,11 @@
48 . /etc/dhcp/dhclient-exit-hooks
49 fi
50 # probably should do something with exit status of the local script
51+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
52+ dbus-send --system --dest=com.redhat.dhcp \
53+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
54+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
55+ fi
56 exit $exit_status
57 }
58
59--- client/scripts/openbsd
60+++ client/scripts/openbsd
61@@ -47,6 +47,11 @@
62 . /etc/dhcp/dhclient-exit-hooks
63 fi
64 # probably should do something with exit status of the local script
65+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
66+ dbus-send --system --dest=com.redhat.dhcp \
67+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
68+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
69+ fi
70 exit $exit_status
71 }
72
73--- client/scripts/solaris
74+++ client/scripts/solaris
75@@ -47,6 +47,11 @@
76 . /etc/dhcp/dhclient-exit-hooks
77 fi
78 # probably should do something with exit status of the local script
79+ if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
80+ dbus-send --system --dest=com.redhat.dhcp \
81+ --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
82+ 'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
83+ fi
84 exit $exit_status
85 }
86
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fix-client-path.patch b/meta/recipes-connectivity/dhcp/dhcp/fix-client-path.patch
new file mode 100644
index 0000000000..97ed0d9322
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fix-client-path.patch
@@ -0,0 +1,23 @@
1CLIENT_PATH is the only environment when executing dhclient-script,
2without this patch, dhclient-script won't run properly because it
3invokes ifconfig and route
4
5Upstream-Status: Inappropriate [configuration]
6
77/28/2010 - qhe
8
9diff -ru dhcp-4.1.1-P1.orig//client/Makefile.am dhcp-4.1.1-P1/client/Makefile.am
10--- dhcp-4.1.1-P1.orig//client/Makefile.am 2010-07-29 13:20:05.000000000 +0800
11+++ dhcp-4.1.1-P1/client/Makefile.am 2010-07-29 13:28:14.000000000 +0800
12@@ -10,9 +10,9 @@
13 EXTRA_DIST = $(man_MANS)
14
15 dhclient.o: dhclient.c
16- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
17+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
18 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
19
20 dhc6.o: dhc6.c
21- $(COMPILE) -DCLIENT_PATH='"$(sbindir)"' \
22+ $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):$(base_sbindir):$(bindir):$(base_bindir)"' \
23 -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch b/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
new file mode 100644
index 0000000000..4f11655812
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
@@ -0,0 +1,103 @@
1Upstream-Status: Pending
2
311/30/2010
4--with-libbind=PATH is available but not used by Makefile,
5this patch is to allow building with external bind
6
7Signed-off-by: Qing He <qing.he@intel.com>
8
9diff --git a/Makefile.am b/Makefile.am
10index 928d926..cd17af8 100644
11--- a/Makefile.am
12+++ b/Makefile.am
13@@ -21,7 +21,7 @@ EXTRA_DIST = RELNOTES LICENSE \
14 util/bindvar.sh \
15 bind/Makefile bind/bind.tar.gz bind/version.tmp
16
17-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
18+SUBDIRS = includes tests common dst omapip client dhcpctl relay server
19
20 nobase_include_HEADERS = dhcpctl/dhcpctl.h
21
22diff --git a/client/Makefile.am b/client/Makefile.am
23index 77ed055..5a77f2d 100644
24--- a/client/Makefile.am
25+++ b/client/Makefile.am
26@@ -5,7 +5,7 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
27 scripts/netbsd scripts/nextstep scripts/openbsd \
28 scripts/solaris scripts/openwrt
29 dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
30- ../bind/lib/libdns.a ../bind/lib/libisc.a
31+ $(libbind)/libdns.a $(libbind)/libisc.a
32 man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
33 EXTRA_DIST = $(man_MANS)
34
35diff --git a/configure.ac b/configure.ac
36index ff832aa..60d342c 100644
37--- a/configure.ac
38+++ b/configure.ac
39@@ -500,6 +500,7 @@ no)
40 libbind="$use_libbind"
41 ;;
42 esac
43+AC_SUBST([libbind])
44
45 # OpenLDAP support.
46 AC_ARG_WITH(ldap,
47diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
48index 61049be..85aefa3 100644
49--- a/dhcpctl/Makefile.am
50+++ b/dhcpctl/Makefile.am
51@@ -6,10 +6,10 @@ EXTRA_DIST = $(man_MANS)
52
53 omshell_SOURCES = omshell.c
54 omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
55- ../bind/lib/libdns.a ../bind/lib/libisc.a
56+ $(libbind)/libdns.a $(libbind)/libisc.a
57
58 libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
59
60 cltest_SOURCES = cltest.c
61 cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
62- ../bind/lib/libdns.a ../bind/lib/libisc.a
63\ No newline at end of file
64+ $(libbind)/libdns.a $(libbind)/libisc.a
65diff --git a/omapip/Makefile.am b/omapip/Makefile.am
66index 595950a..17f2233 100644
67--- a/omapip/Makefile.am
68+++ b/omapip/Makefile.am
69@@ -10,5 +10,5 @@ man_MANS = omapi.3
70 EXTRA_DIST = $(man_MANS)
71
72 svtest_SOURCES = test.c
73-svtest_LDADD = libomapi.a ../bind/lib/libdns.a ../bind/lib/libisc.a
74+svtest_LDADD = libomapi.a $(libbind)/libdns.a $(libbind)/libisc.a
75
76diff --git a/relay/Makefile.am b/relay/Makefile.am
77index d8757ca..a7885da 100644
78--- a/relay/Makefile.am
79+++ b/relay/Makefile.am
80@@ -3,7 +3,7 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
81 sbin_PROGRAMS = dhcrelay
82 dhcrelay_SOURCES = dhcrelay.c
83 dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
84- ../bind/lib/libdns.a ../bind/lib/libisc.a
85+ $(libbind)/libdns.a $(libbind)/libisc.a
86 man_MANS = dhcrelay.8
87 EXTRA_DIST = $(man_MANS)
88
89diff --git a/server/Makefile.am b/server/Makefile.am
90index cdfaf47..d2c254b 100644
91--- a/server/Makefile.am
92+++ b/server/Makefile.am
93@@ -8,8 +8,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
94
95 dhcpd_CFLAGS = $(LDAP_CFLAGS)
96 dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
97- ../dhcpctl/libdhcpctl.a ../bind/lib/libdns.a \
98- ../bind/lib/libisc.a
99+ ../dhcpctl/libdhcpctl.a $(libbind)/libdns.a \
100+ $(libbind)/libisc.a
101
102 man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
103 EXTRA_DIST = $(man_MANS)
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fixincludes.patch b/meta/recipes-connectivity/dhcp/dhcp/fixincludes.patch
new file mode 100644
index 0000000000..e33c9dd73f
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fixincludes.patch
@@ -0,0 +1,12 @@
1Upstream-Status: Pending
2
3--- dhcp-3.0.2/common/tr.c~compile 2005-10-13 14:23:37.000000000 +0200
4+++ dhcp-3.0.2/common/tr.c 2005-10-13 14:23:45.000000000 +0200
5@@ -39,6 +39,7 @@
6 #include "includes/netinet/udp.h"
7 #include "includes/netinet/if_ether.h"
8 #include "netinet/if_tr.h"
9+#include <asm/types.h>
10 #include <sys/time.h>
11
12 /*
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
new file mode 100644
index 0000000000..e686afd2d2
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -0,0 +1,90 @@
1Fix out of tree builds
2
3Upstream-Status: Pending
4
5RP 2013/03/21
6
7Index: dhcp-4.2.5/common/Makefile.am
8===================================================================
9--- dhcp-4.2.5.orig/common/Makefile.am 2013-03-21 12:54:11.345063519 +0000
10+++ dhcp-4.2.5/common/Makefile.am 2013-03-21 12:54:11.805063510 +0000
11@@ -1,4 +1,4 @@
12-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
13+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
14 AM_CFLAGS = $(LDAP_CFLAGS)
15
16 noinst_LIBRARIES = libdhcp.a
17Index: dhcp-4.2.5/dst/Makefile.am
18===================================================================
19--- dhcp-4.2.5.orig/dst/Makefile.am 2013-03-21 12:54:11.345063519 +0000
20+++ dhcp-4.2.5/dst/Makefile.am 2013-03-21 12:54:11.805063510 +0000
21@@ -1,4 +1,4 @@
22-AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
23+AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
24
25 lib_LIBRARIES = libdst.a
26
27Index: dhcp-4.2.5/omapip/Makefile.am
28===================================================================
29--- dhcp-4.2.5.orig/omapip/Makefile.am 2013-03-21 12:54:11.677063511 +0000
30+++ dhcp-4.2.5/omapip/Makefile.am 2013-03-21 12:54:11.809063510 +0000
31@@ -1,3 +1,5 @@
32+AM_CPPFLAGS = -I$(top_srcdir)/includes
33+
34 lib_LIBRARIES = libomapi.a
35 noinst_PROGRAMS = svtest
36
37Index: dhcp-4.2.5/client/Makefile.am
38===================================================================
39--- dhcp-4.2.5.orig/client/Makefile.am 2013-03-21 12:54:11.677063511 +0000
40+++ dhcp-4.2.5/client/Makefile.am 2013-03-21 12:54:11.809063510 +0000
41@@ -1,3 +1,5 @@
42+AM_CPPFLAGS = -I$(top_srcdir)/includes
43+
44 dist_sysconf_DATA = dhclient.conf.example
45 sbin_PROGRAMS = dhclient
46 dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
47@@ -11,8 +13,8 @@
48
49 dhclient.o: dhclient.c
50 $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
51- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
52+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhclient.c
53
54 dhc6.o: dhc6.c
55 $(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
56- -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
57+ -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhc6.c
58Index: dhcp-4.2.5/dhcpctl/Makefile.am
59===================================================================
60--- dhcp-4.2.5.orig/dhcpctl/Makefile.am 2013-03-21 12:54:11.677063511 +0000
61+++ dhcp-4.2.5/dhcpctl/Makefile.am 2013-03-21 12:54:11.809063510 +0000
62@@ -1,3 +1,5 @@
63+AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
64+
65 bin_PROGRAMS = omshell
66 lib_LIBRARIES = libdhcpctl.a
67 noinst_PROGRAMS = cltest
68Index: dhcp-4.2.5/relay/Makefile.am
69===================================================================
70--- dhcp-4.2.5.orig/relay/Makefile.am 2013-03-21 12:54:11.677063511 +0000
71+++ dhcp-4.2.5/relay/Makefile.am 2013-03-21 12:54:11.809063510 +0000
72@@ -1,4 +1,4 @@
73-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
74+AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
75
76 sbin_PROGRAMS = dhcrelay
77 dhcrelay_SOURCES = dhcrelay.c
78Index: dhcp-4.2.5/server/Makefile.am
79===================================================================
80--- dhcp-4.2.5.orig/server/Makefile.am 2013-03-21 12:54:11.677063511 +0000
81+++ dhcp-4.2.5/server/Makefile.am 2013-03-21 12:55:01.509062081 +0000
82@@ -4,7 +4,7 @@
83 # production code. Sadly, we are not there yet.
84 SUBDIRS = . tests
85
86-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
87+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
88
89 dist_sysconf_DATA = dhcpd.conf.example
90 sbin_PROGRAMS = dhcpd
diff --git a/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch b/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
new file mode 100644
index 0000000000..57e10b0297
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
@@ -0,0 +1,25 @@
1Author: Andrei Gherzan <andrei@gherzan.ro>
2Date: Thu Feb 2 23:59:11 2012 +0200
3
4From 4.2.0 final release, -lcrypto check was removed and we compile static libraries
5from bind that are linked to libcrypto. This is why i added a patch in order to add
6-lcrypto to LIBS.
7
8Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
9Upstream-Status: Pending
10
11Index: dhcp-4.2.3-P2-r0/dhcp-4.2.3-P2/configure.ac
12===================================================================
13--- dhcp-4.2.3-P2.orig/configure.ac 2012-02-02 18:04:20.843023196 +0200
14+++ dhcp-4.2.3-P2/configure.ac 2012-02-02 17:58:16.000000000 +0200
15@@ -456,6 +456,10 @@
16 # Look for optional headers.
17 AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
18
19+# find an MD5 library
20+AC_SEARCH_LIBS(MD5_Init, [crypto])
21+AC_SEARCH_LIBS(MD5Init, [crypto])
22+
23 # Solaris needs some libraries for functions
24 AC_SEARCH_LIBS(socket, [socket])
25 AC_SEARCH_LIBS(inet_ntoa, [nsl])
diff --git a/meta/recipes-connectivity/dhcp/dhcp/noattrmode.patch b/meta/recipes-connectivity/dhcp/dhcp/noattrmode.patch
new file mode 100644
index 0000000000..5c635e8dcb
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/noattrmode.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Backport
2
3#
4# Patch managed by http://www.holgerschurig.de/patcher.html
5#
6
7--- dhcp-3.0.1/includes/dhcpd.h~compile
8+++ dhcp-3.0.1/includes/dhcpd.h
9@@ -306,9 +306,9 @@
10 # define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
11 UNICAST_BROADCAST_HACK)
12
13- binding_state_t __attribute__ ((mode (__byte__))) binding_state;
14- binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
15- binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
16+ binding_state_t binding_state;
17+ binding_state_t next_binding_state;
18+ binding_state_t desired_binding_state;
19
20 struct lease_state *state;
21
diff --git a/meta/recipes-connectivity/dhcp/dhcp/site.h b/meta/recipes-connectivity/dhcp/dhcp/site.h
new file mode 100644
index 0000000000..2289554ef3
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/site.h
@@ -0,0 +1,21 @@
1/*
2 * define config file location in ${S}/includes/site.h
3 * still need to take care of installation path (${sysconfdir}/dhcpd.conf)
4 *
5 * 7/22/2010 - qhe
6 */
7
8/* Define this if you want DNS update functionality to be available. */
9
10#define NSUPDATE
11
12/* Define this if you aren't debugging and you want to save memory
13 (potentially a _lot_ of memory) by allocating leases in chunks rather
14 than one at a time. */
15
16#define COMPACT_LEASES
17
18
19/* local */
20#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
21#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"