pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/sqlgrey Update sqlgrey to 1.8.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae99166269e4
branches:  trunk
changeset: 347602:ae99166269e4
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Wed May 25 21:39:44 2016 +0000

description:
Update sqlgrey to 1.8.0.
Add SMF support, clean up etc.

* Mon Feb 13 2012 Martin Matuska <martin%matuska.org@localhost>
 - 1.8.0 release
 - Allow to specify complete DSN in configuration file
 - Support listening on UNIX sockets
 - Support pidfile command line argument

* Mon Feb 01 2010 Michal Ludvig <mludvig%logix.net.nz@localhost>
 - Upgraded VERSION to 1.8.0-rc2
 - Reverted GNU sed syntax in Makefile

* Sat Jan 23 2010 Michal Ludvig <mludvig%logix.net.nz@localhost>
 - Upgraded VERSION to 1.8.0-rc1
 - 'make dist' now creates sqlgrey-$VERSION.tar.gz with
   the help of 'git archive'

* Mon Aug 17 2009 Michal Ludvig <mludvig%logix.net.nz@localhost>
 - 1.7.7 release getting ready
 - Reworked "smart"/"class-c" IPv6 address handling.
 - Added IPv6 address support for clients_ip_whitelist(.local)
   file
 - client_ip_whitelist(.local) now supports address/prefix
   notation both for IPv4 and IPv6 addresses.

* Sun Aug 05 2007 Lionel Bouton <lionel-dev%bouton.name@localhost>
 - 1.7.6 release
 - Database handling fix (deactivated InactiveDestroy unless
   needed)
 - Reopen database connection on SIGUSR1

* Thu Feb 15 2007 Dan Faerch <dan.sqlgrey @hacker.dk>
 - 1.7.5 release
 - Changed db_cleanup. clean time stored in db for better
   handling,
   especially in  clustered environments
 - Fix for harmless warnings about "possible typo"
 - Fix for sqlgrey dying if syslog is offline
 - Filled feature req from Riaan Kok. Support "postfix attributes
   on both
   sides".. Ie:  "client_name !~ helo_name"

* Sun Aug 03 2006 Dan Faerch <dan-NOSPAM%hacker.dk@localhost>
 - 1.7.4 release
 - Added feature Discrimination
 - Added feature DBCluster
 - Added config option reject_code (eg. answer 451 instead of 450)

* Wed Nov 16 2005 Lionel Bouton <lionel-dev%bouton.name@localhost>
 - 1.7.3 release
 - fixes for a crash with '*' in email adresses

* Tue Oct 25 2005 Lionel Bouton <lionel-dev%bouton.name@localhost>
 - 1.7.2 release
 - fixes for several errors in logging
 - clean_method ported from 1.6.x

* Thu Sep 15 2005 Lionel Bouton <lionel-dev%bouton.name@localhost>
 - 1.7.1 release
 - fix for a race condition in multiple instances configurations
 - fix for weekly stats

* Tue Jun 21 2005 Lionel Bouton <lionel-dev%bouton.name@localhost>
 - 1.7.0 release
 - now continue if the DB isn't available at startup time
 - based on 1.6.0 with Michel Bouissou's work:
  . better connect cleanup when creating AWL entries
  . source IP throttling

diffstat:

 mail/sqlgrey/MESSAGE                |  13 ++++++
 mail/sqlgrey/Makefile               |  70 ++++++++++++++++++++++--------------
 mail/sqlgrey/PLIST                  |  11 ++++-
 mail/sqlgrey/distinfo               |  18 ++++----
 mail/sqlgrey/files/smf/manifest.xml |  32 ++++++++++++++++
 mail/sqlgrey/patches/patch-aa       |  10 +++--
 mail/sqlgrey/patches/patch-ab       |  36 ++++++++++++------
 mail/sqlgrey/patches/patch-ac       |   8 ++-
 mail/sqlgrey/patches/patch-ad       |  22 ++++++-----
 9 files changed, 151 insertions(+), 69 deletions(-)

diffs (truncated from 380 to 300 lines):

diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/MESSAGE      Wed May 25 21:39:44 2016 +0000
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2016/05/25 21:39:44 fhajny Exp $
+
+You'll need to install one of the three tested DBD driver packages
+in order to use sqlgrey:
+
+ - p5-DBD-mysql (DBD::MySQL)
+ - p5-DBD-postgresql (DBD::Pg)
+ - p5-DBD-SQLite (DBD::SQLite)
+
+and update sqlgrey.conf appropriately.
+
+===========================================================================
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/Makefile
--- a/mail/sqlgrey/Makefile     Wed May 25 20:19:45 2016 +0000
+++ b/mail/sqlgrey/Makefile     Wed May 25 21:39:44 2016 +0000
@@ -1,45 +1,56 @@
-# $NetBSD: Makefile,v 1.10 2015/06/12 10:50:26 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2016/05/25 21:39:44 fhajny Exp $
 
-DISTNAME=              sqlgrey-1.6.8
-PKGREVISION=           7
+DISTNAME=              sqlgrey-1.8.0
 CATEGORIES=            mail
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=sqlgrey/}
-EXTRACT_SUFX=          .tar.bz2
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              http://sqlgrey.sourceforge.net/
 COMMENT=               Postfix greylisting policy daemon
+LICENSE=               gnu-gpl-v2
 
 USE_TOOLS+=            perl:run
 
 DEPENDS+=              p5-Net-Server>=0.87:../../net/p5-Net-Server
 DEPENDS+=              p5-IO-Multiplex>=1:../../devel/p5-IO-Multiplex
 
-PKG_SYSCONFSUBDIR=     ${PKGBASE}
-EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
+.include "../../mk/bsd.prefs.mk"
 
-.include "../../mk/bsd.prefs.mk"
+BUILD_DEFS+=           VARBASE SQLGREY_DIR SQLGREY_PIDDIR
+BUILD_DEFS+=           SQLGREY_USER SQLGREY_GROUP
 
 SQLGREY_USER?=         sqlgrey
 SQLGREY_GROUP?=                sqlgrey
+SQLGREY_DIR?=          ${VARBASE}/db/sqlgrey
+SQLGREY_PIDDIR?=       ${VARBASE}/run
 
-PKG_USERS=             ${SQLGREY_USER}:${SQLGREY_GROUP}
-PKG_GROUPS=            ${SQLGREY_GROUP}
+PKG_USERS+=                    ${SQLGREY_USER}:${SQLGREY_GROUP}
+PKG_GROUPS+=                   ${SQLGREY_GROUP}
+PKG_HOME.${SQLGREY_USER}=      ${SQLGREY_DIR}
+
+PKG_USERS_VARS=                SQLGREY_USER
+PKG_GROUPS_VARS=       SQLGREY_GROUP
 
+OWN_DIRS_PERMS+=       ${SQLGREY_DIR} ${SQLGREY_USER} ${SQLGREY_GROUP} 0755
+
+EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
+INSTALLATION_DIRS+=    share/doc/sqlgrey
+
+PKG_SYSCONFSUBDIR=     ${PKGBASE}
 RCD_SCRIPTS=           sqlgrey
 
-MAKE_ENV+=             EGDIR=${EGDIR}
+CONFIG_FILES=          sqlgrey.conf                                    \
+                       clients_fqdn_whitelist clients_ip_whitelist     \
+                       discrimination.regexp dyn_fqdn.regexp           \
+                       smtp_server.regexp
 
-CONF_FILES=            ${EGDIR}/clients_fqdn_whitelist \
-                       ${PKG_SYSCONFDIR}/clients_fqdn_whitelist
-CONF_FILES+=           ${EGDIR}/clients_ip_whitelist   \
-                       ${PKG_SYSCONFDIR}/clients_ip_whitelist
-CONF_FILES+=           ${EGDIR}/dyn_fqdn.regexp        \
-                       ${PKG_SYSCONFDIR}/dyn_fqdn.regexp
-CONF_FILES+=           ${EGDIR}/smtp_server.regexp     \
-                       ${PKG_SYSCONFDIR}/smtp_server.regexp
-CONF_FILES+=           ${EGDIR}/sqlgrey.conf           \
-                       ${PKG_SYSCONFDIR}/sqlgrey.conf
+DOC_FILES=             FAQ HOWTO README README.DBCLUSTER               \
+                       README.DISCRIMINATION README.OPTINOUT           \
+                       README.PERF
+
+.for file in ${CONFIG_FILES}
+CONF_FILES+=           ${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
+.endfor
 
 REPLACE_PERL=          sqlgrey-logstats.pl
 REPLACE_PERL+=         sqlgrey
@@ -48,16 +59,19 @@
 SUBST_CLASSES+=                sysconfdir
 SUBST_STAGE.sysconfdir=        pre-configure
 SUBST_FILES.sysconfdir=        sqlgrey update_sqlgrey_config etc/sqlgrey.conf
-SUBST_SED.sysconfdir=  -e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g'
-SUBST_SED.sysconfdir+= -e 's,%%VARBASE%%,${VARBASE},g'
-SUBST_SED.sysconfdir+= -e 's,%%SQLGREY_USER%%,${SQLGREY_USER},g'
-SUBST_SED.sysconfdir+= -e 's,%%SQLGREY_GROUP%%,${SQLGREY_GROUP},g'
+SUBST_VARS.sysconfdir= PKG_SYSCONFDIR SQLGREY_PIDDIR
+SUBST_VARS.sysconfdir+=        SQLGREY_USER SQLGREY_GROUP
+
+FILES_SUBST+=          SQLGREY_USER=${SQLGREY_USER}
+FILES_SUBST+=          SQLGREY_GROUP=${SQLGREY_GROUP}
 
-BUILD_DEFS+=           VARBASE
-BUILD_DEFS+=           SQLGREY_USER SQLGREY_GROUP
+MAKE_ENV+=             EGDIR=${EGDIR}
 
-PKG_USERS_VARS=                SQLGREY_USER
-PKG_GROUPS_VARS=       SQLGREY_GROUP
+post-install:
+       ${RM} -f ${DESTDIR}${PREFIX}/share/examples/sqlgrey/README
+.for file in ${DOC_FILES}
+       ${INSTALL_DATA} ${WRKSRC}/${file} ${DESTDIR}${PREFIX}/share/doc/sqlgrey
+.endfor
 
 .include "../../databases/p5-DBI/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/PLIST
--- a/mail/sqlgrey/PLIST        Wed May 25 20:19:45 2016 +0000
+++ b/mail/sqlgrey/PLIST        Wed May 25 21:39:44 2016 +0000
@@ -1,11 +1,18 @@
-@comment $NetBSD: PLIST,v 1.3 2014/03/11 14:05:05 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.4 2016/05/25 21:39:44 fhajny Exp $
 bin/sqlgrey-logstats.pl
 man/man1/sqlgrey.1
 sbin/sqlgrey
 sbin/update_sqlgrey_config
-share/examples/sqlgrey/README
+share/doc/sqlgrey/FAQ
+share/doc/sqlgrey/HOWTO
+share/doc/sqlgrey/README
+share/doc/sqlgrey/README.DBCLUSTER
+share/doc/sqlgrey/README.DISCRIMINATION
+share/doc/sqlgrey/README.OPTINOUT
+share/doc/sqlgrey/README.PERF
 share/examples/sqlgrey/clients_fqdn_whitelist
 share/examples/sqlgrey/clients_ip_whitelist
+share/examples/sqlgrey/discrimination.regexp
 share/examples/sqlgrey/dyn_fqdn.regexp
 share/examples/sqlgrey/smtp_server.regexp
 share/examples/sqlgrey/sqlgrey.conf
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/distinfo
--- a/mail/sqlgrey/distinfo     Wed May 25 20:19:45 2016 +0000
+++ b/mail/sqlgrey/distinfo     Wed May 25 21:39:44 2016 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 23:27:21 agc Exp $
+$NetBSD: distinfo,v 1.4 2016/05/25 21:39:44 fhajny Exp $
 
-SHA1 (sqlgrey-1.6.8.tar.bz2) = 1c687d1839fd2911bf9ef535eef8e84bc97d56a6
-RMD160 (sqlgrey-1.6.8.tar.bz2) = f5f13004fa1a9228eb1c5a141ec1658738447899
-SHA512 (sqlgrey-1.6.8.tar.bz2) = 15afdd030464dde177dc135ca54ebf4d5967736e520c2fe0171594f70dc9e3e2d7a63190bfbc19f92e104144ce7d45948915f194d27d5915c9f5272f7293716f
-Size (sqlgrey-1.6.8.tar.bz2) = 43551 bytes
-SHA1 (patch-aa) = 1bf8853fece173be36f9c3ac1112b89dbfe2796d
-SHA1 (patch-ab) = 637dc9870d6b01caa9cfe10109aeafd3192fbb66
-SHA1 (patch-ac) = 29100eb0d591abec3c2f628cc1c3eeaf46e739ac
-SHA1 (patch-ad) = 661dc0b5b08ca96bdc0f7b571e62a706b174fa13
+SHA1 (sqlgrey-1.8.0.tar.gz) = 059ffabe639363bbed696ab40b0a07cce5730f35
+RMD160 (sqlgrey-1.8.0.tar.gz) = 503ff9487154506e2f550d931654822f014e6d20
+SHA512 (sqlgrey-1.8.0.tar.gz) = 97ab057bf7111159166a6963d5948c10468731730136ddca6449d2d629f39235c09d00497a52408bb87057905c1bf43bc064571ee6302d7f1f8c6408af82d044
+Size (sqlgrey-1.8.0.tar.gz) = 69476 bytes
+SHA1 (patch-aa) = e6eb7bb4aa3169febfb6d0e7084ced34334112b3
+SHA1 (patch-ab) = f9bd117f36f1a4e9061845c226d23e24e7c6690b
+SHA1 (patch-ac) = fb7be803cc1f2c84282eacb3cc1d9fadae3aa4ba
+SHA1 (patch-ad) = 7abcb3e28a2a6c0605880cd6cca30391da9044fa
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/files/smf/manifest.xml       Wed May 25 21:39:44 2016 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="network" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/milestone/network:default" />
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+      <service_fmri value="svc:/system/filesystem/local" />
+    </dependency>
+    <method_context>
+      <method_credential user="@SQLGREY_USER@" group="@SQLGREY_GROUP@" />
+    </method_context>
+    <exec_method type="method" name="start" exec="@PREFIX@/sbin/sqlgrey -d" timeout_seconds="60" />
+    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract" />
+      <propval name="ignore_error" type="astring" value="core,signal" />
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/sqlgrey.conf" />
+    </property_group>
+    <stability value="Evolving" />
+    <template>
+      <common_name>
+        <loctext xml:lang="C">SQLgrey daemon</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/patches/patch-aa
--- a/mail/sqlgrey/patches/patch-aa     Wed May 25 20:19:45 2016 +0000
+++ b/mail/sqlgrey/patches/patch-aa     Wed May 25 21:39:44 2016 +0000
@@ -1,6 +1,8 @@
-$NetBSD: patch-aa,v 1.2 2010/02/04 02:43:52 joerg Exp $
+$NetBSD: patch-aa,v 1.3 2016/05/25 21:39:44 fhajny Exp $
 
---- Makefile.orig      2005-06-07 02:28:38.000000000 +0200
+Default dirs.
+
+--- Makefile.orig      2012-02-13 16:54:08.000000000 +0000
 +++ Makefile
 @@ -1,10 +1,8 @@
  INSTALL = install
@@ -16,8 +18,8 @@
 +MANDIR = ${DESTDIR}$(PREFIX)/$(PKGMANDIR)/man1
  
  VERSION := $(shell cat VERSION)
- TBZ2 = sqlgrey-$(VERSION).tar.bz2
-@@ -30,9 +28,7 @@ clean:
+ 
+@@ -43,9 +41,7 @@ clean:
  
  install: all
        $(INSTALL) -d -m 755 $(SBINDIR)
diff -r 1d797c5a66f1 -r ae99166269e4 mail/sqlgrey/patches/patch-ab
--- a/mail/sqlgrey/patches/patch-ab     Wed May 25 20:19:45 2016 +0000
+++ b/mail/sqlgrey/patches/patch-ab     Wed May 25 21:39:44 2016 +0000
@@ -1,44 +1,54 @@
-$NetBSD: patch-ab,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+$NetBSD: patch-ab,v 1.2 2016/05/25 21:39:44 fhajny Exp $
+
+Default dirs. Use native connection to syslog.
 
---- sqlgrey.orig       2007-08-05 22:41:19.000000000 +0200
+--- sqlgrey.orig       2012-02-13 16:54:08.000000000 +0000
 +++ sqlgrey
-@@ -52,11 +52,11 @@ my $config        = 'config';
+@@ -57,10 +57,10 @@ my $config        = 'config';
  # defaults
  my %dflt;
  $dflt{loglevel}           = 2; # used for $dflt{log} entries in read_conffile()
 -$dflt{user}               = 'sqlgrey';
 -$dflt{group}              = 'sqlgrey';
-+$dflt{user}               = '%%SQLGREY_USER%%';
-+$dflt{group}              = '%%SQLGREY_GROUP%%';
- $dflt{inet}               = '2501';
 -$dflt{pidfile}            = '/var/run/sqlgrey.pid';
 -$dflt{conf_dir}           = '/etc/sqlgrey';
-+$dflt{pidfile}            = '%%VARBASE%%/run/sqlgrey.pid';
-+$dflt{conf_dir}           = '%%PKG_SYSCONFDIR%%';
++$dflt{user}               = '@SQLGREY_USER@';
++$dflt{group}              = '@SQLGREY_GROUP@';
++$dflt{pidfile}            = '@SQLGREY_PIDDIR@/sqlgrey.pid';
++$dflt{conf_dir}           = '@PKG_SYSCONFDIR@';
  $dflt{reconnect_delay}    = 5;            # 5 minutes
  $dflt{max_connect_age}    = 24;           # 24 hours
  $dflt{awl_age}            = 60;           # 60 days
-@@ -91,7 +91,7 @@ $dflt{log} = { # note values here are no
+@@ -104,7 +104,7 @@ $dflt{log} = { # note values here are no
             };
  
  # Default configuration file
 -my $config_file              = '/etc/sqlgrey/sqlgrey.conf';
-+my $config_file              = '%%PKG_SYSCONFDIR%%/sqlgrey.conf';
++my $config_file              = '@PKG_SYSCONFDIR@/sqlgrey.conf';
  
  # whitelist files
  my $stat_ip_whitelist_file   = $dflt{conf_dir} . '/clients_ip_whitelist';
-@@ -2390,12 +2390,12 @@ B<sqlgrey> [I<options>...]
+@@ -2639,7 +2639,7 @@ sub main()
+             log_level       => $dflt{loglevel} > 2 ? $dflt{loglevel} : 2,
+             log_file        => $opt{daemonize} ? 'Sys::Syslog' : undef,
+             syslog_facility => 'mail',
+-            syslog_logsock  => 'unix',
++            syslog_logsock  => 'native',
+             syslog_ident    => defined $dflt{log_ident} ? $dflt{log_ident} :
+                                                         # process name
+                                                         $0 =~ m{.*/(.*)},
+@@ -2825,12 +2825,12 @@ B<sqlgrey> [I<options>...]
   -k, --kill                 kill a running sqlgrey
                              (identified by 'pidfile' content)
   -f, --configfile=FILE      read config from FILE
 -                            (default /etc/sqlgrey/sqlgrey.conf)
-+                            (default %%PKG_SYSCONFDIR%%/sqlgrey.conf)
++                            (default @PKG_SYSCONFDIR@/sqlgrey.conf)
                              expecting config_param=value lines,
                              - spaces are ignored,
                              - '#' is used for comments
  
 -See the default config file at /etc/sqlgrey/sqlgrey.conf for runtime parameters.
-+See the default config file at %%PKG_SYSCONFDIR%%/sqlgrey.conf for runtime parameters.



Home | Main Index | Thread Index | Old Index