On Tue, Jan 08, 2013 at 04:55:05PM -0600, Todd T. Fries wrote:
> Thanks a lot for your efforts!  See comments inline.
> 
> Penned by Landry Breuil on 20130108 16:35.06, we have:
> | Hi,
> | 
> | he're a preliminary diff to :
> | - update dspam to 3.10.2
> | - move some FLAVORS to MULTI_PACKAGES
> 
> I see no reason not to do this, why we want to waste cpu cycles when
> MULTI_PACKAGES can work is beyond me.
> 
> | - the 10 FLAVOR maze is just insane. hash & sqlite3 flavors can go to the
> | main subpackage, sqlite2 can die, and pgsql & mysql go into their own
> | subpackage.
> 
> Works for me.
> 
> | - keep only clamav/ldap/domainscale/largescale as FLAVORs since those
> |   one still make sense (and they dont use PFRAGs)
> 
> They really do change the binary .. so either enable by default or keep
> separate as flavors indeed.
> 
> | - the default engine used is still sqlite3 (first driver in the list)
> | - disable static libs
> 
> I guess this doesn't work on vax, so why not?
> 
> | - enable virtual users / preferences extension / daemon by default
> 
> My default usage case, so good from my perspective.
> 
> | - the @pkgpath annotations seems to allow updates from previous pkgs
> |   without issues, didnt test all combinations yet
> 
> Always fun to test, but I'm glad you're thinking of these details ;-)
> 
> | - i'm pondering removing the strlcpy patches since they're not easily
> |   maintainable. Also, anyone knows the reason of the daemon_getline()
> | chunks bumping the timeout from 300 to 900 ?
> 
> Regarding strlcpy current practices suggest if it is a good move then it
> should be put into upstream first not maintained locally.  Feel free to
> nuke.
> 
> Regarding the timeout I think I've started to recall.   Basically, if
> the dspam client is running connecting to the dspam daemon, and the
> dspam daemon is overloaded (or the db backend can't keep up) you end up
> hitting a timeout and then a failure if you make this number too low.  I
> am pretty sure I ran into this myself in the past and probably was the
> source of the bump of the timeout.
> 
> | TBD: test all upgrade paths, write rc script & README.
> | 
> | comments/feedback welcome especially on the gory pkgpath details.
>  
> I'll queue this up for testing here, apologies ahead of time that my
> queue is rather long..

New version with :
- rc script for dspam --daemon
- var/run/dspam @sampled for the daemon to start fine
- and (courtesy of sthen@, many thanks!) a PFRAG.* + FULLPKGPATH-* +
  @pkgpath dance that would allow all combinations of pkgpaths to
update seamlessly. One would need to manually install dspam-*-{my,pg}sql
if they were using such a backend, but that will go to upgrade.html
(and/or to a MESSAGE) since manual intervention to update the db schema
is needed anyway.
- no need for a pkg README, the one provided by upstream is already
  complete enough
- sqlite2 flavor really dies, what's the point when we have sqlite3 in
  base..

running in production here with sqlite3. This one should be good to go
(minus the upgrade.html/MESSAGE part)

Landry
? 4457291837299d5aaf704c19d935a571
? dspam-3.10.2-libdspam.so.8.0
? dspam-3.8.0-libdspam.so.8.0
Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/dspam/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- Makefile    23 Dec 2012 13:25:11 -0000      1.39
+++ Makefile    10 Jan 2013 22:56:56 -0000
@@ -1,28 +1,40 @@
 # $OpenBSD: Makefile,v 1.39 2012/12/23 13:25:11 sthen Exp $
 
-COMMENT=       anti-spam filter
-
-VERSION=       3.8.0
-DISTNAME=      dspam-${VERSION}
-REVISION=      4
-SHARED_LIBS=   dspam   8.0
+COMMENT-main=  anti-spam filter
+COMMENT-pgsql= PostgreSQL driver for dspam
+COMMENT-mysql= MySQL driver for dspam
+
+VERSION=       3.10.2
+DISTNAME=      dspam-3.10.2
+PKGNAME-main = ${PKGNAME}
+.for p in pgsql mysql
+PKGNAME-$p =   dspam-$p-${VERSION}
+# non-flavoured db backend packages
+FULLPKGNAME-$p = dspam-$p-${VERSION}
+FULLPKGPATH-$p = ${PKGPATH},-$p
+.endfor
+SHARED_LIBS=   dspam   9.0
 CATEGORIES=    mail
+SHARED_ONLY =  Yes
 
-MASTER_SITES=  http://dspam.nuclearelephant.com/sources/
+MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=dspam/}
 
 HOMEPAGE=      http://dspam.nuclearelephant.com/
 
 MAINTAINER=     Todd T. Fries <t...@openbsd.org>
 
-# GPL
+# AGPLv3/BSD/GPLv2
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB += c m
+MULTI_PACKAGES = -main -mysql -pgsql
+WANTLIB = m pthread
+WANTLIB-main += ${WANTLIB} c sqlite3
 
 USE_LIBTOOL=           Yes
+LIBTOOL_FLAGS =        --tag=disable-static
 USE_GROFF =            Yes
 CONFIGURE_STYLE=       gnu
 SEPARATE_BUILD=                Yes
@@ -33,94 +45,50 @@
                        --with-dspam-owner=root \
                        --with-dspam-group=bin \
                        --with-dspam-mode=0555 \
+                       
--with-storage-driver=sqlite3_drv,mysql_drv,pgsql_drv,hash_drv \
+                       --with-mysql-includes=${LOCALBASE}/include/mysql \
+                       --with-mysql-libraries=${LOCALBASE}/lib/mysql \
+                       --with-pgsql-includes=${LOCALBASE}/include/postgresql \
+                       --with-pgsql-libraries=${LOCALBASE}/lib \
+                       --enable-virtual-users \
+                       --enable-preferences-extension \
+                       --enable-daemon \
                        --enable-long-usernames
 
-DOCS=          ${WRKSRC}/README ${WRKSRC}/UPGRADING ${WRKSRC}/RELEASE.NOTES \
-               ${WRKSRC}/doc/courier.txt ${WRKSRC}/doc/exim.txt \
-               ${WRKSRC}/doc/markov.txt ${WRKSRC}/doc/pop3filter.txt \
-               ${WRKSRC}/doc/postfix.txt ${WRKSRC}/doc/qmail.txt \
-               ${WRKSRC}/doc/relay.txt ${WRKSRC}/doc/sendmail.txt
-
 EXAMPLESDIR=   ${PREFIX}/share/examples/dspam
-DAEMON_SUPPORT=
 
-FLAVORS=       sqlite3 sqlite mysql pgsql hash clamav ldap preferences \
-               domainscale largescale
-FLAVOR?=       sqlite3
+FLAVORS=       clamav ldap domainscale largescale
+FLAVOR?=
 
 . if ${FLAVOR:Mlargescale} && ${FLAVOR:Mdomainscale}
 ERRORS+= "Fatal: choose either domainscale or largescale, not both"
 . endif
 
-.for d in sqlite3 sqlite mysql pgsql hash
-.  if ${FLAVOR:M$d}
-DRIVER ?= $d
-.    if ${DRIVER} != "$d"
-ERRORS += "Fatal: choose either mysql or pgsql or sqlite or sqlite3 or hash"
-.    endif
-.  endif
-.endfor
 
-.if !defined(DRIVER)
-DRIVER = sqlite3
-FLAVOR += sqlite3
-.endif
+LIB_DEPENDS-mysql=     ${PKGNAME-main}:${BUILD_PKGPATH},-main \
+                       databases/mysql
+WANTLIB-mysql=         ${WANTLIB} dspam z ssl crypto lib/mysql/mysqlclient
+
+LIB_DEPENDS-pgsql=     ${PKGNAME-main}:${BUILD_PKGPATH},-main \
+                       databases/postgresql
+WANTLIB-pgsql=         ${WANTLIB} c com_err crypto dspam pq ssl
 
 
-.if ${DRIVER} == "mysql"
-CONFIGURE_ARGS+=       --with-storage-driver=mysql_drv \
-                       --with-mysql-includes=${LOCALBASE}/include/mysql \
-                       --with-mysql-libraries=${LOCALBASE}/lib/mysql \
-                       --enable-virtual-users
-LIB_DEPENDS+=          databases/mysql
-WANTLIB+=              z ssl crypto lib/mysql/mysqlclient>=14
-.elif ${DRIVER} == "pgsql"
-CONFIGURE_ARGS+=       --with-storage-driver=pgsql_drv \
-                       --with-pgsql-includes=${LOCALBASE}/include/postgresql \
-                       --with-pgsql-libraries=${LOCALBASE}/lib \
-                       --enable-virtual-users
-LIB_DEPENDS+=          databases/postgresql
-WANTLIB +=             pq>=4 com_err crypto ssl
-.elif ${DRIVER} == "hash"
-CONFIGURE_ARGS+=       --with-storage-driver=hash_drv
-.elif ${DRIVER} == "sqlite"
-CONFIGURE_ARGS+=       --with-storage-driver=sqlite_drv \
-                       --with-sqlite-includes=${LOCALBASE}/include \
-                       --with-sqlite-libraries=${LOCALBASE}/lib
-LIB_DEPENDS+=          databases/sqlite
-WANTLIB +=             sqlite>=8
-.elif ${DRIVER} == "sqlite3"
-CONFIGURE_ARGS+=       --with-storage-driver=sqlite3_drv \
-                       --with-sqlite-includes=${LOCALBASE}/include \
-                       --with-sqlite-libraries=${LOCALBASE}/lib
-WANTLIB +=             sqlite3>=8
-DRIVER =               sqlite
-.endif
-
-.if ${DRIVER} != "sqlite"
-DAEMON_SUPPORT=                Yes
-CONFIGURE_ARGS+=       --enable-daemon
-WANTLIB+=              pthread
-.endif
-
 .if ${FLAVOR:Mclamav}
 CONFIGURE_ARGS+=       --enable-clamav
-LIB_DEPENDS+=          security/clamav
-WANTLIB +=             clamav>=1
+LIB_DEPENDS-main+=             security/clamav
+WANTLIB-main +=                clamav>=1
 .endif
 
 .if ${FLAVOR:Mldap}
 CONFIGURE_ARGS+=       --enable-ldap
 CONFIGURE_ENV=         CPPFLAGS="-I${LOCALBASE}/include" \
                        LDFLAGS="-L${LOCALBASE}/lib"
-LIB_DEPENDS+=          databases/openldap
-WANTLIB+=              crypto ssl sasl2 asn1 com_err gssapi krb5 \
+LIB_DEPENDS-main+=             databases/openldap
+WANTLIB-main+=         crypto ssl sasl2 asn1 com_err gssapi krb5 \
                        ldap-2.4 lber-2.4
 .endif
 
-.if ${FLAVOR:Mpreferences}
-CONFIGURE_ARGS+=       --enable-preferences-extension
-.endif
 
 .if ${FLAVOR:Mdomainscale}
 CONFIGURE_ARGS+=       --enable-domain-scale
@@ -139,13 +107,12 @@
        ${INSTALL_DATA} ${WRKBUILD}/src/dspam.conf \
                ${PREFIX}/share/examples/dspam/dspam.conf
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dspam
-       ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/dspam
-.if ${DRIVER} != "hash"
+       ${INSTALL_DATA} ${WRKSRC}/{README,UPGRADING,RELEASE.NOTES,doc/*.txt} 
${PREFIX}/share/doc/dspam
+.for DRIVER in mysql sqlite pgsql
        ${INSTALL_DATA_DIR} ${EXAMPLESDIR}/${DRIVER}
        ${INSTALL_DATA} ${WRKSRC}/src/tools.${DRIVER}_drv/*.sql \
                ${EXAMPLESDIR}/${DRIVER}
-       ${INSTALL_DATA} ${WRKSRC}/doc/${DRIVER}_drv.txt \
-               ${PREFIX}/share/doc/dspam
-.endif
+.endfor
+
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/dspam/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo    21 Dec 2007 14:42:23 -0000      1.13
+++ distinfo    10 Jan 2013 22:56:56 -0000
@@ -1,5 +1,2 @@
-MD5 (dspam-3.8.0.tar.gz) = BWuMizrZQVpSwBsi/x5kzw==
-RMD160 (dspam-3.8.0.tar.gz) = 54MeJBXjDoGd2cvAuj8mnhE+L7k=
-SHA1 (dspam-3.8.0.tar.gz) = 0d5+4hNFIq2vUvSRZ6zOzxWJ+pY=
-SHA256 (dspam-3.8.0.tar.gz) = hKInk0p67nNRa9uCwz7ns1npVcjNlaFUSpoTBp95v8c=
-SIZE (dspam-3.8.0.tar.gz) = 726160
+SHA256 (dspam-3.10.2.tar.gz) = rnZWlgQCHzW3QfuVGYoeYRqMZMODhmGXOmzzYLulk6k=
+SIZE (dspam-3.10.2.tar.gz) = 1035054
Index: patches/patch-UPGRADING
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-UPGRADING,v
retrieving revision 1.3
diff -u -r1.3 patch-UPGRADING
--- patches/patch-UPGRADING     21 Dec 2007 14:42:23 -0000      1.3
+++ patches/patch-UPGRADING     10 Jan 2013 22:56:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-UPGRADING,v 1.3 2007/12/21 14:42:23 todd Exp $
---- UPGRADING.orig     Sun Mar 18 17:42:25 2007
-+++ UPGRADING  Sun Apr 29 18:02:34 2007
-@@ -16,9 +16,9 @@ UPGRADING FROM 3.6
+--- UPGRADING.orig     Wed Aug 17 00:38:30 2011
++++ UPGRADING  Sat Jan  5 15:35:35 2013
+@@ -123,9 +123,9 @@ UPGRADING FROM 3.6
     log file selection. This is now required.
  
  3. Ensure 3.6.0 malaligned hash databases are converted
Index: patches/patch-man_Makefile_in
===================================================================
RCS file: patches/patch-man_Makefile_in
diff -N patches/patch-man_Makefile_in
--- patches/patch-man_Makefile_in       24 Oct 2010 12:14:08 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-man_Makefile_in,v 1.1 2010/10/24 12:14:08 naddy Exp $
---- man/Makefile.in.orig       Sun Oct 24 13:51:14 2010
-+++ man/Makefile.in    Sun Oct 24 13:53:43 2010
-@@ -647,14 +647,14 @@ install-data-hook:
-       rm -f $(DESTDIR)$(mandir)/man3/dspam_getsource.3
-       rm -f $(DESTDIR)$(mandir)/man3/dspam_destroy.3
-       rm -f $(DESTDIR)$(mandir)/man3/dspam_detach.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_init.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_create.3
--      ln -s $(mandir)/man3/libdspam.3 
$(DESTDIR)$(mandir)/man3/dspam_addattribute.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_attach.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_process.3
--      ln -s $(mandir)/man3/libdspam.3 
$(DESTDIR)$(mandir)/man3/dspam_getsource.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_destroy.3
--      ln -s $(mandir)/man3/libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_detach.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_init.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_create.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_addattribute.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_attach.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_process.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_getsource.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_destroy.3
-+      ln -s libdspam.3 $(DESTDIR)$(mandir)/man3/dspam_detach.3
- 
- uninstall-hook:
-       rm -f $(DESTDIR)$(mandir)/man3/dspam_init.3
Index: patches/patch-src_Makefile_in
===================================================================
RCS file: patches/patch-src_Makefile_in
diff -N patches/patch-src_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Makefile_in       10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,63 @@
+$OpenBSD$
+Remove version-info from drivers
+dont install-exec-hook for var/dspam/{,log} & etc/dspam.conf
+--- src/Makefile.in.orig       Mon Apr 23 19:53:45 2012
++++ src/Makefile.in    Tue Jan  8 22:21:26 2013
+@@ -470,8 +470,7 @@ libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info
+ @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_CPPFLAGS = $(libmysql_drv_cppflags)
+ @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_LDFLAGS =  \
+ @DYNAMIC_DRIVER_TRUE@ $(libmysql_drv_ldflags) -rpath \
+-@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \
+-@DYNAMIC_DRIVER_TRUE@ $(libversion)
++@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -avoid-version
+ @DYNAMIC_DRIVER_TRUE@libmysql_drv_la_DEPENDENCIES = libdspam.la
+ @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_SOURCES = \
+ @DYNAMIC_DRIVER_TRUE@ pgsql_drv.c pgsql_drv.h 
+@@ -480,8 +479,7 @@ libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info
+ @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_CPPFLAGS = $(libpgsql_drv_cppflags)
+ @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_LDFLAGS =  \
+ @DYNAMIC_DRIVER_TRUE@ $(libpgsql_drv_ldflags) -rpath \
+-@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \
+-@DYNAMIC_DRIVER_TRUE@ $(libversion)
++@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -avoid-version
+ @DYNAMIC_DRIVER_TRUE@libpgsql_drv_la_DEPENDENCIES = libdspam.la
+ @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_SOURCES = \
+ @DYNAMIC_DRIVER_TRUE@ sqlite_drv.c sqlite_drv.h 
+@@ -490,8 +488,7 @@ libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info
+ @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_CPPFLAGS = $(libsqlite_drv_cppflags)
+ @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_LDFLAGS =  \
+ @DYNAMIC_DRIVER_TRUE@ $(libsqlite_drv_ldflags) -rpath \
+-@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \
+-@DYNAMIC_DRIVER_TRUE@ $(libversion)
++@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -avoid-version
+ @DYNAMIC_DRIVER_TRUE@libsqlite_drv_la_DEPENDENCIES = libdspam.la
+ @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_SOURCES = \
+ @DYNAMIC_DRIVER_TRUE@ sqlite3_drv.c sqlite3_drv.h 
+@@ -500,8 +497,7 @@ libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info
+ @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_CPPFLAGS = $(libsqlite3_drv_cppflags)
+ @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_LDFLAGS =  \
+ @DYNAMIC_DRIVER_TRUE@ $(libsqlite3_drv_ldflags) -rpath \
+-@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -version-info \
+-@DYNAMIC_DRIVER_TRUE@ $(libversion)
++@DYNAMIC_DRIVER_TRUE@ '$(pkglibdir)' -avoid-version
+ @DYNAMIC_DRIVER_TRUE@libsqlite3_drv_la_DEPENDENCIES = libdspam.la
+ @DYNAMIC_DRIVER_TRUE@libhash_drv_la_SOURCES = \
+ @DYNAMIC_DRIVER_TRUE@ hash_drv.c hash_drv.h
+@@ -509,8 +505,7 @@ libdspam_la_LDFLAGS = -rpath '$(libdir)' -version-info
+ @DYNAMIC_DRIVER_TRUE@libhash_drv_la_LIBADD = $(libhash_drv_libs) -L. -ldspam
+ @DYNAMIC_DRIVER_TRUE@libhash_drv_la_CPPFLAGS = $(libhash_drv_cppflags)
+ @DYNAMIC_DRIVER_TRUE@libhash_drv_la_LDFLAGS = $(libhash_drv_ldflags) \
+-@DYNAMIC_DRIVER_TRUE@ -rpath '$(pkglibdir)' -version-info \
+-@DYNAMIC_DRIVER_TRUE@ $(libversion)
++@DYNAMIC_DRIVER_TRUE@ -rpath '$(pkglibdir)' -avoid-version
+ @DYNAMIC_DRIVER_TRUE@libhash_drv_la_DEPENDENCIES = libdspam.la
+ dspam_SOURCES = \
+       config.h libdspam.h language.h \
+@@ -1163,7 +1158,6 @@ install-dvi-am:
+ install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
+       install-pkglibLTLIBRARIES
+       @$(NORMAL_INSTALL)
+-      $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ install-html: install-html-recursive
+ 
+ install-html-am:
Index: patches/patch-src_agent_shared_c
===================================================================
RCS file: patches/patch-src_agent_shared_c
diff -N patches/patch-src_agent_shared_c
--- patches/patch-src_agent_shared_c    21 Dec 2007 14:42:23 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-$OpenBSD: patch-src_agent_shared_c,v 1.3 2007/12/21 14:42:23 todd Exp $
---- src/agent_shared.c.orig    Thu Dec 20 18:03:30 2007
-+++ src/agent_shared.c Thu Dec 20 18:03:08 2007
-@@ -913,3 +913,18 @@ int process_parseto(AGENT_CTX *ATX, const char *buf) {
- 
-   return 0;
- }
-+
-+int
-+init_pwent_cache()
-+{
-+  struct passwd *pwent;
-+  pwent = getpwuid(getuid());
-+  if (pwent == NULL) {
-+    return 0;
-+  }
-+  else {
-+    __pw_name = strdup(pwent->pw_name);
-+    __pw_uid  = pwent->pw_uid;
-+  }
-+  return 1;
-+}
Index: patches/patch-src_agent_shared_h
===================================================================
RCS file: patches/patch-src_agent_shared_h
diff -N patches/patch-src_agent_shared_h
--- patches/patch-src_agent_shared_h    21 Dec 2007 14:42:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_agent_shared_h,v 1.1 2007/12/21 14:42:23 todd Exp $
---- src/agent_shared.h.orig    Thu Dec 20 18:03:38 2007
-+++ src/agent_shared.h Thu Dec 20 18:03:54 2007
-@@ -107,6 +107,8 @@ int initialize_atx      (AGENT_CTX *ATX);
- int process_parseto   (AGENT_CTX *ATX, const char *buf);
- buffer *read_stdin    (AGENT_CTX *ATX);
- 
-+int init_pwent_cache();
-+
- #ifndef MIN
- #   define MAX(a,b)  ((a)>(b)?(a):(b))
- #   define MIN(a,b)  ((a)<(b)?(a):(b))
Index: patches/patch-src_bnr_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_bnr_c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_bnr_c
--- patches/patch-src_bnr_c     26 Oct 2005 06:18:38 -0000      1.1
+++ patches/patch-src_bnr_c     10 Jan 2013 22:56:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_bnr_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
---- src/bnr.c.orig     Sat Sep 24 19:49:48 2005
-+++ src/bnr.c  Mon Oct 17 14:48:42 2005
-@@ -137,11 +137,11 @@ int bnr_instantiate(BNR_CTX *BTX) {
+--- src/bnr.c.orig     Wed Apr 11 20:48:33 2012
++++ src/bnr.c  Sat Jan  5 15:35:35 2013
+@@ -136,11 +136,11 @@ int bnr_instantiate(BNR_CTX *BTX) {
      }
  
      previous_bnr_probs[BNR_SIZE-1] = _bnr_round(node_list->value);
@@ -15,7 +15,7 @@
      }
  
  #ifdef LIBBNR_VERBOSE_DEBUG
-@@ -280,11 +280,11 @@ int bnr_finalize(BNR_CTX *BTX) {
+@@ -279,11 +279,11 @@ int bnr_finalize(BNR_CTX *BTX) {
      previous_bnr_probs[BNR_SIZE-1] = _bnr_round(node_list->value);
      previous_bnr_tokens[BNR_SIZE-1] = node_list;
  
Index: patches/patch-src_client_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_client_c,v
retrieving revision 1.4
diff -u -r1.4 patch-src_client_c
--- patches/patch-src_client_c  21 Dec 2007 14:42:23 -0000      1.4
+++ patches/patch-src_client_c  10 Jan 2013 22:56:56 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_client_c,v 1.4 2007/12/21 14:42:23 todd Exp $
---- src/client.c.orig  Thu May 25 17:36:39 2006
-+++ src/client.c       Sun Apr 29 17:57:52 2007
+--- src/client.c.orig  Wed Apr 11 20:48:33 2012
++++ src/client.c       Sat Jan  5 15:35:35 2013
 @@ -108,7 +108,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
  
    /* RCPT TO - Send recipient information */
@@ -10,7 +10,7 @@
    node_nt = c_nt_first(ATX->users, &c_nt);
    while(node_nt != NULL) {
      const char *ptr = (const char *) node_nt->ptr;
-@@ -170,7 +170,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
+@@ -211,7 +211,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
      if (ATX->flags & DAF_SUMMARY)
        head = 1;
  
@@ -19,8 +19,8 @@
  
      while(line != NULL && strcmp(line, ".")) {
        chomp(line);
-@@ -192,7 +192,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
-           break;
+@@ -231,13 +231,13 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
+         printf("%s\n", line);
        } 
        free(line);
 -      line = client_getline(&TTX, 300);
@@ -28,8 +28,6 @@
        if (line) chomp(line);
      }
      free(line);
-@@ -200,7 +200,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
-       goto BAIL;
    } else {
      for(i=0;i<ATX->users->items;i++) {
 -      char *input = client_getline(&TTX, 300);
@@ -37,7 +35,7 @@
        char *x;
        int code = 500;
  
-@@ -313,7 +313,7 @@ int client_connect(AGENT_CTX *ATX, int flags) {
+@@ -354,7 +354,7 @@ int client_connect(AGENT_CTX *ATX, int flags) {
    if (domain) {
      sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
      saun.sun_family = AF_UNIX;
@@ -46,7 +44,7 @@
      addr_len = sizeof(saun.sun_family) + strlen(saun.sun_path) + 1;
  
      LOGDEBUG(INFO_CLIENT_CONNECTING, host, 0);
-@@ -443,7 +443,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
+@@ -484,7 +484,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
    char *inp, *dup, *ptr, *ptrptr;
    int recv_code;
  
@@ -55,7 +53,7 @@
    while(inp != NULL) {
      recv_code = 0;
      dup = strdup(inp);
-@@ -467,7 +467,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
+@@ -508,7 +508,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
      
      strlcpy(err, inp, len);
      free(inp);
@@ -64,8 +62,8 @@
    }
  
    return NULL;
-@@ -512,13 +512,13 @@ int client_getcode(THREAD_CTX *TTX, char *err, size_t 
-   char *inp, *ptr, *ptrptr;
+@@ -553,13 +553,13 @@ int client_getcode(THREAD_CTX *TTX, char *err, size_t 
+   char *inp, *ptr, *ptrptr = NULL;
    int i;
  
 -  inp = client_getline(TTX, 300);
Index: patches/patch-src_daemon_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_daemon_c,v
retrieving revision 1.4
diff -u -r1.4 patch-src_daemon_c
--- patches/patch-src_daemon_c  21 Dec 2007 14:42:23 -0000      1.4
+++ patches/patch-src_daemon_c  10 Jan 2013 22:56:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_daemon_c,v 1.4 2007/12/21 14:42:23 todd Exp $
---- src/daemon.c.orig  Tue Jun 13 16:43:12 2006
-+++ src/daemon.c       Sun Apr 29 17:57:52 2007
-@@ -549,7 +549,7 @@ void *process_connection(void *ptr) {
+--- src/daemon.c.orig  Wed Apr 11 20:48:33 2012
++++ src/daemon.c       Sat Jan  5 15:56:04 2013
+@@ -561,7 +561,7 @@ void *process_connection(void *ptr) {
  
      while(ATX->users->items == 0 || invalid) {
        free(cmdline);
@@ -10,7 +10,7 @@
   
        while(cmdline && 
              (!strncasecmp(cmdline, "RCPT TO:", 8) ||
-@@ -596,7 +596,7 @@ void *process_connection(void *ptr) {
+@@ -620,7 +620,7 @@ void *process_connection(void *ptr) {
  
  GETCMD:
          free(cmdline);
@@ -19,7 +19,7 @@
        }
  
        if (cmdline == NULL)
-@@ -875,7 +875,7 @@ buffer * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) {
+@@ -900,7 +900,7 @@ buffer * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) {
      body = 1;
    }
  
@@ -28,21 +28,30 @@
      chomp(buf);
  
      if (!strcmp(buf, ".")) {
-@@ -958,7 +958,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
+@@ -992,7 +992,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
    char buf[128];
    char *cmd;
  
--  cmd = daemon_getline(TTX, 300); 
-+  cmd = daemon_getline(TTX, 900); 
+-  cmd = daemon_getline(TTX, 300);
++  cmd = daemon_getline(TTX, 900);
    if (cmd == NULL)
      return NULL;
  
-@@ -981,7 +981,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
-     if (send_socket(TTX, buf)<=0)
-       return NULL;
-     free(cmd);
--    cmd = daemon_getline(TTX, 300);
-+    cmd = daemon_getline(TTX, 900);
-     if (cmd == NULL)
-       return NULL;
-   } 
+@@ -1007,7 +1007,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
+         return NULL;
+       free(cmd);
+       if (!strncasecmp(command, "LHLO", 4)) {
+-        cmd = daemon_getline(TTX, 300);
++        cmd = daemon_getline(TTX, 900);
+         if (cmd == NULL)
+           return NULL;
+       } else {
+@@ -1018,7 +1018,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
+       if (send_socket(TTX, buf)<=0)
+         return NULL;
+       free(cmd);
+-      cmd = daemon_getline(TTX, 300);
++      cmd = daemon_getline(TTX, 900);
+       if (cmd == NULL)
+         return NULL;
+     }
Index: patches/patch-src_dspam_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_dspam_c,v
retrieving revision 1.8
diff -u -r1.8 patch-src_dspam_c
--- patches/patch-src_dspam_c   21 Dec 2007 14:42:23 -0000      1.8
+++ patches/patch-src_dspam_c   10 Jan 2013 22:56:56 -0000
@@ -1,41 +1,17 @@
 $OpenBSD: patch-src_dspam_c,v 1.8 2007/12/21 14:42:23 todd Exp $
---- src/dspam.c.orig   Tue Dec 12 09:33:45 2006
-+++ src/dspam.c        Thu Dec 20 18:07:56 2007
-@@ -108,7 +108,6 @@ main (int argc, char *argv[])
-   int exitcode = EXIT_SUCCESS;
-   struct nt_node *node_nt;
-   struct nt_c c_nt;
--  struct passwd *pwent;
- 
-   srand ((long) time << (long) getpid ());
-   umask (006);                  /* rw-rw---- */
-@@ -123,14 +122,11 @@ main (int argc, char *argv[])
- 
-   /* Cache my username and uid for trusted user security */
- 
--  pwent = getpwuid(getuid());
--  if (pwent == NULL) {
-+  if (!init_pwent_cache()) {
-     LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER);
-     exitcode = EXIT_FAILURE;
-     goto BAIL;
-   }
--  __pw_name = strdup(pwent->pw_name);
--  __pw_uid  = pwent->pw_uid;
- 
-   /* Read dspam.conf into global config structure (ds_config_t) */
- 
-@@ -402,7 +398,7 @@ process_message (
+--- src/dspam.c.orig   Wed Apr 11 20:48:33 2012
++++ src/dspam.c        Sat Jan  5 16:11:50 2013
+@@ -415,7 +415,7 @@ process_message (
        CTX->confidence = 1.0;
        STATUS("A virus was detected in the message contents");
        result = DSR_ISSPAM;
 -      strcpy(CTX->class, LANG_CLASS_VIRUS);
 +      strlcpy(CTX->class, LANG_CLASS_VIRUS, sizeof (CTX->class));
        internally_canned = 1;
-       if (!dspam_getsource (CTX, ip, sizeof (ip)))
-       {
-@@ -419,7 +415,7 @@ process_message (
-     result = DSR_ISSPAM;
+       if(!_ds_match_attribute(agent_config, "TrackSources", "virus")) {
+         if (!dspam_getsource (CTX, ip, sizeof (ip)))
+@@ -433,7 +433,7 @@ process_message (
+     CTX->result = DSR_ISSPAM;
      CTX->probability = 1.0;
      CTX->confidence = 1.0;
 -    strcpy(CTX->class, LANG_CLASS_BLOCKLISTED);
@@ -43,16 +19,7 @@
      internally_canned = 1;
    }
  
-@@ -439,7 +435,7 @@ process_message (
-         result = DSR_ISSPAM;
-         CTX->probability = 1.0;
-         CTX->confidence = 1.0;
--        strcpy(CTX->class, LANG_CLASS_BLACKLISTED);
-+        strlcpy(CTX->class, LANG_CLASS_BLACKLISTED, sizeof (CTX->class));
-         internally_canned = 1;
-       }
-     }
-@@ -786,10 +782,10 @@ process_message (
+@@ -826,10 +826,10 @@ process_message (
  
      switch (CTX->result) {
        case DSR_ISSPAM:
@@ -65,7 +32,7 @@
          break;
      }
  
-@@ -1054,7 +1050,7 @@ int tag_message(AGENT_CTX *ATX, ds_message_t message)
+@@ -1114,7 +1114,7 @@ int tag_message(AGENT_CTX *ATX, ds_message_t message)
    int tagged = 0;
    char spam_subject[16];
  
@@ -74,12 +41,12 @@
    if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
        _ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
    {
-@@ -1616,7 +1612,7 @@ int process_users(AGENT_CTX *ATX, buffer *message) {
+@@ -1709,7 +1709,7 @@ int process_users(AGENT_CTX *ATX, buffer *message) {
      if (parse_message == NULL) {
        LOG(LOG_CRIT, ERR_MEM_ALLOC);
        presult->exitcode = ERC_PROCESS;
 -      strcpy(presult->text, ERR_MEM_ALLOC);
 +      strlcpy(presult->text, ERR_MEM_ALLOC, sizeof (presult->text));
  
-       if (ATX->results)
+       if (ATX->results) {
          nt_add(ATX->results, presult);
Index: patches/patch-src_dspamc_c
===================================================================
RCS file: patches/patch-src_dspamc_c
diff -N patches/patch-src_dspamc_c
--- patches/patch-src_dspamc_c  21 Dec 2007 14:42:23 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-src_dspamc_c,v 1.1 2007/12/21 14:42:23 todd Exp $
---- src/dspamc.c.orig  Thu Dec 20 18:00:46 2007
-+++ src/dspamc.c       Thu Dec 20 18:01:59 2007
-@@ -99,6 +99,7 @@ main (int argc, char *argv[])
-   int exitcode = EXIT_SUCCESS;
-   buffer *message = NULL;       /* input Message */
-   int agent_init = 0;         /* agent is initialized */
-+  struct passwd *pwent;
- 
-   setbuf (stdout, NULL);      /* unbuffered output */
- #ifdef DEBUG
-@@ -112,6 +113,14 @@ main (int argc, char *argv[])
-   LOG(LOG_ERR, ERR_DAEMON_NO_SUPPORT);
-   exit(EXIT_FAILURE);
- #endif
-+
-+  /* Cache my username and uid for trusted user security */
-+
-+  if (!init_pwent_cache()) {
-+    LOG(LOG_ERR, ERR_AGENT_RUNTIME_USER);
-+    exitcode = EXIT_FAILURE;
-+    goto BAIL;
-+  }
- 
-   /* Read dspam.conf into global config structure (ds_config_t) */
- 
Index: patches/patch-src_example_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_example_c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_example_c
--- patches/patch-src_example_c 26 Oct 2005 06:18:38 -0000      1.1
+++ patches/patch-src_example_c 10 Jan 2013 22:56:56 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_example_c,v 1.1 2005/10/26 06:18:38 jakob Exp $
---- src/example.c.orig Sat Sep 24 19:49:49 2005
-+++ src/example.c      Mon Oct 17 14:48:42 2005
-@@ -68,7 +68,7 @@ main (int argc, char **argv)
+--- src/example.c.orig Wed Apr 11 20:48:33 2012
++++ src/example.c      Sat Jan  5 15:36:07 2013
+@@ -67,7 +67,7 @@ main (int argc, char **argv)
        fprintf (stderr, "out of memory!");
        exit (EXIT_FAILURE);
      }
Index: patches/patch-src_list_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_list_c,v
retrieving revision 1.2
diff -u -r1.2 patch-src_list_c
--- patches/patch-src_list_c    21 Dec 2007 14:42:23 -0000      1.2
+++ patches/patch-src_list_c    10 Jan 2013 22:56:56 -0000
@@ -1,8 +1,8 @@
 $OpenBSD: patch-src_list_c,v 1.2 2007/12/21 14:42:23 todd Exp $
---- src/list.c.orig    Sat May 13 03:12:59 2006
-+++ src/list.c Sun Apr 29 17:57:52 2007
-@@ -116,7 +116,7 @@ bnr_list_insert (struct bnr_list *list, void *data, fl
-       perror("memory allocation error: list_insert() failed");
+--- src/list.c.orig    Wed Apr 11 20:48:33 2012
++++ src/list.c Sat Jan  5 15:36:07 2013
+@@ -115,7 +115,7 @@ bnr_list_insert (struct bnr_list *list, void *data, fl
+       perror("bnr_list_insert: memory allocation error");
        return NULL;
      }
 -    strcpy (vptr, data);
Index: patches/patch-src_mysql_drv_c
===================================================================
RCS file: patches/patch-src_mysql_drv_c
diff -N patches/patch-src_mysql_drv_c
--- patches/patch-src_mysql_drv_c       21 Dec 2007 14:42:23 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_mysql_drv_c,v 1.6 2007/12/21 14:42:23 todd Exp $
---- src/mysql_drv.c.orig       Thu Sep 21 20:25:19 2006
-+++ src/mysql_drv.c    Sun Apr 29 17:57:52 2007
-@@ -1362,7 +1362,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
-       virtual_username, 
-       virtual_table);
- #else
--    strcpy (query, "select distinct uid from dspam_stats");
-+    strlcpy (query, "select distinct uid from dspam_stats", sizeof (query));
- #endif
-     if (MYSQL_RUN_QUERY (s->dbt->dbh_read, query))
-     {
Index: patches/patch-src_pgsql_drv_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_pgsql_drv_c,v
retrieving revision 1.6
diff -u -r1.6 patch-src_pgsql_drv_c
--- patches/patch-src_pgsql_drv_c       24 Oct 2010 12:14:08 -0000      1.6
+++ patches/patch-src_pgsql_drv_c       10 Jan 2013 22:56:56 -0000
@@ -1,30 +1,12 @@
 $OpenBSD: patch-src_pgsql_drv_c,v 1.6 2010/10/24 12:14:08 naddy Exp $
---- src/pgsql_drv.c.orig       Sat Jul 29 15:38:48 2006
-+++ src/pgsql_drv.c    Sun Oct 24 13:51:05 2010
-@@ -1146,7 +1146,7 @@ _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_si
- 
-     p = _pgsql_drv_getpwuid (CTX, uid);
-     if (!p) {
--      LOG(LOG_CRIT, "_ds_get_signature(): _mysql_drv_getpwuid(%d) failed: 
aborting", uid);
-+      LOG(LOG_CRIT, "_ds_get_signature(): _pgsql_drv_getpwuid(%d) failed: 
aborting", uid);
-       return EFAILURE;
-     }
-     username = strdup(p->pw_name);
-@@ -1241,7 +1241,7 @@ _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_si
-   mem = PQescapeBytea(SIG->data, SIG->length, &length);
+--- src/pgsql_drv.c.orig       Wed Apr 11 20:48:33 2012
++++ src/pgsql_drv.c    Sat Jan  5 15:59:46 2013
+@@ -1537,7 +1537,7 @@ _ds_set_signature (DSPAM_CTX * CTX, struct _ds_spam_si
+   }
  
    snprintf (scratch, sizeof (scratch),
--            "INSERT INTO dspam_signature_data (uid, signature, length, 
created_on, data) VALUES (%d, '%s', %ld, CURRENT_DATE, '",
-+            "INSERT INTO dspam_signature_data (uid, signature, length, 
created_on, data) VALUES (%d, '%s', %ld, CURRENT_DATE, E'",
-             (int)p->pw_uid, signature, SIG->length);
+-            "INSERT INTO dspam_signature_data 
(uid,signature,length,created_on,data) VALUES (%d,'%s',%lu,CURRENT_DATE,'",
++            "INSERT INTO dspam_signature_data 
(uid,signature,length,created_on,data) VALUES (%d,'%s',%lu,CURRENT_DATE, E'",
+             (int) p->pw_uid, sig_esc, (unsigned long) SIG->length);
+   free(sig_esc);
    buffer_cat (query, scratch);
-   buffer_cat (query, (const char *) mem);
-@@ -1405,7 +1405,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
-         virtual_username,
-         virtual_table);
- #else
--    strcpy (query, "DECLARE dscursor CURSOR FOR SELECT DISTINCT uid FROM 
dspam_stats");
-+    strlcpy (query, "DECLARE dscursor CURSOR FOR SELECT DISTINCT uid FROM 
dspam_stats", sizeof (query));
- #endif
- 
-     result = PQexec(s->dbh, query);
Index: patches/patch-src_storage_driver_c
===================================================================
RCS file: patches/patch-src_storage_driver_c
diff -N patches/patch-src_storage_driver_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_storage_driver_c  10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- src/storage_driver.c.orig  Sat Jan  5 16:48:17 2013
++++ src/storage_driver.c       Sat Jan  5 16:48:34 2013
+@@ -25,6 +25,7 @@
+ 
+ #include <stdlib.h>
+ #include <dlfcn.h>
++#include <stdint.h>
+ 
+ #include "libdspam.h"
+ #include "storage_driver.h"
Index: patches/patch-src_util_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_util_c,v
retrieving revision 1.3
diff -u -r1.3 patch-src_util_c
--- patches/patch-src_util_c    21 Dec 2007 14:42:23 -0000      1.3
+++ patches/patch-src_util_c    10 Jan 2013 22:56:56 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_util_c,v 1.3 2007/12/21 14:42:23 todd Exp $
---- src/util.c.orig    Sat May 13 03:12:59 2006
-+++ src/util.c Sun Apr 29 17:57:52 2007
+--- src/util.c.orig    Wed Apr 11 20:48:33 2012
++++ src/util.c Sat Jan  5 15:36:07 2013
 @@ -278,7 +278,7 @@ const char * _ds_userdir_path (char *path, const char 
  #endif
  
@@ -19,7 +19,7 @@
  #endif
  
    /* Use home/opt-in/ and home/opt-out/ to store opt files, instead of
-@@ -748,6 +748,7 @@ inet_ntoa_r(struct in_addr in, char *buf, int len)
+@@ -860,7 +860,8 @@ inet_ntoa_r(struct in_addr in, char *buf, int len)
      return(NULL);
    }
  
@@ -28,3 +28,4 @@
 +  return buf;
  }
  #endif
+ 
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- pkg/DESCR   6 Sep 2007 19:15:13 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-DSPAM is an open-source, freely available anti-spam solution designed to 
-combat unsolicited commercial email using advanced statistical analysis. 
-In short, DSPAM filters spam by learning what spam is and isn't by 
-learning each user's individual mail behavior. This allows DSPAM to 
-provide highly-accurate, personalized filtering for each user on even a 
-large system and provides an administratively maintenance free solution 
-capable of learning each user's email behaviors with very few false 
-positives.
-
-Available flavors are:
-
-- clamav: enable usage of the clam antivirus.
-
-- ldap: include support for LDAP verification.
-
-- sqlite: use the sqlite 2.x library as a storage engine.
-
-- sqlite3: use the sqlite 3.x library as a storage engine. This is the
-default.
-
-- pgsql: use a postgresql server as a storage engine.
-
-- mysql: use a mysql server as a storage engine.
-
-- hash: use the CRM Sparse Spectra (CSS) storage engine.
-
-- preferences : store user preferences in the database instead of flat files.
-Has any effect only on mysql and pgsql flavors.
Index: pkg/DESCR-main
===================================================================
RCS file: pkg/DESCR-main
diff -N pkg/DESCR-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-main      10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,14 @@
+DSPAM is an open-source, freely available anti-spam solution designed to 
+combat unsolicited commercial email using advanced statistical analysis. 
+In short, DSPAM filters spam by learning what spam is and isn't by 
+learning each user's individual mail behavior. This allows DSPAM to 
+provide highly-accurate, personalized filtering for each user on even a 
+large system and provides an administratively maintenance free solution 
+capable of learning each user's email behaviors with very few false 
+positives.
+
+Available flavors are:
+
+- clamav: enable usage of the clam antivirus.
+
+- ldap: include support for LDAP verification.
Index: pkg/DESCR-mysql
===================================================================
RCS file: pkg/DESCR-mysql
diff -N pkg/DESCR-mysql
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-mysql     10 Jan 2013 22:56:56 -0000
@@ -0,0 +1 @@
+MySQL driver for dspam.
Index: pkg/DESCR-pgsql
===================================================================
RCS file: pkg/DESCR-pgsql
diff -N pkg/DESCR-pgsql
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-pgsql     10 Jan 2013 22:56:56 -0000
@@ -0,0 +1 @@
+PostgreSQL driver for dspam.
Index: pkg/PFRAG.clamav-main
===================================================================
RCS file: pkg/PFRAG.clamav-main
diff -N pkg/PFRAG.clamav-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.clamav-main       10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@pkgpath 
mail/dspam,clamav[,hash][,sqlite][,sqlite3][,mysql][,pgsql][,preferences]
Index: pkg/PFRAG.domainscale-main
===================================================================
RCS file: pkg/PFRAG.domainscale-main
diff -N pkg/PFRAG.domainscale-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.domainscale-main  10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@pkgpath 
mail/dspam,domainscale[,hash][,sqlite][,sqlite3][,mysql][,pgsql][,preferences]
Index: pkg/PFRAG.hash
===================================================================
RCS file: pkg/PFRAG.hash
diff -N pkg/PFRAG.hash
--- pkg/PFRAG.hash      23 Nov 2005 08:52:49 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
-@comment $OpenBSD: PFRAG.hash,v 1.2 2005/11/23 08:52:49 jakob Exp $
-bin/cssclean
-bin/csscompress
-bin/cssconvert
-bin/cssstat
Index: pkg/PFRAG.largescale-main
===================================================================
RCS file: pkg/PFRAG.largescale-main
diff -N pkg/PFRAG.largescale-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.largescale-main   10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@pkgpath 
mail/dspam,largescale[,hash][,sqlite][,sqlite3][,mysql][,pgsql][,preferences]
Index: pkg/PFRAG.ldap-main
===================================================================
RCS file: pkg/PFRAG.ldap-main
diff -N pkg/PFRAG.ldap-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.ldap-main 10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@pkgpath 
mail/dspam,ldap[,hash][,sqlite][,sqlite3][,mysql][,pgsql][,preferences]
Index: pkg/PFRAG.mysql
===================================================================
RCS file: pkg/PFRAG.mysql
diff -N pkg/PFRAG.mysql
--- pkg/PFRAG.mysql     25 Mar 2006 02:51:33 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
-@comment $OpenBSD: PFRAG.mysql,v 1.3 2006/03/25 02:51:33 todd Exp $
-share/doc/dspam/mysql_drv.txt
-share/examples/dspam/mysql/
-share/examples/dspam/mysql/mysql_objects-4.1.sql
-share/examples/dspam/mysql/mysql_objects-space.sql
-share/examples/dspam/mysql/mysql_objects-speed.sql
-share/examples/dspam/mysql/purge-4.1.sql
-share/examples/dspam/mysql/purge.sql
-share/examples/dspam/mysql/virtual_user_aliases.sql
-share/examples/dspam/mysql/virtual_users.sql
Index: pkg/PFRAG.pgsql
===================================================================
RCS file: pkg/PFRAG.pgsql
diff -N pkg/PFRAG.pgsql
--- pkg/PFRAG.pgsql     26 Oct 2005 06:18:39 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-@comment $OpenBSD: PFRAG.pgsql,v 1.2 2005/10/26 06:18:39 jakob Exp $
-bin/dspam_pg2int8
-share/doc/dspam/pgsql_drv.txt
-share/examples/dspam/pgsql/
-share/examples/dspam/pgsql/pgsql_objects.sql
-share/examples/dspam/pgsql/purge.sql
-share/examples/dspam/pgsql/virtual_users.sql
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- pkg/PFRAG.shared    26 Dec 2005 13:17:35 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-@comment $OpenBSD: PFRAG.shared,v 1.3 2005/12/26 13:17:35 steven Exp $
-@lib lib/libdspam.so.${LIBdspam_VERSION}
Index: pkg/PFRAG.sqlite
===================================================================
RCS file: pkg/PFRAG.sqlite
diff -N pkg/PFRAG.sqlite
--- pkg/PFRAG.sqlite    26 Oct 2005 06:18:39 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
-@comment $OpenBSD: PFRAG.sqlite,v 1.2 2005/10/26 06:18:39 jakob Exp $
-share/doc/dspam/sqlite_drv.txt
-share/examples/dspam/sqlite/
-share/examples/dspam/sqlite/purge-2.sql
Index: pkg/PFRAG.sqlite3
===================================================================
RCS file: pkg/PFRAG.sqlite3
diff -N pkg/PFRAG.sqlite3
--- pkg/PFRAG.sqlite3   18 Oct 2006 05:12:35 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-@comment $OpenBSD: PFRAG.sqlite3,v 1.3 2006/10/18 05:12:35 aanriot Exp $
-share/examples/dspam/sqlite/purge-3.sql
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- pkg/PLIST   11 May 2011 12:57:48 -0000      1.8
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.8 2011/05/11 12:57:48 jasper Exp $
-@newgroup _dspam:540
-@newuser _dspam:540:540:daemon:DSPAM Account:/var/dspam:/sbin/nologin
-@extraunexec rm -rf /var/dspam/*
-%%SHARED%%
-bin/dspam
-bin/dspam_2sql
-bin/dspam_admin
-bin/dspam_clean
-bin/dspam_crc
-bin/dspam_dump
-bin/dspam_logrotate
-bin/dspam_merge
-bin/dspam_stats
-bin/dspam_train
-bin/dspamc
-include/dspam/
-include/dspam/buffer.h
-include/dspam/config.h
-include/dspam/config_shared.h
-include/dspam/decode.h
-include/dspam/diction.h
-include/dspam/error.h
-include/dspam/heap.h
-include/dspam/ldap_client.h
-include/dspam/libdspam.h
-include/dspam/libdspam_objects.h
-include/dspam/nodetree.h
-include/dspam/storage_driver.h
-include/dspam/tokenizer.h
-lib/libdspam.a
-lib/libdspam.la
-lib/pkgconfig/
-lib/pkgconfig/dspam.pc
-@man man/man1/dspam.1
-@man man/man1/dspam_clean.1
-@man man/man1/dspam_dump.1
-@man man/man1/dspam_merge.1
-@man man/man1/dspam_stats.1
-@man man/man1/dspam_train.1
-@man man/man3/dspam_addattribute.3
-@man man/man3/dspam_attach.3
-@man man/man3/dspam_create.3
-@man man/man3/dspam_destroy.3
-@man man/man3/dspam_detach.3
-@man man/man3/dspam_getsource.3
-@man man/man3/dspam_init.3
-@man man/man3/dspam_process.3
-@man man/man3/libdspam.3
-share/doc/dspam/
-share/doc/dspam/README
-share/doc/dspam/RELEASE.NOTES
-share/doc/dspam/UPGRADING
-share/doc/dspam/courier.txt
-share/doc/dspam/exim.txt
-share/doc/dspam/markov.txt
-share/doc/dspam/pop3filter.txt
-share/doc/dspam/postfix.txt
-share/doc/dspam/qmail.txt
-share/doc/dspam/relay.txt
-share/doc/dspam/sendmail.txt
-share/examples/dspam/
-share/examples/dspam/dspam.conf
-@sample ${SYSCONFDIR}/dspam.conf
-%%sqlite3%%
-%%sqlite%%
-%%mysql%%
-%%pgsql%%
-%%hash%%
-@mode 755
-@owner _dspam
-@group _dspam
-@sample /var/dspam/
-@sample /var/dspam/data/
Index: pkg/PLIST-main
===================================================================
RCS file: pkg/PLIST-main
diff -N pkg/PLIST-main
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-main      10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,98 @@
+@comment $OpenBSD: PLIST,v 1.8 2011/05/11 12:57:48 jasper Exp $
+%%clamav%%
+%%domainscale%%
+%%ldap%%
+%%largescale%%
+@pkgpath mail/dspam[,hash][,sqlite][,sqlite3][,mysql][,pgsql][,preferences]
+@newgroup _dspam:540
+@newuser _dspam:540:540:daemon:DSPAM Account:/var/dspam:/sbin/nologin
+@extraunexec rm -rf /var/dspam/*
+@bin bin/cssclean
+@bin bin/csscompress
+@bin bin/cssconvert
+@bin bin/cssstat
+@bin bin/dspam
+@bin bin/dspam_2sql
+@bin bin/dspam_admin
+@bin bin/dspam_clean
+@bin bin/dspam_crc
+@bin bin/dspam_dump
+bin/dspam_logrotate
+@bin bin/dspam_merge
+bin/dspam_notify
+@bin bin/dspam_stats
+bin/dspam_train
+@bin bin/dspamc
+include/dspam/
+include/dspam/buffer.h
+include/dspam/config.h
+include/dspam/config_shared.h
+include/dspam/decode.h
+include/dspam/diction.h
+include/dspam/error.h
+include/dspam/heap.h
+include/dspam/libdspam.h
+include/dspam/libdspam_objects.h
+include/dspam/nodetree.h
+include/dspam/pref.h
+include/dspam/read_config.h
+include/dspam/storage_driver.h
+include/dspam/tokenizer.h
+lib/dspam/
+@comment lib/dspam/libhash_drv.la
+lib/dspam/libhash_drv.so
+@comment lib/dspam/libsqlite3_drv.la
+lib/dspam/libsqlite3_drv.so
+@comment lib/libdspam.la
+@lib lib/libdspam.so.${LIBdspam_VERSION}
+lib/pkgconfig/
+lib/pkgconfig/dspam.pc
+@man man/man1/dspam.1
+@man man/man1/dspam_admin.1
+@man man/man1/dspam_clean.1
+@man man/man1/dspam_crc.1
+@man man/man1/dspam_dump.1
+@man man/man1/dspam_logrotate.1
+@man man/man1/dspam_merge.1
+@man man/man1/dspam_stats.1
+@man man/man1/dspam_train.1
+@man man/man3/dspam_addattribute.3
+@man man/man3/dspam_attach.3
+@man man/man3/dspam_clearattributes.3
+@man man/man3/dspam_create.3
+@man man/man3/dspam_destroy.3
+@man man/man3/dspam_detach.3
+@man man/man3/dspam_getsource.3
+@man man/man3/dspam_init.3
+@man man/man3/dspam_process.3
+@man man/man3/libdspam.3
+share/doc/dspam/
+share/doc/dspam/README
+share/doc/dspam/RELEASE.NOTES
+share/doc/dspam/UPGRADING
+share/doc/dspam/courier.txt
+share/doc/dspam/cssclean.txt
+share/doc/dspam/exim.txt
+share/doc/dspam/markov.txt
+share/doc/dspam/osx.txt
+share/doc/dspam/pop3filter.txt
+share/doc/dspam/postfix.txt
+share/doc/dspam/qmail.txt
+share/doc/dspam/relay.txt
+share/doc/dspam/sendmail.txt
+share/doc/dspam/sqlite_drv.txt
+share/doc/dspam/tests.txt
+share/examples/dspam/
+share/examples/dspam/dspam.conf
+@sample ${SYSCONFDIR}/dspam.conf
+share/examples/dspam/sqlite/
+share/examples/dspam/sqlite/purge-2.sql
+share/examples/dspam/sqlite/purge-3.sql
+@rcscript ${RCDIR}/dspam
+@mode 755
+@owner _dspam
+@group _dspam
+@sample /var/dspam/
+@sample /var/dspam/data/
+@sample /var/dspam/log/
+@sample /var/run/dspam/
Index: pkg/PLIST-mysql
===================================================================
RCS file: pkg/PLIST-mysql
diff -N pkg/PLIST-mysql
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-mysql     10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,13 @@
+@comment $OpenBSD: PFRAG.mysql,v 1.3 2006/03/25 02:51:33 todd Exp $
+@conflict dspam-*-mysql
+@comment lib/dspam/libmysql_drv.la
+lib/dspam/libmysql_drv.so
+share/doc/dspam/mysql_drv.txt
+share/examples/dspam/mysql/
+share/examples/dspam/mysql/mysql_objects-4.1.sql
+share/examples/dspam/mysql/mysql_objects-space.sql
+share/examples/dspam/mysql/mysql_objects-speed.sql
+share/examples/dspam/mysql/purge-4.1.sql
+share/examples/dspam/mysql/purge.sql
+share/examples/dspam/mysql/virtual_user_aliases.sql
+share/examples/dspam/mysql/virtual_users.sql
Index: pkg/PLIST-pgsql
===================================================================
RCS file: pkg/PLIST-pgsql
diff -N pkg/PLIST-pgsql
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-pgsql     10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,11 @@
+@comment $OpenBSD: PFRAG.pgsql,v 1.2 2005/10/26 06:18:39 jakob Exp $
+@conflict dspam-*-pgsql
+@bin bin/dspam_pg2int8
+@comment lib/dspam/libpgsql_drv.la
+lib/dspam/libpgsql_drv.so
+share/doc/dspam/pgsql_drv.txt
+share/examples/dspam/pgsql/
+share/examples/dspam/pgsql/pgsql_objects.sql
+share/examples/dspam/pgsql/purge-pe.sql
+share/examples/dspam/pgsql/purge.sql
+share/examples/dspam/pgsql/virtual_users.sql
Index: pkg/dspam.rc
===================================================================
RCS file: pkg/dspam.rc
diff -N pkg/dspam.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/dspam.rc        10 Jan 2013 22:56:56 -0000
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/bin/dspam"
+daemon_flags=" --daemon"
+
+. /etc/rc.d/rc.subr
+
+rc_cmd $1

Reply via email to