View | Details | Raw Unified | Return to bug 209770 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-26 / +33 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	opensmtpd
4
PORTNAME=	opensmtpd
5
PORTVERSION=	201602131907
5
PORTVERSION=	201605221711
6
DISTVERSIONSUFFIX=	p1
6
DISTVERSIONSUFFIX=	p1
7
PORTEPOCH=	1
7
PORTEPOCH=	1
8
PORTREVISION=	1
8
CATEGORIES=	mail
9
CATEGORIES=	mail
9
MASTER_SITES=	http://www.opensmtpd.org/archives/ \
10
MASTER_SITES=	http://www.opensmtpd.org/archives/ \
10
		http://distfiles.pirateparty.in/ashish/
11
		http://distfiles.pirateparty.in/ashish/
Lines 16-75 Link Here
16
LICENSE=	ISCL
17
LICENSE=	ISCL
17
LICENSE_FILE=	${WRKSRC}/LICENSE
18
LICENSE_FILE=	${WRKSRC}/LICENSE
18
19
19
LIB_DEPENDS=	libevent.so:${PORTSDIR}/devel/libevent2
20
LIB_DEPENDS=	libevent.so:devel/libevent2
20
21
21
OPTIONS_DEFINE=	CA_BUNDLE LIBASR MAILERCONF PAM SSL_PORT
22
OPTIONS_DEFINE=		CA_BUNDLE LIBASR MAILERCONF PAM SSL_PORT TABLE_DB
22
23
23
OPTIONS_DEFAULT=	CA_BUNDLE PAM
24
OPTIONS_DEFAULT=	CA_BUNDLE PAM TABLE_DB
24
25
25
CA_BUNDLE_DESC=		Install CA bundle for SSL
26
CA_BUNDLE_DESC=		Install CA bundle for SSL
26
LIBASR_DESC=		Use stable version of libasr
27
LIBASR_DESC=		Use stable version of libasr
27
MAILERCONF_DESC=	Activate OpenSMTPD in mailer.conf(5)
28
MAILERCONF_DESC=	Activate OpenSMTPD in mailer.conf(5)
28
SSL_PORT_DESC=		SSL/TLS support via OpenSSL/LibreSSL from port
29
SSL_PORT_DESC=		SSL/TLS support via OpenSSL/LibreSSL from port
30
TABLE_DB_DESC=		Build table-db plugin (aliases)
29
31
30
USES=		cpe libtool
32
USES=		cpe libtool
31
USE_OPENSSL=	yes
33
USE_OPENSSL=	yes
32
GNU_CONFIGURE=	yes
34
GNU_CONFIGURE=	yes
33
CONFIGURE_ARGS=	--with-table-db \
34
		--sysconfdir=${PREFIX}/etc/mail/ \
35
		--with-libasr=${LOCALBASE} \
36
		--with-libevent=${LOCALBASE} \
37
		--with-libssl=${OPENSSLBASE} \
38
		--with-group-queue=${GROUPS}
39
35
36
CPE_VENDOR=	openbsd
37
40
USE_RC_SUBR=	smtpd
38
USE_RC_SUBR=	smtpd
41
SUB_FILES=	pkg-install pkg-deinstall
39
SUB_FILES=	pkg-install pkg-deinstall pkg-message
42
40
43
CPE_VENDOR=	openbsd
44
45
CONFLICTS_INSTALL=	postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]*
41
CONFLICTS_INSTALL=	postfix-[0-9]* sendmail-[0-9]* opensmtpd-[0-9]*
46
42
47
USERS=		_smtpd _smtpq
43
USERS=		_smtpd _smtpq
48
GROUPS=		_smtpd
44
GROUPS=		_smtpd _smtpq
49
45
50
PLIST_SUB+=	SMTPQ_GROUP=${GROUPS}
46
OPTIONS_SUB=	yes
51
47
52
OPTIONS_SUB=		yes
48
CA_BUNDLE_CONFIGURE_WITH=	path-CAfile=${LOCALBASE}/share/certs/ca-root-nss.crt
49
CA_BUNDLE_RUN_DEPENDS=		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
53
50
54
LIBASR_LIB_DEPENDS_OFF=	libasr.so:${PORTSDIR}/dns/libasr-devel
51
LIBASR_LIB_DEPENDS=	libasr.so:dns/libasr
55
LIBASR_LIB_DEPENDS=	libasr.so:${PORTSDIR}/dns/libasr
52
LIBASR_LIB_DEPENDS_OFF=	libasr.so:dns/libasr-devel
56
53
57
CA_BUNDLE_CONFIGURE_WITH=	path-CAfile=${LOCALBASE}/share/certs/ca-root-nss.crt
58
CA_BUNDLE_RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss
59
60
PAM_CONFIGURE_WITH=	auth-pam=smtpd
54
PAM_CONFIGURE_WITH=	auth-pam=smtpd
55
SSL_PORT_VARS=		with_openssl_port=yes
56
TABLE_DB_CONFIGURE_WITH=	table-db
61
57
62
.include <bsd.port.options.mk>
58
.include <bsd.port.options.mk>
63
59
64
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 && ! ${PORT_OPTIONS:MSSL_PORT}
60
.if ${OPSYS} == FreeBSD && ${OSVERSION} <= 1000015
65
WITH_OPENSSL_PORT=	yes
61
WITH_OPENSSL_PORT=	yes
66
.endif
62
.endif
67
63
68
.if ${PORT_OPTIONS:MSSL_PORT}
64
.include <bsd.port.pre.mk>
69
WITH_OPENSSL_PORT=	yes
70
.endif
71
65
66
CONFIGURE_ARGS+=	--with-libasr=${LOCALBASE} \
67
			--with-libevent=${LOCALBASE} \
68
			--with-libssl=${OPENSSLBASE} \
69
			--sysconfdir=${PREFIX}/etc/mail/
70
71
post-patch:
72
	${REINPLACE_CMD} -e '/chmod 2555/d' ${WRKSRC}/mk/smtpctl/Makefile.in
73
	${REINPLACE_CMD} -r -e \
74
		'/SMTPD_VERSION/s/"[^"]+"$$/"${PORTVERSION}${DISTVERSIONSUFFIX}"/' \
75
		${WRKSRC}/smtpd/smtpd.h
76
77
.if ${PORT_OPTIONS:MTABLE_DB}
72
post-install:
78
post-install:
73
	@${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap
79
	@${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap
80
.endif
74
81
75
.include <bsd.port.mk>
82
.include <bsd.port.post.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (opensmtpd-201602131907p1.tar.gz) = 0fd10cff59719523e41fe489ff5c1490c2898a2ce47b98e4bf39f07ba3562252
1
SHA256 (opensmtpd-201605221711p1.tar.gz) = e7f63a4d5c26386cffe61f35d6e4a959a1f6f38b3fbe0351c746326cf2329418
2
SIZE (opensmtpd-201602131907p1.tar.gz) = 686726
2
SIZE (opensmtpd-201605221711p1.tar.gz) = 691693
(-)files/patch-mk_smtpd_Makefile.in (-3 / +4 lines)
Lines 1-9 Link Here
1
--- mk/smtpd/Makefile.in.orig	2016-02-07 00:04:24 UTC
1
--- mk/smtpd/Makefile.in.orig	2016-02-02 20:40:51 UTC
2
+++ mk/smtpd/Makefile.in
2
+++ mk/smtpd/Makefile.in
3
@@ -1339,12 +1339,7 @@ install-exec-hook: $(CONFIGFILES) $(MANP
3
@@ -1365,13 +1365,7 @@ install-exec-hook: $(CONFIGFILES) $(MANP
4
 	$(MKDIR_P) $(DESTDIR)$(bindir)
4
 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
5
 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
5
 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
6
 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
6
 
7
-
7
-	@if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then			\
8
-	@if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then			\
8
-		$(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \
9
-		$(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \
9
-	else									\
10
-	else									\
(-)files/pkg-message.in (-1 / +1 lines)
Lines 1-4 Link Here
1
If you are upgrading from OpenSMTPD version 201303011853 or earlier, please 
1
If you are upgrading from OpenSMTPD version 201303011853 or earlier, please
2
follow the procedure below to update the permissions on the OpenSMTPD
2
follow the procedure below to update the permissions on the OpenSMTPD
3
spool directories:
3
spool directories:
4
4
(-)files/smtpd.in (-8 / +6 lines)
Lines 18-28 Link Here
18
18
19
. /etc/rc.subr
19
. /etc/rc.subr
20
20
21
check_process()
22
{
23
	/bin/pgrep -j none -f "^$smtpd_procname\$"
24
}
25
26
name="smtpd"
21
name="smtpd"
27
rcvar=smtpd_enable
22
rcvar=smtpd_enable
28
23
Lines 34-51 Link Here
34
load_rc_config $name
29
load_rc_config $name
35
30
36
: ${smtpd_enable:="NO"}
31
: ${smtpd_enable:="NO"}
37
: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"}
32
: ${smtpd_config:="%%PREFIX%%/etc/mail/${name}.conf"}
38
: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"}
33
: ${smtpd_procname:="%%PREFIX%%/sbin/${name}"}
39
: ${smtpd_flags:=""}
34
: ${smtpd_flags:=""}
40
35
41
command=${smtpd_procname}
36
command=${smtpd_procname}
37
command_args="-f ${smtpd_config} ${command_args}"
38
required_files="${smtpd_config}"
42
39
43
procname=${smtpd_procname}
40
procname=${smtpd_procname}
41
pidfile="/var/run/${name}.pid"
44
42
45
smtpd_checkconfig()
43
smtpd_checkconfig()
46
{
44
{
47
    echo "Performing sanity check on smtpd configuration:"
45
    echo "Performing sanity check on smtpd configuration:"
48
    eval ${command} ${smtpd_flags} -n
46
    eval ${command} ${command_args} ${smtpd_flags} -n
49
}
47
}
50
48
51
smtpd_precmd()
49
smtpd_precmd()
(-)pkg-plist (-4 / +4 lines)
Lines 1-15 Link Here
1
@sample etc/mail/smtpd.conf.sample
1
@sample etc/mail/smtpd.conf.sample
2
libexec/opensmtpd/encrypt
2
libexec/opensmtpd/encrypt
3
libexec/opensmtpd/mail.local
3
libexec/opensmtpd/mail.local
4
libexec/opensmtpd/makemap
4
%%TABLE_DB%%libexec/opensmtpd/makemap
5
@(,%%SMTPQ_GROUP%%,2555) sbin/smtpctl
5
@(,,2555) sbin/smtpctl
6
sbin/smtpd
6
sbin/smtpd
7
man/man5/aliases.5.gz
7
man/man5/aliases.5.gz
8
man/man5/forward.5.gz
8
man/man5/forward.5.gz
9
man/man5/smtpd.conf.5.gz
9
man/man5/smtpd.conf.5.gz
10
man/man5/table.5.gz
10
man/man5/table.5.gz
11
man/man8/makemap.8.gz
11
%%TABLE_DB%%man/man8/makemap.8.gz
12
man/man8/newaliases.8.gz
12
%%TABLE_DB%%man/man8/newaliases.8.gz
13
man/man8/sendmail.8.gz
13
man/man8/sendmail.8.gz
14
man/man8/smtpctl.8.gz
14
man/man8/smtpctl.8.gz
15
man/man8/smtpd.8.gz
15
man/man8/smtpd.8.gz

Return to bug 209770