pkgsrc-Bugs archive

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

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



>Number:         47420
>Category:       pkg
>Synopsis:       fix pkgsrc/mail/milter-greylist VARBASE path problems + patch 
>for duplicate definition warnings during compile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 08 13:55:00 +0000 2013
>Originator:     Richard PALO
>Release:        pkgsrc trunk
>Organization:
>Environment:
SunOS devzone 5.11 oi_151a7 i86pc i386 i86pc Solaris

>Description:
the conf and rc.d scripts in milter-greylist need the path to VARBASE replaced 
instead of hardcoding /var.
In addition, spamd.c needs to be more selective whether the system queue.h is 
used or the pkg supplied version is.
Finally, place a copy of examples/milter-greylist/greylist.conf in 
PKG_SYSCONFBASE, and while we're at it, place greylist2.conf in examples.
>How-To-Repeat:

>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/milter-greylist/Makefile,v
retrieving revision 1.57
diff -u -p -r1.57 Makefile
--- Makefile    3 Jan 2013 09:50:44 -0000       1.57
+++ Makefile    8 Jan 2013 13:53:17 -0000
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.57 2013/01/03 09:50:44 tron Exp $
 
 DISTNAME=      milter-greylist-4.4.1
+PKGREVISION=  2
 CATEGORIES=    mail
 MASTER_SITES=  ftp://ftp.espci.fr/pub/milter-greylist/
 EXTRACT_SUFX=  .tgz
@@ -34,11 +35,23 @@ 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       8 Jan 2013 13:53:17 -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.34
diff -u -p -r1.34 distinfo
--- distinfo    3 Jan 2013 09:50:44 -0000       1.34
+++ distinfo    8 Jan 2013 13:53:17 -0000
@@ -5,4 +5,4 @@ RMD160 (milter-greylist-4.4.1.tgz) = 17d
 Size (milter-greylist-4.4.1.tgz) = 229401 bytes
 SHA1 (patch-aa) = c42757814933001ddbcdfb77dd03e17a9c4c8283
 SHA1 (patch-p0f.c) = 01a16304527cad8eb0d0ad8686c2be1e90426c74
-SHA1 (patch-spamd.c) = 7347c4bc4115df743e489ba4221d3d0c50e9d1ef
+SHA1 (patch-spamd.c) = 36fc4ceecb38df9747aafd209a8eb72d9a5ac72d
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    8 Jan 2013 13:53:17 -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)
Index: patches/patch-spamd.c
===================================================================
RCS file: /cvsroot/pkgsrc/mail/milter-greylist/patches/patch-spamd.c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-spamd.c
--- patches/patch-spamd.c       3 Jan 2013 09:50:44 -0000       1.2
+++ patches/patch-spamd.c       8 Jan 2013 13:53:17 -0000
@@ -1,7 +1,5 @@
-$NetBSD: patch-spamd.c,v 1.2 2013/01/03 09:50:44 tron Exp $
+$NetBSD$
 
-Rename 'sun' to 's_un' to avoid a conflict on SunOS
-and include <strings.h> if present
 --- spamd.c.orig       2012-02-24 02:25:46.000000000 +0000
 +++ spamd.c
 @@ -44,6 +44,9 @@ __RCSID("$Id: spamd.c,v 1.22 2012/02/24
@@ -14,7 +12,19 @@ and include <strings.h> if present
  #include <unistd.h>
  #include <netdb.h>
  #include <sys/types.h>
-@@ -436,12 +439,12 @@ static int
+@@ -55,7 +58,11 @@ __RCSID("$Id: spamd.c,v 1.22 2012/02/24
+ #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"
+@@ -436,12 +443,12 @@ static int
  spamd_unix_socket(path)
        char *path;
  {
@@ -31,7 +41,7 @@ and include <strings.h> if present
  
        if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
                mg_log(LOG_ERR, "spamd socket failed: %s", strerror(errno));
-@@ -450,7 +453,7 @@ spamd_unix_socket(path)
+@@ -450,7 +457,7 @@ spamd_unix_socket(path)
  
        SET_CLOEXEC(sock);
  



Home | Main Index | Thread Index | Old Index