opensmtpd: make this really work with the portable libressl.

This commit is contained in:
Juan RP 2014-08-03 18:30:06 +02:00
parent a4bcf304d6
commit 2e7706aefa
2 changed files with 31 additions and 2 deletions

View file

@ -0,0 +1,26 @@
Defer checking for arc4random and friends until libcrypto is found,
fixes segv due to portable libressl/opensmtpd and arc4random<->RAND_bytes.
See http://marc.info/?l=openssh-unix-dev&m=140515171616098&w=2
for more information.
--- configure.ac.orig 2014-08-03 18:23:43.352548006 +0200
+++ configure.ac 2014-08-03 18:24:00.440690901 +0200
@@ -620,9 +620,6 @@ fi
#l1527 (customized)
dnl Checks for library functions. Please keep in alphabetical order
AC_CHECK_FUNCS([ \
- arc4random \
- arc4random_buf \
- arc4random_uniform \
asprintf \
b64_ntop \
__b64_ntop \
@@ -1369,6 +1366,8 @@ AC_RUN_IFELSE(
]
)
+AC_CHECK_FUNCS([arc4random arc4random_buf arc4random_uniform])
+
# PRNGD TCP socket
AC_ARG_WITH([prngd-port],
[ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],

View file

@ -1,14 +1,14 @@
# Template file for 'opensmtpd' # Template file for 'opensmtpd'
pkgname=opensmtpd pkgname=opensmtpd
version=5.4.2p1 version=5.4.2p1
revision=4 revision=5
build_style=gnu-configure build_style=gnu-configure
configure_args="--sysconfdir=/etc/smtpd --sbindir=/usr/bin configure_args="--sysconfdir=/etc/smtpd --sbindir=/usr/bin
--with-maildir=/var/spool/mail --with-privsep-path=/var/db --with-maildir=/var/spool/mail --with-privsep-path=/var/db
--with-sock-dir=/run --with-mantype=doc --with-sock-dir=/run --with-mantype=doc
--with-privsep-user=smtpd --with-queue-user=smtpq --with-privsep-user=smtpd --with-queue-user=smtpq
--with-ca-file=/etc/ssl/certs/ca-certificates.crt" --with-ca-file=/etc/ssl/certs/ca-certificates.crt"
hostmakedepends="pkg-config bison" hostmakedepends="automake libtool pkg-config bison"
makedepends="zlib-devel libressl-devel libevent-devel db-devel" makedepends="zlib-devel libressl-devel libevent-devel db-devel"
depends="ca-certificates" depends="ca-certificates"
conf_files="/etc/smtpd/smtpd.conf /etc/smtpd/aliases" conf_files="/etc/smtpd/smtpd.conf /etc/smtpd/aliases"
@ -25,6 +25,9 @@ distfiles="http://www.opensmtpd.org/archives/${pkgname}-${version}.tar.gz"
checksum=4ffaf48d3d044ef8be1bd80c8972c87ba830a21bb330b85a59f6a70da5fbd9a2 checksum=4ffaf48d3d044ef8be1bd80c8972c87ba830a21bb330b85a59f6a70da5fbd9a2
pre_configure() { pre_configure() {
touch README AUTHORS NEWS ChangeLog
autoreconf -fi
# XXX hardcode the libevent major version for now. # XXX hardcode the libevent major version for now.
# XXX the configure test needs to execute a binary to # XXX the configure test needs to execute a binary to
# XXX get this result. # XXX get this result.