From owner-svn-ports-all@FreeBSD.ORG Wed Apr 22 16:07:54 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EDEF1EB; Wed, 22 Apr 2015 16:07:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8129A12FF; Wed, 22 Apr 2015 16:07:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MG7smV007432; Wed, 22 Apr 2015 16:07:54 GMT (envelope-from zi@FreeBSD.org) Received: (from zi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MG7q64007415; Wed, 22 Apr 2015 16:07:52 GMT (envelope-from zi@FreeBSD.org) Message-Id: <201504221607.t3MG7q64007415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zi set sender to zi@FreeBSD.org using -f From: Ryan Steinmetz Date: Wed, 22 Apr 2015 16:07:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384496 - in head/net/pwhois: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 16:07:54 -0000 Author: zi Date: Wed Apr 22 16:07:52 2015 New Revision: 384496 URL: https://svnweb.freebsd.org/changeset/ports/384496 Log: - Add missing pwdump tool - Fix timeout in updater script - Silence warnings in updater script - Fix periodic script - Fix default directory permissions - Bump PORTREVISION Added: head/net/pwhois/files/patch-pwhois-updatedb (contents, props changed) Modified: head/net/pwhois/Makefile head/net/pwhois/files/512.pwhois-updatedb.in head/net/pwhois/files/pkg-message.in head/net/pwhois/files/pwhoisd.in head/net/pwhois/pkg-plist Modified: head/net/pwhois/Makefile ============================================================================== --- head/net/pwhois/Makefile Wed Apr 22 15:46:01 2015 (r384495) +++ head/net/pwhois/Makefile Wed Apr 22 16:07:52 2015 (r384496) @@ -3,7 +3,7 @@ PORTNAME= pwhois PORTVERSION= 2.2.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://pwhois.org/get/ \ http://mirrors.rit.edu/zi/ @@ -51,12 +51,14 @@ do-install: @${INSTALL_SCRIPT} ${WRKDIR}/512.pwhois-updatedb \ ${STAGEDIR}${PREFIX}/etc/periodic/daily/ @${INSTALL_PROGRAM} ${WRKSRC}/pwhoisd ${STAGEDIR}${PREFIX}/sbin/ + @${INSTALL_PROGRAM} ${WRKSRC}/pwhois-pwdump ${STAGEDIR}${PREFIX}/bin/ @${INSTALL_SCRIPT} ${WRKSRC}/pwhois-updatedb ${STAGEDIR}${PREFIX}/sbin/ @${INSTALL_DATA} ${WRKSRC}/pwhoisd.conf \ ${STAGEDIR}${ETCDIR}/pwhoisd.conf.sample @${INSTALL_DATA} ${WRKSRC}/mysql/createdb.sql ${STAGEDIR}${DATADIR}/ post-install: - @${MKDIR} ${STAGEDIR}/var/db/pwhois ${STAGEDIR}/var/log/pwhois + @${INSTALL} -d -o 512 -g 512 ${STAGEDIR}/var/db/pwhois + @${INSTALL} -d -o 512 -g 512 ${STAGEDIR}/var/log/pwhois .include Modified: head/net/pwhois/files/512.pwhois-updatedb.in ============================================================================== --- head/net/pwhois/files/512.pwhois-updatedb.in Wed Apr 22 15:46:01 2015 (r384495) +++ head/net/pwhois/files/512.pwhois-updatedb.in Wed Apr 22 16:07:52 2015 (r384496) @@ -10,11 +10,12 @@ fi rc=0 -case "${daily_pwhois-updatedb_enable:-YES}" in +case "${daily_pwhois_updatedb_enable:-YES}" in [Nn][Oo]) ;; - *) - [ -x %%PREFIX%%/sbin/pwhois-updatedb ] && %%PREFIX%%/sbin/pwhois-updatedb 1>/dev/null + [Yy][Ee][Ss]) + rm /tmp/.pwhois-updatedb.LCK + su -fm pwhois -c 'lockf -t0 /tmp/.pwhois-updatedb.lock %%PREFIX%%/sbin/pwhois-updatedb' 1>/dev/null ;; esac Added: head/net/pwhois/files/patch-pwhois-updatedb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/pwhois/files/patch-pwhois-updatedb Wed Apr 22 16:07:52 2015 (r384496) @@ -0,0 +1,38 @@ +--- pwhois-updatedb.orig 2013-10-08 18:59:42 UTC ++++ pwhois-updatedb +@@ -975,7 +975,7 @@ sub connect + my $passwd = shift; + + +- my $session = Net::Telnet->new(timeout => 10, ++ my $session = Net::Telnet->new(timeout => 300, + telnetmode=>0, + cmd_remove_mode => 1 + ); +@@ -3133,7 +3133,7 @@ sub readMRTdump + + @st = stat($fd); + +- if(!defined(@st)) ++ if(!@st) + { + $errcode = -2; + } +@@ -3763,7 +3763,7 @@ sub parseOrganisationObject + + #printMap(%obj); + +- return -$numlines if(!(defined($orgId) && defined($orgName) && defined(@addrs))); ++ return -$numlines if(!(defined($orgId) && defined($orgName) && (@addrs))); + + $country = "" if(!defined($country)); + $country = substr(normalizeValue($country), 0, $fields_length{'organization.country'}); +@@ -4035,7 +4035,7 @@ sub parsePersonObject + #printMap(%obj); + + $source = 0 if(!defined($source)); +- return -$numlines if(!(defined($person) && defined(@addrs) && defined($officePhone) && ++ return -$numlines if(!(defined($person) && (@addrs) && defined($officePhone) && + defined($mailbox) && defined($pocHandle) && defined($source))); + + for($j1 = 0; $j1 < 6; $j1++){ Modified: head/net/pwhois/files/pkg-message.in ============================================================================== --- head/net/pwhois/files/pkg-message.in Wed Apr 22 15:46:01 2015 (r384495) +++ head/net/pwhois/files/pkg-message.in Wed Apr 22 16:07:52 2015 (r384496) @@ -21,4 +21,4 @@ pwhoisd_enable="YES" service pwhoisd start 6. To enable daily updates, edit /etc/periodic.conf and add: -daily_pwhois-updatedb_enable="YES" +daily_pwhois_updatedb_enable="YES" Modified: head/net/pwhois/files/pwhoisd.in ============================================================================== --- head/net/pwhois/files/pwhoisd.in Wed Apr 22 15:46:01 2015 (r384495) +++ head/net/pwhois/files/pwhoisd.in Wed Apr 22 16:07:52 2015 (r384496) @@ -33,8 +33,8 @@ stop_postcmd=pwhoisd_cleanup pwhoisd_precmd() { [ ! -f $pidfile ] && %%TOUCH%% $pidfile && %%CHOWN%% %%USER%%:%%GROUP%% $pidfile - [ ! -d $_dbdir ] && %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_dbdir - [ ! -d $_logdir ] && %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_logdir + %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_dbdir + %%INSTALL%% -d -o %%USER%% -g %%GROUP%% $_logdir return 0 } Modified: head/net/pwhois/pkg-plist ============================================================================== --- head/net/pwhois/pkg-plist Wed Apr 22 15:46:01 2015 (r384495) +++ head/net/pwhois/pkg-plist Wed Apr 22 16:07:52 2015 (r384496) @@ -1,3 +1,4 @@ +bin/pwhois-pwdump etc/periodic/daily/512.pwhois-updatedb sbin/pwhois-updatedb sbin/pwhoisd