svn commit: r384496 - in head/net/pwhois: . files
Ryan Steinmetz
zi at FreeBSD.org
Wed Apr 22 16:07:54 UTC 2015
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 <bsd.port.mk>
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
More information about the svn-ports-all
mailing list