commit this three-month old patch that was posted to ports@ with no

response.  Does anyone out there use this port at all?  It was broken,
this unbreaks it by FAKEing it, but there's noone using it to test
it out....
This commit is contained in:
avsm 2001-01-09 20:49:33 +00:00
parent a848488691
commit a0882217cf
28 changed files with 149 additions and 278 deletions

View File

@ -1,42 +1,34 @@
# $OpenBSD: Makefile,v 1.10 2000/06/18 23:26:34 turan Exp $
BROKEN= Never update anything in /etc without asking the user first.
# $OpenBSD: Makefile,v 1.11 2001/01/09 20:49:33 avsm Exp $
DISTNAME= dhcp-1.4.0p3
PKGNAME= wide-dhcp-1.4.0.3
CATEGORIES= net
FAKE=No
MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/
DISTFILES= ${DISTNAME}.tar.gz
NEED_VERSION= 1.340
HOMEPAGE= http://www.sfc.wide.ad.jp/~tomy/dhcp/index-e.html
MAINTAINER= ports@openbsd.org
LICENSE_TYPE= BSD
PERMIT_PACKAGE_CDROM= YES
PERMIT_PACKAGE_FTP= YES
PERMIT_DISTFILES_CDROM= YES
PERMIT_DISTFILES_FTP= YES
MAKE_ENV= OSTYPE=`uname`
MAKE_FLAGS= OSTYPE=OpenBSD CC=${CC} CFLAGS="${CFLAGS} -g -Wall -I. -I${WRKBUILD}/server"
FAKE_FLAGS= ${MAKE_FLAGS} SBIN=${WRKINST}${PREFIX}/sbin MAN=${WRKINST}${PREFIX}/man LIBEXEC=${WRKINST}${PREFIX}/libexec
DOCS= README README.jis db_sample/intro.dhcp db_sample/intro.dhcp.jis
EXAMPLES= dhcpdb.pool dhcpdb.relay dhcpdb.server
post-install:
.if !defined(NOPORTDOCS)
@if [ ! -d ${PREFIX}/share/doc/dhcp ]; then \
mkdir -p ${PREFIX}/share/doc/dhcp; \
fi
@if [ ! -d ${PREFIX}/share/examples/dhcp ]; then \
mkdir -p ${PREFIX}/share/examples/dhcp; \
fi
@cp ${WRKSRC}/README ${PREFIX}/share/doc/dhcp/
@cp ${WRKSRC}/README.jis ${PREFIX}/share/doc/dhcp/
@cp ${WRKSRC}/db_sample/dhcpdb.pool ${PREFIX}/share/examples/dhcp/dhcpdb.pool.sample
@cp ${WRKSRC}/db_sample/dhcpdb.relay ${PREFIX}/share/examples/dhcp/dhcpdb.relay.sample
@cp ${WRKSRC}/db_sample/dhcpdb.server ${PREFIX}/share/examples/dhcp/dhcpdb.server.sample
@cp ${WRKSRC}/db_sample/intro.dhcp ${PREFIX}/share/doc/dhcp/
@cp ${WRKSRC}/db_sample/intro.dhcp.jis ${PREFIX}/share/doc/dhcp/
.endif
@echo "***"
@echo "*** Don't forget to enable kernel BPF support!"
@echo "***"
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/wide-dhcp
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/wide-dhcp
.for a in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/$a ${PREFIX}/share/doc/wide-dhcp
.endfor
.for i in ${EXAMPLES}
${INSTALL_DATA} ${WRKSRC}/db_sample/$i ${PREFIX}/share/examples/wide-dhcp
.endfor
.include <bsd.port.mk>

View File

@ -1,35 +0,0 @@
*** client/Makefile.OpenBSD.orig Wed Apr 29 15:32:20 1998
--- client/Makefile.OpenBSD Wed Apr 29 15:32:20 1998
***************
*** 0 ****
--- 1,30 ----
+ INCLUDE = ../server/dhcp.h dhcpc.h common.h ../server/common_subr.h dhcpc_subr.h
+ OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
+
+ CC = gcc
+ CFLAGS = -Wall -g -I. -I../server -DRETRY_FOREVER #-DDEBUG
+ #CC = cc
+ #CFLAGS = -g -I. -I../server -DRETRY_FOREVER #-DDEBUG
+ LDFLAGS = -lkvm
+
+ SBIN = /usr/local/sbin
+ LIBEXEC = /usr/local/libexec
+ MAN = /usr/local/man
+
+ dhcpc: ${OBJ}
+ ${CC} ${CFLAGS} -o dhcpc ${OBJ} ${LDFLAGS}
+
+ install: dhcpc
+ ${INSTALL} -m 755 -s dhcpc ${SBIN}/dhcpc
+ cp dhcpc.8 ${MAN}/man8/dhcpc.8
+ gzip ${MAN}/man8/dhcpc.8
+
+ clean:
+ rm -f *~ *.o *core* dhcpc
+
+ dhcpc.o: dhcpc.c config.h ${INCLUDE}
+ dhcpc_subr.o: dhcpc_subr.c ${INCLUDE}
+ common_subr.o: ../server/common_subr.c ../server/dhcp.h dhcpc.h common.h ../server/common_subr.h
+ ${CC} ${CFLAGS} -c ../server/common_subr.c
+ getmac.o: ../server/getmac.c
+ ${CC} ${CFLAGS} -c ../server/getmac.c

View File

@ -1,37 +0,0 @@
*** relay/Makefile.OpenBSD.orig Wed Apr 29 15:32:20 1998
--- relay/Makefile.OpenBSD Wed Apr 29 15:32:20 1998
***************
*** 0 ****
--- 1,32 ----
+ OBJ = relay.o getmac.o common_subr.o interface.o
+ CC = gcc
+ CFLAGS = -g -Wall -I. -I../server
+ #CC = cc
+ #CFLAGS = -g -I. -I../server
+ LDFLAGS = -lkvm
+ SBIN = /usr/local/sbin
+ LIBEXEC = /usr/local/libexec
+ MAN = /usr/local/man
+
+ relay: ${OBJ}
+ ${CC} ${CFLAGS} -o relay ${OBJ} ${LDFLAGS}
+
+ install: relay
+ ${INSTALL} -m 755 -s relay ${SBIN}/relay
+ cp relay.8 ${MAN}/man8/relay.8
+ gzip ${MAN}/man8/relay.8
+ cp dhcpdb.server.5 ${MAN}/man5/dhcpdb.server.5
+ gzip ${MAN}/man5/dhcpdb.server.5
+
+ relay.o: relay.c common.h ../server/dhcp.h ../server/common_subr.h
+ common_subr.o: ../server/common_subr.c ../server/dhcp.h common.h ../server/common_subr.h
+ ${CC} ${CFLAGS} -c ../server/common_subr.c
+
+ interface.o: ../server/interface.c common.h
+ ${CC} ${CFLAGS} -c ../server/interface.c
+
+ getmac.o: ../server/getmac.c
+ ${CC} ${CFLAGS} -c ../server/getmac.c
+
+ clean:
+ rm -f *~ *.o *core* relay

View File

@ -1,38 +0,0 @@
*** server/Makefile.OpenBSD.orig Wed Apr 29 15:32:20 1998
--- server/Makefile.OpenBSD Wed Apr 29 15:32:20 1998
***************
*** 0 ****
--- 1,33 ----
+ OBJ = dhcps.o database.o hash.o getmac.o common_subr.o \
+ interface.o delarp.o
+ LDFLAGS = -lkvm
+ CC = gcc
+ CFLAGS = -g -Wall -I. #-DCOMPAT_RFC1541 #-DNOICMPCHK
+ #CC = cc
+ #CFLAGS = -g -I. #-DCOMPAT_RFC1541 #-DNOICMPCHK
+ SBIN = /usr/local/sbin
+ LIBEXEC = /usr/local/libexec
+ MAN = /usr/local/man
+
+ dhcps: ${OBJ}
+ ${CC} ${CFLAGS} -o dhcps ${OBJ} ${LDFLAGS}
+
+ install: dhcps
+ ${INSTALL} -m 755 -s dhcps ${SBIN}/dhcps
+ tbl dhcpdb.pool.5 >${MAN}/man5/dhcpdb.pool.5
+ gzip ${MAN}/man5/dhcpdb.pool.5
+ cp dhcpdb.relay.5 ${MAN}/man5/dhcpdb.relay.5
+ gzip ${MAN}/man5/dhcpdb.relay.5
+ cp dhcps.8 ${MAN}/man8/dhcps.8
+ gzip ${MAN}/man8/dhcps.8
+
+ clean:
+ rm -f *~ *.o *core* dhcps
+
+ dhcps.o: dhcps.c dhcp.h common.h common_subr.h hash.h dhcps.h
+ database.o: database.c dhcp.h common.h hash.h database.h
+ hash.o: hash.c hash.h
+ getmac.o: getmac.c
+ common_subr.o: common_subr.c dhcp.h common.h common_subr.h
+ interface.o: interface.c common.h
+ delarp.o: delarp.c

View File

@ -1,23 +0,0 @@
*** tools/Makefile.OpenBSD.orig Wed Apr 29 15:32:21 1998
--- tools/Makefile.OpenBSD Wed Apr 29 15:32:21 1998
***************
*** 0 ****
--- 1,18 ----
+ CC = gcc
+ CFLAGS = -g -Wall -I. -I../server
+ #CC = cc
+ #CFLAGS = -g -I. -I../server
+ SBIN = /usr/local/sbin
+ LIBEXEC = /usr/local/libexec
+ MAN = /usr/local/man
+
+ dhcpm: dhcpm.c ../server/dhcp.h
+ $(CC) $(CFLAGS) dhcpm.c -o dhcpm
+
+ install: dhcpm
+ ${INSTALL} -m 755 -s dhcpm ${SBIN}/dhcpm
+ cp dhcpm.8 ${MAN}/man8/dhcpm.8
+ gzip ${MAN}/man8/dhcpm.8
+
+ clean:
+ rm -rf *~ *.o *core* dhcpm

View File

@ -0,0 +1,25 @@
--- client/Makefile.OpenBSD.orig Mon Nov 6 22:43:51 2000
+++ client/Makefile.OpenBSD Mon Nov 6 22:45:50 2000
@@ -0,0 +1,22 @@
+INCLUDE = ../server/dhcp.h dhcpc.h common.h ../server/common_subr.h dhcpc_subr.h
+OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
+
+COPTS = -DRETRY_FOREVER
+LDFLAGS = -lkvm
+
+dhcpc: ${OBJ}
+ ${CC} ${CFLAGS} ${COPTS} -o dhcpc ${OBJ} ${LDFLAGS}
+
+install: dhcpc
+ ${INSTALL} -m 755 -s dhcpc ${SBIN}/dhcpc
+ cp dhcpc.8 ${MAN}/man8/dhcpc.8
+
+clean:
+ rm -f *~ *.o *core* dhcpc
+
+dhcpc.o: dhcpc.c config.h ${INCLUDE}
+dhcpc_subr.o: dhcpc_subr.c ${INCLUDE}
+common_subr.o: ../server/common_subr.c ../server/dhcp.h dhcpc.h common.h ../server/common_subr.h
+ ${CC} ${CFLAGS} ${COPTS} -c ../server/common_subr.c
+getmac.o: ../server/getmac.c
+ ${CC} ${CFLAGS} ${COPTS} -c ../server/getmac.c

View File

@ -0,0 +1,26 @@
--- relay/Makefile.OpenBSD.orig Mon Nov 6 22:43:51 2000
+++ relay/Makefile.OpenBSD Mon Nov 6 22:50:10 2000
@@ -0,0 +1,23 @@
+OBJ = relay.o getmac.o common_subr.o interface.o
+LDFLAGS = -lkvm
+
+relay: ${OBJ}
+ ${CC} ${CFLAGS} -o relay ${OBJ} ${LDFLAGS}
+
+install: relay
+ ${INSTALL} -m 755 -s relay ${SBIN}/relay
+ cp relay.8 ${MAN}/man8/relay.8
+ cp dhcpdb.server.5 ${MAN}/man5/dhcpdb.server.5
+
+relay.o: relay.c common.h ../server/dhcp.h ../server/common_subr.h
+common_subr.o: ../server/common_subr.c ../server/dhcp.h common.h ../server/common_subr.h
+ ${CC} ${CFLAGS} -c ../server/common_subr.c
+
+interface.o: ../server/interface.c common.h
+ ${CC} ${CFLAGS} -c ../server/interface.c
+
+getmac.o: ../server/getmac.c
+ ${CC} ${CFLAGS} -c ../server/getmac.c
+
+clean:
+ rm -f *~ *.o *core* relay

View File

@ -0,0 +1,26 @@
--- server/Makefile.OpenBSD.orig Mon Nov 6 22:43:51 2000
+++ server/Makefile.OpenBSD Mon Nov 6 22:49:48 2000
@@ -0,0 +1,23 @@
+OBJ = dhcps.o database.o hash.o getmac.o common_subr.o \
+ interface.o delarp.o
+LDFLAGS = -lkvm
+
+dhcps: ${OBJ}
+ ${CC} ${CFLAGS} -o dhcps ${OBJ} ${LDFLAGS}
+
+install: dhcps
+ ${INSTALL} -m 755 -s dhcps ${SBIN}/dhcps
+ tbl dhcpdb.pool.5 >${MAN}/man5/dhcpdb.pool.5
+ cp dhcpdb.relay.5 ${MAN}/man5/dhcpdb.relay.5
+ cp dhcps.8 ${MAN}/man8/dhcps.8
+
+clean:
+ rm -f *~ *.o *core* dhcps
+
+dhcps.o: dhcps.c dhcp.h common.h common_subr.h hash.h dhcps.h
+database.o: database.c dhcp.h common.h hash.h database.h
+hash.o: hash.c hash.h
+getmac.o: getmac.c
+common_subr.o: common_subr.c dhcp.h common.h common_subr.h
+interface.o: interface.c common.h
+delarp.o: delarp.c

View File

@ -0,0 +1,12 @@
--- tools/Makefile.OpenBSD.orig Mon Nov 6 22:43:51 2000
+++ tools/Makefile.OpenBSD Mon Nov 6 22:48:39 2000
@@ -0,0 +1,9 @@
+dhcpm: dhcpm.c ../server/dhcp.h
+ $(CC) $(CFLAGS) dhcpm.c -o dhcpm
+
+install: dhcpm
+ ${INSTALL} -m 755 -s dhcpm ${SBIN}/dhcpm
+ cp dhcpm.8 ${MAN}/man8/dhcpm.8
+
+clean:
+ rm -rf *~ *.o *core* dhcpm

View File

@ -1 +1 @@
Dynamic Host Configuration Protocol, WIDE-Implementation
client and servers for the WIDE DHCP protocol

View File

@ -1,94 +1,13 @@
<< DHCP WIDE-Implementation, version 1.3 >>
This package is a distribution kit of DHCP WIDE-Implementation
version 1.3. DHCP (Dynamic Host Configuration Protocol) is a
protocol which provides informations to computer when it boots.
This release includes DHCP server, relay agent, and client.
October, 1995.
To use DHCP, your kernel must be rebuilt with the following line
added to your kernel config file, e.g. /usr/src/sys/conf/GENERIC
This package is a distribution kit of DHCP WIDE-Implementation
version 1.3. DHCP (Dynamic Host Configuration Protocol) is a
protocol which provides informations to computer when it boots.
This release includes DHCP server, relay agent, and client.
<License>
See "Copyright" included in this directory.
Also, portions of this software may fall under the copyrights which
are included the end of this file. These are included corresponded
source code files.
<Package>
You can get the latest version from;
ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/
------------------------------
** Attention for this ports file **
To use DHCP, your kernel must be rebuilt with the following
line added to your kernel config file (/sys/i386/conf/<YourMachine>):
pseudo-device bpfilter 4 #Berkeley packet filter
and make bpf devices in your /dev directory: /dev/bpf[1-3].
cd /dev
./MAKEDEV bpf1
./MAKEDEV bpf2
./MAKEDEV bpf3
** dhcpdb.relay file is need without relay agent **
Please read more information in
/usr/local/share/doc/dhcp/intro.dhcp or intro.dhcp.jis.
** CHECK_SUM Problem under FreeBSD 2.1.x **
This port collection is use tzfile.h from FreeBSD-current source
tree. Because this file is frequently changed, md5 check sum of
this file in files/md5 is ``IGNORE''.
If you use this port collection ***under FreeBSD 2.1-stable***:
2.1.0-RELEASE, 2.1.5-RELASE, 2.1.6-RELEASE, 2.1.7-RELEASE,
please use latest bsd.ports.mk and bsd.port.subdir.mk files in
/usr/share/mk or manually check checksum and delete files/md5
file.
** kernel dependence of package program files **
This compiled programs(packages) depends on kernel table as
ifconfig program.
So please use fit package to your FreeBSD (for example under
2.1.5-RELEASE, use packages-2.1.5, do not use packages-2.2) or
recompile from ports collection.
** additional function **
DHCP client(dhcpc) in this port is supported "dynamic change
/etc/resolv.conf and hostname via DHCP infomation".
o `-r' is recreate /etc/resolv.conf
(resolv.conf file is overwritten.)
o `-n' is reset HOSTNAME
** Acknowledgements to this ports file **
Special thanks to:
Hirotaka TAKETA<taketa@csk.co.jp>
Hajimu UMEMOTO<ume@calm.imasy.or.jp>
Tamotsu KANOH<kanoh@kanoh.iijnet.or.jp>
Junichi SATOH<junichi@astec.co.jp>
Hisashi HIRAMOTO<hiramoto@phys.chs.nihon-u.ac.jp>
Takeshi TAGUCHI<taguchi@tohoku.iij.ad.jp>
Keisuke INOUE<keisuke@aa.cs.keio.ac.jp>
- Yoshiro MIHIRA
(sanpei@yy.cs.keio.ac.jp)
- OpenBSD port by Oleg Safiullin
(form@vs.itam.nsc.ru)
OpenBSD port supersedes "dhcp-1.4.0p1.OpenBSD.patch" by KAMO Hiroyasu,
so you don't need to use it.
pseudo-device bpfilter 4 #Berkeley packet filter
and make bpf devices in your /dev directory: /dev/bpf[1-3].
WWW: ${HOMEPAGE}

15
net/wide-dhcp/pkg/MESSAGE Normal file
View File

@ -0,0 +1,15 @@
==============================================================
You may need to add these entries to your /etc/services file
to register the dhcp services:
dhcps 67/udp # dhcp server
dhcpc 68/udp # dhcp client
Also, ensure that BPF support is compiled into the kernel.
Examples and documentation are in:
${PREFIX}/share/doc/wide-dhcp , and
${PREFIX}/share/examples/wide-dhcp
==============================================================

View File

@ -1,33 +1,22 @@
@comment $OpenBSD: PLIST,v 1.3 2001/01/09 20:49:37 avsm Exp $
man/man5/dhcpdb.pool.5
man/man5/dhcpdb.relay.5
man/man5/dhcpdb.server.5
man/man8/dhcpc.8
man/man8/dhcpm.8
man/man8/dhcps.8
man/man8/relay.8
sbin/dhcpc
sbin/dhcpm
sbin/relay
sbin/dhcps
man/man8/dhcpc.8.gz
man/man8/relay.8.gz
man/man8/dhcps.8.gz
man/man8/dhcpm.8.gz
man/man5/dhcpdb.server.5.gz
man/man5/dhcpdb.pool.5.gz
man/man5/dhcpdb.relay.5.gz
share/doc/dhcp/README
share/doc/dhcp/README.jis
share/doc/dhcp/intro.dhcp
share/doc/dhcp/intro.dhcp.jis
@dirrm share/doc/dhcp
share/examples/dhcp/dhcpdb.pool.sample
share/examples/dhcp/dhcpdb.relay.sample
share/examples/dhcp/dhcpdb.server.sample
@dirrm share/examples/dhcp
@exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ; echo "dhcps 67/udp # dhcp server") > /etc/services
@exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ; echo "dhcpc 68/udp # dhcp client") > /etc/services
sbin/relay
share/doc/wide-dhcp/README
share/doc/wide-dhcp/README.jis
share/doc/wide-dhcp/intro.dhcp
share/doc/wide-dhcp/intro.dhcp.jis
share/examples/wide-dhcp/dhcpdb.pool
share/examples/wide-dhcp/dhcpdb.relay
share/examples/wide-dhcp/dhcpdb.server
@dirrm share/examples/wide-dhcp
@dirrm share/doc/wide-dhcp
@exec touch -f /var/db/dhcpdb.bind
@exec echo "***"
@exec echo "*** Don't forget to enable kernel BPF support!"
@exec echo "***"
@unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ) > /etc/services
@unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ) > /etc/services
@unexec rm -f /var/db/dhcp_cache /var/db/dhcpdb.bind*
@unexec echo "***"
@unexec echo "*** Remove /etc/dhcpdb.pool and /etc/dhcpdb.relay manually"
@unexec echo "*** to complete uninstallation."
@unexec echo "***"