pkgsrc-Bugs archive

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

Re: pkg/47420: fix pkgsrc/mail/milter-greylist VARBASE path problems + patch for duplicate definition warnings during compile



The following reply was made to PR pkg/47420; it has been noted by GNATS.

From: Richard PALO <richard.palo%baou.fr@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/47420: fix pkgsrc/mail/milter-greylist VARBASE path problems
 + patch for duplicate definition warnings during compile
Date: Thu, 10 Jan 2013 12:43:46 +0100

 This is a multi-part message in MIME format.
 --------------030505000305040103000209
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Here is the complete set of patches enabling the updated milter-greylist 
 (4.4.2) to build on solaris, including a fix for the conffile location 
 which was hardcoded to /etc/mail/greylist.conf...
 
 NB with-drac-db is also pointing at /etc/mail/dracd.db, but at least the 
 user can override DRACD_DB in their mk.conf until a configurable 
 solution can be found to fix hardcoding "/etc/mail" everywhere.
 
 
 --------------030505000305040103000209
 Content-Type: text/plain; charset=UTF-8;
  name="grey.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="grey.diff"
 
 ? patches/patch-p0f.c
 ? patches/patch-spamd.c
 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/milter-greylist/Makefile,v
 retrieving revision 1.58
 diff -u -p -r1.58 Makefile
 --- Makefile   8 Jan 2013 15:54:54 -0000       1.58
 +++ Makefile   10 Jan 2013 11:24:55 -0000
 @@ -1,6 +1,7 @@
  # $NetBSD: Makefile,v 1.58 2013/01/08 15:54:54 tron Exp $
  
  DISTNAME=     milter-greylist-4.4.2
 +PKGREVISION=  1
  CATEGORIES=   mail
  MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/
  EXTRACT_SUFX= .tgz
 @@ -23,6 +24,7 @@ RCD_SCRIPTS=         milter-greylist
  .include "options.mk"
  
  CONFIGURE_ARGS+=      --sysconfdir=${PKG_SYSCONFDIR:Q}
 +CONFIGURE_ARGS+=      --with-conffile=${PKG_SYSCONFDIR:Q}/greylist.conf
  CONFIGURE_ARGS+=      --localstatedir=${VARBASE:Q}
  CONFIGURE_ARGS+=      --with-user=${MILTER_USER}
  BUILD_DEFS+=          MILTER_USER MILTER_GROUP VARBASE
 @@ -34,11 +36,25 @@ INSTALLATION_DIRS+=        share/examples/milte
  
  OWN_DIRS_PERMS+=      ${VARBASE}/milter-greylist ${MILTER_USER} 
${MILTER_GROUP} 0755
  
 +SUBST_CLASSES+=         paths
 +SUBST_STAGE.paths=      pre-configure
 +SUBST_FILES.paths=      greylist.conf greylist2.conf
 +SUBST_SED.paths+=       -e "s|/var/run|${VARBASE}/run|g"
 +SUBST_SED.paths+=       -e 
"s|/var/milter-greylist|${VARBASE}/milter-greylist|g"
 +SUBST_MESSAGE.paths=    Fixing paths in conf examples.
 +
 +EGDIR=                  ${PREFIX}/share/examples/milter-greylist
 +CONF_FILES=             ${EGDIR}/greylist.conf ${PKG_SYSCONFDIR}/greylist.conf
 +
 +
  post-install:
        ${INSTALL_DATA} ${WRKSRC}/README \
          ${DESTDIR}${PREFIX}/share/doc/milter-greylist
        ${INSTALL_DATA} ${WRKSRC}/greylist.conf \
          ${DESTDIR}${PREFIX}/share/examples/milter-greylist
 +      ${INSTALL_DATA} ${WRKSRC}/greylist2.conf \
 +        ${DESTDIR}${PREFIX}/share/examples/milter-greylist
 +
  
  .include "../../mail/libmilter/buildlink3.mk"
  .include "../../mk/pthread.buildlink3.mk"
 Index: PLIST
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/milter-greylist/PLIST,v
 retrieving revision 1.7
 diff -u -p -r1.7 PLIST
 --- PLIST      14 Jun 2009 18:04:38 -0000      1.7
 +++ PLIST      10 Jan 2013 11:24:55 -0000
 @@ -4,4 +4,5 @@ man/man8/milter-greylist.8
  man/man5/greylist.conf.5
  share/doc/milter-greylist/README
  share/examples/milter-greylist/greylist.conf
 +share/examples/milter-greylist/greylist2.conf
  share/examples/rc.d/milter-greylist
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/milter-greylist/distinfo,v
 retrieving revision 1.35
 diff -u -p -r1.35 distinfo
 --- distinfo   8 Jan 2013 15:54:54 -0000       1.35
 +++ distinfo   10 Jan 2013 11:24:55 -0000
 @@ -4,3 +4,5 @@ SHA1 (milter-greylist-4.4.2.tgz) = a8746
  RMD160 (milter-greylist-4.4.2.tgz) = 077ab452c8bb007c9f52e80be8db3475a83af410
  Size (milter-greylist-4.4.2.tgz) = 230544 bytes
  SHA1 (patch-aa) = c42757814933001ddbcdfb77dd03e17a9c4c8283
 +SHA1 (patch-p0f.c) = b535af928885aae3f0b9241cf6632be5979d448b
 +SHA1 (patch-spamd.c) = 5727e4f3781f10a4299840e7573afbee62812235
 Index: options.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/milter-greylist/options.mk,v
 retrieving revision 1.9
 diff -u -p -r1.9 options.mk
 --- options.mk 22 Sep 2009 16:52:02 -0000      1.9
 +++ options.mk 10 Jan 2013 11:24:55 -0000
 @@ -33,6 +33,11 @@ CONFIGURE_ARGS+=    --disable-drac
  DRACD_DB?=            /etc/mail/dracd.db
  
  CONFIGURE_ARGS+=      --enable-drac --with-drac-db=${DRACD_DB}
 +CFLAGS+=-DUSE_DB185_EMULATION
 +USE_DB185=yes
 +BDB_ACCEPTED=db2 db3 db4 db5
 +LIBS+=${BDB_LIBS}
 +.include "../../mk/bdb.buildlink3.mk"
  .endif
  
  ###
 Index: files/milter-greylist.sh
 ===================================================================
 RCS file: /cvsroot/pkgsrc/mail/milter-greylist/files/milter-greylist.sh,v
 retrieving revision 1.6
 diff -u -p -r1.6 milter-greylist.sh
 --- files/milter-greylist.sh   22 Sep 2009 15:57:50 -0000      1.6
 +++ files/milter-greylist.sh   10 Jan 2013 11:24:55 -0000
 @@ -10,7 +10,7 @@
  name="miltergreylist"
  rcvar="miltergreylist"
  command="@PREFIX@/bin/milter-greylist"
 -command_args="-p /var/milter-greylist/milter-greylist.sock -u @MILTER_USER@"
 +command_args="-p @VARBASE@/milter-greylist/milter-greylist.sock -u 
@MILTER_USER@"
  
  if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
        . /etc/rc.subr
 @@ -20,7 +20,7 @@ if [ -f /etc/rc.subr -a -d /etc/rc.d -a 
        run_rc_command "$1"
  
  else                          # old NetBSD, Solaris, Linux, etc...
 -      pidfile=/var/run/${name}.pid
 +      pidfile=@VARBASE@/run/${name}.pid
  
        case $1 in
        start)
 ===================================================================
 
 
 --- /dev/null  2013-01-10 12:21:06.000000000 +0100
 +++ patches/patch-p0f.c        2013-01-08 17:20:13.344961767 +0100
 @@ -0,0 +1,45 @@
 +$NetBSD$
 +
 +--- p0f.c.orig        2013-01-08 14:30:01.000000000 +0000
 ++++ p0f.c
 +@@ -116,25 +116,25 @@ strcasestr ( haystack, needle )
 + #define RESP_NOMATCH         2
 + 
 + struct p0f_query {
 +-     u_int32_t       magic;
 +-     u_int8_t        type;
 +-     u_int32_t       id;
 +-     u_int32_t       src_ad,dst_ad;
 +-     u_int16_t       src_port,dst_port;
 ++     uint32_t        magic;
 ++     uint8_t type;
 ++     uint32_t        id;
 ++     uint32_t        src_ad,dst_ad;
 ++     uint16_t        src_port,dst_port;
 + };
 + struct p0f_response {
 +-     u_int32_t       magic;
 +-     u_int32_t       id;
 +-     u_int8_t        type;
 +-     u_int8_t        genre[20];
 +-     u_int8_t        detail[40];
 ++     uint32_t        magic;
 ++     uint32_t        id;
 ++     uint8_t         type;
 ++     uint8_t genre[20];
 ++     uint8_t detail[40];
 +      int8_t          dist;
 +-     u_int8_t        link[30];
 +-     u_int8_t        tos[30];
 +-     u_int8_t        fw,nat;
 +-     u_int8_t        real;
 ++     uint8_t link[30];
 ++     uint8_t tos[30];
 ++     uint8_t fw,nat;
 ++     uint8_t real;
 +      int16_t         score;
 +-     u_int16_t       mflags;
 ++     uint16_t        mflags;
 +      int32_t         uptime;
 + };
 + /* End of stuff borrowed from p0f/p0f-query.h */
 ================================================================
 --- /dev/null  2013-01-10 12:21:06.000000000 +0100
 +++ patches/patch-spamd.c      2013-01-09 07:23:12.579004568 +0100
 @@ -0,0 +1,25 @@
 +$NetBSD$
 +
 +--- spamd.c.orig      2013-01-08 14:30:01.000000000 +0000
 ++++ spamd.c
 +@@ -43,7 +43,7 @@ __RCSID("$Id: spamd.c,v 1.23 2013/01/08
 + #include <stdio.h>
 + #include <stdlib.h>
 + #include <errno.h>
 +-#include <string.h>
 ++#include <strings.h>
 + #include <unistd.h>
 + #include <netdb.h>
 + #include <sys/types.h>
 +@@ -55,7 +55,11 @@ __RCSID("$Id: spamd.c,v 1.23 2013/01/08
 + #include "spf.h"
 + #include "acl.h"
 + #include "conf.h"
 ++#ifdef HAVE_OLD_QUEUE_H
 + #include "queue.h"
 ++#else 
 ++#include <sys/queue.h>
 ++#endif
 + #include "milter-greylist.h"
 + 
 + #include "spamd.h"
 
 --------------030505000305040103000209--
 


Home | Main Index | Thread Index | Old Index