aboutsummaryrefslogtreecommitdiff
path: root/net/isc-dhcp31-server
diff options
context:
space:
mode:
Diffstat (limited to 'net/isc-dhcp31-server')
-rw-r--r--net/isc-dhcp31-server/Makefile83
-rw-r--r--net/isc-dhcp31-server/distinfo12
-rw-r--r--net/isc-dhcp31-server/files/extra-patch-dlq14
-rw-r--r--net/isc-dhcp31-server/files/extra-patch-dlq-ldap14
-rw-r--r--net/isc-dhcp31-server/files/patch-client::dhclient.c56
5 files changed, 39 insertions, 140 deletions
diff --git a/net/isc-dhcp31-server/Makefile b/net/isc-dhcp31-server/Makefile
index 5efec3822b3c..80889dded7eb 100644
--- a/net/isc-dhcp31-server/Makefile
+++ b/net/isc-dhcp31-server/Makefile
@@ -7,22 +7,21 @@
#
PORTNAME= dhcp
-PORTVERSION= 3.0.5
-PORTREVISION= 1
+PORTVERSION= 3.1.1
PORTREVISION= ${DHCP_PORTREVISION}
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
-MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
+MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.1-history
PKGNAMEPREFIX= isc-
-PKGNAMESUFFIX= 3-${SUBSYS}
+PKGNAMESUFFIX= 31-${SUBSYS}
DISTNAME= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
MAINTAINER= Joerg.Pulz@frm2.tum.de
COMMENT?= The ISC Dynamic Host Configuration Protocol server
-BROKEN= Not yet integrated
+BROKEN= Not yet integrated and tested
-PORTREVISION_SERVER= 2
+PORTREVISION_SERVER= 0
PORTREVISION_CLIENT= 0
PORTREVISION_RELAY= 0
PORTREVISION_DEVEL= 0
@@ -37,11 +36,8 @@ OPTIONS= INTERFACE_POLLING "interface polling support" on
OPTIONS= DHCP_PARANOIA "add -user, -group and -chroot options" on \
DHCP_JAIL "add -chroot and -jail options" on \
DHCP_SOCKETS "use sockets instead of /dev/bpf (jail-only)" off \
- DHCP_LDAP "add experimental LDAP backend support" off \
- DHCP_LDAP_SSL "support LDAP connection over SSL/TLS" on \
OPENSSL_BASE "use the base system OpenSSL (required by TLS)" on \
- OPENSSL_PORT "use OpenSSL from ports (required by TLS)" off \
- DHCP_LQ "DHCPLEASEQUERY support used by Cisco uBR's" off
+ OPENSSL_PORT "use OpenSSL from ports (required by TLS)" off
.endif
# PORTREVISION handling
@@ -57,30 +53,6 @@ DHCP_PORTREVISION= ${PORTREVISION_SERVER}
.include <bsd.port.pre.mk>
-.if ${SUBSYS} == server && defined(WITH_DHCP_LDAP)
-# Based on patch from Brian Masney :
-PATCH_SITES= http://www.newwave.net/~masneyb/:ldap \
- ftp://ftp.frm2.tum.de/pub/jpulz/FreeBSD/:ldap
-PATCHFILES= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}-ldap-patch:ldap
-PATCH_DIST_STRIP= -p1
-
-USE_PERL5_RUN= yes
-USE_OPENLDAP= yes
-
-.if !defined(WITHOUT_DHCP_LDAP_SSL)
-USE_OPENSSL= yes
-# hack to get bsd.openssl.mk included at this late state
-.include "${PORTSDIR}/Mk/bsd.openssl.mk"
-.endif
-.endif
-
-.if ${SUBSYS} == server && defined(WITH_DHCP_LQ)
-# Based on patch from Dmitry Sukhodoev :
-PATCH_SITES+= http://bingo.ru/~raven/FreeBSD/patches/:dlq \
- ftp://ftp.frm2.tum.de/pub/jpulz/FreeBSD/:dlq
-PATCHFILES+= ${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}-dlq-patch:dlq
-.endif
-
# Global variables
#
@@ -161,11 +133,6 @@ BIN_FILES= dhcpd omshell
USE_RC_SUBR= isc-dhcpd
SAMP_FILES= server/dhcpd.conf
DATA_FILES= dhcpd.leases
-.if defined(WITH_DHCP_LDAP)
-PORTDOCS+= README.ldap
-LDAP_SCRIPT= contrib/dhcpd-conf-to-ldap.pl
-LDAP_SCHEMA= contrib/dhcp.schema
-.endif
.elif ${SUBSYS} == relay
BIN_FILES= dhcrelay
USE_RC_SUBR= isc-dhcrelay
@@ -179,11 +146,7 @@ DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
DATADIR= /var/db
PLIST_SUB+= SCHEMA_DIR="${SCHEMA_DIR:S,^${PREFIX}/,,}"
-.if defined(WITH_DHCP_LDAP)
-PLIST_SUB+= LDAP=""
-.else
PLIST_SUB+= LDAP="@comment "
-.endif
REINPLACE_SUB= PREFIX=${PREFIX}
.if ${OSVERSION} >= 502100
SUB_LIST+= NOLOGIN=/usr/sbin/nologin
@@ -222,8 +185,7 @@ extract-script:
post-patch: patch-scripts patch-makefile-conf \
patch-makefiles-dist patch-man-pages \
- patch-pkgmessage patch-site-conf \
- patch-dlq
+ patch-pkgmessage patch-site-conf
patch-scripts:
@${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
@@ -244,15 +206,6 @@ patch-site-conf:
@${ECHO_CMD} CFLAGS += -DUSE_SOCKETS >> ${WRKSRC}/site.conf
.endif
.endif
-.if defined(WITH_DHCP_LDAP)
- @${ECHO_CMD} CFLAGS += -I${LOCALBASE}/include >> ${WRKSRC}/site.conf
- @${ECHO_CMD} LIBS += -L${LOCALBASE}/lib >> ${WRKSRC}/site.conf
-.if !defined(WITHOUT_DHCP_LDAP_SSL)
- @${ECHO_CMD} CFLAGS += -DUSE_SSL -I${OPENSSLINC} >> ${WRKSRC}/site.conf
- @${ECHO_CMD} LIBS += -L${OPENSSLLIB} >> ${WRKSRC}/site.conf
- @${ECHO_CMD} LIBS += -lcrypto -lssl >> ${WRKSRC}/site.conf
-.endif
-.endif
.endif
patch-makefile-conf:
@@ -273,21 +226,8 @@ patch-pkgmessage:
.if ${SUBSYS} != devel
@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${MSG_FILE} > ${PKGMESSAGE}
-.if defined(WITH_DHCP_LDAP)
- @${REINPLACE_CMD} -e 's|^%%LDAP%%||g' ${PKGMESSAGE}
-.else
@${REINPLACE_CMD} -e '/^%%LDAP%%/d' ${PKGMESSAGE}
.endif
-.endif
-
-patch-dlq:
-.if ${SUBSYS} == server && defined(WITH_DHCP_LQ)
-.if defined(WITH_DHCP_LDAP)
- @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-dlq-ldap
-.else
- @${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-dlq
-.endif
-.endif
# Post-install
#
@@ -299,7 +239,7 @@ post-install: ${POST-INSTALL}
parallel-post-install: \
strip-binary-files \
- install-doc-files install-ldap-files install-sample-files \
+ install-doc-files install-sample-files \
create-conf-files create-data-files
strip-binary-files:
@@ -320,13 +260,6 @@ install-doc-files:
.endfor
.endif
-install-ldap-files:
-.if ${SUBSYS} == server && defined(WITH_DHCP_LDAP)
- @${INSTALL_SCRIPT} ${WRKSRC}/${LDAP_SCRIPT} ${PREFIX}/bin
- @${MKDIR} ${SCHEMA_DIR}
- @${INSTALL_DATA} ${WRKSRC}/${LDAP_SCHEMA} ${SCHEMA_DIR}
-.endif
-
install-sample-files:
.for f in ${SAMP_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${CONF_DIR}/${f:T}${SAMP_SUFX}
diff --git a/net/isc-dhcp31-server/distinfo b/net/isc-dhcp31-server/distinfo
index 399a8acbe95c..d2e77a5735b6 100644
--- a/net/isc-dhcp31-server/distinfo
+++ b/net/isc-dhcp31-server/distinfo
@@ -1,9 +1,3 @@
-MD5 (dhcp-3.0.5.tar.gz) = ce5d30d4645e4eab1f54561b487d1ec7
-SHA256 (dhcp-3.0.5.tar.gz) = dd445fb2a341cdd69e85693dce6f8fda1a1c9d0e98d34c01afc3e68d8037ffb6
-SIZE (dhcp-3.0.5.tar.gz) = 876591
-MD5 (dhcp-3.0.5-ldap-patch) = 41cde9e9a768bf12390288465ef30bbd
-SHA256 (dhcp-3.0.5-ldap-patch) = e700472acb890b504ae5199500a0e87ca1da607946b2f3a8a8958f82d0a277c0
-SIZE (dhcp-3.0.5-ldap-patch) = 192308
-MD5 (dhcp-3.0.5-dlq-patch) = 0e071945cc986d7ecdfd9b41fc4a102b
-SHA256 (dhcp-3.0.5-dlq-patch) = c3fd3200eaf00fa80cb37f19bd3b9edb89497c235b5fa594a0f6f60050f64108
-SIZE (dhcp-3.0.5-dlq-patch) = 7655
+MD5 (dhcp-3.1.1.tar.gz) = fcc19330a9c3a0efb5620409214652a9
+SHA256 (dhcp-3.1.1.tar.gz) = 129024c7545e3e8d37e75cd5d534b50c53955592c4935189a57916e216355f6d
+SIZE (dhcp-3.1.1.tar.gz) = 798228
diff --git a/net/isc-dhcp31-server/files/extra-patch-dlq b/net/isc-dhcp31-server/files/extra-patch-dlq
deleted file mode 100644
index 5657af491721..000000000000
--- a/net/isc-dhcp31-server/files/extra-patch-dlq
+++ /dev/null
@@ -1,14 +0,0 @@
---- server/Makefile.dist.orig Tue Jun 14 09:37:50 2005
-+++ server/Makefile.dist Tue Jun 14 09:37:50 2005
-@@ -25,9 +25,9 @@
- CATMANPAGES = dhcpd.cat8 dhcpd.conf.cat5 dhcpd.leases.cat5
- SEDMANPAGES = dhcpd.man8 dhcpd.conf.man5 dhcpd.leases.man5
- SRCS = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
-- omapi.c mdb.c stables.c salloc.c ddns.c
-+ omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c
- OBJS = dhcpd.o dhcp.o bootp.o confpars.o db.o class.o failover.o \
-- omapi.o mdb.o stables.o salloc.o ddns.o
-+ omapi.o mdb.o stables.o salloc.o ddns.o dhcpleasequery.o
- PROG = dhcpd
- MAN = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
-
diff --git a/net/isc-dhcp31-server/files/extra-patch-dlq-ldap b/net/isc-dhcp31-server/files/extra-patch-dlq-ldap
deleted file mode 100644
index 5f73fefb6f11..000000000000
--- a/net/isc-dhcp31-server/files/extra-patch-dlq-ldap
+++ /dev/null
@@ -1,14 +0,0 @@
---- server/Makefile.dist.orig Tue Jun 14 09:39:39 2005
-+++ server/Makefile.dist Tue Jun 14 09:39:39 2005
-@@ -25,9 +25,9 @@
- CATMANPAGES = dhcpd.cat8 dhcpd.conf.cat5 dhcpd.leases.cat5
- SEDMANPAGES = dhcpd.man8 dhcpd.conf.man5 dhcpd.leases.man5
- SRCS = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
-- ldap.c ldap_casa.c omapi.c mdb.c stables.c salloc.c ddns.c
-+ ldap.c ldap_casa.c omapi.c mdb.c stables.c salloc.c ddns.c dhcpleasequery.c
- OBJS = dhcpd.o dhcp.o bootp.o confpars.o db.o class.o failover.o \
-- ldap.o ldap_casa.o omapi.o mdb.o stables.o salloc.o ddns.o
-+ ldap.o ldap_casa.o omapi.o mdb.o stables.o salloc.o ddns.o dhcpleasequery.o
- PROG = dhcpd
- MAN = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
-
diff --git a/net/isc-dhcp31-server/files/patch-client::dhclient.c b/net/isc-dhcp31-server/files/patch-client::dhclient.c
index c6a23b2ad6f1..d8a4e0beaf41 100644
--- a/net/isc-dhcp31-server/files/patch-client::dhclient.c
+++ b/net/isc-dhcp31-server/files/patch-client::dhclient.c
@@ -1,5 +1,5 @@
---- client/dhclient.c.orig Thu Apr 27 23:38:29 2006
-+++ client/dhclient.c Sat May 6 17:34:55 2006
+--- client/dhclient.c.orig 2008-01-23 06:02:50.000000000 +1100
++++ client/dhclient.c 2008-10-13 22:47:51.000000000 +1100
@@ -38,6 +38,13 @@
#include "dhcpd.h"
#include "version.h"
@@ -27,7 +27,7 @@
static void usage PROTO ((void));
-@@ -174,6 +184,9 @@
+@@ -181,6 +191,9 @@
} else if (!strcmp (argv [i], "-q")) {
quiet = 1;
quiet_interface_discovery = 1;
@@ -37,7 +37,7 @@
} else if (!strcmp (argv [i], "-s")) {
if (++i == argc)
usage ();
-@@ -187,6 +200,19 @@
+@@ -194,6 +207,19 @@
} else if (!strcmp (argv [i], "-n")) {
/* do not start up any interfaces */
interfaces_requested = 1;
@@ -57,7 +57,7 @@
} else if (!strcmp (argv [i], "-w")) {
/* do not exit if there are no broadcast interfaces. */
persist = 1;
-@@ -215,7 +241,16 @@
+@@ -222,7 +248,16 @@
if (strlen(argv[i]) >= sizeof(tmp->name))
log_fatal("%s: interface name too long (is %ld)",
argv [i], (long)strlen(argv[i]));
@@ -75,7 +75,7 @@
if (interfaces) {
interface_reference (&tmp -> next,
interfaces, MDL);
-@@ -375,6 +410,16 @@
+@@ -380,6 +415,16 @@
INTERFACE_AUTOMATIC)) !=
INTERFACE_REQUESTED))
continue;
@@ -92,7 +92,7 @@
script_init (ip -> client,
"PREINIT", (struct string_list *)0);
if (ip -> client -> alias)
-@@ -417,8 +462,13 @@
+@@ -424,8 +469,13 @@
client -> state = S_INIT;
/* Set up a timeout to start the initialization
process. */
@@ -106,20 +106,20 @@
}
}
}
-@@ -476,9 +526,9 @@
+@@ -483,9 +533,10 @@
log_info (arr);
log_info (url);
-- log_error ("Usage: dhclient [-1dqr] [-nw] [-p <port>] %s",
-- "[-s server]");
+- log_error ("Usage: dhclient [-1dqrx] [-nw] [-p <port>] %s",
++ log_error ("Usage: dhclient [-1dqrvx] [-i polling-interval] %s",\
++ "[-nw] [-p <port>] %s",
+ "[-s server]");
- log_error (" [-cf config-file] [-lf lease-file]%s",
-+ log_error ("Usage: dhclient [-1Ddqrv] [-i polling-interval] %s",
-+ "[-nw] [-p <port>] [-s server]");
+ log_error (" [-cf config-file] [-lf lease-file] %s",
"[-pf pid-file] [-e VAR=val]");
log_fatal (" [-sf script-file] [interface]");
}
-@@ -879,6 +929,15 @@
+@@ -886,6 +937,15 @@
/* Write out the new lease. */
write_client_lease (client, client -> new, 0, 0);
@@ -135,7 +135,7 @@
/* Replace the old active lease with the new one. */
if (client -> active)
destroy_client_lease (client -> active);
-@@ -893,6 +952,12 @@
+@@ -900,6 +960,12 @@
piaddr (client -> active -> address),
(long)(client -> active -> renewal - cur_time));
client -> state = S_BOUND;
@@ -148,7 +148,7 @@
reinitialize_interfaces ();
go_daemon ();
if (client -> config -> do_forward_update) {
-@@ -1357,6 +1422,11 @@
+@@ -1422,6 +1488,11 @@
int interval;
int increase = 1;
@@ -160,7 +160,7 @@
/* Figure out how long it's been since we started transmitting. */
interval = cur_time - client -> first_sending;
-@@ -1457,6 +1527,9 @@
+@@ -1522,6 +1593,9 @@
struct client_lease *loop;
struct client_lease *lp;
@@ -170,7 +170,7 @@
loop = lp = client -> active;
log_info ("No DHCPOFFERS received.");
-@@ -1489,6 +1562,10 @@
+@@ -1554,6 +1628,10 @@
log_info ("bound: renewal in %ld %s.",
(long)(client -> active -> renewal -
cur_time), "seconds");
@@ -181,7 +181,7 @@
add_timeout (client -> active -> renewal,
state_bound, client, 0, 0);
} else {
-@@ -1496,6 +1573,11 @@
+@@ -1561,6 +1639,11 @@
log_info ("bound: immediate renewal.");
state_bound (client);
}
@@ -193,7 +193,7 @@
reinitialize_interfaces ();
go_daemon ();
return;
-@@ -1541,6 +1623,12 @@
+@@ -1606,6 +1689,12 @@
}
log_info ("No working leases in persistent database - sleeping.");
@@ -206,7 +206,7 @@
script_init (client, "FAIL", (struct string_list *)0);
if (client -> alias)
script_write_params (client, "alias_", client -> alias);
-@@ -1682,6 +1770,18 @@
+@@ -1747,6 +1836,18 @@
client -> packet.secs = htons (65535);
}
@@ -225,7 +225,7 @@
log_info ("DHCPREQUEST on %s to %s port %d",
client -> name ? client -> name : client -> interface -> name,
inet_ntoa (destination.sin_addr),
-@@ -1703,6 +1803,16 @@
+@@ -1768,6 +1869,16 @@
from, &destination,
(struct hardware *)0);
@@ -242,7 +242,7 @@
add_timeout (cur_time + client -> interval,
send_request, client, 0, 0);
}
-@@ -2600,6 +2710,13 @@
+@@ -2654,6 +2765,13 @@
wstatus = 0;
}
} else {
@@ -253,10 +253,10 @@
+ if (i > STDERR_FILENO)
+ close(i);
+ }
- execve (scriptName, argv, envp);
- log_error ("execve (%s, ...): %m", scriptName);
- exit (0);
-@@ -2786,8 +2903,10 @@
+ /* We don't want to pass an open file descriptor for
+ * dhclient.leases when executing dhclient-script.
+ */
+@@ -2840,8 +2958,10 @@
case S_STOPPED:
break;
}
@@ -267,7 +267,7 @@
}
}
}
-@@ -3015,7 +3134,9 @@
+@@ -3069,7 +3189,9 @@
break;
case server_awaken:
@@ -277,7 +277,7 @@
break;
}
}
-@@ -3153,3 +3274,265 @@
+@@ -3207,3 +3329,265 @@
data_string_forget (&ddns_dhcid, MDL);
return rcode;
}