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 38D4015817D for ; Thu, 13 Jun 2024 02:34:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CC10E2A7A; Thu, 13 Jun 2024 02:34:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 59E1CE2A7A for ; Thu, 13 Jun 2024 02:34:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49E8233BE4D for ; Thu, 13 Jun 2024 02:34:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A4BB01C7B for ; Thu, 13 Jun 2024 02:34:50 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1718245418.19e750b6880c1ffba55c4d309fbf33d5e746ee33.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: /, bin/ X-VCS-Repository: proj/portage X-VCS-Files: NEWS bin/ebuild.sh X-VCS-Directories: bin/ / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 19e750b6880c1ffba55c4d309fbf33d5e746ee33 X-VCS-Branch: master Date: Thu, 13 Jun 2024 02:34:50 +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: 71108586-791a-4d57-b08f-788e8e07de8d X-Archives-Hash: 7989db714629058db210d58a67411ae8 commit: 19e750b6880c1ffba55c4d309fbf33d5e746ee33 Author: Sam James gentoo org> AuthorDate: Thu Jun 13 02:20:27 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 13 02:23:38 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=19e750b6 bin/ebuild.sh: disable globskipdots too in Bash 5.2 See 69cac73ba0a7bcf2e2cff88c60d389895a550623. globskipdots is a new option in bash-5.2 that is also default-on in that release. The default value is not gated by BASH_COMPAT (see bug #907061), hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds and eclasses. Bug: https://bugs.gentoo.org/907061 Signed-off-by: Sam James gentoo.org> NEWS | 6 ++++++ bin/ebuild.sh | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 5aa485d264..b4b378e7a0 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,12 @@ Features: as well as / for all EAPIs rather than instead of / for EAPI 6 and below (bug #435066). +Bug fixes: +* ebuild: Handle Bash 5.2's change in behavior which enables the shopt + 'globskipdots' by default. This is needed to avoid breaking existing + working ebuilds. Future EAPIs will need to adjust the logic + added by this change. See bug #907061. + portage-3.0.65 (2024-06-04) -------------- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index c9f7c04e28..8b1e0861a8 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -18,7 +18,7 @@ source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit 1 # used instead. __check_bash_version() { # Figure out which min version of bash we require. - # Adjust patsub_replacement logic below on new EAPI! + # Adjust patsub_replacement/globskipdots logic below on new EAPI! local maj min if ___eapi_bash_3_2 ; then maj=3 min=2 @@ -52,16 +52,16 @@ __check_bash_version() { shopt -s compat32 fi - # patsub_replacement is a new option in bash-5.2 that is also default-on + # patsub_replacement and globskipdots are new options in bash-5.2 that are also default-on # in that release. The default value is not gated by BASH_COMPAT (see bug #881383), # hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds # and eclasses. # # New EAPI note: a newer EAPI (after 8) may well adopt Bash 5.2 as its minimum version. # If it does, this logic will need to be adjusted to only disable patsub_replacement - # for < ${new_api}! + # and globskipdots for < ${new_api}! if (( BASH_VERSINFO[0] >= 6 || ( BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 2 ) )) ; then - shopt -u patsub_replacement + shopt -u patsub_replacement globskipdots fi }