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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 605E1158094 for ; Sat, 2 Jul 2022 17:58:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 976B9E08A0; Sat, 2 Jul 2022 17:58:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 60648E08A0 for ; Sat, 2 Jul 2022 17:58:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 99A59341D19 for ; Sat, 2 Jul 2022 17:58:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D1355A2 for ; Sat, 2 Jul 2022 17:22:18 +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: <1656782521.3085a0a30f8439efeb3178a852af00109d29fcad.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: 3085a0a30f8439efeb3178a852af00109d29fcad X-VCS-Branch: master Date: Sat, 2 Jul 2022 17:22:18 +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: 584263ae-4edc-4686-afca-5ddba29d7501 X-Archives-Hash: 6e96f14e27a8eff6ac6255e1462a2ce5 commit: 3085a0a30f8439efeb3178a852af00109d29fcad Author: Tom Gillespie gmail com> AuthorDate: Fri Jun 17 08:10:50 2022 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Jul 2 17:22:01 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3085a0a3 bootstrap-prefix.sh fixes for stage1 cygwin bash and python failures bootstrap_gnu --disable-readline seems to work and seems to be needed on cygwin now for bash 5.1 and cygwin-3.3.5-341 bootstrap_python update patches to use cygwin python39 patch set for 3.9.9 and source from their releases since only older versions are on github and their gitweb does not support downloading snapshots, requiring git, which makes it unsuitable for bootstrapping Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 46 ++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 2a28478970..aecca9d3e2 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -946,10 +946,8 @@ bootstrap_gnu() { export ac_cv_path_POD2MAN=no # 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" + # but we don't need any groovy input handling at all, so just disable it + [[ ${PN} == "bash" ]] && myconf="${myconf} --disable-readline" # On e.g. musl systems bash will crash with a malloc error if we use # bash' internal malloc, so disable it during it this stage @@ -1059,16 +1057,37 @@ bootstrap_python() { case ${CHOST} in (*-*-cygwin*) - # apply patches from cygwinports much like the ebuild does - local gitrev pf pn - gitrev="71f2ac2444946c97d892be3892e47d2a509e0e96" # python36 3.6.8 - efetch "https://github.com/cygwinports/python36/archive/${gitrev}.tar.gz" \ - || return 1 - gzip -dc "${DISTDIR}"/${gitrev}.tar.gz | tar -xf - - [[ ${PIPESTATUS[*]} == '0 0' ]] || return 1 + local gitrev cygpyver pf pn patch_folder ffail + + # try github first, if that fails, it means that cygwin has not + # archived that repo yet + # ideally the version of python used by bootstrap would be one + # that cygwin has packaged if we don't do exact matches on the + # version then some patches may not apply cleanly + + ffail=0 + gitrev="42494e325a050ba03638568d7318f8f0075e25fb" + efetch "https://github.com/cygwinports/python39/archive/${gitrev}.tar.gz" \ + || ffail=1 + if [[ -z ${ffail} ]]; then + gzip -dc "${DISTDIR}"/"${gitrev}.tar.gz" | tar -xf - + [[ ${PIPESTATUS[*]} == '0 0' ]] || return 1 + patch_folder="python39-${gitrev}" + else + cygpyver="3.9.9-1" + efetch "https://mirrors.kernel.org/sourceware/cygwin/x86_64/release/python39/python39-${cygpyver}-src.tar.xz" \ + || return 1 + xz -dc "${DISTDIR}"/"python39-${cygpyver}-src.tar.xz" | tar -xf - + [[ ${PIPESTATUS[*]} == '0 0' ]] || return 1 + patch_folder="python39-${cygpyver}.src" + ffail=0 + fi + [[ ${ffail} == 0 ]] || return 1 + for pf in $( sed -ne '/PATCH_URI="/,/"/{s/.*="//;s/".*$//;p}' \ - < python36-${gitrev}/python3.cygport + < "${patch_folder}/python39.cygport" \ + | grep -v rpm-wheels | grep -v revert-bpo ); do pf="python36-${gitrev}/${pf}" for pn in {1..2} fail; do @@ -1076,7 +1095,8 @@ bootstrap_python() { eerror "failed to apply ${pf}" return 1 fi - patch -N -p${pn} -i "${pf}" --dry-run >/dev/null 2>&1 || continue + patch -N -p${pn} -i "${pf}" --dry-run >/dev/null 2>&1 \ + || continue echo "applying (-p${pn}) ${pf}" patch -N -p${pn} -i "${pf}" || return 1 break