On Fri 2007.10.12 at 00:23 -0400, Brad wrote:
> I already sent an update for dspam to the list awhile ago. Take
> a look at that first.

oh thanks, i missed that...

taking your patch from here:
http://marc.info/?l=openbsd-ports&m=118202988628862&w=2

then making it apply cleanly to -current and adding my 3 bits to it, 
one has:
- update dspam from 3.6.8 to 3.8.0
- set the delivery agent default to openbsd's, instead of it's default,
  /usr/bin/procmail, which just does not help for a default config ;)
- register the sqlite (sqlite3 FLAVOR) dir so pkg_delete can deal.
- install sqlite_drv.txt doc for sqlite3, for it's the same.

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/dspam/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile    6 Sep 2007 19:15:13 -0000       1.22
+++ Makefile    12 Oct 2007 21:31:27 -0000
@@ -2,10 +2,9 @@
 
 COMMENT=       anti-spam filter
 
-VERSION=       3.6.8
+VERSION=       3.8.0
 DISTNAME=      dspam-${VERSION}
-PKGNAME=       ${DISTNAME}p4
-SHARED_LIBS=   dspam   7.0
+SHARED_LIBS=   dspam   8.0
 CATEGORIES=    mail
 
 MASTER_SITES=  http://dspam.nuclearelephant.com/sources/
@@ -21,11 +20,9 @@
 PERMIT_DISTFILES_FTP=  Yes
 WANTLIB=               c m
 
+USE_LIBTOOL=           Yes
 CONFIGURE_STYLE=       gnu
 SEPARATE_BUILD=                concurrent
-
-USE_LIBTOOL=           Yes
-
 CONFIGURE_ARGS+=       --with-dspam-home=/var/dspam \
                        --with-dspam-home-owner=_dspam \
                        --with-dspam-home-group=_dspam \
@@ -33,6 +30,7 @@
                        --with-dspam-owner=root \
                        --with-dspam-group=bin \
                        --with-dspam-mode=0555 \
+                       --with-delivery-agent=/usr/libexec/mail.local \
                        --enable-long-usernames
 
 DOCS=          ${WRKSRC}/README ${WRKSRC}/UPGRADING ${WRKSRC}/RELEASE.NOTES \
Index: distinfo
===================================================================
RCS file: /cvs/ports/mail/dspam/distinfo,v
retrieving revision 1.12
diff -u -r1.12 distinfo
--- distinfo    5 Apr 2007 16:20:01 -0000       1.12
+++ distinfo    12 Oct 2007 21:31:27 -0000
@@ -1,5 +1,5 @@
-MD5 (dspam-3.6.8.tar.gz) = xLGnB5aQ7hbYsPNrKiqQpA==
-RMD160 (dspam-3.6.8.tar.gz) = k6cNsUBwy2G9LvGwylWhi+Hb/Xs=
-SHA1 (dspam-3.6.8.tar.gz) = 6MQTiC6t8eAoN+Si/8/Ji4Ae3tE=
-SHA256 (dspam-3.6.8.tar.gz) = iMe0H7gekLqKJgiFodFLzjny70oGzCxri/oLmboa7DQ=
-SIZE (dspam-3.6.8.tar.gz) = 743275
+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
Index: patches/patch-UPGRADING
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-UPGRADING,v
retrieving revision 1.2
diff -u -r1.2 patch-UPGRADING
--- patches/patch-UPGRADING     22 Jan 2006 04:10:42 -0000      1.2
+++ patches/patch-UPGRADING     12 Oct 2007 21:31:27 -0000
@@ -1,16 +1,16 @@
 $OpenBSD: patch-UPGRADING,v 1.2 2006/01/22 04:10:42 brad Exp $
---- UPGRADING.orig     Tue Jan 17 15:49:08 2006
-+++ UPGRADING  Sat Jan 21 22:54:40 2006
-@@ -13,8 +13,10 @@ UPGRADING FROM < 3.6.1
+--- 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
+    log file selection. This is now required.
  
- - For users of hash_drv: A cssconvert tool has been provided to convert all
-   v3.6.0 databases to the correct, 8-byte aligned format used in all newer
--  versions. Please run cssconvert on all of your .css databases before 
--  turning on your new version of dspam.
-+  versions. 
-+  
-+  The OpenBSD port of DSPAM 3.6.0 already used the correctly aligned format,
-+  so that you don't need to run cssconvert before upgrading to 3.6.1 and 
later.
+ 3. Ensure 3.6.0 malaligned hash databases are converted
+-   Version 3.6.0 failed to align hash databases to 8-byte boundaries. If you
+-   are upgrading from v3.6.0 and are using the hash_drv storage driver, you
+-   should run cssconvert to upgrade your .css files to a fully aligned format.
++   Version 3.6.0 failed to align hash databases to 8-byte boundaries. The
++   OpenBSD port of DSPAM 3.6.0 already used the correctly aligned format,
++   so that you don't need to run cssconvert.
  
- UPGRADING FROM < 3.6.0
- ----------------------
+ 4. Invert "SupressWebStats" setting in dspam.conf
+    SupressWebStats has been changed to simply WebStats, and the setting is
Index: patches/patch-src_client_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_client_c,v
retrieving revision 1.3
diff -u -r1.3 patch-src_client_c
--- patches/patch-src_client_c  28 Apr 2006 01:13:37 -0000      1.3
+++ patches/patch-src_client_c  12 Oct 2007 21:31:27 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_client_c,v 1.3 2006/04/28 01:13:37 brad Exp $
---- src/client.c.orig  Wed Feb 15 21:06:35 2006
-+++ src/client.c       Thu Apr 27 10:03:28 2006
-@@ -108,7 +108,7 @@ int client_process(AGENT_CTX *ATX, buffe
+--- src/client.c.orig  Thu May 25 17:36:39 2006
++++ src/client.c       Sun Apr 29 17:57:52 2007
+@@ -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, buffe
+@@ -170,7 +170,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
      if (ATX->flags & DAF_SUMMARY)
        head = 1;
  
@@ -19,7 +19,7 @@
  
      while(line != NULL && strcmp(line, ".")) {
        chomp(line);
-@@ -192,7 +192,7 @@ int client_process(AGENT_CTX *ATX, buffe
+@@ -192,7 +192,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
            break;
        } 
        free(line);
@@ -28,7 +28,7 @@
        if (line) chomp(line);
      }
      free(line);
-@@ -200,7 +200,7 @@ int client_process(AGENT_CTX *ATX, buffe
+@@ -200,7 +200,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
        goto BAIL;
    } else {
      for(i=0;i<ATX->users->items;i++) {
@@ -37,7 +37,7 @@
        char *x;
        int code = 500;
  
-@@ -313,7 +313,7 @@ int client_connect(AGENT_CTX *ATX, int f
+@@ -313,7 +313,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 +46,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, in
+@@ -443,7 +443,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
    char *inp, *dup, *ptr, *ptrptr;
    int recv_code;
  
@@ -55,7 +55,7 @@
    while(inp != NULL) {
      recv_code = 0;
      dup = strdup(inp);
-@@ -467,7 +467,7 @@ char * client_expect(THREAD_CTX *TTX, in
+@@ -467,7 +467,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
      
      strlcpy(err, inp, len);
      free(inp);
@@ -64,7 +64,7 @@
    }
  
    return NULL;
-@@ -512,13 +512,13 @@ int client_getcode(THREAD_CTX *TTX, char
+@@ -512,13 +512,13 @@ int client_getcode(THREAD_CTX *TTX, char *err, size_t 
    char *inp, *ptr, *ptrptr;
    int i;
  
Index: patches/patch-src_daemon_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_daemon_c,v
retrieving revision 1.3
diff -u -r1.3 patch-src_daemon_c
--- patches/patch-src_daemon_c  23 Mar 2006 17:17:40 -0000      1.3
+++ patches/patch-src_daemon_c  12 Oct 2007 21:31:27 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-src_daemon_c,v 1.3 2006/03/23 17:17:40 todd Exp $
---- src/daemon.c.orig  Mon Mar  6 17:23:43 2006
-+++ src/daemon.c       Mon Mar  6 17:24:26 2006
+--- 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) {
  
      while(ATX->users->items == 0 || invalid) {
@@ -19,7 +19,7 @@
        }
  
        if (cmdline == NULL)
-@@ -873,7 +873,7 @@ buffer * read_sock(THREAD_CTX *TTX, AGEN
+@@ -875,7 +875,7 @@ buffer * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) {
      body = 1;
    }
  
@@ -28,7 +28,7 @@
      chomp(buf);
  
      if (!strcmp(buf, ".")) {
-@@ -956,7 +956,7 @@ char *daemon_expect(THREAD_CTX *TTX, con
+@@ -958,7 +958,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
    char buf[128];
    char *cmd;
  
@@ -37,7 +37,7 @@
    if (cmd == NULL)
      return NULL;
  
-@@ -979,7 +979,7 @@ char *daemon_expect(THREAD_CTX *TTX, con
+@@ -981,7 +981,7 @@ char *daemon_expect(THREAD_CTX *TTX, const char *comma
      if (send_socket(TTX, buf)<=0)
        return NULL;
      free(cmd);
Index: patches/patch-src_dspam_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_dspam_c,v
retrieving revision 1.7
diff -u -r1.7 patch-src_dspam_c
--- patches/patch-src_dspam_c   8 Jun 2006 14:41:08 -0000       1.7
+++ patches/patch-src_dspam_c   12 Oct 2007 21:31:27 -0000
@@ -1,16 +1,16 @@
 $OpenBSD: patch-src_dspam_c,v 1.7 2006/06/08 14:41:08 todd Exp $
---- src/dspam.c.orig   Tue May 30 17:03:55 2006
-+++ src/dspam.c        Wed Jun  7 13:36:39 2006
-@@ -387,7 +387,7 @@ process_message (
+--- src/dspam.c.orig   Tue Dec 12 16:33:45 2006
++++ src/dspam.c        Sun Apr 29 17:57:52 2007
+@@ -402,7 +402,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;
-     }
-   }
-@@ -400,7 +400,7 @@ process_message (
+       if (!dspam_getsource (CTX, ip, sizeof (ip)))
+       {
+@@ -419,7 +419,7 @@ process_message (
      result = DSR_ISSPAM;
      CTX->probability = 1.0;
      CTX->confidence = 1.0;
@@ -19,7 +19,7 @@
      internally_canned = 1;
    }
  
-@@ -420,7 +420,7 @@ process_message (
+@@ -439,7 +439,7 @@ process_message (
          result = DSR_ISSPAM;
          CTX->probability = 1.0;
          CTX->confidence = 1.0;
@@ -28,7 +28,7 @@
          internally_canned = 1;
        }
      }
-@@ -751,10 +751,10 @@ process_message (
+@@ -786,10 +786,10 @@ process_message (
  
      switch (CTX->result) {
        case DSR_ISSPAM:
@@ -41,7 +41,7 @@
          break;
      }
  
-@@ -1019,7 +1019,7 @@ int tag_message(AGENT_CTX *ATX, ds_messa
+@@ -1054,7 +1054,7 @@ int tag_message(AGENT_CTX *ATX, ds_message_t message)
    int tagged = 0;
    char spam_subject[16];
  
@@ -50,7 +50,7 @@
    if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
        _ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
    {
-@@ -1593,7 +1593,7 @@ int process_users(AGENT_CTX *ATX, buffer
+@@ -1616,7 +1616,7 @@ int process_users(AGENT_CTX *ATX, buffer *message) {
      if (parse_message == NULL) {
        LOG(LOG_CRIT, ERR_MEM_ALLOC);
        presult->exitcode = ERC_PROCESS;
Index: patches/patch-src_list_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_list_c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_list_c
--- patches/patch-src_list_c    26 Oct 2005 06:18:39 -0000      1.1
+++ patches/patch-src_list_c    12 Oct 2007 21:31:27 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_list_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
---- src/list.c.orig    Sat Oct  1 06:32:18 2005
-+++ src/list.c Mon Oct 17 14:48:42 2005
-@@ -116,7 +116,7 @@ bnr_list_insert (struct bnr_list *list, 
+--- 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");
        return NULL;
      }
Index: patches/patch-src_mysql_drv_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_mysql_drv_c,v
retrieving revision 1.5
diff -u -r1.5 patch-src_mysql_drv_c
--- patches/patch-src_mysql_drv_c       8 Jun 2006 14:41:08 -0000       1.5
+++ patches/patch-src_mysql_drv_c       12 Oct 2007 21:31:27 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_mysql_drv_c,v 1.5 2006/06/08 14:41:08 todd Exp $
---- src/mysql_drv.c.orig       Sat Jun  3 05:15:49 2006
-+++ src/mysql_drv.c    Wed Jun  7 13:36:39 2006
-@@ -1361,7 +1361,7 @@ _ds_get_nextuser (DSPAM_CTX * CTX)
+--- 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
Index: patches/patch-src_pgsql_drv_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_pgsql_drv_c,v
retrieving revision 1.3
diff -u -r1.3 patch-src_pgsql_drv_c
--- patches/patch-src_pgsql_drv_c       8 Jun 2006 14:41:08 -0000       1.3
+++ patches/patch-src_pgsql_drv_c       12 Oct 2007 21:31:27 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_pgsql_drv_c,v 1.3 2006/06/08 14:41:08 todd Exp $
---- src/pgsql_drv.c.orig       Tue Jun  6 17:46:06 2006
-+++ src/pgsql_drv.c    Wed Jun  7 13:36:39 2006
-@@ -1146,7 +1146,7 @@ _ds_get_signature (DSPAM_CTX * CTX, stru
+--- src/pgsql_drv.c.orig       Sat Jul 29 15:38:48 2006
++++ src/pgsql_drv.c    Sun Apr 29 17:57:52 2007
+@@ -1146,7 +1146,7 @@ _ds_get_signature (DSPAM_CTX * CTX, struct _ds_spam_si
  
      p = _pgsql_drv_getpwuid (CTX, uid);
      if (!p) {
Index: patches/patch-src_util_c
===================================================================
RCS file: /cvs/ports/mail/dspam/patches/patch-src_util_c,v
retrieving revision 1.2
diff -u -r1.2 patch-src_util_c
--- patches/patch-src_util_c    23 Nov 2005 08:52:49 -0000      1.2
+++ patches/patch-src_util_c    12 Oct 2007 21:31:27 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-src_util_c,v 1.2 2005/11/23 08:52:49 jakob Exp $
---- src/util.c.orig    Wed Oct 26 19:39:32 2005
-+++ src/util.c Tue Nov  8 16:13:59 2005
-@@ -278,7 +278,7 @@ const char * _ds_userdir_path (char *pat
+--- src/util.c.orig    Sat May 13 03:12:59 2006
++++ src/util.c Sun Apr 29 17:57:52 2007
+@@ -278,7 +278,7 @@ const char * _ds_userdir_path (char *path, const char 
  #endif
  
    if (p == NULL) 
@@ -10,7 +10,7 @@
    else
        strlcpy(userhome, p->pw_dir, sizeof(userhome));
  
-@@ -307,7 +307,7 @@ const char * _ds_userdir_path (char *pat
+@@ -307,7 +307,7 @@ const char * _ds_userdir_path (char *path, const char 
    free(f);
  #else
    strlcpy(username, filename, MAX_FILENAME_LENGTH);
@@ -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
+@@ -748,6 +748,7 @@ inet_ntoa_r(struct in_addr in, char *buf, int len)
      return(NULL);
    }
  
Index: pkg/PFRAG.sqlite3
===================================================================
RCS file: /cvs/ports/mail/dspam/pkg/PFRAG.sqlite3,v
retrieving revision 1.3
diff -u -r1.3 PFRAG.sqlite3
--- pkg/PFRAG.sqlite3   18 Oct 2006 05:12:35 -0000      1.3
+++ pkg/PFRAG.sqlite3   12 Oct 2007 21:31:27 -0000
@@ -1,2 +1,4 @@
 @comment $OpenBSD: PFRAG.sqlite3,v 1.3 2006/10/18 05:12:35 aanriot Exp $
+share/doc/dspam/sqlite_drv.txt
+share/examples/dspam/sqlite/
 share/examples/dspam/sqlite/purge-3.sql

Reply via email to