From owner-svn-src-all@freebsd.org Wed Oct 10 22:29:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37FDA10BE9D4; Wed, 10 Oct 2018 22:29:07 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1C9C74BB8; Wed, 10 Oct 2018 22:29:06 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D880B2716D; Wed, 10 Oct 2018 22:29:06 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9AMT6gC020324; Wed, 10 Oct 2018 22:29:06 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9AMT6Fx020320; Wed, 10 Oct 2018 22:29:06 GMT (envelope-from des@FreeBSD.org) Message-Id: <201810102229.w9AMT6Fx020320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 10 Oct 2018 22:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339294 - in head: contrib/ldns contrib/unbound crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head: contrib/ldns contrib/unbound crypto/openssh X-SVN-Commit-Revision: 339294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2018 22:29:07 -0000 Author: des Date: Wed Oct 10 22:29:06 2018 New Revision: 339294 URL: https://svnweb.freebsd.org/changeset/base/339294 Log: Try harder to sanitize the environment before running configure. Remove a workaround for older Unbound versions that used sbrk. Approved by: re (gjb) Modified: head/contrib/ldns/freebsd-configure.sh head/contrib/unbound/freebsd-configure.sh head/crypto/openssh/freebsd-configure.sh Modified: head/contrib/ldns/freebsd-configure.sh ============================================================================== --- head/contrib/ldns/freebsd-configure.sh Wed Oct 10 21:28:04 2018 (r339293) +++ head/contrib/ldns/freebsd-configure.sh Wed Oct 10 22:29:06 2018 (r339294) @@ -5,15 +5,26 @@ set -e +error() { + echo "$@" >&2 + exit 1 +} + ldns=$(dirname $(realpath $0)) cd $ldns -libtoolize --copy -autoheader -autoconf +# Run autotools before we drop LOCALBASE out of PATH +(cd $ldns && libtoolize --copy && autoheader && autoconf) +(cd $ldns/drill && aclocal && autoheader && autoconf) + +# Ensure we use the correct toolchain and clean our environment +export CC=$(echo ".include " | make -f /dev/stdin -VCC) +export CPP=$(echo ".include " | make -f /dev/stdin -VCPP) +unset CFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH LIBS +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +cd $ldns ./configure --prefix= --exec-prefix=/usr --disable-dane-ta-usage cd $ldns/drill -autoheader -autoconf ./configure --prefix= --exec-prefix=/usr Modified: head/contrib/unbound/freebsd-configure.sh ============================================================================== --- head/contrib/unbound/freebsd-configure.sh Wed Oct 10 21:28:04 2018 (r339293) +++ head/contrib/unbound/freebsd-configure.sh Wed Oct 10 22:29:06 2018 (r339294) @@ -13,6 +13,15 @@ error() { unbound=$(dirname $(realpath $0)) cd $unbound +# Run autotools before we drop LOCALBASE out of PATH +(cd $unbound && libtoolize --copy && autoheader && autoconf) + +# Ensure we use the correct toolchain and clean our environment +export CC=$(echo ".include " | make -f /dev/stdin -VCC) +export CPP=$(echo ".include " | make -f /dev/stdin -VCPP) +unset CFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH LIBS +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + ldnssrc=$(realpath $unbound/../ldns) [ -f $ldnssrc/ldns/ldns.h ] || error "can't find LDNS sources" export CFLAGS="-I$ldnssrc" @@ -24,17 +33,9 @@ ldnsobj=$(realpath $(make -C$ldnsbld -V.OBJDIR)) [ -f $ldnsobj/libprivateldns.a ] || error "can't find LDNS object directory" export LDFLAGS="-L$ldnsobj" -export CC=$(echo ".include " | make -f /dev/stdin -VCC) -export CPP=$(echo ".include " | make -f /dev/stdin -VCPP) - -autoconf -autoheader +cd $unbound ./configure \ --prefix= --exec-prefix=/usr \ --with-conf-file=/var/unbound/unbound.conf \ --with-run-dir=/var/unbound \ --with-username=unbound - -# Don't try to provide bogus memory usage statistics based on sbrk(2). -sed -n -i.orig -e '/HAVE_SBRK/!p' config.status -./config.status config.h Modified: head/crypto/openssh/freebsd-configure.sh ============================================================================== --- head/crypto/openssh/freebsd-configure.sh Wed Oct 10 21:28:04 2018 (r339293) +++ head/crypto/openssh/freebsd-configure.sh Wed Oct 10 22:29:06 2018 (r339294) @@ -16,28 +16,27 @@ configure_args=" set -e -# make sure configure uses the correct compiler -export CC=$(echo ".include " | make -f /dev/stdin -VCC) -export CPP=$(echo ".include " | make -f /dev/stdin -VCPP) -unset CFLAGS CPPFLAGS LDFLAGS LIBS +openssh=$(dirname $(realpath $0)) +cd $openssh -# regenerate configure and config.h.in -autoheader -autoconf +# Run autotools before we drop LOCALBASE out of PATH +(cd $openssh && libtoolize --copy && autoheader && autoconf) -# reset PATH to avoid picking up the wrong libraries +# Ensure we use the correct toolchain and clean our environment +export CC=$(echo ".include " | make -f /dev/stdin -VCC) +export CPP=$(echo ".include " | make -f /dev/stdin -VCPP) +unset CFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH LIBS export PATH=/bin:/sbin:/usr/bin:/usr/sbin -unset LD_LIBRARY_PATH -# generate config.h with krb5 and stash it +# Generate config.h with krb5 and stash it sh configure $configure_args --with-kerberos5=/usr mv config.log config.log.orig mv config.h config.h.orig -# generate config.h without krb5 +# Generate config.h without krb5 sh configure $configure_args --without-kerberos5 -# extract the difference +# Extract the difference echo '/* $Free''BSD$ */' > krb5_config.h diff -u config.h.orig config.h | sed -n '/^-#define/s/^-//p' |