Wednesday, October 04, 2023

Re: fix for smtp-vilter link stage on clang archs

On Wed, Aug 16, 2023 at 12:07:28PM +0200, Niklas Hallqvist wrote:
> Clang does not have -export-dynamic. Instead dlopen(3) teaches us to use the
> -rdynamic option to cc(1).
>
> The attached patch is needed for smtp-vilter to be able to dlopen(3) the
> clamd and spamd backends on clang archs too.

This looks like a candidate to slip into the release although it sounds
as if it has been broken for many years.

This is niklas's diff + a printf format fix + revision bump +
FIX_EXTRACT_PERMISSIONS + regen plist.

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/smtp-vilter/Makefile,v
retrieving revision 1.69
diff -u -p -r1.69 Makefile
--- Makefile 26 Sep 2023 12:28:15 -0000 1.69
+++ Makefile 4 Oct 2023 20:27:10 -0000
@@ -2,7 +2,7 @@ COMMENT= sendmail milter to scan message

DISTNAME= smtp-vilter-1.3.6
EPOCH= 0
-REVISION= 6
+REVISION= 7

CATEGORIES= mail

@@ -13,6 +13,8 @@ WANTLIB += c m pthread milter

SITES= https://spacehopper.org/mirrors/
EXTRACT_SUFX= .tgz
+
+FIX_EXTRACT_PERMISSIONS= Yes

LIB_DEPENDS= mail/sendmail,-libmilter

Index: patches/patch-bin_smtp-vilter_Makefile
===================================================================
RCS file: /cvs/ports/mail/smtp-vilter/patches/patch-bin_smtp-vilter_Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 patch-bin_smtp-vilter_Makefile
--- patches/patch-bin_smtp-vilter_Makefile 14 May 2022 15:35:08 -0000 1.5
+++ patches/patch-bin_smtp-vilter_Makefile 4 Oct 2023 20:25:38 -0000
@@ -1,7 +1,13 @@
Index: bin/smtp-vilter/Makefile
--- bin/smtp-vilter/Makefile.orig
+++ bin/smtp-vilter/Makefile
-@@ -12,7 +12,7 @@ YFLAGS= -d -p vilter
+@@ -7,12 +7,12 @@ SRCS= smtp-vilter.c engine.c imsg.c buffer.c pftable.
+ CFLAGS+= -pthread -Wall -I{.CURDIR} -I${.CURDIR}/../../include \
+ -I/usr/src/gnu/usr.sbin/sendmail/include
+
+-LDADD+= -export-dynamic -lmilter -lpthread -L/usr/local/lib -lm
++LDADD+= -rdynamic -lmilter -lpthread -L/usr/local/lib -lm
+ YFLAGS= -d -p vilter
LFLAGS= -Pvilter -olex.yy.c
LINTFLAGS+= -u

Index: patches/patch-bin_smtp-vilter_smtp-vilter_c
===================================================================
RCS file: /cvs/ports/mail/smtp-vilter/patches/patch-bin_smtp-vilter_smtp-vilter_c,v
retrieving revision 1.4
diff -u -p -r1.4 patch-bin_smtp-vilter_smtp-vilter_c
--- patches/patch-bin_smtp-vilter_smtp-vilter_c 11 Mar 2022 19:34:57 -0000 1.4
+++ patches/patch-bin_smtp-vilter_smtp-vilter_c 4 Oct 2023 20:48:28 -0000
@@ -1,5 +1,6 @@
---- bin/smtp-vilter/smtp-vilter.c.orig Sun Jan 21 13:09:38 2007
-+++ bin/smtp-vilter/smtp-vilter.c Fri Oct 23 16:35:17 2009
+Index: bin/smtp-vilter/smtp-vilter.c
+--- bin/smtp-vilter/smtp-vilter.c.orig
++++ bin/smtp-vilter/smtp-vilter.c
@@ -22,6 +22,7 @@
#include <sys/resource.h>
#include <sys/stat.h>
@@ -37,17 +38,30 @@

No comments:

Post a Comment