Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2009 10:48:14 GMT
From:      Oleg Gawriloff <barzog@telecom.by>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/130541: isc-dhcp41-server port
Message-ID:  <200901141048.n0EAmEWi044698@www.freebsd.org>
Resent-Message-ID: <200901141050.n0EAo3uc051907@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         130541
>Category:       ports
>Synopsis:       isc-dhcp41-server port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 14 10:50:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Oleg Gawriloff
>Release:        7.1
>Organization:
Atlant Telecom
>Environment:
FreeBSD albatros2.telecom.by 7.1-RELEASE-p1 FreeBSD 7.1-RELEASE-p1 #0: Sat Jan 10 00:35:09 EET 2009     root@albatros2.telecom.by:/usr/obj/usr/src/sys/ALBATROS2  amd64

>Description:
Heres new port for isc-dhcp server 4.1.0. Based on 3.0.x port version, without any patches/relay/client stuff. Only server. 
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	isc-dhcp41-server/Makefile
#	isc-dhcp41-server/distinfo
#	isc-dhcp41-server/files
#	isc-dhcp41-server/pkg-descr
#	isc-dhcp41-server/pkg-install
#	isc-dhcp41-server/pkg-message
#	isc-dhcp41-server/pkg-plist
#	isc-dhcp41-server/files/isc-dhcpd.in
#
echo x - isc-dhcp41-server/Makefile
sed 's/^X//' >isc-dhcp41-server/Makefile << 'ef79b37aa2afc64e36277c2b988d7caa'
X# ex:ts=8
X# Ports collection makefile for:    dhcp
X# Date created:         7 Mar 1996
X# Whom:                 se
X#
X#
X
XPORTNAME=	dhcp
XPORTVERSION=	4.1.0
XPORTREVISION=	1
XPORTREVISION=	${DHCP_PORTREVISION}
XCATEGORIES=	net
XMASTER_SITES=	${MASTER_SITE_ISC}
XMASTER_SITE_SUBDIR=	dhcp dhcp/dhcp-4.1-history
XPKGNAMEPREFIX=	isc-
XPKGNAMESUFFIX=	4-${SUBSYS}
XDISTNAME=	${PORTNAME}-${RELEASE}${VERSION}${PATCHLEVEL}
X
XMAINTAINER=	Joerg.Pulz@frm2.tum.de
XCOMMENT?=	The ISC Dynamic Host Configuration Protocol server
X
XPORTREVISION_SERVER=	2
XPORTREVISION_CLIENT=	0
XPORTREVISION_RELAY=	0
XPORTREVISION_DEVEL=	0
X
XSUBSYS?=	server
X
XUNIQUENAME=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
X
X# PORTREVISION handling
X.if ${SUBSYS} == client
XDHCP_PORTREVISION=	${PORTREVISION_CLIENT}
X.elif ${SUBSYS} == relay
XDHCP_PORTREVISION=	${PORTREVISION_RELAY}
X.elif ${SUBSYS} == devel
XDHCP_PORTREVISION=	${PORTREVISION_DEVEL}
X.else
XDHCP_PORTREVISION=	${PORTREVISION_SERVER}
X.endif
X
X.include <bsd.port.pre.mk>
X
X# Global variables
X#
X
XHAS_CONFIGURE=	yes
X#ALL_TARGET=	all.${SUBSYS}
X#INSTALL_TARGET=	install.${SUBSYS}
XSCRIPTS_ENV+=	PKG_PREFIX=${PREFIX}
X
X.if ${SUBSYS} == client
XMAN5=		dhclient.conf.5 dhclient.leases.5
XMAN8=		dhclient.8 dhclient-script.8
X.elif ${SUBSYS} == server
XMAN1=		omshell.1
XMAN5=		dhcpd.conf.5 dhcpd.leases.5
XMAN8=		dhcpd.8
X.elif ${SUBSYS} == relay
XMAN8=		dhcrelay.8
X.else
XMAN3=		dhcpctl.3 omapi.3
X.endif
X.if ${SUBSYS} != relay
XMAN5+=		dhcp-eval.5 dhcp-options.5
X.endif
X
XMSG_FILE=	${.CURDIR}/pkg-message
XDESCR=		${.CURDIR}/pkg-descr
XPKGMESSAGE=	${.CURDIR}/pkg-message
XPKGINSTALL=	${.CURDIR}/pkg-install
XPLIST=		${.CURDIR}/pkg-plist
X
X# Local variables
X#
X
X# for instance, possible versions are:
X#	1.2.r3.4 (or 1.2.b3.4), 1.2.r3 (or 1.2.b3), 1.2.3, 1.2
X# which have to become:
X#	1.2rc3pl4 (or 1.2beta3pl4), 1.2rc3 (or 1.2beta3), 1.2.3, 1.2
X# so, the magic things are:
XVERSION=
XPATCHLEVEL=
X.if ${PORTVERSION:R:E:M[br]*} != ""
XRELEASE=	${PORTVERSION:R:R}
XVERSION=	${PORTVERSION:R:E:S/b/beta/:S/r/rc/}
XPATCHLEVEL=	pl${PORTVERSION:E}
X.elif ${PORTVERSION:E:M[br]*} != ""
XRELEASE=	${PORTVERSION:R}
XVERSION=	${PORTVERSION:E:S/b/beta/:S/r/rc/}
X.else
XRELEASE=	${PORTVERSION}
X.endif
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	LICENSE README RELNOTES
X.endif
X.if ${SUBSYS} == client
XBIN_FILES=	dhclient
XLOCAL_CONF_FILES=	dhclient.conf
XSAMP_FILES=	client/dhclient.conf
XDATA_FILES=	dhclient.leases
X.elif ${SUBSYS} == server
XBIN_FILES=	dhcpd omshell
XUSE_RC_SUBR=	isc-dhcpd
XSAMP_FILES=	server/dhcpd.conf
XDATA_FILES=	dhcpd.leases
X.elif ${SUBSYS} == relay
XBIN_FILES=	dhcrelay
XUSE_RC_SUBR=	isc-dhcrelay
X.endif
X
XSAMP_SUFX=	.sample
X
XCONF_DIR=	${PREFIX}/etc
XSCHEMA_DIR=	${PREFIX}/share/${PKGBASE}
XDOCSDIR=	${PREFIX}/share/doc/${PKGBASE}
XDATADIR=	/var/db
X
XPLIST_SUB+=	SCHEMA_DIR="${SCHEMA_DIR:S,^${PREFIX}/,,}"
XREINPLACE_SUB=	PREFIX=${PREFIX}
X.if ${OSVERSION} >= 502100
XSUB_LIST+=	NOLOGIN=/usr/sbin/nologin
X.else
XSUB_LIST+=	NOLOGIN=/sbin/nologin
X.endif
X.if !defined(WITHOUT_DHCP_PARANOIA)
XPLIST_SUB+=	WITH_DHCP_PARANOIA="@comment "
XCONFIGURE_ARGS+= --enable-paranoia
X.else
XPLIST_SUB+=	WITH_DHCP_PARANOIA=""
X.endif
X.if !defined(WITHOUT_DHCP_JAIL)
XPLIST_SUB+=	JAIL="@comment "
XCONFIGURE_ARGS+= --enable-early-chroot
X.else
XPLIST_SUB+=	JAIL=""
X.endif
XPKGMESSAGE_SUB=	PREFIX="${PREFIX}" MAN1PREFIX="${MAN1PREFIX}" \
X		DOCSDIR="${DOCSDIR}" SCHEMA_DIR="${SCHEMA_DIR}"
X
X# Post-install
X#
X
XPOST-INSTALL=	parallel-post-install \
X		display-message
X.ORDER: ${POST-INSTALL}
Xpost-install: ${POST-INSTALL}
X
Xparallel-post-install: \
X	strip-binary-files \
X	install-doc-files install-sample-files \
X	create-conf-files create-data-files
X
Xstrip-binary-files:
X.for f in ${BIN_FILES}
X.if exists(${PREFIX}/bin/${f})
X	@${STRIP_CMD} ${PREFIX}/bin/${f}
X.endif
X.if exists(${PREFIX}/sbin/${f})
X	@${STRIP_CMD} ${PREFIX}/sbin/${f}
X.endif
X.endfor
X
Xinstall-doc-files:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X.for f in ${PORTDOCS}
X	@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
X.endfor
X.endif
X
Xinstall-sample-files:
X.for f in ${SAMP_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/${f} ${CONF_DIR}/${f:T}${SAMP_SUFX}
X.endfor
X
Xcreate-conf-files:
X.for f in ${LOCAL_CONF_FILES}
X.if !exists(${CONF_DIR}/${f})
X	@${TOUCH} ${CONF_DIR}/${f}
X.endif
X.endfor
X
Xcreate-data-files:
X.for f in ${DATA_FILES}
X.if !exists(${DATADIR}/${f})
X	@${TOUCH} ${DATADIR}/${f}
X.endif
X.endfor
X
Xdisplay-message:
X.if ${SUBSYS} != devel
X	@${ECHO_MSG}
X	@${CAT} ${PKGMESSAGE}
X	@${ECHO_MSG}
X.endif
X
X.include <bsd.port.post.mk>
ef79b37aa2afc64e36277c2b988d7caa
echo x - isc-dhcp41-server/distinfo
sed 's/^X//' >isc-dhcp41-server/distinfo << '1c44e9f5c5c1054979af23eeb492fc39'
XMD5 (dhcp-4.1.0.tar.gz) = 1fffed2e8c3d67b111316d6a9b33db7a
XSHA256 (dhcp-4.1.0.tar.gz) = 688741e970410efdb177513550f8cd1ee52032eb109313ab316a852f40310914
XSIZE (dhcp-4.1.0.tar.gz) = 1086815
1c44e9f5c5c1054979af23eeb492fc39
echo c - isc-dhcp41-server/files
mkdir -p isc-dhcp41-server/files > /dev/null 2>&1
echo x - isc-dhcp41-server/pkg-descr
sed 's/^X//' >isc-dhcp41-server/pkg-descr << '514ba1aac24df6bbca85cbbbc22b6779'
XThe ISC Dynamic Host Configuration Protocol Distribution provides a
Xfreely redistributable reference implementation of all aspects of the
XDHCP protocol, through a suite of DHCP tools:
X
X  * A DHCP server (this port)
X  * A DHCP client
X  * A DHCP relay agent
X
XVersion 3 of the ISC DHCP Distribution includes the following features
Xthat are new since version 2.0:
X
X  * DHCP Failover Protocol support
X  * OMAPI, an API for accessing and modifying the DHCP server and client state
X  * Conditional behaviour
X  * Storing arbitrary information on leases
X  * Address pools with access control
X  * Client classing
X  * Address allocation restriction by class
X  * Relay agent information option support 
X  * Dynamic DNS updates
X  * Many bug fixes, performance enhancements, and minor new DHCP protocol
X    features. 
X
XWWW: http://www.isc.org/products/DHCP/
514ba1aac24df6bbca85cbbbc22b6779
echo x - isc-dhcp41-server/pkg-install
sed 's/^X//' >isc-dhcp41-server/pkg-install << '601c013896102029b5f57f18789bdd70'
601c013896102029b5f57f18789bdd70
echo x - isc-dhcp41-server/pkg-message
sed 's/^X//' >isc-dhcp41-server/pkg-message << '45ff71dc21cd3c9436fc988d76205671'
X****  To setup dhcpd, you may have to copy %%PREFIX%%/etc/dhcpd.conf.sample
X      to %%PREFIX%%/etc/dhcpd.conf for editing.
X
X****  This port installs dhcp daemon, but don't invokes dhcpd by default. If
X      you want to invoke dhcpd at startup, put these lines into /etc/rc.conf.
X
X	    dhcpd_enable="YES"				# dhcpd enabled?
X	    dhcpd_flags="-q"				# command option(s)
X	    dhcpd_conf="%%PREFIX%%/etc/dhcpd.conf"	# configuration file
X	    dhcpd_ifaces=""				# ethernet interface(s)
X	    dhcpd_withumask="022"			# file creation mask
X
X****  If compiled with paranoia support (the default), the following lines
X      are also supported:
X
X	    dhcpd_chuser_enable="YES"			# runs w/o privileges?
X	    dhcpd_withuser="dhcpd"			# user name to run as
X	    dhcpd_withgroup="dhcpd"			# group name to run as
X	    dhcpd_chroot_enable="YES"			# runs chrooted?
X	    dhcpd_devfs_enable="YES"		      # use devfs if available?
X	    dhcpd_makedev_enable="YES"		      # use MAKEDEV instead?
X	    dhcpd_rootdir="/var/db/dhcpd"		# directory to run in
X	    dhcpd_includedir="<some_dir>"		# directory with config-
X							  files to include
X	    dhcpd_flags="-early_chroot"			# needs full root
X
X      WARNING: -early_chroot requires a jail(8) like environment to work.
X
X      WARNING: dhcpd_devfs_enable and dhcpd_makedev_enable are mutually
X               exclusive 
X               dhcpd_makedev_enable make NO sense on FreeBSD 5.x and up!
X
X****  If compiled with jail support (the default), the following lines are
X      also supported (-early_chroot and dhcpd_chroot_enable=YES are implied):
X
X	    dhcpd_jail_enable="YES"			# runs imprisoned?
X            dhcpd_hostname="<hostname>"			# jail hostname
X            dhcpd_ipaddress="<ip address>"		# jail ip address
X
X      WARNING: dhcpd_rootdir needs to point to a full jail(8) environment.
X
X****  WARNING: never edit the chrooted or jailed dhcpd.conf file but
X      %%PREFIX%%/etc/dhcpd.conf instead which is always copied where
X      needed upon startup.
X
X****  WARNING: %%PREFIX%%/etc/rc.isc-dhcpd.conf is obsolete.  rc.conf like
X      variables are still read there but should be moved /etc/rc.conf or
X      /etc/rc.conf.d/dhcpd instead.  Also, the dhcpd_options variable must
X      be renamed dhcpd_flags if any.
X%%LDAP%%
X%%LDAP%%****  You have requested support for the LDAP configuration backend.
X%%LDAP%%      The OpenLDAP schema file is installed as %%SCHEMA_DIR%%/dhcp.schema.
X%%LDAP%%      See %%DOCSDIR%%/README.ldap for further LDAP configuration details.
45ff71dc21cd3c9436fc988d76205671
echo x - isc-dhcp41-server/pkg-plist
sed 's/^X//' >isc-dhcp41-server/pkg-plist << '56e5a5245aea56d57a7776f2fa5a1462'
X@comment $FreeBSD: ports/net/isc-dhcp40-server/pkg-plist,v 1.31 2006/08/25 12:02:58 sem Exp $
X@unexec %D/etc/rc.d/isc-dhcpd.sh forcestop 2>/dev/null || true
X@unexec %D/etc/rc.d/isc-dhcpd forcestop 2>/dev/null || true
Xbin/omshell
X%%LDAP%%bin/dhcpd-conf-to-ldap.pl
Xetc/dhcpd.conf.sample
Xsbin/dhcpd
X%%LDAP%%%%SCHEMA_DIR%%/dhcp.schema
X%%LDAP%%@dirrm %%SCHEMA_DIR%%
56e5a5245aea56d57a7776f2fa5a1462
echo x - isc-dhcp41-server/files/isc-dhcpd.in
sed 's/^X//' >isc-dhcp41-server/files/isc-dhcpd.in << 'f4d99acf558409df5c07ab1d09c3beb4'
X#!/bin/sh
X# $FreeBSD: ports/sysutils/smartmontools/files/smartd.in,v 1.1 2006/05/11 17:02:59 garga Exp $
X
X# PROVIDE: isc-dhcpd
X# REQUIRE: DAEMON
X# BEFORE: LOGIN
X# KEYWORD: shutdown
X
X# DO NOT CHANGE THESE DEFAULT VALUES HERE
X#
Xdhcpd_enable="${dhcpd_enable-NO}"
Xdhcpd_pidfile="/var/run/dhcpd.pid"
Xdhcpd_interfaces="${dhcpd_interfaces}"
Xdhcpd_leases="${dhcpd_leases-/var/db/dhcpd/dhcpd.leases}"
X
X. %%RC_SUBR%%
X
Xname="dhcpd"
Xrcvar=`set_rcvar`
Xcommand="%%PREFIX%%/sbin/dhcpd"
X
Xload_rc_config $name
X
X: ${dhcpd_config="%%PREFIX%%/etc/dhcpd.conf"}
X: ${dhcpd_interfaces=""}
X: ${dhcpd_leases="/var/db/dhcpd/dhcpd.leases"}
X: ${dhcpd_flags="-cf ${dhcpd_config} -lf ${dhcpd_leases} ${dhcpd_interfaces}"}
X
Xpidfile="${dhcpd_pidfile}"
Xrequired_files="${dhcpd_config}"
X
Xrun_rc_command "$1"
f4d99acf558409df5c07ab1d09c3beb4
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901141048.n0EAmEWi044698>