Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+23 -12
View File
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.5 2015/09/03 21:07:10 sevan Exp $
# $NetBSD: Makefile,v 1.9 2016/06/01 11:47:39 wiz Exp $
VERSION= 5.3.3p1
VERSION= 5.7.3p2
DISTNAME= opensmtpd-${VERSION}
PKGREVISION= 1
CATEGORIES= mail net
MASTER_SITES= http://www.opensmtpd.org/archives/
@@ -13,7 +12,7 @@ LICENSE= isc AND modified-bsd AND 2-clause-bsd
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
CONFLICTS+= esmtp>=1.2 nullmailer-[0-9]* postfix-[0-9]*
BROKEN_FOR_PLATFORM+= OpenBSD-*-*
BROKEN_FOR_PLATFORM= OpenBSD-*-*
BUILD_DEFS+= VARBASE
@@ -25,12 +24,21 @@ USE_TOOLS+= automake aclocal autoheader autoconf
SMTPD_HOME= ${VARBASE}/chroot/smtpd
OWN_DIRS= ${SMTPD_HOME}
PKG_GROUPS= _smtpd
PKG_USERS= _smtpd:_smtpd
PKG_GROUPS= _smtpd _smtpq
PKG_USERS= _smtpd:_smtpd _smtpq:_smtpq
PKG_GECOS._smtpd= OpenSMTPD pseudo-user
PKG_HOME._smtpd= ${SMTPD_HOME}
PKG_GECOS._smtpq= OpenSMTPD pseudo-user
PKG_HOME._smtpq= ${SMTPD_HOME}
GNU_CONFIGURE= yes
USE_DB185= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-mantype=man
CONFIGURE_ARGS+= --with-privsep-path=${SMTPD_HOME}
CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q}
CONFIGURE_ARGS+= --enable-table-db
CONFIGURE_ARGS+= --without-zlib-version-check
EXAMPLEDIR= ${PREFIX}/share/examples/opensmtpd
CONF_FILES= ${EXAMPLEDIR}/smtpd.conf ${PKG_SYSCONFDIR}/smtpd.conf
@@ -45,23 +53,26 @@ SUBST_STAGE.paths= post-patch
SUBST_CLASSES+= exampledir
SUBST_STAGE.exampledir= pre-configure
SUBST_MESSAGE.exampledir= Fixing exampledir path
SUBST_FILES.exampledir= smtpd/Makefile.am
SUBST_FILES.exampledir= mk/smtpd/Makefile.am
SUBST_SED.exampledir+= -e 's,@EXAMPLE_DIR@,${EXAMPLEDIR},'
post-extract:
cp ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
pre-configure:
cd $(WRKSRC) && ${PREFIX}/bin/libtoolize --copy --force
cd $(WRKSRC) && ${TOOLS_CMD.aclocal}
cd $(WRKSRC) && ${TOOLS_CMD.autoconf}
cd $(WRKSRC) && ${TOOLS_CMD.autoheader}
cd $(WRKSRC) && ${TOOLS_CMD.automake} --foreign --add-missing --copy
cd ${WRKSRC} && ${PREFIX}/bin/libtoolize --copy --force
cd ${WRKSRC} && ${TOOLS_CMD.aclocal}
cd ${WRKSRC} && ${TOOLS_CMD.autoconf}
cd ${WRKSRC} && ${TOOLS_CMD.autoheader}
cd ${WRKSRC} && ${TOOLS_CMD.automake} --foreign --add-missing --copy
post-install:
${INSTALL_DATA} ${WRKDIR}/mailer.conf \
${DESTDIR}${EXAMPLEDIR}/mailer.conf
.include "../../databases/db5/buildlink3.mk"
.include "../../devel/libevent/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../net/libasr/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
+8 -6
View File
@@ -1,17 +1,19 @@
@comment $NetBSD: PLIST,v 1.2 2014/03/11 14:05:04 jperkin Exp $
bin/mailq
bin/newaliases
bin/smtpscript
libexec/mail.local
libexec/opensmtpd/makemap
@comment $NetBSD: PLIST,v 1.3 2016/05/01 05:56:40 mef Exp $
bin/sendmail
libexec/opensmtpd/encrypt
libexec/opensmtpd/mail.local
man/man5/aliases.5
man/man5/forward.5
man/man5/smtpd.conf.5
man/man5/table.5
man/man8/makemap.8
man/man8/newaliases.8
man/man8/sendmail.8
man/man8/smtpctl.8
man/man8/smtpd.8
sbin/mailq
sbin/makemap
sbin/newaliases
sbin/smtpctl
sbin/smtpd
share/examples/opensmtpd/mailer.conf
+10 -7
View File
@@ -1,8 +1,11 @@
$NetBSD: distinfo,v 1.2 2014/08/17 19:03:32 joerg Exp $
$NetBSD: distinfo,v 1.6 2016/06/01 11:47:06 wiz Exp $
SHA1 (opensmtpd-5.3.3p1.tar.gz) = a7fc3a15b5dc622410fcedf51bbe62e6b6d64df3
RMD160 (opensmtpd-5.3.3p1.tar.gz) = 97f63e37fa6ce1f5f58d816088c5b356f99167c3
Size (opensmtpd-5.3.3p1.tar.gz) = 343733 bytes
SHA1 (patch-configure.ac) = ed819952951700c057c11200095a72972aafc1f9
SHA1 (patch-smtpd_Makefile.am) = 4267002ecadceaf68868b9d782d5e6f8571ebc36
SHA1 (patch-smtpd_queue_fsqueue.c) = 80dae37705378c022c1a76d31ea54a3f907b6c1a
SHA1 (opensmtpd-5.7.3p2.tar.gz) = 4d1edc5811a80ec26de040227a298a742c494e72
RMD160 (opensmtpd-5.7.3p2.tar.gz) = 5d6faebea3a303e5effeafbef5def597bfac434e
SHA512 (opensmtpd-5.7.3p2.tar.gz) = bac0b8d6a6969a5e49a1d45b2c74cb2f3da44d06b12c7162500adf3ca312751020762bc8301075a9d7634d94cf51f978d04fac327f843680646e9e687737c42f
Size (opensmtpd-5.7.3p2.tar.gz) = 709074 bytes
SHA1 (patch-configure.ac) = d8aa50afb48abcfb38c9cd7080ba59122aee8ba6
SHA1 (patch-mk_makemap_Makefile.am) = 51da0f13b1b32b3c364ae638a38d4b33efaf1ec7
SHA1 (patch-mk_smtpd_Makefile.am) = ebc62819300d3ddd824178c08a5630ca85dc6fdc
SHA1 (patch-smtpd_queue__fs.c) = f13d1bf1d26544b3c81e5e2c813d2fe5e917b96b
SHA1 (patch-smtpd_smtp__session.c) = f9c034827519a02b97cadb3c034ad1e84abc805a
+6 -4
View File
@@ -1,7 +1,9 @@
# $NetBSD: mailer.conf,v 1.1 2013/11/18 22:50:01 pettai Exp $
# $NetBSD: mailer.conf,v 1.2 2016/05/01 05:56:40 mef Exp $
#
# Use "opensmtpd" replacements
#
sendmail @PREFIX@/libexec/mail.local
mailq @PREFIX@/bin/mailq
newaliases @PREFIX@/bin/newaliases
sendmail @PREFIX@/sbin/smtpctl
send-mail @PREFIX@/sbin/smtpctl
mailq @PREFIX@/sbin/mailq
makemap @PREFIX@/sbin/makemap
newaliases @PREFIX@/sbin/newaliases
+14 -6
View File
@@ -1,14 +1,22 @@
$NetBSD: patch-configure.ac,v 1.1 2013/11/18 22:50:01 pettai Exp $
$NetBSD: patch-configure.ac,v 1.3 2016/06/01 11:47:06 wiz Exp $
Add sys/statvfs for NetBSD
Add sys/statvfs for NetBSD.
--- configure.ac.orig 2013-05-16 15:19:59.000000000 +0000
--- configure.ac.orig 2016-02-02 07:40:06.000000000 +0000
+++ configure.ac
@@ -261,6 +261,7 @@ AC_CHECK_HEADERS([ \
@@ -338,6 +338,7 @@ AC_CHECK_HEADERS([ \
sys/ndir.h \
sys/pstat.h \
sys/statfs.h \
+ sys/statvfs.h \
sys/time.h \
sys/un.h \
ucred.h \
util.h \
time.h \
@@ -701,6 +702,7 @@ AC_CHECK_FUNCS([ \
setreuid \
setsid \
sigaction \
+ snprintf \
socketpair \
strdup \
strerror \
@@ -0,0 +1,14 @@
$NetBSD: patch-mk_makemap_Makefile.am,v 1.1 2016/05/31 21:33:15 joerg Exp $
--- mk/makemap/Makefile.am.orig 2016-05-07 12:20:44.083460074 +0000
+++ mk/makemap/Makefile.am
@@ -29,8 +29,7 @@ makemap_CFLAGS= -DNO_IO
AM_CPPFLAGS= -I$(smtpd_srcdir) \
- -I$(compat_srcdir) \
- -I$(asr_srcdir)
+ -I$(compat_srcdir)
LIBCOMPAT= $(top_builddir)/openbsd-compat/libopenbsd-compat.a
@@ -1,10 +1,10 @@
$NetBSD: patch-smtpd_Makefile.am,v 1.1 2013/11/18 22:50:01 pettai Exp $
$NetBSD: patch-mk_smtpd_Makefile.am,v 1.1 2016/05/01 05:56:40 mef Exp $
Install the configuration file in the example directory
Install the configuration file in the example directory.
--- smtpd/Makefile.am.orig 2013-03-08 18:22:39.000000000 +0000
+++ smtpd/Makefile.am
@@ -154,17 +154,16 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
--- mk/smtpd/Makefile.am.orig 2016-02-02 07:40:06.000000000 +0000
+++ mk/smtpd/Makefile.am
@@ -151,17 +151,16 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
# smtpd.conf
# newaliases makemap
@@ -25,5 +25,5 @@ Install the configuration file in the example directory
- fi
+ $(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(EXAMPLE_DIR)/smtpd.conf
ln -f $(DESTDIR)$(sbindir)/smtpctl$(EXEEXT) \
$(DESTDIR)$(bindir)/mailq$(EXEEXT);
$(INSTALL) -m 644 aliases.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/aliases.5
$(INSTALL) -m 644 forward.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/forward.5
@@ -0,0 +1,19 @@
$NetBSD: patch-smtpd_queue__fs.c,v 1.1 2016/05/01 05:56:40 mef Exp $
NetBSD use statvfs, not statfs.
--- smtpd/queue_fs.c.orig 2016-02-02 07:40:06.000000000 +0000
+++ smtpd/queue_fs.c
@@ -30,6 +30,12 @@
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#ifdef __NetBSD__
+#define statfs statvfs
+#endif
+#endif
#include <ctype.h>
#include <dirent.h>
@@ -1,18 +0,0 @@
$NetBSD: patch-smtpd_queue_fsqueue.c,v 1.1 2013/11/18 22:50:01 pettai Exp $
NetBSD use statvfs, not statfs.
--- smtpd/queue_fsqueue.c.orig 2013-05-16 15:19:59.000000000 +0000
+++ smtpd/queue_fsqueue.c
@@ -26,5 +26,11 @@
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#ifdef __NetBSD__
+#define statfs statvfs
+#endif
+#endif
#include <sys/param.h>
#include <sys/mount.h>
@@ -0,0 +1,69 @@
$NetBSD: patch-smtpd_smtp__session.c,v 1.1 2016/05/01 05:56:40 mef Exp $
Add a patch to handle long usernames during SMTP authentication,
e.g. often username exceeds the limit when it contains @host.name
part.
From FreeBSD's ports.
cf.http://svnweb.freebsd.org/ports?view=revision&revision=394424
--- smtpd/smtp_session.c.orig 2016-02-02 07:40:06.000000000 +0000
+++ smtpd/smtp_session.c
@@ -84,6 +84,7 @@ enum session_flags {
SF_BADINPUT = 0x0080,
SF_FILTERCONN = 0x0100,
SF_FILTERDATA = 0x0200,
+ SF_USERTOOLONG = 0x0400,
};
enum message_flags {
@@ -133,7 +134,7 @@ struct smtp_session {
char helo[LINE_MAX];
char cmd[LINE_MAX];
- char username[LOGIN_NAME_MAX];
+ char username[LOGIN_NAME_MAX+HOST_NAME_MAX+1];
struct envelope evp;
@@ -986,6 +987,15 @@ smtp_session_imsg(struct mproc *p, struc
s = tree_xpop(&wait_parent_auth, reqid);
strnvis(user, s->username, sizeof user, VIS_WHITE | VIS_SAFE);
+
+ if (s->flags & SF_USERTOOLONG) {
+ log_info("smtp-in: sesson %016"PRIx64
+ ": auth failed because username too long",
+ s->id);
+ s->flags &= (~SF_USERTOOLONG);
+ success = LKA_PERMFAIL;
+ }
+
if (success == LKA_OK) {
log_info("smtp-in: session %016"PRIx64
": authentication successful for user %s ",
@@ -1925,7 +1935,7 @@ smtp_rfc4954_auth_plain(struct smtp_sess
user++; /* skip NUL */
if (strlcpy(s->username, user, sizeof(s->username))
>= sizeof(s->username))
- goto abort;
+ s->flags |= SF_USERTOOLONG;
pass = memchr(user, '\0', len - (user - buf));
if (pass == NULL || pass >= buf + len - 2)
@@ -1965,9 +1975,12 @@ smtp_rfc4954_auth_login(struct smtp_sess
case STATE_AUTH_USERNAME:
memset(s->username, 0, sizeof(s->username));
- if (base64_decode(arg, (unsigned char *)s->username,
- sizeof(s->username) - 1) == -1)
+ if (base64_decode(arg, (unsigned char *)buf,
+ sizeof(buf) - 1) == -1)
goto abort;
+ if (strlcpy(s->username, buf, sizeof(s->username))
+ >= sizeof(s->username))
+ s->flags |= SF_USERTOOLONG;
smtp_enter_state(s, STATE_AUTH_PASSWORD);
smtp_reply(s, "334 UGFzc3dvcmQ6");