From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C1F39138334 for ; Wed, 20 Mar 2019 14:54:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 99DBAE0953; Wed, 20 Mar 2019 14:54:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 54D39E0953 for ; Wed, 20 Mar 2019 14:54:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E9EC5335CC8 for ; Wed, 20 Mar 2019 14:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4CEB0452 for ; Wed, 20 Mar 2019 14:54:20 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1553093526.5107368437df6964ba4c2567de9e13bb988912c6.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 5107368437df6964ba4c2567de9e13bb988912c6 X-VCS-Branch: master Date: Wed, 20 Mar 2019 14:54:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0dcc3837-8b33-44c8-81cd-9069cba48440 X-Archives-Hash: ddbcdbeafd66bb028cb8251e004f9ed5 commit: 5107368437df6964ba4c2567de9e13bb988912c6 Author: Fabian Groffen gentoo org> AuthorDate: Wed Mar 20 14:52:06 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Mar 20 14:52:06 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=51073684 scripts/bootstrap-prefix: bootstrap libressl for wget to use Somewhat experimental, but optional (e.g. if it fails should not abort the bootstrap) bootstrap of libressl so wget can link against it to enable https:// support. Tested on powerpc-apple-darwin9. Bug: https://bugs.gentoo.org/644372 Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 57 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 6f5b44f5d0..7cb83cf84d 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -13,8 +13,13 @@ rapx() { is-rap && echo $1 || echo $2; } ## Functions Start Here +v() { + echo "$@" + "$@" +} + econf() { - ${CONFIG_SHELL} ./configure \ + v ${CONFIG_SHELL} ./configure \ --host=${CHOST} \ --prefix="${ROOT}"/tmp/usr \ --mandir="${ROOT}"/tmp/usr/share/man \ @@ -65,7 +70,7 @@ efetch() { # try for mirrors first, fall back to distfiles, then try given location local locs=( ) local loc - for loc in ${GENTOO_MIRRORS} ${DISTFILES_G_O} ; do + for loc in ${GENTOO_MIRRORS} ; do locs=( "${locs[@]}" "${loc}/distfiles/${1##*/}" @@ -74,7 +79,7 @@ efetch() { locs=( "${locs[@]}" "$1" ) for loc in "${locs[@]}" ; do - ${FETCH_COMMAND} "${loc}" < /dev/null + v ${FETCH_COMMAND} "${loc}" < /dev/null [[ -f ${1##*/} ]] && break done if [[ ! -f ${1##*/} ]] ; then @@ -806,7 +811,8 @@ bootstrap_gnu() { # Darwin9 in particular doesn't compile when using system readline, # but we don't need any groovy input at all, so just disable it, # except for Cygwin, where the patch above would fail to compile - [[ ${PN} == "bash" && ${CHOST} != *-cygwin* ]] && myconf="${myconf} --disable-readline" + [[ ${PN} == "bash" && ${CHOST} != *-cygwin* ]] \ + && myconf="${myconf} --disable-readline" # ensure we don't read system-wide shell initialisation, it may # contain cruft, bug #650284 @@ -819,11 +825,30 @@ bootstrap_gnu() { # coreutils completely useless (install failing on everything) # Don't try using gmp either, it may be that just the library is # there, and if so, the buildsystem assumes the header exists too - [[ ${PN} == "coreutils" ]] && \ + # stdbuf is giving many problems, and we don't really care about it + # at this level, so disable it too + if [[ ${PN} == "coreutils" ]] ; then myconf="${myconf} --disable-acl --without-gmp" + myconf="${myconf} --enable-no-install-program=stdbuf" + fi # Gentoo Bug 400831, fails on Ubuntu with libssl-dev installed - [[ ${PN} == "wget" ]] && myconf="${myconf} --without-ssl" + if [[ ${PN} == "wget" ]] ; then + if [[ -x ${ROOT}/tmp/usr/bin/openssl ]] ; then + myconf="${myconf} --with-ssl=openssl" + myconf="${myconf} --with-libssl-prefix=${ROOT}/tmp/usr" + export CPPFLAGS="${CPPFLAGS} -I${ROOT}/tmp/usr/include" + export LDFLAGS="${LDFLAGS} -L${ROOT}/tmp/usr/lib" + else + myconf="${myconf} --without-ssl" + fi + fi + + # for libressl, only provide static lib, such that wget (above) + # links it in and we don't have to bother about RPATH or something + if [[ ${PN} == "libressl" ]] ; then + myconf="${myconf} --enable-static --disable-shared" + fi # SuSE 11.1 has GNU binutils-2.20, choking on crc32_x86 [[ ${PN} == "xz" ]] && myconf="${myconf} --disable-assembler" @@ -848,16 +873,16 @@ bootstrap_gnu() { einfo "Compiling ${PN}" econf ${myconf} || return 1 if [[ ${PN} == "make" && $(type -t $MAKE) != "file" ]]; then - ./build.sh || return 1 + v ./build.sh || return 1 else - $MAKE ${MAKEOPTS} || return 1 + v $MAKE ${MAKEOPTS} || return 1 fi einfo "Installing ${PN}" if [[ ${PN} == "make" && $(type -t $MAKE) != "file" ]]; then - ./make install MAKE="${S}/make" || return 1 + v ./make install MAKE="${S}/make" || return 1 else - $MAKE install || return 1 + v $MAKE install || return 1 fi cd "${ROOT}" @@ -1150,6 +1175,7 @@ bootstrap_findutils() { } bootstrap_wget() { + bootstrap_gnu wget 1.20.1 || \ bootstrap_gnu wget 1.17.1 || bootstrap_gnu wget 1.13.4 } @@ -1211,8 +1237,8 @@ bootstrap_bash() { bootstrap_bison() { bootstrap_gnu bison 2.6.2 || bootstrap_gnu bison 2.6.1 || \ - bootstrap_gnu bison 2.6 || bootstrap_gnu bison 2.5.1 || \ - bootstrap_gnu bison 2.4 + bootstrap_gnu bison 2.6 || bootstrap_gnu bison 2.5.1 || \ + bootstrap_gnu bison 2.4 } bootstrap_m4() { @@ -1260,6 +1286,11 @@ bootstrap_bzip2() { einfo "${A%-*} successfully bootstrapped" } +bootstrap_libressl() { + GNU_URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL" \ + bootstrap_gnu libressl 2.8.3 +} + bootstrap_stage_host_gentoo() { if ! is-rap ; then einfo "Shortcut only supports prefix-standalone, but we are bootstrapping" @@ -1313,6 +1344,8 @@ bootstrap_stage1() { # don't rely on $MAKE, if make == gmake packages that call 'make' fail [[ $(make --version 2>&1) == *GNU" Make "4* ]] \ || (bootstrap_make) || return 1 + [[ ${OFFLINE_MODE} ]] || [[ -x ${ROOT}/tmp/usr/bin/openssl ]] \ + || (bootstrap_libressl) # do not fail if this fails, we'll try without [[ ${OFFLINE_MODE} ]] || type -P wget > /dev/null \ || (bootstrap_wget) || return 1 [[ $(sed --version 2>&1) == *GNU* ]] || (bootstrap_sed) || return 1