1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

Update to 1.3.8

PR:		ports/67661
Submitted by:	maintainer
This commit is contained in:
Volker Stolz 2004-06-08 12:52:50 +00:00
parent 91df2d8eeb
commit 1fd031933f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=111086
8 changed files with 16 additions and 114 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= milter-greylist
PORTVERSION= 1.2.2
PORTREVISION= 1
PORTVERSION= 1.3.8
CATEGORIES= mail
MASTER_SITES= ftp://ftp.espci.fr/pub/milter-greylist/
EXTRACT_SUFX= .tgz

View File

@ -1,2 +1,2 @@
MD5 (milter-greylist-1.2.2.tgz) = 7c313a482cec2b4e406eefe121c1e5e7
SIZE (milter-greylist-1.2.2.tgz) = 88297
MD5 (milter-greylist-1.3.8.tgz) = c31172a904212706dee8795f351e918a
SIZE (milter-greylist-1.3.8.tgz) = 91830

View File

@ -1,36 +1,23 @@
--- Makefile.in.orig Sat Apr 3 11:26:11 2004
+++ Makefile.in Tue May 25 23:04:47 2004
--- Makefile.in.orig Fri May 28 10:59:04 2004
+++ Makefile.in Thu Jun 3 14:21:13 2004
@@ -29,9 +29,9 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
#
-CFLAGS= @CFLAGS@ -D_BSD_SOURCE -Wall -ansi
-CFLAGS= @CFLAGS@ -D_BSD_SOURCE
-LDFLAGS= @LDFLAGS@
-LIBS= @LIBS@
+CFLAGS= @CFLAGS@ -D_BSD_SOURCE -Wall -ansi -pthread
+LDFLAGS= @LDFLAGS@ -pthread
+CFLAGS= @CFLAGS@ -D_BSD_SOURCE -pthread
+LDFLAGS= -pthread @LDFLAGS@
+LIBS= -lmilter
prefix= @prefix@
exec_prefix= @exec_prefix@
SYSCONFDIR= @sysconfdir@
@@ -66,34 +66,20 @@
dump_yacc.o: dump_yacc.c dump_lex.c
rc-bsd.sh: rc-bsd.sh.in
- ${SED} "s|@BINDIR@|${BINDIR}|g" rc-bsd.sh.in > rc-bsd.sh
+ ${SED} -e "s|@BINDIR@|${BINDIR}|g" \
+ -e "s|@SYSCONFDIR@|${SYSCONFDIR}|g" rc-bsd.sh.in > rc-bsd.sh
rc-linux.sh: rc-linux.sh.in
${SED} "s|@BINDIR@|${BINDIR}|g" rc-linux.sh.in > rc-linux.sh
install: milter-greylist
- ${INSTALL} -d 755 ${BINDIR}
- ${INSTALL} -d 755 ${MANDIR}/man8
- ${INSTALL} -d 755 ${MANDIR}/man5
+ ${INSTALL} -d -m 755 ${BINDIR}
@@ -75,26 +75,11 @@
${INSTALL} -d -m 755 ${BINDIR}
${INSTALL} -d -m 755 ${MANDIR}/man8
${INSTALL} -d -m 755 ${MANDIR}/man5
+ ${INSTALL} -d -m 755 ${SYSCONFDIR}/mail
+ ${INSTALL} -d -m 755 ${MANDIR}/man8
+ ${INSTALL} -d -m 755 ${MANDIR}/man5
${INSTALL} -m 755 milter-greylist ${BINDIR}
${INSTALL} -m 644 milter-greylist.8 ${MANDIR}/man8
${INSTALL} -m 644 greylist.conf.5 ${MANDIR}/man5

View File

@ -1,62 +0,0 @@
--- conf.c.orig Fri Apr 2 17:06:52 2004
+++ conf.c Mon May 31 16:58:06 2004
@@ -83,6 +83,8 @@
conf_load(void) /* exceptlist must be write-locked */
{
FILE *stream;
+ pthread_t tid;
+ pthread_attr_t attr;
/*
* Reset the configuration to its default
@@ -100,8 +102,49 @@
return;
}
+ /*
+ * On some platforms, the thread stack limit is too low and
+ * conf_parse will get a SIGSEGV because it overflows the
+ * stack.
+ *
+ * In order to fix this, we spawn a new thread just for
+ * parsing the config file, and we request a stack big
+ * enough to hold the parser data. 2 MB seems okay.
+ */
+
conf_in = stream;
- conf_parse();
+
+ if (pthread_attr_init(&attr) != 0) {
+ syslog(LOG_ERR, "pthread_attr_init failed: %s",
+ strerror(errno));
+ exit(EX_OSERR);
+ }
+
+ if (pthread_attr_setstacksize(&attr, 2 * 1024 * 1024) != 0) {
+ syslog(LOG_ERR, "pthread_attr_setstacksize failed: %s",
+ strerror(errno));
+ exit(EX_OSERR);
+ }
+
+ if (pthread_create(&tid, &attr,
+ (void *(*)(void *))conf_parse, NULL) != 0) {
+ syslog(LOG_ERR, "pthread_create failed: %s",
+ strerror(errno));
+ exit(EX_OSERR);
+ }
+
+ if (pthread_join(tid, NULL) != 0) {
+ syslog(LOG_ERR, "pthread_join failed: %s",
+ strerror(errno));
+ exit(EX_OSERR);
+ }
+
+ if (pthread_attr_destroy(&attr) != 0) {
+ syslog(LOG_ERR, "pthread_attr_destroy failed: %s",
+ strerror(errno));
+ exit(EX_OSERR);
+ }
+
fclose(stream);
(void)gettimeofday(&conffile_modified, NULL);

View File

@ -1,10 +0,0 @@
--- dump.c.orig Wed Mar 31 19:02:08 2004
+++ dump.c Thu Apr 29 15:12:53 2004
@@ -53,6 +53,7 @@
#include <sysexits.h>
#include <syslog.h>
#include <time.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>

View File

@ -1,5 +1,5 @@
--- dump.h.orig Thu May 6 15:54:01 2004
+++ dump.h Tue May 25 22:48:33 2004
--- dump.h.orig Tue May 25 11:39:49 2004
+++ dump.h Tue Jun 8 10:24:13 2004
@@ -46,7 +46,7 @@
#include <arpa/inet.h>
@ -8,4 +8,4 @@
+#define DUMPFILE "/var/db/milter-greylist/greylist.db"
#endif
#define DATELEN 40
#ifndef DUMPFREQ

View File

@ -1,12 +0,0 @@
--- spf.c.orig Wed Apr 14 10:46:14 2004
+++ spf.c Thu Apr 29 15:19:01 2004
@@ -45,8 +45,8 @@
#include <syslog.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <arpa/inet.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include "conf.h"
#include "spf.h"

View File

@ -8,6 +8,6 @@ etc/rc.d/milter-greylist.sh
@exec /usr/sbin/chown smmsp /var/milter-greylist /var/db/milter-greylist
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
@dirrm etc/mail
@unexec /bin/rmdir %D/etc/mail 2>/dev/null || true
@unexec /bin/rmdir /var/milter-greylist 2>/dev/null || true
@unexec [ -f /var/db/milter-greylist/greylist.db ] || /bin/rmdir /var/db/milter-greylist || true