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 C01201382C5 for ; Wed, 3 Jun 2020 07:13:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EF294E083B; Wed, 3 Jun 2020 07:13:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 C225DE083B for ; Wed, 3 Jun 2020 07:13:35 +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 0FDE034EF66 for ; Wed, 3 Jun 2020 07:13:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 11E919C for ; Wed, 3 Jun 2020 07:13:26 +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: <1591168337.dedba266af11afd99be69dd29eb0bd1b4e9a3ad0.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: dedba266af11afd99be69dd29eb0bd1b4e9a3ad0 X-VCS-Branch: master Date: Wed, 3 Jun 2020 07:13:26 +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: da3a340c-84a3-4ad5-84ad-6f86320e6748 X-Archives-Hash: edb0310a9136088e83318c7a0dfb7235 commit: dedba266af11afd99be69dd29eb0bd1b4e9a3ad0 Author: Fabian Groffen gentoo org> AuthorDate: Wed Jun 3 07:12:17 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Jun 3 07:12:17 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=dedba266 scripts/bootstrap-prefix: try to avoid downloading files which don't exist libressl only has a .gz tarball, so it's pointless to try .xz and bz2. Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 97 +++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 57 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index e70bc57311..99b405f406 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -91,33 +91,6 @@ efetch() { return 0 } -# template -# bootstrap_() { -# PV= -# A= -# einfo "Bootstrapping ${A%-*}" - -# efetch ${A} || return 1 - -# einfo "Unpacking ${A%-*}" -# export S="${PORTAGE_TMPDIR}/${PN}" -# rm -rf ${S} -# mkdir -p ${S} -# cd ${S} -# tar -zxf ${DISTDIR}/${A} || return 1 -# S=${S}/${PN}-${PV} -# cd ${S} - -# einfo "Compiling ${A%-*}" -# econf || return 1 -# $MAKE ${MAKEOPTS} || return 1 - -# einfo "Installing ${A%-*}" -# $MAKE install || return 1 - -# einfo "${A%-*} successfully bootstrapped" -# } - configure_cflags() { export CPPFLAGS="-I${ROOT}/tmp/usr/include" @@ -735,6 +708,40 @@ bootstrap_portage() { einfo "${A%-*} successfully bootstrapped" } +bootstrap_simple() { + local PN PV A S + PN=$1 + PV=$2 + A=${PN}-${PV}.tar.${3:-gz} + einfo "Bootstrapping ${A%-*}" + + efetch ${4:-${DISTFILES_G_O}/distfiles}/${A} || return 1 + + einfo "Unpacking ${A%-*}" + S="${PORTAGE_TMPDIR}/${PN}-${PV}" + rm -rf "${S}" + mkdir -p "${S}" + cd "${S}" + case $3 in + xz) decomp=xz ;; + bz2) decomp=bzip2 ;; + gz|) decomp=gzip ;; + esac + ${decomp} -dc "${DISTDIR}"/${A} | tar -xf - || return 1 + S="${S}"/${PN}-${PV} + cd "${S}" + + einfo "Compiling ${A%-*}" + v $MAKE || return 1 + + einfo "Installing ${A%-*}" + v $MAKE PREFIX="${ROOT}"/tmp/usr install || return 1 + + cd "${ROOT}" + rm -Rf "${S}" + einfo "${PN}-${PV} successfully bootstrapped" +} + bootstrap_gnu() { local PN PV A S PN=$1 @@ -1279,42 +1286,18 @@ bootstrap_gzip() { } bootstrap_xz() { - GNU_URL=${XZ_URL:-http://tukaani.org} bootstrap_gnu xz 5.2.4 || \ - GNU_URL=${XZ_URL:-http://tukaani.org} bootstrap_gnu xz 5.2.3 + GNU_URL=http://tukaani.org/xz bootstrap_gnu xz 5.2.4 || \ + GNU_URL=http://tukaani.org/xz bootstrap_gnu xz 5.2.3 } bootstrap_bzip2() { - local PN PV A S - PN=bzip2 - PV=1.0.6 - A=${PN}-${PV}.tar.gz - einfo "Bootstrapping ${A%-*}" - - efetch ${DISTFILES_G_O}/distfiles/${A} || return 1 - - einfo "Unpacking ${A%-*}" - S="${PORTAGE_TMPDIR}/${PN}-${PV}" - rm -rf "${S}" - mkdir -p "${S}" - cd "${S}" - gzip -dc "${DISTDIR}"/${A} | tar -xf - || return 1 - S="${S}"/${PN}-${PV} - cd "${S}" - - einfo "Compiling ${A%-*}" - $MAKE || return 1 - - einfo "Installing ${A%-*}" - $MAKE PREFIX="${ROOT}"/tmp/usr install || return 1 - - cd "${ROOT}" - rm -Rf "${S}" - einfo "${A%-*} successfully bootstrapped" + bootstrap_simple bzip2 1.0.6 gz \ + https://sourceware.org/pub/bzip2 } bootstrap_libressl() { - GNU_URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL" \ - bootstrap_gnu libressl 2.8.3 + bootstrap_simple libressl 2.8.3 gz \ + https://ftp.openbsd.org/pub/OpenBSD/LibreSSL } bootstrap_stage_host_gentoo() {