pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/sqlgrey Import sqlgrey-1.6.8 package as requested...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7f8fdad657a3
branches:  trunk
changeset: 535321:7f8fdad657a3
user:      ghen <ghen%pkgsrc.org@localhost>
date:      Tue Nov 13 16:43:04 2007 +0000

description:
Import sqlgrey-1.6.8 package as requested by Petr Janda on pkgsrc-users list.

SQLgrey is a postfix policy service implementing a greylisting policy.  It is
written in Perl and uses DBI to access an SQL database.  Its goal is reducing
the SPAM reaching user mailboxes.

diffstat:

 mail/sqlgrey/DESCR            |   3 ++
 mail/sqlgrey/Makefile         |  62 +++++++++++++++++++++++++++++++++++++++++++
 mail/sqlgrey/PLIST            |  13 +++++++++
 mail/sqlgrey/distinfo         |   9 ++++++
 mail/sqlgrey/files/sqlgrey.sh |  19 +++++++++++++
 mail/sqlgrey/patches/patch-aa |  29 ++++++++++++++++++++
 mail/sqlgrey/patches/patch-ab |  44 ++++++++++++++++++++++++++++++
 mail/sqlgrey/patches/patch-ac |  22 +++++++++++++++
 mail/sqlgrey/patches/patch-ad |  33 ++++++++++++++++++++++
 9 files changed, 234 insertions(+), 0 deletions(-)

diffs (270 lines):

diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/DESCR        Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,3 @@
+SQLgrey is a postfix policy service implementing a greylisting policy.  It is
+written in Perl and uses DBI to access an SQL database.  Its goal is reducing
+the SPAM reaching user mailboxes.
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/Makefile     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+DISTNAME=              sqlgrey-1.6.8
+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
+
+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"
+
+SQLGREY_USER?=         sqlgrey
+SQLGREY_GROUP?=                sqlgrey
+
+PKG_USERS=             ${SQLGREY_USER}:${SQLGREY_GROUP}
+PKG_GROUPS=            ${SQLGREY_GROUP}
+
+RCD_SCRIPTS=           sqlgrey
+
+MAKE_ENV+=             EGDIR=${EGDIR}
+
+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
+
+REPLACE_PERL=          sqlgrey-logstats.pl
+REPLACE_PERL+=         sqlgrey
+REPLACE_SH=            update_sqlgrey_config
+
+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'
+
+BUILD_DEFS+=           VARBASE
+BUILD_DEFS+=           SQLGREY_USER SQLGREY_GROUP
+
+PKG_USERS_VARS=                SQLGREY_USER
+PKG_GROUPS_VARS=       SQLGREY_GROUP
+
+.include "../../databases/p5-DBI/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/PLIST        Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+bin/sqlgrey-logstats.pl
+man/man1/sqlgrey.1
+sbin/sqlgrey
+sbin/update_sqlgrey_config
+share/examples/rc.d/sqlgrey
+share/examples/sqlgrey/README
+share/examples/sqlgrey/clients_fqdn_whitelist
+share/examples/sqlgrey/clients_ip_whitelist
+share/examples/sqlgrey/dyn_fqdn.regexp
+share/examples/sqlgrey/smtp_server.regexp
+share/examples/sqlgrey/sqlgrey.conf
+@dirrm share/examples/sqlgrey
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/distinfo     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+SHA1 (sqlgrey-1.6.8.tar.bz2) = 1c687d1839fd2911bf9ef535eef8e84bc97d56a6
+RMD160 (sqlgrey-1.6.8.tar.bz2) = f5f13004fa1a9228eb1c5a141ec1658738447899
+Size (sqlgrey-1.6.8.tar.bz2) = 43551 bytes
+SHA1 (patch-aa) = 9471d72a66d8557b969aef8d5400ff6d4da06c9a
+SHA1 (patch-ab) = 637dc9870d6b01caa9cfe10109aeafd3192fbb66
+SHA1 (patch-ac) = 29100eb0d591abec3c2f628cc1c3eeaf46e739ac
+SHA1 (patch-ad) = 661dc0b5b08ca96bdc0f7b571e62a706b174fa13
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/files/sqlgrey.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/files/sqlgrey.sh     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,19 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: sqlgrey.sh,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+#
+# PROVIDE: sqlgrey
+# REQUIRE: DAEMON
+# BEFORE: mail
+
+. /etc/rc.subr
+
+name="sqlgrey"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+required_files="@PKG_SYSCONFDIR@/${name}.conf"
+command_args="-d"
+stop_cmd="${command} -k"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/patches/patch-aa     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+--- Makefile.orig      2005-06-07 02:28:38.000000000 +0200
++++ Makefile
+@@ -1,10 +1,8 @@
+ INSTALL = install
+-ETCDIR = $(ROOTDIR)/etc
+-CONFDIR = $(ETCDIR)/sqlgrey
+-SBINDIR = $(ROOTDIR)/usr/sbin
+-BINDIR = $(ROOTDIR)/usr/bin
+-INITDIR = $(ETCDIR)/init.d
+-MANDIR = $(ROOTDIR)/usr/share/man/man1
++CONFDIR = $(EGDIR)
++SBINDIR = $(PREFIX)/sbin
++BINDIR = $(PREFIX)/bin
++MANDIR = $(PREFIX)/$(PKGMANDIR)/man1
+ 
+ VERSION := $(shell cat VERSION)
+ TBZ2 = sqlgrey-$(VERSION).tar.bz2
+@@ -30,9 +28,7 @@ clean:
+ 
+ install: all
+       $(INSTALL) -d -m 755 $(SBINDIR)
+-      $(INSTALL) -d -m 755 $(ETCDIR)
+       $(INSTALL) -d -m 755 $(CONFDIR)
+-      $(INSTALL) -d -m 755 $(INITDIR)
+       $(INSTALL) -d -m 755 $(MANDIR)
+       $(INSTALL) -d -m 755 $(BINDIR)
+       $(INSTALL) -m 755 sqlgrey $(SBINDIR)
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/patches/patch-ab     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+--- sqlgrey.orig       2007-08-05 22:41:19.000000000 +0200
++++ sqlgrey
+@@ -52,11 +52,11 @@ 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{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
+            };
+ 
+ # Default configuration file
+-my $config_file              = '/etc/sqlgrey/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>...]
+  -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)
+                             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.
+ If you got sqlgrey from sources, read the HOWTO file in the compressed archive.
+ If it came prepackaged, look into the documentation tree for this file:
+ /usr/share/doc/sqlgrey-<version>/ on most Linux distributions for example.
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/patches/patch-ac     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+--- update_sqlgrey_config.orig 2005-03-02 01:49:41.000000000 +0100
++++ update_sqlgrey_config
+@@ -24,7 +24,7 @@ fi
+ LANG=C
+ LC_ALL=C
+ 
+-MYDIR=/etc/sqlgrey
++MYDIR=%%PKG_SYSCONFDIR%%
+ CONF=$MYDIR/sqlgrey.conf
+ 
+ # Get whitelists host and pidfile from conf
+@@ -36,7 +36,7 @@ fi
+ pidfile=`grep "^[[:space:]]*pidfile" $CONF | cut -d= -f2 | awk '{print $1}'`
+ if [ -z "$pidfile" ]
+ then
+-    pidfile="/var/run/sqlgrey.pid"
++    pidfile="/%%VARBASE%%/run/sqlgrey.pid"
+ fi
+ 
+ # Go into a temp directory
diff -r 6277ba1cbf32 -r 7f8fdad657a3 mail/sqlgrey/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqlgrey/patches/patch-ad     Tue Nov 13 16:43:04 2007 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $
+
+--- etc/sqlgrey.conf.orig      2005-12-20 11:41:30.000000000 +0100
++++ etc/sqlgrey.conf
+@@ -7,7 +7,7 @@
+ # - SQLgrey uses a specific config file when called with -f <conf_file>
+ 
+ ## Configuration files
+-# conf_dir = /etc/sqlgrey
++# conf_dir = %%PKG_SYSCONFDIR%%
+ 
+ ## Log level
+ # Uncomment to change the log level (default is normal: 2)
+@@ -59,8 +59,8 @@
+ # log_ident =
+ 
+ ## username and groupname the daemon runs as
+-# user = sqlgrey
+-# group = sqlgrey
++# user = %%SQLGREY_USER%%
++# group = %%SQLGREY_GROUP%%
+ 
+ ## Socket
+ # On which socket do SQLgrey wait for queries
+@@ -75,7 +75,7 @@
+ 
+ ## Config directory
+ # where to look for other configuration files (whitelists)
+-# confdir = /etc/sqlgrey
++# confdir = %%PKG_SYSCONFDIR%%
+ 
+ ## Greylisting delays
+ # If you want to be really strict (RFC-wise) use these



Home | Main Index | Thread Index | Old Index