Update to rbldnsd-0.997a

- update MASTER_SITES
- regen patch
- setup chroot by default
- add rc script
- add README describing how to use it

help and feedback from sthen@ and ajacoutot@, thanks!

ok sthen
This commit is contained in:
william 2013-10-15 01:18:00 +00:00
parent 4c2dda1a1b
commit 68a3e4d86b
6 changed files with 61 additions and 15 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.6 2013/03/11 11:35:56 espie Exp $
# $OpenBSD: Makefile,v 1.7 2013/10/15 01:18:00 william Exp $
COMMENT= small daemon for DNSBLs
DISTNAME= rbldnsd_0.996b
PKGNAME= ${DISTNAME:S/_/-/}
DISTNAME= rbldnsd-0.997a
CATEGORIES= net
HOMEPAGE= http://www.corpit.ru/mjt/rbldnsd.html
@ -15,11 +14,12 @@ PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c z
MASTER_SITES= http://www.corpit.ru/mjt/rbldnsd/ \
http://openbsd.rutgers.edu/
MASTER_SITES= http://www.corpit.ru/mjt/rbldnsd/
CONFIGURE_STYLE=simple
WRKDIST= ${WRKDIR}/${DISTNAME:S/rbldnsd_/rbldnsd-/}
RBLDNSD_BASE= ${VARBASE}/rbldnsd
SUBST_VARS= VARBASE RBLDNSD_BASE
NO_TEST= Yes

View File

@ -1,5 +1,2 @@
MD5 (rbldnsd_0.996b.tar.gz) = mg8m87M3ZMMlqWvUxhsm+g==
RMD160 (rbldnsd_0.996b.tar.gz) = Fb5Yj7QFHwUmCEQltYbqeYa2STo=
SHA1 (rbldnsd_0.996b.tar.gz) = nP5s8BxUCIzsw6ApAsch7nFPHCg=
SHA256 (rbldnsd_0.996b.tar.gz) = R1r+W+hymna3wj4vPVzhx3N3UUBAali/t0d/rFpSg0I=
SIZE (rbldnsd_0.996b.tar.gz) = 113128
SHA256 (rbldnsd-0.997a.tar.gz) = nBfGveaZUFggSmaAVEQDnTFSOn1O9AzsBZ5QWgiCqO8=
SIZE (rbldnsd-0.997a.tar.gz) = 144771

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-rbldnsd_c,v 1.3 2012/04/21 14:57:49 gonzalo Exp $
--- rbldnsd.c.orig Fri Nov 24 13:35:28 2006
+++ rbldnsd.c Mon Apr 9 15:56:44 2012
@@ -529,7 +529,7 @@ break;
$OpenBSD: patch-rbldnsd_c,v 1.4 2013/10/15 01:18:01 william Exp $
--- rbldnsd.c.orig Sat Apr 6 12:28:53 2013
+++ rbldnsd.c Mon Oct 7 16:47:34 2013
@@ -530,7 +530,7 @@ break;
#endif
if (!user && !(uid = getuid()))

View File

@ -1,5 +1,14 @@
@comment $OpenBSD: PLIST,v 1.2 2012/04/21 14:57:49 gonzalo Exp $
@comment $OpenBSD: PLIST,v 1.3 2013/10/15 01:18:01 william Exp $
@newgroup _rbldns:561
@newuser _rbldns:561:_rbldns:daemon:rbldns Account:/nonexistent:/sbin/nologin
@man man/man8/rbldnsd.8
@bin sbin/rbldnsd
@sample ${RBLDNSD_BASE}/
@sample ${RBLDNSD_BASE}/etc/
@owner _rbldns
@group _rbldns
@sample ${RBLDNSD_BASE}/var/
@owner
@group
share/doc/pkg-readmes/${FULLPKGNAME}
@rcscript ${RCDIR}/rbldnsd

29
net/rbldnsd/pkg/README Normal file
View File

@ -0,0 +1,29 @@
$Id: README,v 1.1 2013/10/15 01:18:01 william Exp $
+-----------------------------------------------------------------------
| Running ${FULLPKGNAME} on OpenBSD
+-----------------------------------------------------------------------
rbldnsd runs chrooted
=====================
By default, the rbldnsd package will chroot to ${VARBASE}/rbldnsd, and the
package will create two subdirectories underneath:
${VARBASE}/rbldnsd/ # rbldnsd chroot path
${VARBASE}/rbldnsd/etc/ # zonefiles
${VARBASE}/rbldnsd/var/ # scratch/work (-w) directory
Because of the chroot(), all paths given to rbldnsd are relative to
to the chroot path (${VARBASE}/rbldnsd). Thus, with this line in
/etc/rc.conf.local:
rbldnsd_flags="-b 127.0.0.1/53 rbl.invalid:ip4tset:/etc/rbl.invalid.zone"
rbldnsd will load the "rbl.invalid" zone from
${VARBASE}/rbldnsd/etc/rbl.invalid.zone and do any processing in
${VARBASE}/rbldnsd/var/
Note that rbldnsd will refuse to start if you do not supply the "-b"
option and an "IP address <forward slash> port number" argument for
binding, as shown above.

View File

@ -0,0 +1,11 @@
#!/bin/sh
#
# $OpenBSD: rbldnsd.rc,v 1.1 2013/10/15 01:18:01 william Exp $
daemon="${TRUEPREFIX}/sbin/rbldnsd -r ${RBLDNSD_BASE} -w var"
. /etc/rc.d/rc.subr
pexp="rbldnsd -r ${RBLDNSD_BASE} -w var${daemon_flags:+ ${daemon_flags}}"
rc_cmd $1