- Fix a segfault on amd64 (except on qmail-spamcontrol and qmail-ldap) [1]

- Add an rcNG startup example file to QMAIL_PREFIX/boot [2]
- Bump PORTREVISION due to rcNG add (except for qmail-ldap)
- Fix make certificate to add ciphers file to QMAIL_PREFIX/control [3]

PR:		ports/118117 [1], ports/117422 [2], ports/118198 [3]
Submitted by:	Andrew Reilly <areilly@bigpond.net.au> [1] [3]
		Nick@van-laarhoven.org [2]
This commit is contained in:
Renato Botelho 2007-12-26 16:43:55 +00:00
parent 3b1eaf2b19
commit e1ab2d0519
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=204580
7 changed files with 86 additions and 4 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${MYSQL_PATCH_VERSION}
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= mail
PKGNAMESUFFIX= -mysql

View file

@ -7,7 +7,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${SPAMCONTROL_VERSION}
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES+= http://www.fehcom.de/qmail/spamcontrol/:spamcontrol \
${MASTER_SITE_LOCAL:S/$/:spamcontrol/}

View file

@ -7,7 +7,7 @@
PORTNAME= qmail
PORTVERSION= ${QMAIL_VERSION}.${TLS_PATCH_DATE}
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= mail
PKGNAMESUFFIX= -tls

View file

@ -7,7 +7,7 @@
PORTNAME= qmail
PORTVERSION?= ${QMAIL_VERSION}
PORTREVISION?= 5
PORTREVISION?= 6
CATEGORIES= mail
MASTER_SITES+= ${MASTER_SITE_QMAIL}
DISTNAME= ${PORTNAME}-${QMAIL_VERSION}
@ -659,6 +659,10 @@ post-patch:
s!QUEUE_EXTRALEN 0!QUEUE_EXTRALEN 5!g' \
${WRKSRC}/extra.h
.endif
.if ( ${ARCH} == "amd64" || ${ARCH} == "ia64" ) && \
( !defined(SLAVE_SPAMCONTROL) && !defined(SLAVE_LDAP) )
@${PATCH} -d ${WRKSRC} < ${FILESDIR}/extra-patch-amd64
.endif
do-configure:
@${SED} -e 's,%%RCDLINK%%,${RCDLINK},g; s,%%LOCALBASE%%,${LOCALBASE},g' \
@ -694,6 +698,9 @@ do-install:
.for i in ${BOOTFILES}
${INSTALL_SCRIPT} ${WRKDIR}/${i:T} ${PREFIX}/boot
.endfor
.if !defined(SLAVE_LDAP)
${INSTALL_SCRIPT} ${FILESDIR}/qmail-smtpd.rcNG ${PREFIX}/boot
.endif
.for i in 1 5 7 8
@${MKDIR} ${PREFIX}/man/man$i
. for j in ${MAN${i}}
@ -750,6 +757,8 @@ certificate:
-out ${WRKDIR}/servercert.pem -days 366 \
-keyout ${WRKDIR}/servercert.pem ; \
${INSTALL} -o qmaild -g qmail -m 0640 ${WRKDIR}/servercert.pem ${PREFIX}/control/servercert.pem ; \
${OPENSSLBASE}/bin/openssl ciphers > ${QMAIL_PREFIX}/control/tlsclientciphers
${OPENSSLBASE}/bin/openssl ciphers > ${QMAIL_PREFIX}/control/tlsserverciphers
${ECHO_MSG} "===> Do not forget to do 'make clean' to clean up temporary files" ; \
else \
${ECHO_MSG} "===> You must create the file ${OPENSSLDIR}/openssl.cnf first." ; \

View file

@ -0,0 +1,20 @@
--- alloc.c.orig 2007-12-26 14:24:10.000000000 -0200
+++ alloc.c 2007-12-26 14:25:40.000000000 -0200
@@ -1,7 +1,6 @@
+#include <stdlib.h>
#include "alloc.h"
#include "error.h"
-extern char *malloc();
-extern void free();
#define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
#define SPACE 4096 /* must be multiple of ALIGNMENT */
--- spawn.c.orig 2007-12-26 14:24:53.000000000 -0200
+++ spawn.c 2007-12-26 14:25:09.000000000 -0200
@@ -1,5 +1,6 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include "alloc.h"
#include "sig.h"
#include "wait.h"
#include "substdio.h"

View file

@ -0,0 +1,52 @@
#!/bin/sh
#
# PROVIDE: qmailsmtpd
# REQUIRE: LOGIN cleanvar
#
# To use the checkpassword interface to qmail-smtpd, set
# qmailsmtpd_checkpassword to the full path to the checkpassword program (e.g.
# security/checkpassword or security checkpassword-pam).
#
# Note: tcpserver can be found in the sysutils/ucspi-tcp package.
. /etc/rc.subr
name="qmailsmtpd"
rcvar=`set_rcvar`
load_rc_config $name
: ${qmailsmtpd_tcpserver="/usr/local/bin/tcpserver"}
: ${qmailsmtpd_tcprules="/usr/local/bin/tcprules"}
: ${qmailsmtpd_enable="NO"}
: ${qmailsmtpd_cdb="/etc/tcp.smtp"}
: ${qmailsmtpd_flags="-R -H -u 82 -g 81"}
: ${qmailsmtpd_host="0"}
: ${qmailsmtpd_port="smtp"}
: ${qmailsmtpd_smtpd="/var/qmail/bin/qmail-smtpd"}
: ${qmailsmtpd_fqdn=`hostname`}
: ${qmailsmtpd_checkpassword=""} # e.g. /usr/local/bin/checkpassword-pam
: ${qmailsmtpd_checksubprogram="/usr/bin/true"}
qmailsmtpd_start() {
$qmailsmtpd_tcprules $qmailsmtpd_cdb.cdb $qmailsmtpd_cdb.tmp < $qmailsmtpd_cdb \
|| return 1
if [ "x$qmailsmtpd_checkpassword" != "x" ]; then
qmailsmtpd_usercheck="$qmailsmtpd_fqdn $qmailsmtpd_checkpassword $qmailsmtpd_checksubprogram"
fi
echo "Starting qmail-smtpd."
$qmailsmtpd_tcpserver -x $qmailsmtpd_cdb.cdb $qmailsmtpd_flags $qmailsmtpd_host $qmailsmtpd_port \
$qmailsmtpd_smtpd $qmailsmtpd_usercheck &
echo $! > /var/run/qmailsmtpd.pid
}
qmailsmtpd_stop() {
echo "Stopping qmail-smtpd"
kill `cat /var/run/qmailsmtpd.pid`
}
start_cmd="qmailsmtpd_start"
stop_cmd="qmailsmtpd_stop"
run_rc_command "$1"

View file

@ -77,6 +77,7 @@ bin/tcp-env
%%NOT_LDAP%%boot/maildir
%%NOT_LDAP%%boot/proc
%%NOT_LDAP%%boot/proc+df
%%NOT_LDAP%%boot/qmail-smtpd.rcNG
%%LDAP%%boot/qmail/log/run
%%LDAP%%boot/qmail/run
%%LDAP%%boot/qmail-smtpd/log/run