diff options
author | Ashish SHUKLA <ashish@FreeBSD.org> | 2010-09-01 07:15:59 +0000 |
---|---|---|
committer | Ashish SHUKLA <ashish@FreeBSD.org> | 2010-09-01 07:15:59 +0000 |
commit | 9092473c3cc385bf73f9af5e956a40fdc8825bc0 (patch) | |
tree | 3842206622fb6de3a4bdaec7e281b4562f8aee11 | |
parent | 3b5d3072532f2611ed8e51cdd7fc0bab288eba3b (diff) | |
download | ports-9092473c3cc385bf73f9af5e956a40fdc8825bc0.tar.gz ports-9092473c3cc385bf73f9af5e956a40fdc8825bc0.zip |
Notes
-rw-r--r-- | dns/Makefile | 1 | ||||
-rw-r--r-- | dns/dnscheckengine/Makefile | 104 | ||||
-rw-r--r-- | dns/dnscheckengine/distinfo | 3 | ||||
-rw-r--r-- | dns/dnscheckengine/files/patch-apps-dnscheck-dispatcher.pl | 78 | ||||
-rw-r--r-- | dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh | 14 | ||||
-rw-r--r-- | dns/dnscheckengine/files/pkg-deinstall.in | 20 | ||||
-rw-r--r-- | dns/dnscheckengine/files/pkg-install.in | 18 | ||||
-rw-r--r-- | dns/dnscheckengine/files/pkg-message.in | 34 | ||||
-rw-r--r-- | dns/dnscheckengine/pkg-descr | 6 | ||||
-rw-r--r-- | dns/dnscheckengine/pkg-plist | 40 |
10 files changed, 318 insertions, 0 deletions
diff --git a/dns/Makefile b/dns/Makefile index 81bd36562523..b36b81216cfd 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -31,6 +31,7 @@ SUBDIR += dns_mre SUBDIR += dnscap SUBDIR += dnscheck + SUBDIR += dnscheckengine SUBDIR += dnsdoctor SUBDIR += dnsflood SUBDIR += dnshijacker diff --git a/dns/dnscheckengine/Makefile b/dns/dnscheckengine/Makefile new file mode 100644 index 000000000000..6b13e79ee99c --- /dev/null +++ b/dns/dnscheckengine/Makefile @@ -0,0 +1,104 @@ +# New ports collection makefile for: dnscheckengine +# Date created: 28 July 2010 +# Whom: dnscheckengine-port@academ.com (Stan Barber) +# +# $FreeBSD$ +# + +PORTNAME= dnscheckengine +PORTVERSION= 1.1 +CATEGORIES= dns perl5 +MASTER_SITES= http://opensource.iis.se/pub/dnscheck/ \ + ftp://www.ns.gen.tx.us/pub/software/dnscheck-se/ +DISTNAME= DNSCheck-1.1 + +MAINTAINER= dnscheckengine-port@academ.com +COMMENT= DNS checker from the folks that run the .SE top level domain + +BUILD_DEPENDS= p5-Crypt-OpenSSL-Random>=0:${PORTSDIR}/security/p5-Crypt-OpenSSL-Random \ + p5-Digest-BubbleBabble>=0:${PORTSDIR}/security/p5-Digest-BubbleBabble \ + p5-Digest-SHA1>=0:${PORTSDIR}/security/p5-Digest-SHA1 \ + p5-IO-Socket-INET6>=2.51:${PORTSDIR}/net/p5-IO-Socket-INET6 \ + p5-Net-DNS>=0.65:${PORTSDIR}/dns/p5-Net-DNS \ + p5-Net-DNS-SEC>=0.15:${PORTSDIR}/dns/p5-Net-DNS-SEC \ + p5-Socket6>=0.19:${PORTSDIR}/net/p5-Socket6 \ + p5-Sys-Syslog>=0:${PORTSDIR}/sysutils/p5-Sys-Syslog \ + p5-Time-HiRes>=0:${PORTSDIR}/devel/p5-Time-HiRes \ + p5-YAML>=0:${PORTSDIR}/textproc/p5-YAML \ + p5-Text-Template>=0:${PORTSDIR}/textproc/p5-Text-Template \ + p5-Mail-RFC822-Address>=0:${PORTSDIR}/mail/p5-Mail-RFC822-Address \ + p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite + +PERL_CONFIGURE= yes +CONFIGURE_SCRIPT+= Makefile.PL INSTALLSITESCRIPT=${PREFIX}/libexec/dnscheck + +WRKSRC= ${WRKDIR}/engine +# +DOCSDIR= ${PREFIX}/share/doc/DNSCheck +DOCS= data-flow-batch.png DNSCheck.graffle data-flow-web.png call-flow.png database-schema.pdf +DOCSDB= indexes.sql schema.sql drop.sql +PORTDOCS= ${DOCS} db +SUB_FILES= pkg-install pkg-deinstall pkg-message + +OPTIONS= MYSQL "Add MySQL Support (needed for webgui)" off + +.include <bsd.port.options.mk> + +.if defined(WITH_MYSQL) +BUILD_DEPENDS+= p5-DBI>=0:${PORTSDIR}/databases/p5-DBI +RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql +USE_MYSQL= yes +.endif + +MAN1= dnscheck-zonediff.1 \ + dnscheck-dispatcher.1 \ + dnscheck-preflight.1 \ + dnscheck-hostsyntax.1 \ + dnscheck.1 \ + dnscheck-12hourmailer.1 + +MAN3= DNSCheck::Test::Nameserver.3 \ + DNSCheck::Config.3 \ + DNSCheck.3 \ + DNSCheck::Lookup::DNS.3 \ + DNSCheck::Test::Consistency.3 \ + DNSCheck::Test::Host.3 \ + DNSCheck::Test::Connectivity.3 \ + DNSCheck::Overview.3 \ + DNSCheck::Test::Address.3 \ + DNSCheck::Test::DNSSEC.3 \ + DNSCheck::Test::SMTP.3 \ + DNSCheck::Lookup::ASN.3 \ + DNSCheck::Test::Zone.3 \ + DNSCheck::Logger.3 \ + DNSCheck::Test::Common.3 \ + DNSCheck::Test::Delegation.3 \ + DNSCheck::Test::SOA.3 \ + DNSCheck::Lookup::Resolver.3 \ + DNSCheck::Test::Mail.3 + +MANCOMPRESSED= no + +post-patch: + @${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \ + -e 's,%%PREFIX%%,${PREFIX},g' + +pre-install: + -@${FIND} ${WRKSRC} -name \*.orig -delete + +post-install: +.if defined(WITH_MYSQL) +# install startup script (if WITH_MYSQL is defined) + @${INSTALL_SCRIPT} ${WRKSRC}/contrib/dnscheck-dispatcher.sh \ + ${PREFIX}/etc/rc.d/dnscheck-dispatcher +.endif + @PKG_PREFIX=${PREFIX} BATCH=${BATCH} SU_CMD="${SU_CMD}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} ${DOCSDIR}/db + @${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR} + @${INSTALL_DATA} '${WRKSRC}/doc/DNSCheck Lib Descriptions.pdf' ${DOCSDIR} + @${INSTALL_DATA} ${DOCSDB:S|^|${WRKSRC}/db/|} ${DOCSDIR}/db + +.endif + @${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE} +.include <bsd.port.mk> diff --git a/dns/dnscheckengine/distinfo b/dns/dnscheckengine/distinfo new file mode 100644 index 000000000000..a3a4ea7d6018 --- /dev/null +++ b/dns/dnscheckengine/distinfo @@ -0,0 +1,3 @@ +MD5 (DNSCheck-1.1.tar.gz) = a2ab54833e7aae696d5b716028de2ce0 +SHA256 (DNSCheck-1.1.tar.gz) = 456fcb885ca7fd2de7219295988975cd0d311622d73cd112505fba132fe6194e +SIZE (DNSCheck-1.1.tar.gz) = 427599 diff --git a/dns/dnscheckengine/files/patch-apps-dnscheck-dispatcher.pl b/dns/dnscheckengine/files/patch-apps-dnscheck-dispatcher.pl new file mode 100644 index 000000000000..2af75b6c9d77 --- /dev/null +++ b/dns/dnscheckengine/files/patch-apps-dnscheck-dispatcher.pl @@ -0,0 +1,78 @@ +*** apps/dnscheck-dispatcher.pl Tue Jun 29 04:15:59 2010 +--- apps/dnscheck-dispatcher.pl Sun Jul 4 19:22:42 2010 +*************** +*** 43,49 **** + %running + %reaped + %problem +! $debug + $verbose + $check + $limit +--- 43,49 ---- + %running + %reaped + %problem +! $user + $verbose + $check + $limit +*************** +*** 54,59 **** +--- 54,60 ---- + $exit_timeout + $savelevel + %levels ++ $debug + ]; + + %running = (); +*************** +*** 75,81 **** + ERROR => 4, + CRITICAL => 5, + ); +! + # Kick everything off + main(); + +--- 76,83 ---- + ERROR => 4, + CRITICAL => 5, + ); +! # user to run as +! $user = 'nobody'; + # Kick everything off + main(); + +*************** +*** 124,130 **** + sub setup { + my $errfile = $check->config->get("daemon")->{errorlog}; + my $pidfile = $check->config->get("daemon")->{pidfile}; +! + @saved_argv = @ARGV; # We'll use this if we're asked to restart ourselves + GetOptions('debug' => \$debug, 'verbose' => \$verbose); + openlog($check->config->get("syslog")->{ident}, +--- 126,135 ---- + sub setup { + my $errfile = $check->config->get("daemon")->{errorlog}; + my $pidfile = $check->config->get("daemon")->{pidfile}; +! my $uid; +! unless ($uid = (getpwnam($user))[2]) { +! die "Attempt to run dispatcher as non-existent user or as root\n"; +! } + @saved_argv = @ARGV; # We'll use this if we're asked to restart ourselves + GetOptions('debug' => \$debug, 'verbose' => \$verbose); + openlog($check->config->get("syslog")->{ident}, +*************** +*** 149,154 **** +--- 154,161 ---- + open PIDFILE, '>', $pidfile or die "Failed to open PID file: $!"; + print PIDFILE $$; + close PIDFILE; ++ # become non-root ++ $>= $uid; + $SIG{CHLD} = \&REAPER; + $SIG{TERM} = sub { $running = 0 }; + $SIG{HUP} = sub { diff --git a/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh b/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh new file mode 100644 index 000000000000..5aa9989f5e45 --- /dev/null +++ b/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- contrib/dnscheck-dispatcher.sh.orig ++++ contrib/dnscheck-dispatcher.sh +@@ -20,7 +20,7 @@ + + name="dnscheck_dispatcher" + rcvar=`set_rcvar` +-command="/usr/local/bin/dnscheck-dispatcher" ++command="%%PREFIX%%/libexec/dnscheck/dnscheck-dispatcher" + + pidfile="${utility_pidfile}" + diff --git a/dns/dnscheckengine/files/pkg-deinstall.in b/dns/dnscheckengine/files/pkg-deinstall.in new file mode 100644 index 000000000000..37490ab0c1f0 --- /dev/null +++ b/dns/dnscheckengine/files/pkg-deinstall.in @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PKG_PREFIX=${PKG_PREFIX:-%%PREFIX%%} + + +if [ "$2" != "DEINSTALL" ]; then + exit 0 +fi +if [ -f ${PKG_PREFIX}/etc/rc.d/dnscheck-dispatcher ]; then + echo '===> Stopping dnscheck dispatcher if it is running' + ${PKG_PREFIX}/etc/rc.d/dnscheck-dispatcher stop >/dev/null 2>/dev/null + echo '===> Removing startup script for dnscheck dispatcher' + rm -f ${PKG_PREFIX}/etc/rc.d/dnscheck-dispatcher stop +fi + + +exit 0 diff --git a/dns/dnscheckengine/files/pkg-install.in b/dns/dnscheckengine/files/pkg-install.in new file mode 100644 index 000000000000..a12a15b40d9e --- /dev/null +++ b/dns/dnscheckengine/files/pkg-install.in @@ -0,0 +1,18 @@ +#!/bin/sh +# $FreeBSD$ +# + +PKG_PREFIX=${PKG_PREFIX:-%%PREFIX%%} + +if [ "$2" = "POST-INSTALL" ];then + +if [ -f ${PKG_PREFIX}/etc/rc.d/dnscheck-dispatcher ]; then + echo '***Please add dns_dispatcher_enable="YES" to /etc/rc.conf to enable dnscheck-se-dispatcher to run at startup.***' + chmod +x ${PKG_PREFIX}/etc/rc.d/dnscheck-dispatcher + fi +# install a link to put the dnscheck engine into the regular $PATH for more users + +ln -s ${PKG_PREFIX}/libexec/dnscheck/dnscheck ${PKG_PREFIX}/bin/dnscheckengine + +fi +exit 0 diff --git a/dns/dnscheckengine/files/pkg-message.in b/dns/dnscheckengine/files/pkg-message.in new file mode 100644 index 000000000000..93b92f2b4f73 --- /dev/null +++ b/dns/dnscheckengine/files/pkg-message.in @@ -0,0 +1,34 @@ +************************************************************************* +* _ _____ _____ _____ _ _ _____ ___ ___ _ _ * +* / \|_ _|_ _| ____| \ | |_ _|_ _/ _ \| \ | | * +* / _ \ | | | | | _| | \| | | | | | | | | \| | * +* / ___ \| | | | | |___| |\ | | | | | |_| | |\ | * +* /_/ \_\_| |_| |_____|_| \_| |_| |___\___/|_| \_| * +* * +************************************************************************* + +The DNSCheck software included in the port is the PERL-based engine and +includes a command line utility that uses that engine in %%PREFIX%%/bin +called dnscheckengine. There is some other software that is included +that the developers at the .SE registry use to manage the process by +which they do domain delegation. These generally require MYSQL support +to work and are disabled by default. If you want to learn more about them, +they are all PERL-based and have integrated perldoc information. However, +I have not tested them extensively and can't advise on their suitability as of +this writing. All the scripts install into %%PREFIX%%/libexec/dnscheck. + +This port also installs some documentation in %%DOCSDIR%% +that may prove useful. + +There is also a webui that is available as an alternative frontend. I hope +to include it in a future port. + +If you have questions about the basic software, please see the developer's +web site at http://opensource.iis.se/dnscheck. If there is a problem with +the port, please let me know at dnscheckengine-port@academ.com. + +Stan Barber +Academ Consulting Services +http://www.stanbarber.com +http://www.academ.com + diff --git a/dns/dnscheckengine/pkg-descr b/dns/dnscheckengine/pkg-descr new file mode 100644 index 000000000000..cdab27fa5d81 --- /dev/null +++ b/dns/dnscheckengine/pkg-descr @@ -0,0 +1,6 @@ +DNSCheck is a program that is designed to help people check, measure and +hopefully also understand the workings of the Domain Name System. When used to +check an domain (aka zone) is submitted to DNSCheck, it will investigate the +general health by performing various tests and sanity checks. + +WWW: http://dnscheck.iis.se/ diff --git a/dns/dnscheckengine/pkg-plist b/dns/dnscheckengine/pkg-plist new file mode 100644 index 000000000000..174698c71fa0 --- /dev/null +++ b/dns/dnscheckengine/pkg-plist @@ -0,0 +1,40 @@ +libexec/dnscheck/dnscheck +libexec/dnscheck/dnscheck-12hourmailer +libexec/dnscheck/dnscheck-dispatcher +libexec/dnscheck/dnscheck-hostsyntax +libexec/dnscheck/dnscheck-preflight +libexec/dnscheck/dnscheck-zonediff +@dirrm libexec/dnscheck +bin/dnscheckengine +%%PORTDOCS%%%%DOCSDIR%%/DNSCheck Lib Descriptions.pdf +%%SITE_PERL%%/DNSCheck.pm +%%SITE_PERL%%/DNSCheck/Test/Address.pm +%%SITE_PERL%%/DNSCheck/Test/Consistency.pm +%%SITE_PERL%%/DNSCheck/Test/Host.pm +%%SITE_PERL%%/DNSCheck/Test/SMTP.pm +%%SITE_PERL%%/DNSCheck/Test/Common.pm +%%SITE_PERL%%/DNSCheck/Test/DNSSEC.pm +%%SITE_PERL%%/DNSCheck/Test/Mail.pm +%%SITE_PERL%%/DNSCheck/Test/SOA.pm +%%SITE_PERL%%/DNSCheck/Test/Connectivity.pm +%%SITE_PERL%%/DNSCheck/Test/Delegation.pm +%%SITE_PERL%%/DNSCheck/Test/Nameserver.pm +%%SITE_PERL%%/DNSCheck/Test/Zone.pm +%%SITE_PERL%%/DNSCheck/Config.pm +%%SITE_PERL%%/DNSCheck/Logger.pm +%%SITE_PERL%%/DNSCheck/Locale.pm +%%SITE_PERL%%/DNSCheck/Overview.pod +%%SITE_PERL%%/DNSCheck/Lookup/ASN.pm +%%SITE_PERL%%/DNSCheck/Lookup/DNS.pm +%%SITE_PERL%%/DNSCheck/Lookup/Resolver.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/DNSCheck/.packlist +@dirrm %%SITE_PERL%%/DNSCheck/Test +@dirrm %%SITE_PERL%%/DNSCheck/Lookup +@dirrm %%SITE_PERL%%/DNSCheck +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/DNSCheck +share/dnscheck/locale/en.yaml +share/dnscheck/locale/sv.yaml +share/dnscheck/config.yaml +share/dnscheck/policy.yaml +@dirrmtry share/dnscheck/locale +@dirrmtry share/dnscheck |