pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/qmqtool Update to 1.14. From the changelog:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cdf4402bf924
branches:  trunk
changeset: 635302:cdf4402bf924
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Mon Jun 02 14:09:20 2014 +0000

description:
Update to 1.14. From the changelog:

* changed english and added Total on qmqtool -s
* added more stats with qmqtool -s -V
* modified some regexs to be arithmetic instead
* changed string finding code:
  increased speed
  removed fallback routine
  use grep -E (egrep) when /pattern/ is used
  support case insensitive search with /pattern/i
* rely on PATH instead of statically searching
* improved queue consistency check
* -[lRTLx] /displays/ calculated size
* added -x feature for extended information on a message
* created ./configure ; make ; make install process
  (even though we're just a light perl script)

diffstat:

 mail/qmqtool/Makefile         |  38 ++++++++++++----------
 mail/qmqtool/PLIST            |   3 +-
 mail/qmqtool/distinfo         |  10 +++---
 mail/qmqtool/patches/patch-aa |  70 ++++++++++++++++++++++--------------------
 4 files changed, 64 insertions(+), 57 deletions(-)

diffs (184 lines):

diff -r 1118838a968a -r cdf4402bf924 mail/qmqtool/Makefile
--- a/mail/qmqtool/Makefile     Mon Jun 02 13:27:08 2014 +0000
+++ b/mail/qmqtool/Makefile     Mon Jun 02 14:09:20 2014 +0000
@@ -1,40 +1,44 @@
-# $NetBSD: Makefile,v 1.8 2014/05/29 23:36:51 wiz Exp $
+# $NetBSD: Makefile,v 1.9 2014/06/02 14:09:20 schmonz Exp $
 #
 
-DISTNAME=      qmqtool-current
-PKGNAME=       ${DISTNAME:S/-current/-1.13/}
-PKGREVISION=   3
+DISTNAME=      qmqtool-1.14
 CATEGORIES=    mail
-MASTER_SITES=  ${HOMEPAGE}
+MASTER_SITES=  ${HOMEPAGE}/files/
 EXTRACT_SUFX=  .tgz
 
 MAINTAINER=    schmonz%NetBSD.org@localhost
 HOMEPAGE=      http://jeremy.kister.net/code/qmqtool/
 COMMENT=       View and safely modify qmail queue
+LICENSE=       artistic
 
 WRKSRC=                ${WRKDIR}/${PKGNAME_NOREV}
 USE_LANGUAGES= # none
 USE_TOOLS+=    perl:run
-NO_BUILD=      yes
-REPLACE_PERL=  qmqtool
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+=--prefix=${PREFIX:Q}
+CONFIGURE_ARGS+=--mandir=${PREFIX:Q}/${PKGMANDIR:Q}
+CONFIGURE_ARGS+=--perl=${PERL5:Q}
+CONFIGURE_ARGS+=--qmaildir=${QMAILDIR:Q}
+CONFIGURE_ARGS+=--scriptdir=${PREFIX:Q}/sbin
+BUILD_TARGET=  qmqtool
 
 SUBST_CLASSES+=                paths
-SUBST_FILES.paths=     ${WRKSRC}/qmqtool
-SUBST_SED.paths+=      -e 's,@QMAILDIR@,${QMAILDIR:Q},g'
+SUBST_FILES.paths=     ${WRKSRC}/src/qmqtool
 SUBST_SED.paths+=      -e 's,@PS@,${PS},g'
 SUBST_SED.paths+=      -e 's,@GREP@,${GREP},g'
 SUBST_SED.paths+=      -e 's,@RCD_SCRIPTS_DIR@,${RCD_SCRIPTS_DIR},g'
-SUBST_STAGE.paths=     do-configure
+SUBST_STAGE.paths=     pre-configure
 
-INSTALLATION_DIRS=     sbin share/doc/qmqtool share/examples/qmqtool
+INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin
+INSTALLATION_DIRS+=    share/doc/qmqtool share/examples/qmqtool
 BUILD_DEFS+=           QMAILDIR
 
 do-install:
-       cd ${WRKSRC}; \
-       cp qmqtool ${DESTDIR}${PREFIX}/sbin; \
-       cp Artistic ChangeLog FAQ README \
-               ${DESTDIR}${PREFIX}/share/doc/qmqtool; \
-       cp -Rp contrib ${DESTDIR}${PREFIX}/share/examples/qmqtool
-       ${CHMOD} 0700 ${DESTDIR}${PREFIX}/sbin/qmqtool
+       ${INSTALL_SCRIPT} ${WRKSRC}/qmqtool ${DESTDIR}${PREFIX}/sbin
+       ${INSTALL_MAN} ${WRKSRC}/qmqtool.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+.for i in Artistic ChangeLog FAQ README
+       ${INSTALL_DATA} ${WRKSRC}/${i} ${DESTDIR}${PREFIX}/share/doc/qmqtool/${i}
+.endfor
+       cp -Rp ${WRKSRC}/contrib ${DESTDIR}${PREFIX}/share/examples/qmqtool
 
 .include "../../mk/bsd.pkg.mk"
diff -r 1118838a968a -r cdf4402bf924 mail/qmqtool/PLIST
--- a/mail/qmqtool/PLIST        Mon Jun 02 13:27:08 2014 +0000
+++ b/mail/qmqtool/PLIST        Mon Jun 02 14:09:20 2014 +0000
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:04:41 joerg Exp $
+@comment $NetBSD: PLIST,v 1.3 2014/06/02 14:09:20 schmonz Exp $
+man/man8/qmqtool.8
 sbin/qmqtool
 share/doc/qmqtool/Artistic
 share/doc/qmqtool/ChangeLog
diff -r 1118838a968a -r cdf4402bf924 mail/qmqtool/distinfo
--- a/mail/qmqtool/distinfo     Mon Jun 02 13:27:08 2014 +0000
+++ b/mail/qmqtool/distinfo     Mon Jun 02 14:09:20 2014 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2014/06/02 14:09:20 schmonz Exp $
 
-SHA1 (qmqtool-current.tgz) = c6fea8ef8324ae0ae241ff126b1da395d9b97e5c
-RMD160 (qmqtool-current.tgz) = d92dd6b9f03cea85f2e4cf69a1dd5b94afef42f2
-Size (qmqtool-current.tgz) = 19098 bytes
-SHA1 (patch-aa) = 4a15464d895afafa112d60af647d4f41f5596a24
+SHA1 (qmqtool-1.14.tgz) = a15ea167137697665d770574aae19f98c8caa44d
+RMD160 (qmqtool-1.14.tgz) = 020abb26fe17f10448bb6a1619f408e4899845cf
+Size (qmqtool-1.14.tgz) = 25357 bytes
+SHA1 (patch-aa) = e80d247f9637889ae4bc2d4fe19a918dbbf58205
diff -r 1118838a968a -r cdf4402bf924 mail/qmqtool/patches/patch-aa
--- a/mail/qmqtool/patches/patch-aa     Mon Jun 02 13:27:08 2014 +0000
+++ b/mail/qmqtool/patches/patch-aa     Mon Jun 02 14:09:20 2014 +0000
@@ -1,26 +1,19 @@
-$NetBSD: patch-aa,v 1.1.1.1 2007/01/18 06:35:24 schmonz Exp $
+$NetBSD: patch-aa,v 1.2 2014/06/02 14:09:20 schmonz Exp $
+
+Use pkgsrc-preferred tools.
 
---- qmqtool.orig       2006-10-07 22:29:46.000000000 -0400
-+++ qmqtool
-@@ -10,14 +10,10 @@ use strict;
- use Getopt::Std;
- my (%tool,%opt);
+--- src/qmqtool.orig   2009-01-24 04:25:44.000000000 +0000
++++ src/qmqtool
+@@ -10,7 +10,7 @@ use Getopt::Std;
  
--my $qmail = '/var/qmail';
--$tool{'ps'} = '/bin/ps'; # full path to ps, or just ps if $PATH is sufficient
-+my $qmail = '@QMAILDIR@';
-+$tool{'ps'} = '@PS@'; # full path to ps, or just ps if $PATH is sufficient
- $tool{'ps_arg'} = (`uname -s` =~ /SunOS/) ? '-ef' : 'aux'; # should statically code this
--if(-x '/usr/local/bin/grep'){
--      $tool{'grep'} = '/usr/local/bin/grep'; # GNU grep is 5 times faster than solaris grep
--}elsif(-x '/bin/grep'){
--      $tool{'grep'} = '/bin/grep';
--}
-+$tool{'grep'} = '@GREP@';
+ my $qmail = '__QMAILDIR__';
+ # keep ps dynamic - one nfs homed script can work on any arch
+-my $ps = ($^O eq 'solaris') ? '/usr/ucb/ps auxww' : 'ps auxww';
++my $ps = '@PS@ auxww';
+ my $bigtodo=0; # hardly implemented, no demand.
  
- # must play with @ARGV directly because Getopt doesnt have a xx: (-x with or without an arg)
- my $n = 0;
-@@ -152,6 +148,7 @@ if(defined($opt{h})){
+ my %opt;
+@@ -161,6 +161,7 @@ if($opt{l}){
                }
                unless($opt{Q}){
                        print "you must now start qmail-send: for a LWQ installation, run: svc -u /service/qmail-send\n";
@@ -28,27 +21,36 @@
                }
        }else{
                syntax();
-@@ -409,6 +406,7 @@ sub check_qmailsend {
-                       if(/^\s*qmails\s.+\sqmail-send/){
-                               die "you must stop qmail-send before this program can continue\n",
-                                   "for a LWQ installation, run: svc -d /service/qmail-send\n",
-+                                  "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend stop\n",
-                                   "others may be able to run: kill -9 `$tool{'ps'} $tool{'ps_arg'} | awk '/qmails.*qmail-send/ { print \$2 }'`\n";
+@@ -421,6 +422,7 @@ sub check_daemons {
+                               next if(/multilog\s+/); # some log to /var/log/qmail/qmail-send/
+                               die "you must stop qmail-send and qmail-smtpd before this program can continue (PID [$1] running).\n",
+                                   "for a LWQ installation, run: svc -d /service/qmail-send /service/qmail-smtpd\n",
++                                  "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend stop; @RCD_SCRIPTS_DIR@/qmailsmtpd stop\n",
+                                   "others may be able to run: kill -9 `$ps | awk '/qmail-send|qmail-smtpd/ { print \$1 }'`\n";
                        }
                }
-@@ -586,6 +584,7 @@ sub checkqueue {
-               print "no rogue files found\n";
+@@ -651,6 +653,7 @@ sub checkqueue {
+       if($opt{r}){
+               unless($opt{Q}){
+                       print "you must now start qmail-send: for a LWQ installation, run: svc -u /service/qmail-send\n";
++                      print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend start\n";
+               }
        }
-       print "you must now start qmail-send: for a LWQ installation, run: svc -u /service/qmail-send\n";
-+      print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend start\n";
  }
- 
- sub rm_files {
-@@ -624,6 +623,7 @@ sub rm_files {
+@@ -691,6 +694,7 @@ sub rm_files {
        }
-       if(defined($restart)){
+       if($restart){
                print "you must now restart qmail-send: for a LWQ installation, run: svc -du /service/qmail-send\n";
 +              print "for a pkgsrc installation, run: @RCD_SCRIPTS_DIR@/qmailsend restart\n";
        }
  }
  
+@@ -979,7 +983,7 @@ sub find_msgs_bystring {
+       my @msgs;
+       # using find|xargs grep is must faster than regex matching in perl (dunno why)
+       my $last=0;
+-      open(GREP, "find ${qmail}/queue/mess/ -type f | xargs grep $opts \"$regex\" /dev/null 2>/dev/null |") || die "could not fork find | xargs grep: $!\n";
++      open(GREP, "find ${qmail}/queue/mess/ -type f | xargs @GREP@ $opts \"$regex\" /dev/null 2>/dev/null |") || die "could not fork find | xargs @GREP@ $!\n";
+       # do not count on grep's exit code, because:
+       #  if a message is removed while grepping, exit code is 2
+       while(<GREP>){



Home | Main Index | Thread Index | Old Index