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 D073D15806E for ; Fri, 2 Jun 2023 18:39:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EFEFEE08CD; Fri, 2 Jun 2023 18:39:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D1008E08CD for ; Fri, 2 Jun 2023 18:39:35 +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 12D2233FD24 for ; Fri, 2 Jun 2023 18:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 75E12A5A for ; Fri, 2 Jun 2023 18:39:33 +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: <1685731145.aeada12dd9d9c0008a73a59fd37578abf3fc1f6a.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ncurses/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild sys-libs/ncurses/ncurses-6.4_p20230401.ebuild sys-libs/ncurses/ncurses-6.4_p20230527.ebuild X-VCS-Directories: sys-libs/ncurses/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: aeada12dd9d9c0008a73a59fd37578abf3fc1f6a X-VCS-Branch: master Date: Fri, 2 Jun 2023 18:39:33 +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: be3fcfa1-943c-4391-b60b-572a3d7a0e76 X-Archives-Hash: d36836f13ec8ccd538eeaf22c0ae69c9 commit: aeada12dd9d9c0008a73a59fd37578abf3fc1f6a Author: Sam James gentoo org> AuthorDate: Fri Jun 2 18:06:23 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Jun 2 18:39:05 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aeada12d sys-libs/ncurses: optimise SRC_URI generation Thanks to radhermit's new tooling. Before: ``` sys-libs/ncurses-6.4_p20230401::.: 33.232636ms sys-libs/ncurses-6.4_p20230527::.: 55.257908ms sys-libs/ncurses-6.3_p20221203-r2::.: 137.523679ms ``` After: ``` sys-libs/ncurses-6.4_p20230401::.: 9.66169ms sys-libs/ncurses-6.4_p20230527::.: 10.019753ms sys-libs/ncurses-6.3_p20221203-r2::.: 11.878338ms ``` Signed-off-by: Sam James gentoo.org> sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild | 52 +++++++++++------------- sys-libs/ncurses/ncurses-6.4_p20230401.ebuild | 52 +++++++++++------------- sys-libs/ncurses/ncurses-6.4_p20230527.ebuild | 52 +++++++++++------------- 3 files changed, 72 insertions(+), 84 deletions(-) diff --git a/sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild b/sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild index fd7f1fc9cb67..49ffaefaa688 100644 --- a/sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild +++ b/sys-libs/ncurses/ncurses-6.3_p20221203-r2.ebuild @@ -105,36 +105,32 @@ if [[ ${PV} == *_p* ]] ; then ) if [[ -z ${PATCH_DATES[@]} ]] ; then - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz" - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc" + SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz" + SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc" # If we have a rollup patch, use that instead of the individual ones. - UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh ) + UPSTREAM_PATCHES+=( patch.sh ) else - patch_url= - my_patch_index= - - # We keep a bunch of mirrors here as we've had reports of invisible*.net - # being 403 forbidden for some users. - urls=( - "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s" - ) - - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do - for url in "${urls[@]}" ; do - patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)" - SRC_URI+=" ${patch_url}" - SRC_URI+=" verify-sig? ( ${patch_url}.asc )" - done - - UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch ) - done - - unset patch_url - unset my_patch_index - unset urls + # We use a mirror as well because we've had reports of 403 forbidden for some users. + upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-" + upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-" + + # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}) + mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" ) + # Suffix each with .patch.gz + mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" ) + mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" ) + # Repeat for .patch.gz.asc for verify-sig + SRC_URI+=" ${mangled_patches[@]}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )" + + # For all of the URLs, chuck in invisible-island.net too: + SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )" + + UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" ) + + unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig fi SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz" @@ -159,7 +155,7 @@ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )" S="${WORKDIR}/${MY_P}" PATCHES=( - "${UPSTREAM_PATCHES[@]}" + "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}" # When rebasing Gentoo's patchset, please use git from a clean # src_prepare with upstream patches already applied. git am --reject diff --git a/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild index d5ee5d28cc97..0d8e53d2c0e1 100644 --- a/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild +++ b/sys-libs/ncurses/ncurses-6.4_p20230401.ebuild @@ -54,36 +54,32 @@ if [[ ${PV} == *_p* ]] ; then ) if [[ -z ${PATCH_DATES[@]} ]] ; then - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz" - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc" + SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz" + SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc" # If we have a rollup patch, use that instead of the individual ones. - UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh ) + UPSTREAM_PATCHES+=( patch.sh ) else - patch_url= - my_patch_index= - - # We keep a bunch of mirrors here as we've had reports of invisible*.net - # being 403 forbidden for some users. - urls=( - "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s" - ) - - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do - for url in "${urls[@]}" ; do - patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)" - SRC_URI+=" ${patch_url}" - SRC_URI+=" verify-sig? ( ${patch_url}.asc )" - done - - UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch ) - done - - unset patch_url - unset my_patch_index - unset urls + # We use a mirror as well because we've had reports of 403 forbidden for some users. + upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-" + upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-" + + # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}) + mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" ) + # Suffix each with .patch.gz + mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" ) + mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" ) + # Repeat for .patch.gz.asc for verify-sig + SRC_URI+=" ${mangled_patches[@]}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )" + + # For all of the URLs, chuck in invisible-island.net too: + SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )" + + UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" ) + + unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig fi fi @@ -110,7 +106,7 @@ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )" S="${WORKDIR}/${MY_P}" PATCHES=( - "${UPSTREAM_PATCHES[@]}" + "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}" # When rebasing Gentoo's patchset, please use git from a clean # src_prepare with upstream patches already applied. git am --reject diff --git a/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild b/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild index 7f0aa8fa0754..460f89a85065 100644 --- a/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild +++ b/sys-libs/ncurses/ncurses-6.4_p20230527.ebuild @@ -67,36 +67,32 @@ if [[ ${PV} == *_p* ]] ; then ) if [[ -z ${PATCH_DATES[@]} ]] ; then - SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz" - SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${P/_p/-}.patch.sh.gz.asc" + SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz" + SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc" # If we have a rollup patch, use that instead of the individual ones. - UPSTREAM_PATCHES+=( "${WORKDIR}"/${P/_p/-}-patch.sh ) + UPSTREAM_PATCHES+=( patch.sh ) else - patch_url= - my_patch_index= - - # We keep a bunch of mirrors here as we've had reports of invisible*.net - # being 403 forbidden for some users. - urls=( - "https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-%s" - "https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${MY_P}-%s" - ) - - for ((my_patch_index=0; my_patch_index < "${#PATCH_DATES[@]}"; my_patch_index++)); do - for url in "${urls[@]}" ; do - patch_url="$(printf ${urls} ${PATCH_DATES[${my_patch_index}]}.patch.gz)" - SRC_URI+=" ${patch_url}" - SRC_URI+=" verify-sig? ( ${patch_url}.asc )" - done - - UPSTREAM_PATCHES+=( "${WORKDIR}"/${MY_P}-${PATCH_DATES[${my_patch_index}]}.patch ) - done - - unset patch_url - unset my_patch_index - unset urls + # We use a mirror as well because we've had reports of 403 forbidden for some users. + upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-" + upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-" + + # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}) + mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" ) + # Suffix each with .patch.gz + mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" ) + mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" ) + # Repeat for .patch.gz.asc for verify-sig + SRC_URI+=" ${mangled_patches[@]}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )" + + # For all of the URLs, chuck in invisible-island.net too: + SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )" + + UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" ) + + unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig fi fi @@ -123,7 +119,7 @@ BDEPEND="verify-sig? ( sec-keys/openpgp-keys-thomasdickey )" S="${WORKDIR}/${MY_P}" PATCHES=( - "${UPSTREAM_PATCHES[@]}" + "${UPSTREAM_PATCHES[@]/#/${WORKDIR}/${MY_P}-}" # When rebasing Gentoo's patchset, please use git from a clean # src_prepare with upstream patches already applied. git am --reject