Merge pull request #2871 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-05-05

Weekly portage-stable package updates 2025-05-05
This commit is contained in:
Krzesimir Nowak 2025-05-08 12:26:50 +02:00 committed by GitHub
commit 5bde4cbecf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
199 changed files with 4762 additions and 1855 deletions

View File

@ -0,0 +1,11 @@
- base, dev: diffutils ([3.12](https://lists.gnu.org/archive/html/info-gnu/2025-04/msg00005.html) (includes [3.11](https://savannah.gnu.org/news/?id=10720)))
- base, dev: ldb ([2.9.2](https://gitlab.com/samba-team/samba/-/commit/42bfbb012f9c1c9054cdfb510ae4a50a3f12b384) (includes [2.9.1](https://gitlab.com/samba-team/samba/-/commit/3dd39600da3c0bedeae9f033c1333eb6b0f4ff33), [2.9.0](https://gitlab.com/samba-team/samba/-/commit/ec91204387bd7f5c5a8d8df8534c6ca59b491ac5)))
- base, dev: libidn2 ([2.3.8](https://gitlab.com/libidn/libidn2/-/blob/v2.3.8/NEWS))
- base, dev: polkit ([126](https://github.com/polkit-org/polkit/blob/126/NEWS.md))
- base, dev: rsync ([3.4.1](https://download.samba.org/pub/rsync/NEWS#3.4.1) (includes [3.4.0](https://download.samba.org/pub/rsync/NEWS#3.4.0)))
- base, dev: samba ([4.20.7](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.7/WHATSNEW.txt) (includes [4.20.6](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.6/WHATSNEW.txt), [4.20.5](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.5/WHATSNEW.txt), [4.20.4](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.4/WHATSNEW.txt), [4.20.3](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.3/WHATSNEW.txt), [4.20.2](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.2/WHATSNEW.txt), [4.20.1](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.1/WHATSNEW.txt), [4.20.0](https://gitlab.com/samba-team/samba/-/blob/samba-4.20.0/WHATSNEW.txt)))
- base, dev: strace ([6.14](https://github.com/strace/strace/releases/tag/v6.14))
- base, dev: tdb ([1.4.12](https://gitlab.com/samba-team/samba/-/commit/6b10cfbaf2c522cceb48c610c18656d2d69cf60b) (includes [1.4.11](https://gitlab.com/samba-team/samba/-/commit/93a6656c13facdb8565f90954428c4cf800bfc36)))
- base, dev: unzip ([6.0_p29](https://metadata.ftp-master.debian.org/changelogs//main/u/unzip/unzip_6.0-29_changelog))
- dev: patch ([2.8](https://lists.gnu.org/archive/html/info-gnu/2025-03/msg00014.html))
- sysext-zfs: zfs ([2.3.1](https://github.com/openzfs/zfs/releases/tag/zfs-2.3.1) (includes [2.3.0](https://github.com/openzfs/zfs/releases/tag/zfs-2.3.0)))

View File

@ -1,4 +1,4 @@
nftables_install_mask=" /usr/libexec/nftables /var/lib/nftables /usr/lib/systemd/system/nftables-restore.service "
nftables_install_mask=" /usr/libexec/nftables /var/lib/nftables /usr/lib/systemd/system/nftables-load.service /usr/lib/systemd/system/nftables-store.service "
INSTALL_MASK+=${nftables_install_mask}
PKG_INSTALL_MASK+=${nftables_install_mask}

View File

@ -23,14 +23,11 @@
=app-crypt/adcli-0.9.2 ~arm64
# Needed by arm64-native SDK
=app-crypt/ccid-1.5.5 ~arm64
=app-crypt/ccid-1.6.1 ~arm64
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=app-crypt/clevis-19-r1 **
# Keep versions on both arches in sync.
=app-crypt/tpm2-tss-4.1.3-r2 ~amd64
# Needed by arm64-native SDK.
=app-emulation/open-vmdk-1.0 *
@ -47,11 +44,6 @@
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=dev-libs/jose-12 **
# Keep versions on both arches in sync.
=dev-libs/libxml2-2.13.7 ~arm64
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=dev-libs/luksmeta-9-r1 **
# No arm64 keyword in package.
@ -60,9 +52,6 @@
# Catalyst 4 is not stable yet, but earlier versions are masked now.
=dev-util/catalyst-4.0.0 ~amd64 ~arm64
# Keep versions on both arches in sync.
=net-dns/bind-9.18.31-r1 ~arm64
# Needed to address CVE-2025-31498.
=net-dns/c-ares-1.34.5 ~amd64 ~arm64
@ -77,7 +66,7 @@
=net-libs/libnetfilter_cttimeout-1.0.1 ~arm64
# Needed to address curl-20250205 (https://github.com/curl/curl/issues/16197)
=net-misc/curl-8.13.0 ~amd64 ~arm64
=net-misc/curl-8.13.0-r1 ~amd64 ~arm64
# Needed to address CVE-2024-53580.
=net-misc/iperf-3.18 ~amd64 ~arm64
@ -97,6 +86,7 @@ sys-apps/azure-vm-utils
=sys-apps/semodule-utils-3.7 ~arm64
=sys-apps/util-linux-2.40.4 ~arm64
=sys-apps/zram-generator-1.2.1 ~arm64
=sys-auth/polkit-126-r1 ~amd64
# Needed to avoid pulling python into production images.
=sys-auth/sssd-2.9.6-r3 ~arm64

View File

@ -19,7 +19,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="Info-ZIP"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="bzip2 natspec unicode"
DEPEND="

View File

@ -11,7 +11,7 @@ SRC_URI="https://ccid.apdu.fr/files/${P}.tar.xz"
LICENSE="LGPL-2.1+ LGPL-2+ GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ppc ppc64 ~riscv ~sparc x86"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~riscv ~sparc x86"
IUSE="twinserial"
RDEPEND="

View File

@ -11,7 +11,7 @@ SRC_URI="https://github.com/tpm2-software/${PN}/releases/download/${PV}/${P}.tar
LICENSE="BSD-2"
SLOT="0/4"
KEYWORDS="~amd64 arm arm64 ~loong ~ppc64 ~riscv ~x86"
KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
IUSE="doc +fapi +openssl mbedtls +policy static-libs test"
RESTRICT="!test? ( test )"

View File

@ -1,178 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
BASHCOMP_P=bashcomp-2.0.3
PYTHON_COMPAT=( python3_{10..12} )
inherit python-any-r1
DESCRIPTION="Programmable Completion for bash"
HOMEPAGE="https://github.com/scop/bash-completion"
SRC_URI="
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
eselect? (
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
)
"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
IUSE="+eselect test"
RESTRICT="!test? ( test )"
# completion collision with net-fs/mc
RDEPEND="
>=app-shells/bash-4.3_p30-r1:0
sys-apps/miscfiles
!<app-text/tree-2.1.1-r1
!!net-fs/mc
"
BDEPEND="
test? (
${RDEPEND}
$(python_gen_any_dep '
dev-python/pexpect[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
')
)
"
PDEPEND="
>=app-shells/gentoo-bashcomp-20140911
"
PATCHES=(
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
)
strip_completions() {
# Remove unwanted completions.
local strip_completions=(
# Slackware package stuff, quite generic names cause collisions
# (e.g. with sys-apps/pacman)
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
# Debian/Red Hat network stuff
ifdown ifup ifquery ifstatus
# Installed in app-editors/vim-core
xxd
# Now-dead symlinks to deprecated completions
hd ncal
# FreeBSD
freebsd-update kldload kldunload portinstall portsnap
pkg_deinstall pkg_delete pkg_info
)
local file
for file in "${strip_completions[@]}"; do
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
die "stripping ${file} failed"
done
# remove deprecated completions (moved to other packages)
rm "${ED}"/usr/share/bash-completion/completions/_* || die
}
python_check_deps() {
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
}
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
if use eselect; then
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
fi
default
}
src_test() {
local EPYTEST_DESELECT=(
# redhat-specific, we strip these completions
test/t/test_if{down,up}.py
# not available for icedtea
test/t/test_javaws.py
# TODO
test/t/test_vi.py::TestVi::test_2
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
test/t/test_xrandr.py::TestXrandr::test_output_filter
)
local EPYTEST_IGNORE=(
# stupid test that async tests work
test/fixtures/pytest/test_async.py
)
local EPYTEST_XDIST=1
# portage's HOME override breaks tests
local -x HOME=$(unset HOME; echo ~)
addpredict "${HOME}"
# used in pytest tests
local -x NETWORK=none
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local -x PYTEST_PLUGINS=xdist.plugin
emake -C completions check
epytest
}
src_install() {
# work-around race conditions, bug #526996
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
strip_completions
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
# install the python completions for all targets, bug #622892
local TARGET
for TARGET in "${PYTHON_COMPAT[@]}"; do
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
fi
done
# install the eselect module
if use eselect; then
insinto /usr/share/eselect/modules
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
fi
}
pkg_postinst() {
local v
for v in ${REPLACING_VERSIONS}; do
if ver_test "${v}" -lt 2.1-r90; then
ewarn "For bash-completion autoloader to work, all completions need to"
ewarn "be installed in /usr/share/bash-completion/completions. You may"
ewarn "need to rebuild packages that installed completions in the old"
ewarn "location. You can do this using:"
ewarn
ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
ewarn
ewarn "After the rebuild, you should remove the old setup symlinks:"
ewarn
ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
fi
done
if has_version 'app-shells/zsh'; then
elog
elog "If you are interested in using the provided bash completion functions with"
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
elog
fi
}

View File

@ -27,6 +27,7 @@ DIST bash-5.3-rc1.tar.gz.sig 95 BLAKE2B cc7916f92eddd881ac4d791918b7bb579396df4b
DIST bash-5.3_rc1_p20250409-42c6cbd459a121e98d9ac43c477a5daf6c3d4f0c.tar.gz 15866668 BLAKE2B 472b67d397dd0f4ba070d4899bb1ecde08a90a7d2f5fc16b8f79c7113d2ca66cbc353e128ace17128069ebc7f8560605dda1441019174a942abb0dd345629746 SHA512 43614445ac11d25258ba6c47f020a1b87d8fa33b139e4d2237683ea0465bf24b03cf84e7e2771de4b038bbecab44c923bb307e4a60b9590b42936ea4e7c86e73
DIST bash-5.3_rc1_p20250419-482872ed8b51408066c3275a18350436f4d0ee41.tar.gz 16004323 BLAKE2B 936b2bf45e90be658105a2755b9a0be046cd5ae50b6d34624ff20199fa93c1de4a8f9ab669c2c9cf86e2e4d6379f124d91141354d41d437536931cd157491626 SHA512 f04eb6c45124a66fc894c4a1f217351a0247ddd870cfcbbcd01bcff77369d022c6ca82f693c6f2fcd035ce5a67ab3fdbc902b30a4c76e84fdaddd25eeb7c407f
DIST bash-5.3_rc1_p20250422-7731dc5c4d405ab147fc562e3af2a375ca593554.tar.gz 15996966 BLAKE2B 6a9c720b2747ccff7d8d198354163b6e0645b8a8e436a65e5d1f86ad509b8f197d95ba7cd4097ec4558911d73f98817da65f90a879215b8ad243388e1fdd75df SHA512 21847abf8019776f310c1de8f7469823c233039fa95ca1f872071580f917c728ac767f6daa778dfcfa0fd7583edf07b7928075d5086f3711d68a45ea3133857f
DIST bash-5.3_rc1_p20250430-15df5993542463ba9798e4ea5e488dfddf83c276.tar.gz 15996459 BLAKE2B 013768ddce578a50845f1709a276b80474999e83172d32d4ba1978a795c17fbd2c77d3812a631ade937afa9a0850ee40f45dcd8b02251fce8c3d0619b82de33d SHA512 e86edefd13e9863c059411587377393b5dc290bf42d1bb5f3684e4a881a0ea10f554b22752f3632b1fc29ff8be08ec1ace8f729639b55ec97eb77968886856fd
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883
DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399

View File

@ -0,0 +1,408 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel. See ftp://ftp.gnu.org/gnu/bash/bash-5.2-patches/.
case ${PV} in
*_p*)
PLEVEL=${PV##*_p}
;;
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.2_p1"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
else
my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
S=${WORKDIR}/${MY_P}
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
"${FILESDIR}/${PN}-5.2_p15-random-ub.patch"
"${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch"
"${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch"
"${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-1.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch"
"${FILESDIR}/${PN}-5.2_p32-erroneous-delimiter-pushback-condition.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Clean out local libs so we know we use system ones w/releases. The
# touch utility is invoked for the benefit of config.status.
if (( PLEVEL >= 0 )); then
rm -rf lib/{readline,termcap}/* \
&& touch lib/{readline,termcap}/Makefile.in \
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|| die
fi
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime.
unset -v YACC
# bash 5.3 drops unprototyped functions, earlier versions are
# incompatible with C23.
append-cflags $(test-flags-CC -std=gnu17)
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r1.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
if [[ ! ${EPREFIX} ]]; then
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local old_ver
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
read -r old_ver <<<"${REPLACING_VERSIONS}"
if [[ ! $old_ver ]]; then
:
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
return
fi
while read -r; do ewarn "${REPLY}"; done <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
}

View File

@ -0,0 +1,408 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel. See ftp://ftp.gnu.org/gnu/bash/bash-5.2-patches/.
case ${PV} in
*_p*)
PLEVEL=${PV##*_p}
;;
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.2_p1"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
else
my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
S=${WORKDIR}/${MY_P}
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
"${FILESDIR}/${PN}-5.2_p15-random-ub.patch"
"${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch"
"${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch"
"${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-1.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-2.patch"
"${FILESDIR}/${PN}-5.2_p32-erroneous-delimiter-pushback-condition.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Clean out local libs so we know we use system ones w/releases. The
# touch utility is invoked for the benefit of config.status.
if (( PLEVEL >= 0 )); then
rm -rf lib/{readline,termcap}/* \
&& touch lib/{readline,termcap}/Makefile.in \
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|| die
fi
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime.
unset -v YACC
# bash 5.3 drops unprototyped functions, earlier versions are
# incompatible with C23.
append-cflags $(test-flags-CC -std=gnu17)
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
if [[ ! ${EPREFIX} ]]; then
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local old_ver
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
read -r old_ver <<<"${REPLACING_VERSIONS}"
if [[ ! $old_ver ]]; then
:
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
return
fi
while read -r; do ewarn "${REPLY}"; done <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -97,7 +97,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch"
"${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch"
"${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch"
"${FILESDIR}/${PN}-5.2_p32-read-delimiter-in-invalid-mbchar.patch"
"${FILESDIR}/${PN}-5.2_p32-invalid-continuation-byte-ignored-as-delimiter-1.patch"
)
pkg_setup() {

View File

@ -0,0 +1,410 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.3_beta"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
BASH_COMMIT="15df5993542463ba9798e4ea5e488dfddf83c276"
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Clean out local libs so we know we use system ones w/releases. The
# touch utility is invoked for the benefit of config.status.
if (( PLEVEL >= 0 )); then
rm -rf lib/{readline,termcap}/* \
&& touch lib/{readline,termcap}/Makefile.in \
&& sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \
|| die
fi
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime.
unset -v YACC
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
# builtins/evalstring.c needs y.tab.h but can't (easily) specify the dep on it from above
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" y.tab.h
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" y.tab.h
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r1.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
if [[ ! ${EPREFIX} ]]; then
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local old_ver
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
read -r old_ver <<<"${REPLACING_VERSIONS}"
if [[ ! $old_ver ]]; then
:
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
return
fi
while read -r; do ewarn "${REPLY}"; done <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
}

View File

@ -315,8 +315,8 @@ src_install() {
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r1.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
if [[ ! ${EPREFIX} ]]; then
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
fi

View File

@ -0,0 +1,76 @@
From 57fbf1c67f2d89365601f39e72781fba001fe2f3 Mon Sep 17 00:00:00 2001
From: Kerin Millar <kfm@plushkava.net>
Date: Mon, 28 Apr 2025 08:13:38 +0100
Subject: [PATCH 3/3] Backport fix for erroneous delimiter pushback condition
in read_mbchar
This is a partial backport of commit 7731dc5c4d405ab147fc562e3af2a375ca593554
from the devel branch. Consider the following test case.
$ LC_ALL=en_US.UTF-8
$ printf 'FOO\0\315\0\226\0' | while read -rd ''; do echo "${REPLY@Q}"; done
With any vanilla 5.0, 5.1 or 5.2 release, the third record is disregarded.
<FOO>
<$'\315'>
With 5.3-rc1, the third record is treated as if it were two empty
records. The same is true of Gentoo's 5.2_p37 release.
'FOO'
$'\315'
''
''
With the upcoming 5.3-rc2, which will incoprorate this patch, all three
records are read correctly.
<FOO>
<$'\315'>
<$'\226'>
The issue is addressed by ensuring that the revised read_mbchar()
routine refrains from pushing back the delimiter - while effectively
truncating the mbchar buffer by writing a NUL byte - in cases where the
delimiter character was not read by the same routine.
As of the time of writing, the issue has not been addressed by any of
the official patchlevels, nor has 5.3 been released.
Link: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/read.html#tag_20_100_06
Link: https://mywiki.wooledge.org/BashPitfalls#IFS.3D_read_-r_-d_.27.27_filename
Link: https://lists.gnu.org/archive/html/bug-bash/2025-04/msg00065.html
Signed-off-by: Kerin Millar <kfm@plushkava.net>
---
builtins/read.def | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git builtins/read.def builtins/read.def
index 9fd9a74c..8000def3 100644
--- builtins/read.def
+++ builtins/read.def
@@ -1102,14 +1102,14 @@ read_mbchar (fd, string, ind, ch, delim, unbuffered)
}
else if (ret == (size_t)-1)
{
- /* If we read a delimiter character that makes this an invalid
- multibyte character, we can't just add it to the input string
- and treat it as a byte. We need to push it back so a subsequent
- zread will pick it up. */
- if ((unsigned char)c == delim)
+ /* If we read (i > 1) a delimiter character (c == delimiter)
+ that makes this an invalid multibyte character, we can't just
+ add it to the input string and treat it as a byte.
+ We need to push it back so a subsequent zread will pick it up. */
+ if (i > 1 && (unsigned char)c == delim)
{
zungetc ((unsigned char)c);
- mbchar[--i] = '\0'; /* unget the delimiter */
+ i--;
}
break; /* invalid multibyte character */
}
--
2.49.0

View File

@ -1,78 +1,67 @@
From 0432ec33408ac124b620c44416c9c58f0c10b63b Mon Sep 17 00:00:00 2001
From 2482e34ac12910f7e7436a968caf97ab96f8b582 Mon Sep 17 00:00:00 2001
From: Kerin Millar <kfm@plushkava.net>
Date: Fri, 23 Aug 2024 04:14:36 +0100
Subject: [PATCH] Backport fix for issue with read delimiter in invalid
mutibyte char
Date: Sat, 26 Apr 2025 08:43:58 +0100
Subject: [PATCH 1/3] Backport fix for invalid continuation bytes being ignored
as delimiters
This addresses a regression introduced by 5.0. Consider the following
This is a partial backport of commit 772e7e760e8a098e4d8dee21cf11090be4757918
from the devel branch. It addresses an issue in read_mbchar() whereby
the read builtin can read past the delimiter character, provided that is
invoked with a multibyte character set in effect. Consider the following
test case.
for i in {194..245}; do printf -v o %o "$i"; printf "\\$o\\n"; done |
while read -r; do declare -p REPLY; done
BEFORE
$ LC_ALL=en_US.UTF-8
$ for i in {194..245}; do printf -v o %o "$i"; printf "\\$o\\n"; done |
while read -r; do declare -p REPLY; done
declare -- REPLY=$'\302\n\303\n\304\n\305\n\306\n\307\n\310\n\311\n\312\
n\313\n\314\n\315\n\316\n\317\n\320\n\321\n\322\n\323\n\324\n\325\n\326\
n\327\n\330\n\331\n\332\n\333\n\334\n\335\n\336\n\337\n\340\n\341\n\342\
n\343\n\344\n\345\n\346\n\347\n\350\n\351\n\352\n\353\n\354\n\355\n\356\
n\357\n\360\n\361\n\362\n\363\n\364\n\365'
AFTER
The producing loop emits a sequence of bytes in the range 0xC2 - 0xF5.
Since each is terminated by a <newline> character, one would expect for
exactly 52 iterations of the consuming loop, with REPLY being assigned a
single byte each time. Instead, the input is read in its entirety. Why
is that, one may ask.
Given a legal UTF-8 byte sequence, any bytes whose values are between
0xC2 - 0xF4 are combinative in nature; they can only be followed by
between one and three bytes that are outside of that range.
0xC2 - 0xDF : First byte of a 2-byte code unit sequence
0xE0 - 0xEF : First byte of a 3-byte code unit sequence
0xF0 - 0xF4 : First byte of a 4-byte code unit sequence
As such, bash begins by reading the 0xC2 byte, for which mbrtowc(3)
returns -2, indicating an incomplete multibyte sequence. Next, the 0x0A
byte is read, for which mbrtowc(3) returns -1, indicating an invalid
multibyte sequence. At this point, bash ought to recognise the most
recently read byte as a delimiter. Instead, it continues reading the
input stream up until the delimiter that follows 0xF5, which is neither
a combining character nor legal in UTF-8 in any capacity.
This patch addresses the issue by introducing the zungetc() function,
which is used by read_mbchar() to push back the delimiter character that
transforms the sequence from an incomplete one to an invalid one. Said
character is then detected by the next invocation of the zread()
function, allowing for the decision to be made to return.
With this, the output of the test case amounts to 52 lines, as expected.
declare -- REPLY=$'\302'
declare -- REPLY=$'\303'
declare -- REPLY=$'\304'
declare -- REPLY=$'\305'
declare -- REPLY=$'\306'
declare -- REPLY=$'\307'
declare -- REPLY=$'\310'
declare -- REPLY=$'\311'
declare -- REPLY=$'\312'
declare -- REPLY=$'\313'
declare -- REPLY=$'\314'
declare -- REPLY=$'\315'
declare -- REPLY=$'\316'
declare -- REPLY=$'\317'
declare -- REPLY=$'\320'
declare -- REPLY=$'\321'
declare -- REPLY=$'\322'
declare -- REPLY=$'\323'
declare -- REPLY=$'\324'
declare -- REPLY=$'\325'
declare -- REPLY=$'\326'
declare -- REPLY=$'\327'
declare -- REPLY=$'\330'
declare -- REPLY=$'\331'
declare -- REPLY=$'\332'
declare -- REPLY=$'\333'
declare -- REPLY=$'\334'
declare -- REPLY=$'\335'
declare -- REPLY=$'\336'
declare -- REPLY=$'\337'
declare -- REPLY=$'\340'
declare -- REPLY=$'\341'
declare -- REPLY=$'\342'
declare -- REPLY=$'\343'
declare -- REPLY=$'\344'
declare -- REPLY=$'\345'
declare -- REPLY=$'\346'
declare -- REPLY=$'\347'
declare -- REPLY=$'\350'
declare -- REPLY=$'\351'
declare -- REPLY=$'\352'
declare -- REPLY=$'\353'
declare -- REPLY=$'\354'
declare -- REPLY=$'\355'
declare -- REPLY=$'\356'
declare -- REPLY=$'\357'
declare -- REPLY=$'\360'
declare -- REPLY=$'\361'
declare -- REPLY=$'\362'
declare -- REPLY=$'\363'
...
declare -- REPLY=$'\364'
declare -- REPLY=$'\365'
The issue affects all bash releases from 5.0 to 5.3-alpha. As of the
time of writing, it has not been addressed by any of the official
patchlevels, nor has 5.3 been released.
Link: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/read.html#tag_20_100_06
Link: https://mywiki.wooledge.org/BashPitfalls#IFS.3D_read_-r_-d_.27.27_filename
Link: https://lists.gnu.org/archive/html/bug-bash/2025-04/msg00068.html
Signed-off-by: Kerin Millar <kfm@plushkava.net>
---
builtins/read.def | 25 ++++++++++++----
@ -293,5 +282,5 @@ index dafb7f60..7cfbb288 100644
zreset ()
{
--
2.45.2
2.49.0

View File

@ -0,0 +1,146 @@
From fb31e1965baa732f9e4cdbe3a7d6691d7beb4e03 Mon Sep 17 00:00:00 2001
From: Kerin Millar <kfm@plushkava.net>
Date: Mon, 28 Apr 2025 07:59:25 +0100
Subject: [PATCH 2/3] Backport fix for invalid continuation bytes above 0x7F
being ignored as delimiters
This is a partial backport of commit e327891b52513bef0b34aac625c44f8fa6811f53
from the devel branch. It addresses an issue in read_mbchar() whereby an
invalid continuation byte greater than 0x7F isn't recognised as a valid
delimiter on platforms where char is signed. Consider the following test
case.
$ LC_ALL=en_US.UTF-8; uname -m
x86_64
$ printf '\317\360_' | { read -rd $'\360'; echo "${REPLY@Q}"; }
$'\317\360_'
After applying this patch, the value of REPLY will be $'\317'.
The issue affects all bash releases from 5.0 to 5.3-rc1. As of the time
of writing, it has not been addressed by any of the official
patchlevels, nor has 5.3 been released.
Link: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/utilities/read.html#tag_20_100_06
Link: https://mywiki.wooledge.org/BashPitfalls#IFS.3D_read_-r_-d_.27.27_filename
Link: https://lists.gnu.org/r/bug-bash/2024-08/msg00100.html
Signed-off-by: Kerin Millar <kfm@plushkava.net>
---
builtins/read.def | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git builtins/read.def builtins/read.def
index 53b4bd81..9fd9a74c 100644
--- builtins/read.def
+++ builtins/read.def
@@ -142,7 +142,7 @@ sh_timer *read_timeout;
static int reading, tty_modified;
static SigHandler *old_alrm;
-static unsigned char delim;
+static int delim;
static struct ttsave termsave;
@@ -320,7 +320,6 @@ read_builtin (list)
break;
case 'N':
ignore_delim = 1;
- delim = -1;
case 'n':
nflag = 1;
code = legal_number (list_optarg, &intval);
@@ -348,7 +347,7 @@ read_builtin (list)
}
break;
case 'd':
- delim = *list_optarg;
+ delim = (unsigned char)*list_optarg;
break;
CASE_HELPOPT;
default:
@@ -765,7 +764,7 @@ read_builtin (list)
continue;
}
- if (ignore_delim == 0 && (unsigned char)c == delim)
+ if ((unsigned char)c == delim)
break;
if (c == '\0' && delim != '\0')
@@ -1107,9 +1106,9 @@ read_mbchar (fd, string, ind, ch, delim, unbuffered)
multibyte character, we can't just add it to the input string
and treat it as a byte. We need to push it back so a subsequent
zread will pick it up. */
- if (c == delim)
+ if ((unsigned char)c == delim)
{
- zungetc (c);
+ zungetc ((unsigned char)c);
mbchar[--i] = '\0'; /* unget the delimiter */
}
break; /* invalid multibyte character */
@@ -1220,6 +1219,8 @@ edit_line (p, itext)
len = strlen (ret);
ret = (char *)xrealloc (ret, len + 2);
ret[len++] = delim;
+ if (delim > 0)
+ ret[len++] = delim;
ret[len] = '\0';
return ret;
}
@@ -1240,7 +1241,7 @@ static rl_command_func_t *old_delim_func;
static int old_newline_ctype;
static rl_command_func_t *old_newline_func;
-static unsigned char delim_char;
+static int delim_char;
static void
set_eol_delim (c)
@@ -1252,19 +1253,21 @@ set_eol_delim (c)
initialize_readline ();
cmap = rl_get_keymap ();
- /* Save the old delimiter char binding */
+ /* Save the old newline binding and change it to self-insert */
old_newline_ctype = cmap[RETURN].type;
old_newline_func = cmap[RETURN].function;
- old_delim_ctype = cmap[c].type;
- old_delim_func = cmap[c].function;
-
- /* Change newline to self-insert */
cmap[RETURN].type = ISFUNC;
cmap[RETURN].function = rl_insert;
- /* Bind the delimiter character to accept-line. */
- cmap[c].type = ISFUNC;
- cmap[c].function = rl_newline;
+ /* Save any binding to the delimiter and bind the delimiter to accept-line */
+ if (c >= 0)
+ {
+ old_delim_ctype = cmap[c].type;
+ old_delim_func = cmap[c].function;
+
+ cmap[c].type = ISFUNC;
+ cmap[c].function = rl_newline;
+ }
delim_char = c;
}
@@ -1280,7 +1283,10 @@ reset_eol_delim (cp)
cmap[RETURN].type = old_newline_ctype;
cmap[RETURN].function = old_newline_func;
- cmap[delim_char].type = old_delim_ctype;
- cmap[delim_char].function = old_delim_func;
+ if (delim_char >= 0)
+ {
+ cmap[delim_char].type = old_delim_ctype;
+ cmap[delim_char].function = old_delim_func;
+ }
}
#endif
--
2.49.0

View File

@ -0,0 +1,73 @@
# /etc/bash/bashrc.d/10-gentoo-color.bash
if [[ ${NO_COLOR} ]]; then
# Respect the user's wish not to use color. See https://no-color.org/.
gentoo_color=0
elif [[ ${COLORTERM@a} == *x* && ${COLORTERM} == @(24bit|truecolor) ]]; then
# The COLORTERM environment variable can reasonably be trusted here.
# See https://github.com/termstandard/colors for further information.
gentoo_color=1
elif unset -v COLORTERM; ! gentoo_color=$(tput colors 2>/dev/null); then
# Either ncurses is not installed or no terminfo database could be
# found. Fall back to a whitelist which covers the majority of terminal
# emulators and virtual console implementations known to support color
# and which remain (somewhat) popular. This will rarely happen, so the
# list need not be exhaustive.
case ${TERM} in
*color* |\
*direct* |\
*ghostty |\
[Ekx]term* |\
alacritty |\
aterm |\
contour |\
dtterm |\
foot* |\
jfbterm |\
linux |\
mlterm |\
rxvt* |\
screen* |\
tmux* |\
wsvt25* ) gentoo_color=1
esac
elif (( gentoo_color == 16777216 )); then
# Truecolor support is available. Advertise it.
export COLORTERM=truecolor
fi
# For direxpand to be missing indicates that bash is lacking readline support.
if (( gentoo_color <= 0 )) || [[ ! $(shopt -p direxpand 2>/dev/null) ]]; then
# Define a prompt without color.
PS1='\u@\h \w \$ '
elif (( EUID == 0 )); then
# If root, omit the username and print the hostname in red.
PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] '
else
# Otherwise, print the username and hostname in green.
PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] '
fi
if (( gentoo_color > 0 )); then
# Colorize the output of diff(1), grep(1) and a few coreutils utilities.
# However, do so only where no alias/function by the given name exists.
for _ in diff dir grep ls vdir; do
if [[ $(type -t "$_") == file ]]; then
alias "$_=$_ --color=auto"
fi
done
# Enable colors for ls(1) and some other utilities that respect the
# LS_COLORS variable. Prefer ~/.dir_colors, per bug #64489.
if hash dircolors 2>/dev/null; then
if [[ -f ~/.dir_colors ]]; then
eval "$(COLORTERM=1 dircolors -b -- ~/.dir_colors)"
elif [[ -f /etc/DIR_COLORS ]]; then
eval "$(COLORTERM=1 dircolors -b /etc/DIR_COLORS)"
else
eval "$(COLORTERM=1 dircolors -b)"
fi
fi
fi
unset -v gentoo_color

View File

@ -0,0 +1,70 @@
# /etc/bash/bashrc.d/10-gentoo-color.bash
if [[ ${NO_COLOR} ]]; then
# Respect the user's wish not to use color. See https://no-color.org/.
gentoo_color=0
elif [[ ${COLORTERM@a} == *x* && ${COLORTERM} == @(24bit|truecolor) ]]; then
# The COLORTERM environment variable can reasonably be trusted here.
# See https://github.com/termstandard/colors for further information.
gentoo_color=1
else
# Check TERM against a whitelist covering a majority of popular
# terminal emulators and virtual console implementations known to
# support color. If no matching entry is found, try to use tput(1) to
# determine whether color is supported.
case ${TERM} in
*color* |\
*direct* |\
*ghostty |\
[Ekx]term* |\
alacritty |\
aterm |\
contour |\
dtterm |\
foot* |\
jfbterm |\
linux |\
mlterm |\
rxvt* |\
screen* |\
tmux* |\
wsvt25* ) gentoo_color=1 ;;
* ) gentoo_color=$(tput colors 2>/dev/null)
esac
fi
# For direxpand to be missing indicates that bash is lacking readline support.
if (( gentoo_color <= 0 )) || ( ! shopt -u direxpand 2>/dev/null ); then
# Define a prompt without color.
PS1='\u@\h \w \$ '
elif (( EUID == 0 )); then
# If root, omit the username and print the hostname in red.
PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] '
else
# Otherwise, print the username and hostname in green.
PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \w \$\[\e[00m\] '
fi
if (( gentoo_color > 0 )); then
# Colorize the output of diff(1), grep(1) and a few coreutils utilities.
# However, do so only where no alias/function by the given name exists.
for _ in diff dir grep ls vdir; do
if [[ $(type -t "$_") == file ]]; then
alias "$_=$_ --color=auto"
fi
done
# Enable colors for ls(1) and some other utilities that respect the
# LS_COLORS variable. Prefer ~/.dir_colors, per bug #64489.
if hash dircolors 2>/dev/null; then
if [[ -f ~/.dir_colors ]]; then
eval "$(COLORTERM=1 dircolors -b -- ~/.dir_colors)"
elif [[ -f /etc/DIR_COLORS ]]; then
eval "$(COLORTERM=1 dircolors -b /etc/DIR_COLORS)"
else
eval "$(COLORTERM=1 dircolors -b)"
fi
fi
fi
unset -v gentoo_color

View File

@ -0,0 +1,83 @@
# /etc/bash/bashrc.d/10-gentoo-title.bash
# For information regarding the control sequences used, please refer to
# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html.
genfun_set_win_title() {
# Advertise the fact that the presently running interactive shell will
# update the title. Doing so allows for its subprocesses to determine
# whether it is safe to set the title of their own accord. Note that 0
# refers to the value of Ps within the OSC Ps ; Pt BEL sequence.
export SHELL_SETS_TITLE=0
# Assigns the basename of the current working directory, having
# sanitised it with @Q parameter expansion. Useful for paths containing
# newlines and such. As a special case, names consisting entirely of
# graphemes shall not undergo the expansion, for reasons of cleanliness.
genfun_sanitise_cwd() {
_cwd=${PWD##*/}
if [[ ! ${_cwd} ]]; then
_cwd=${PWD}
elif [[ ${_cwd} == *[![:graph:]]* ]]; then
_cwd=${_cwd@Q}
fi
}
# Sets the window title with the Set Text Parameters control sequence.
# For screen, the sequence defines the hardstatus (%h) and for tmux, the
# pane_title (#T). For graphical terminal emulators, it is normal for
# the title bar to be affected.
genfun_set_win_title() {
local _cwd
genfun_sanitise_cwd
printf '\033]0;%s@%s - %s\007' "${USER}" "${HOSTNAME%%.*}" "${_cwd}"
}
genfun_set_win_title
}
unset -v SHELL_SETS_TITLE
# Determine whether the terminal can handle the Set Text Parameters sequence.
# The only terminals permitted here are those for which there is empirical
# evidence that the sequence is supported and that the UTF-8 character encoding
# is handled correctly. Quite rightly, this precludes many vintage terminals.
case ${TERM} in
alacritty*|contour|foot*|tmux*)
# The terminal emulator also supports XTWINOPS. If the PTY was
# created by sshd(8) then push the current window title to the
# stack and arrange for it to be popped upon exiting. Xterm also
# supports this but there are far too many terminal emulators
# that falsely identify as being xterm-compatible.
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
trap 'printf "\033[23;0t"' EXIT
printf '\033[22;0t'
fi
;;
rxvt-unicode*|st-256color|xterm*)
# If the PTY was created by sshd(8) then proceed no further.
# Alas, there exist many operating environments in which the
# title would otherwise not be restored upon ssh(1) exiting.
# Those wanting for the title to be set regardless may adjust
# ~/.bashrc or create a bashrc.d drop-in to set PROMPT_COMMAND.
# For example, PROMPT_COMMAND=(genfun_set_win_title).
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
return
fi
;;
screen*)
# If the PTY was created by sshd(8) and screen(1) was launched
# prior to the SSH session beginning, as opposed to afterwards,
# proceed no further. It is another case in which there would be
# no guarantee of the title being restored upon ssh(1) exiting.
if [[ ! ${WINDOW} && ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
return
fi
;;
*)
return
esac
# Arrange for the title to be updated each time the primary prompt is displayed.
PROMPT_COMMAND+=('genfun_set_win_title')

View File

@ -16,12 +16,12 @@ DIST meson-1.7.1.tar.gz 2295198 BLAKE2B a1eda88cc349f74ab00e367daf5f27452875f483
DIST meson-1.7.1.tar.gz.asc 833 BLAKE2B 1e854c5f026471d1fa1f9f9ca26a8be06518564694b92ba8a751f2c05fa430359c5f6c9b636c0df9a2db338f61a9750e4080d60171a0e3bef49163c416166ef6 SHA512 266de0d34828688491ad3167bb3b88f489b579af1bbbb20a28e3ccfc342fa04659970d4db5e10a0470a5c52d37f4b04f718d7af4c3c3e9e1e67c69c10f3c4662
DIST meson-1.7.2.tar.gz 5009274 BLAKE2B f5a19d7c0dfa35efda5bdef972fa6362a64fee2c74be0c09dee6d52c30a8b0169dbe7fab3199add306c778f6a57196251b44ec27ff6b5e038e12c11b27513a54 SHA512 c3c71ae0e0c31d8d72e200bb5fd5e6584ce41aabe1e85575d50371f82ed02c6e346da3b0b4a2786199b9410daaa1622807a88bfc8ac991cf134bad4a53b3c863
DIST meson-1.7.2.tar.gz.asc 996 BLAKE2B 9a34bb86f15eb92d4eb972835e8e18e175c869a6ba9d88310ca6058654200b227c7a4a945eee220784f584737a3b74ffcd06e2b60a3e502e49af5da69eb1e5bf SHA512 a1e0461a28dfc8ba74ffd919511584148094c2bc809c3d380749856cbdaa33473c1a0c1ec92928020f50e116803fc03deb37b3ee2aca7e56287b155a5ccc36ac
DIST meson-1.8.0rc2.tar.gz 2336408 BLAKE2B 6337d81a7adf8de6e0d172117a258f72d11c7bbeeb2624cf449639400f6bcdac961c9519f290d3c7a95f79783cfc2187819b3442b8f258e0db7a9e671edf2a9a SHA512 51012adc2ff86dd88c80c18f78ee7933ecd24f7e664a29cd972e239a25a6b58ab63e10bba1b4cc76fae3edfa74c2ee285a3e23d7791a947e1131de5634cf88f3
DIST meson-1.8.0rc2.tar.gz.asc 833 BLAKE2B fc0445987e7edf2abba6d5c627adbf68bc36b69f7334dbeef19e49ad54ec7d42c2e64d1c4c5d9c2a0f3a217e8364c3cd950705e397e069b308b1099ff0d07f18 SHA512 746e41ee39cf0a58f783835dd79a435a16903b7c39756e93eb3f00446a37b82d2f40f7d5bb8a4e5430b33cb43468b4301616bcc8d6b7d2cd85e5b64f61029ed5
DIST meson-1.8.0.tar.gz 2334911 BLAKE2B a27a6e105bb19ff0fa77f62b7563b66cdeffef8e4d6ec538e1cc5c49fae16097afeae9669ed80b1d0688059c1135ff392c722e39c94f5686fb926ffcd6abf893 SHA512 345ca35b0c9219f42a46eb2dbda793b46277b2220912124a5054973390138ef1310004e1a90fde37c177d3e7103b209ebf539def2ae597f3d472c35c043bc46b
DIST meson-1.8.0.tar.gz.asc 833 BLAKE2B ad1ef6f9fb8b02231b64dac2660cfdf6f2bed801c4696d905b681836132c6da257698cc636c3e449d2b137f4c16b19eb22ad87271298647d33ffa26871e358ff SHA512 cdfb8a6b121f56b02b50b52db0db33fbaec90e6432e047ab168cc529bf79e55a05ad1377c3def8bad130a316c6666d203752bb5173d6e8c84f55d53afb8d5f27
DIST meson-reference-1.4.2.3 339324 BLAKE2B 1a4fbd8c27a8cfba773777eabd2ebaa0f76ec0c61dcfe1c7b4483737b348ff9528d68f26e68d7d40b2e1875611eed5b9a31c1cf55fed8eabb42fc1e31d9ef14b SHA512 8b8ec43e812599203ec44c08805eb6818485805c45b9c69802261eaa35efc97846a96f6472c6b1ef5f6c703e7153fd957df7b805f173ca3400a2030dfbe002ca
DIST meson-reference-1.5.2.3 341110 BLAKE2B 0d588b796f7f2da2dcb0e7822acde6a9a461930da4bfead3cf9148fa0fac18cd0ccbc6e891f555c973836f1c16b4eae299908a838a0b6843293de8815d30fc23 SHA512 64715ce2113e362e7d67179fe13566bc8f84ce7f4e6d795b836f42455a871173fee06e3e969e2996022d7e6c9b4b5379587a4c0c3d97b4bca527fb8902d3547f
DIST meson-reference-1.6.1.3 343730 BLAKE2B 55df822192781a70e4bc44cfe14fb363e3f820406260ca9705d7fdb5fad1bf0117e3f1325d37e58e23477bc075ab6bd84056409355ec694f72eeaa5bf982ecc7 SHA512 553cdcd86a7a600cda05ac970cc285c4c50017d1e7d2925645d7f19a62b34c2f079673cafecf4111aa102afbe9d8e4d56f166d1d9940b740eeec0bb99d6cbc0d
DIST meson-reference-1.7.0.3 344764 BLAKE2B 615c70325b6ca3b964bf2827f20f07845150943b6cd95a0599b0392299e2a9338921b52bbe3613fc03fa931c28fb2121801bdb74880f2bd4fecb051b7f1fcb4b SHA512 9d9a3862602251ca780acdf18cee4ab9cd14404481e216b557eafc88b23561ecf481836898b78cbc4ee3539869b5578c649a5c71f32b3074d8125b867ea4751d
DIST meson-reference-1.7.1.3 344764 BLAKE2B f4b6a5eb80f143310e9aae3fe512b5146b39df4e74e589c571d3f58ddfcb3298d1accff417c055e46a4ad61fc0557723eb4d89607a4793d1bcc134f1e83ab3eb SHA512 f36e4adcf7eab70738c71c48c87328bc436168dc605c0931b746d4b48915269dc9245215a4aa968046e4cb0f5167f595da1cf2acd96d87ed47aea9b34b63a652
DIST meson-reference-1.7.2.3 344764 BLAKE2B 82de9a7a01c2f1b45a2b3432deb4713af3cfd3b2dc9af8802488b7d1b86dde9b6ac81f90b144006a79e90b313e1d4d23f9cc90e17255ce9573e5487d3e20c286 SHA512 d482a3b3bed671705d6316e106984ad2c2169fe890349437e512455705ee8dddb31a29d31f44402a4c7c5bd2f78595b75bfc5ad34d8c0337b66f40837b08ee56
DIST meson-reference-1.8.0rc2.3 345637 BLAKE2B c0435919ce58d0bc48243aadfe1d98c428e8f41bfe73093e1e8373d1e8c126159b9363ee9b272e9fe292287f076cee58dce4b56a9064a6b5032b6db541cbcf99 SHA512 3768d2e493a53627b51865c8be564411c192ee421cf886ade84e3a91d011e32419f0e1417cfec01bf95d28b9610d913a7e0a317335ade2e31c1b8afb7faeaa06
DIST meson-reference-1.8.0.3 345633 BLAKE2B 1f67780a3cf61ab0c992d68f9a7936d24061a204eef6bf9827f0f8a04985c16a04ef2039d622a5d71783e4c07bbf5ac6ed123247aeb770c9d05a0988bd8073d8 SHA512 009cc42d4d279c9c3a912885d1fe3baf7d097fe8868c725cc853c81270e64b49203363324f39e2a2797eadaa82322f15d1076566c87b9b3a2c6c05c1fdbbfc63

View File

@ -16,7 +16,7 @@ else
https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz
verify-sig? ( https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz.asc )
"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
fi
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/strace.asc

View File

@ -5,7 +5,7 @@ EAPI="8"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit prefix python-utils-r1 toolchain-funcs verify-sig
inherit prefix toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
@ -84,11 +84,6 @@ BDEPEND="
RDEPEND+="
!build? ( app-misc/mime-types )
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
@ -567,29 +562,4 @@ src_install() {
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
# 2to3, pydoc
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}

View File

@ -5,10 +5,6 @@
<email>rust@gentoo.org</email>
<name>Rust Project</name>
</maintainer>
<maintainer type="person" proxied="yes">
<email>randy@electronsweatshop.com</email>
<name>Randy Barlow</name>
</maintainer>
<maintainer type="person" proxied="yes">
<email>navi@vlhl.dev</email>
<name>Anna Figueiredo Gomes</name>

View File

@ -5,10 +5,6 @@
<email>rust@gentoo.org</email>
<name>Rust Project</name>
</maintainer>
<maintainer type="person" proxied="yes">
<email>randy@electronsweatshop.com</email>
<name>Randy Barlow</name>
</maintainer>
<maintainer type="person" proxied="yes">
<email>navi@vlhl.dev</email>
<name>Anna Figueiredo Gomes</name>

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
@ -223,8 +223,25 @@ multilib_src_configure() {
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
@ -211,8 +211,25 @@ multilib_src_configure() {
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
@ -215,8 +215,25 @@ multilib_src_configure() {
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
@ -216,8 +216,25 @@ multilib_src_configure() {
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if multilib_native_use introspection && ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"

View File

@ -1,3 +1,4 @@
DIST inih-57.tar.gz 18954 BLAKE2B df2e2a14b4186616071f6ad2a64e0423148fb9a4624a74d4b16845a4a12eb72b1965f1314b92a710b80cc68d85dbe4ef09d6db159b76be856a4041f21a8c520c SHA512 9f758df876df54ed7e228fd82044f184eefbe47e806cd1e6d62e1b0ea28e2c08e67fa743042d73b4baef0b882480e6afe2e72878b175822eb2bdbb6d89c0e411
DIST inih-58.tar.gz 19964 BLAKE2B ba71b21b30c039df026adbd29b422b064934046ced21a37479421e866b73969826dc1fea4e3bc0c5ea427248c774d8f80b83056c54769d454bafa2f336d08024 SHA512 d69f488299c1896e87ddd3dd20cd9db5848da7afa4c6159b8a99ba9a5d33f35cadfdb9f65d6f2fe31decdbadb8b43bf610ff2699df475e1f9ff045e343ac26ae
DIST inih-59.tar.gz 20513 BLAKE2B 6162749ae4f162972041abad6f18dd85a65a70a6672ab90bb41d13ae049a58548a7b9031960a934cab697edf884aac8bb35131c373aa952efe7647eaccb29f80 SHA512 cd5ee8796c1be1ff7f589069ec90fee6fc4464ae7b2f0b39600ab08cf01cda9e4c006aa1cba0ee3c78df0111de5da23fa314816bfd327e34211a0dfcfa1d993b
DIST inih-60.tar.gz 21121 BLAKE2B 499aee6fa3902e1a12117819f42aab4ae84797640cb37b5a7322656443c76f3441b40ae31bfbbb342529c3340439dc3b81f6b49a9da812f5a1531f3e03fd9589 SHA512 b58ac2395ed8e2b3fa25c3c41260ac5c6ee445d5a6520a79a4392741b417c0ea5ede12d5d89b92f8c4a9c555ff41745ea4f18b78ccbe5117eaa4c723de03b50a

View File

@ -0,0 +1,27 @@
# Copyright 2020-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson-multilib
DESCRIPTION="inih (INI not invented here) simple .INI file parser"
HOMEPAGE="https://github.com/benhoyt/inih"
SRC_URI="https://github.com/benhoyt/inih/archive/r${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/inih-r${PV}
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
DOCS=( README.md )
src_configure() {
local emesonargs=(
-Ddefault_library=shared
-Ddistro_install=true
-Dwith_INIReader=true
)
meson-multilib_src_configure
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -8,7 +8,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
inherit autotools distutils-r1 multilib-minimal
LIBNL_P=${P/_/-}

View File

@ -1,3 +1,4 @@
DIST libtracefs-1.7.0.tar.gz 205716 BLAKE2B 7e11ed75e65ddfb6e95fa67db2d3a3000e722108b6cb9d8efe7f057bf96afa608f0452e42090dab077b59044d3cbaebf2e4361812b994943964ea611b0ec6a49 SHA512 8b95c798a9013c0278da1c68ab4625446e1cc9d437eed91a6ce16660e7787f0af04ab65ce0dba536039f2facca39c50df5e45335b1af630e7bcce70b584e2f0c
DIST libtracefs-1.8.0.tar.gz 224662 BLAKE2B 06ee6872ec5cd6c671ee2ddd3de19356ffa560b3ae20318e36be6a95bfe37bf61233841e32c530ab0a3463d13dd57ff1b09bba296663b25d76da2a2ea3e89f51 SHA512 2d9728186de63f03a2222d56efe6b373c038519ad1e81dd10d97640c296696df6b0661743dcd9e851edda5225342ea10a8746434439f7ad878e26780b797eb6c
DIST libtracefs-1.8.1.tar.gz 225995 BLAKE2B cb4f491464d54f1271591cdc5ed61fa67f49e63b94ff91162e3b4f59387d3f27d866e288b69dacdbea7c145989d50e8c00e3f63b066eef93164a8748c535420d SHA512 1d8775cf511982a99e2dd17afcf48da272ff8ec189710a27420befe8765155ed21fd62db8fb2b75a0965e0a52ef810459c826f9b4989093c6a64d0cb7894cfca
DIST libtracefs-1.8.2.tar.gz 230703 BLAKE2B 6426d0968b94a28e2281e99d7986effffb9cd6527b0779dc5976e7f85c597697448e773d31ccf80df544ecea7f5726941c367833bd80876dd98a149f1a3a9cdb SHA512 a4437f40b97c700a643e4a232876b44415f91043b474787784e513d18eafa071a07c9b6431185914a97b258ea6ef89bab247e2feead0366144502e7c95b8c9fd

View File

@ -0,0 +1,51 @@
# Copyright 2019-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson
DESCRIPTION="Linux kernel trace file system library"
HOMEPAGE="https://www.trace-cmd.org/"
if [[ ${PV} =~ [9]{4,} ]]; then
EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
inherit git-r3
else
SRC_URI="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
LICENSE="LGPL-2.1"
SLOT="0"
# Please double check the minimum libtraceevent version!
RDEPEND="
>=dev-libs/libtraceevent-1.8.1
"
DEPEND="${RDEPEND}"
# source-highlight is needed, see bug https://bugs.gentoo.org/865469
BDEPEND="
app-text/asciidoc
app-text/xmlto
dev-util/source-highlight
app-alternatives/yacc
app-alternatives/lex
virtual/pkgconfig
"
src_configure() {
local emesonargs=(
-Dasciidoctor=false
-Ddoc=false
)
# TODO: get docs & tests optional upstream
meson_src_configure
}
src_install() {
meson_src_install
find "${ED}" -type f -name '*.a' -delete || die
}

View File

@ -1,4 +1,4 @@
DIST libuv-1.49.2.tar.gz 1331024 BLAKE2B a4a3367053ab3d5b87c502ef4a25b569fc829b3580005333adf2d3f02a799e6fefec9b6c2cf354eb0e8fe003eff4d3bd5d0f91980dd44702595bfdc54a9fad66 SHA512 ecb94edb9393d1f3ace1e01e89a3f693fb813c1ed21a3c706409bdfd8821885e7713f8d6b043d97ab202cbea9edc99ad6672d1144858802dc92031800ffba1a1
DIST libuv-1.49.2.tar.gz.sig 833 BLAKE2B fe7ac42aad297f71e36995c665e445a82f8bb2fe6b2270fc7581dc1cf321c0bfc9c4238ad58b8666aec531c590c4df07268315980cf17406a5d448f2c5dc6d0b SHA512 66a6f345bfc16a5a673b8e7eb696e731b42f2cc9cb10f2a9eff74ca2ea5f47c7809f1ecea6182863531b776fef8bef8cefee3c7295d1976bd47f0f30afc455cf
DIST libuv-1.50.0.tar.gz 1340083 BLAKE2B 7acd891822157671eeef4ff3dbf8fdf29412faa65ad7f5a196218eb39f44c228757fe0f0df6f3e522ed50cbff856abd0a556ebcb48af3718307072cac855d82a SHA512 b153d019c630831819913ccd0615c22737df49125da533f86db27f24a519937ed64113ceb6445d731d133e2d97b43b6949877e6078c4459d50ea90d2af4a9da9
DIST libuv-1.50.0.tar.gz.sig 833 BLAKE2B bb9819cb7da07589bf4e1693dbd7f533e6a5ce899fbe0893a448ef74949191ed71fb34d19c80f7eacde94395c62a525f7e9d05320240d5a72b1db2e77cbe1979 SHA512 91d3b876b49fe1205cb1a8448925db1f6256dad19c35e350b80fd08fa2ec9e15f8ef7d003cdea4794f22b34e12fca0b604deb4412227a2d583b77d193ff8e477
DIST libuv-1.51.0.tar.gz 1343638 BLAKE2B 1624bb63b647eb199477ac3797f2f629f6ca080e71a753a3fe6ba11053ab7e632371075df025e43e2f3f2aac8aac54c12dc1df44c6e8ff043a65b98195cf482d SHA512 99e5c6529fb97019d20d5ce8638be504c35236e7102a7a6b7a2242205928d152d6b535bb6f45961a78506d408eebd0e3300b090969a64fa87dfdf6c8f4291a12
DIST libuv-1.51.0.tar.gz.sig 833 BLAKE2B b33e7204a04a8b40525780a4ac13ea46e726d4d23190b53a1d06e18bc7f530101887debe87ba4ffe14d760d2b404c876f2ca472c823ac2816866ea8b7481cf51 SHA512 203c95805976e4ca188583f51debe4fe27be1780d4f450d76de4d0ab52580c0ede36bc344950a9e3f99a84b400e8e7b7934a4df45cdfeede7b343cd3db276af5

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -17,7 +17,7 @@ else
https://dist.libuv.org/dist/v${PV}/libuv-v${PV}.tar.gz -> ${P}.tar.gz
verify-sig? ( https://dist.libuv.org/dist/v${PV}/libuv-v${PV}.tar.gz.sign -> ${P}.tar.gz.sig )
"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
S="${WORKDIR}/${PN}-v${PV}"
fi

View File

@ -23,7 +23,7 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
inherit gnome.org
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
SRC_URI+="

View File

@ -12,7 +12,7 @@ if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/${PN}/${PN}"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
fi
LICENSE="MIT"

View File

@ -1,2 +1,3 @@
DIST cachecontrol-0.14.1.tar.gz 28928 BLAKE2B 9f01bc35c905f0fb489e796f96ccc0063a475bacc24b980ee67f8053412a52d9167b4b96495a8a7f7c561e2485a1b6fcb4ec94b1408ea5111f8661fea59394fd SHA512 f99463ee08199058d0f84a173d6a85276cfe6caec0bec6692e5af74f4c8e684a68ab6910c6c85cbd1f4515c7044ee2fbf149cfd85e4ce9d9ac97e9850698c07f
DIST cachecontrol-0.14.2.tar.gz 28832 BLAKE2B fc572206871a39a2d4c50d0970b9aa2c58f9c99b28ab9bf98e76fad8c3f6e89962e84d368287d7d4beab1fcf16666e42a46a11e194c26f3c487359b767d8d77f SHA512 694dc7dfc976a4087471119a8d5f4b76aa08d62f814293d183331164a4225e8d6f9cbf58551ad806ea9e4bb4adac0d98bb54d7aa09ef4a64feff93a8899c4a58
DIST cachecontrol-0.14.3.tar.gz 28985 BLAKE2B 130b372dc5b17eadc1f16ca6ee361bbc5fc83306a333059f538972b2e9cf29b2e0f608faa904c3d2793c7289e5ad176193534a3d1997aca97c490b9784a10bc0 SHA512 12205946ac78263148da4751a55d8c19356bdf055953a014cedfb3084869bb73034860592b5785d4e3e0bd3317c7dc80061105146460a1059eeef458ed5e8dfb

View File

@ -0,0 +1,46 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
inherit distutils-r1 pypi
DESCRIPTION="httplib2 caching for requests"
HOMEPAGE="
https://pypi.org/project/CacheControl/
https://github.com/psf/cachecontrol/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
<dev-python/msgpack-2[${PYTHON_USEDEP}]
>=dev-python/msgpack-0.5.2[${PYTHON_USEDEP}]
>=dev-python/requests-2.16.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/cherrypy[${PYTHON_USEDEP}]
>=dev-python/filelock-3.8.0[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
python_test() {
local EPYTEST_DESELECT=()
if [[ ${EPYTHON} == pypy3* ]]; then
EPYTEST_DESELECT+=(
tests/test_adapter.py::TestSessionActions::test_do_not_leak_response
)
fi
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}

View File

@ -1 +1,2 @@
DIST charset_normalizer-3.4.1.tar.gz 123188 BLAKE2B 04a2a47967d3992eb6320f173689693efb0614d67986fe1417f2f096435d2cdfaf10c57b6ecd2659f19ee907902c16fcd30f050cd14460973a059fc62ea999e3 SHA512 2891c0bd3097ad38d296a8378ded36110a06113c0f79e49cdfd7f3bca4f42487d10895db34cbb020cb70e93d9094ae72555ceef5535f8984de1cac4082232f4f
DIST charset_normalizer-3.4.2.tar.gz 126367 BLAKE2B a83f719394753e7612657caee102c2a662980ef78e2be25a7f109913eb2650ec94b6a01a885a4f7a66b6ca8d47c680c163fdaf6bd043226b340a7aec6f15ab78 SHA512 702d9c23fe68d3538e4f45d5d9451beb02853ecf1ec6b36a7068ed8ade707bd0fd2a1764137381294590d0e5ffc2e296866f402dff33f65ec0458cf1102970fe

View File

@ -0,0 +1,27 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..13} pypy3_11 )
inherit distutils-r1 pypi
DESCRIPTION="The Real First Universal Charset Detector"
HOMEPAGE="
https://pypi.org/project/charset-normalizer/
https://github.com/jawah/charset_normalizer/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
distutils_enable_tests pytest
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -o addopts=
}

View File

@ -6,7 +6,9 @@ DIST bitflags-2.6.0.crate 45357 BLAKE2B 3a368bd2eb58c095b7b4a46680cc2d90a28e24b2
DIST cc-1.2.1.crate 92731 BLAKE2B c9cb100964834692781ecc3f47972f83adaf27e019ca212f896b19a853521cf2084da213f2c2fc5c8a1bc794cc83fe9f81faf7751e1b065a3a2a08137cda0b61 SHA512 54bc5d85d48d678d33dc795aa6cc823a59ae6d17b4ec5708a1dd515e3495eabccdd949e9467e9bb3a29e44847a2d3ccd75055dfda241d8abbb16bfad650f2819
DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff
DIST cryptography-44.0.2.tar.gz 710807 BLAKE2B 3bdfe1f6d4f44a77f8d5c2299e10e672eba2a68888fd5ee8ffae8a452d6c586c39bf5527feee60b62121dd7b18e13b1c91705df87ba0b52885e8538c56fec139 SHA512 12594fcd349b02a077d52b870af99850e275f13a561bbe9c993475f4ebfd35eccb63400c93a9629caf68195b759e2dbfddc3c60dc3066d063bb447acd7b17c03
DIST cryptography-44.0.3.tar.gz 711096 BLAKE2B 42b1fd4cd22c50d377c9942740561612dcc5958a7c9e2bf2d54fc88faac43b3ebbd4ff4085fee923c39510f591e7e93f811541389733b190af3e69504b13643b SHA512 505c3a4275dbaae827ebc7c478d3196c9a2bef71e460a391d56ee53b7ff8a054f7ac81c1a8a4a59829d04dd9a434c123df948627ab8f07ec39259ea0498a8c69
DIST cryptography_vectors-44.0.2.tar.gz 35318019 BLAKE2B 67ed8f4af54c4469f1da21993e7220c649b1098f6e2b82fff10f8339cfd89506d6b6f64083999998408bc60fd66172e1b33844f39d41387c7ff8cc1efc52a35d SHA512 7a75078eae4a1a46d5aa87961aa2e4f28725a2feac99ea0ce00d48aa509ce00fb43176d48eab8eabaa3f7204ba8c4b2ef78b4b65187cfd5056b3c3e3116b4239
DIST cryptography_vectors-44.0.3.tar.gz 35317973 BLAKE2B 1c76a7ddfb188db3cdd72c1458be6b249bbf9ea403767f002bb4044bdcc835d28aa3c5ff9ad15dd7721d0f54d76db499e44d9dda7cd4a35817b7a6cac6e206f8 SHA512 1287901703699053099bb8843928d0621884864d727de65d4a19d4f841271af8b2a773e8a0cbd7e850258db202bfb345439a72f57d8e5f69c6e1366618c1fa64
DIST foreign-types-0.3.2.crate 7504 BLAKE2B 520818b702d990d296ecd31a8646850202509ccfa18edd0e1b260289619a6c351e758f317ec0824bd76eccb209b6f087057c25f1bd01a47897715013dd834867 SHA512 bf27b8243ed482c202d120383374f19ff09422535e24b9c1aebccc66529bf300ca17b8bbc76d67f98ac092e614497afe3add9dc68aa69c93074df05762f91232
DIST foreign-types-shared-0.1.1.crate 5672 BLAKE2B d2e42e04b6657e7a69fe0bd20c672176629c743e49a55fd007bb30e289710b70045d445ae9cae0eeaa747ee708c90e8abd9b5fc39bad8ec0666befe1b696d4f1 SHA512 bafdb2143e136fb0818e2ffd90b5c862b7181647d6568947d4e4531012bbf7a57b597221ec7056c1b562dfc0c3b5dead26d1a4111ebc15e7863737a873518a4a
DIST heck-0.5.0.crate 11517 BLAKE2B 5365ec43b2239a76b33a174f1a4292ece4147f9d382a68c6c60db78fdc8bad0afb1d51a65bcb25e96675372faa4ea37c318265030b0546ba51942f7c929e1835 SHA512 f044fc9c3d22466629fd8f772ec0555350fd611c0cfadca51d99a3d2f10e155f77c1091916c8a95a6b9b499f366c2e99a5fbf45b010f988bfb9b2501bf9f6a76
@ -18,6 +20,7 @@ DIST once_cell-1.20.2.crate 33394 BLAKE2B 79dd394fcf1637adfef28b4159ec653c8b71d2
DIST openssl-0.10.68.crate 276578 BLAKE2B da7c42f8a87150c76cde12316fe1c170593e76a4bd55176ca5ab7a43c57d5457246bfa91bf7bbf73ca47c87a066789226529fb7ad57c5e93c551baa67f6a9eba SHA512 2b0c7f5a888b0e398ebee9c0fffb6fdb8408c36f96eb99182ebb9e162106c012334554304ddaaa6689d3ae41cdf638ba08187a40088efb95a5e9f6aca032a22f
DIST openssl-macros-0.1.1.crate 5601 BLAKE2B 69dc1c1f3b7bc4f934cae0dce64c3efa501162e5279efd6af3b74f7a7716c04b6996b306b310f1c045cfa2eff2895314a47ecbb020a817e461c6d77d0bc11e92 SHA512 57e75c84f78fb83f884eeaedb0dd135ecb40192dad2facd908e6a575c9b65b38a2c93bca4630e09ea5a82c77d8bc8364cb2f5778cbfe9d8f484cafe3346b883c
DIST openssl-sys-0.9.104.crate 72287 BLAKE2B d9af8f2ae8a8dfd53b3bb68433a4dd2a4b30038858ac58aa98d7a23b2d23e0b7c7d8fc36c1733d0330bcb9f51284667b2c32fc5a5bd4d9e1a5df7b98d610a997 SHA512 e812d5323bc0ec7376f176a980dd9856dad6d36513e854d333b93ce8a14c20a9ca61be88db82ba2a8ae4e086df5c3fe6965ed10ac155eb7b502e0225c0124278
DIST openssl-sys-0.9.108.crate 78190 BLAKE2B 202b0a380bb8d462842c7c2190d8d61e3d959b10aba462a75a3f1722a2a975f6f5eaaa30078dde7b56a7c2bb3a93d776b30cf3f718a8e723c2ef14d9ca400294 SHA512 f1d2cbf26b6bf7faf840e9afa6e86e7a38a303c169f54c098433c106cfb3aa264a692419ef2ca31f734551b5f7b97cffb1a3e28984eec0324cfb60e9cf3f1865
DIST pem-3.0.4.crate 13040 BLAKE2B 33126cd0feeeeb8b57691c50f6535c43e853b9835308d69a5afb426c7a738d260a67d5c46f091ad73e934f0347d976c6f65f88b2f7b1058eca542296191bcb9a SHA512 be743157e11ed76e5a9a60f5e58f50277910ecbf12df492b114b4211f1f1d69555702d955337ec41d368566ae1697f550e3705a195105068c617b9392c43f56d
DIST pkg-config-0.3.31.crate 20880 BLAKE2B ab7676e810751f89639b60ae70bdebe1d57edc76319f83077c3680049a701a26e72e8cc485fe77cdc4346fe3571d32c59e7384c8c86fef17e00d7d81df5daf43 SHA512 ac3e8062ee8831a4e4fc717b5247dc7f113da7bf6d64ec95cbca7875959a2afa1497bf81d9dfc27206b5fb10027a2509d51dd9ca1c10139d7b4c78128864fdf4
DIST portable-atomic-1.10.0.crate 174760 BLAKE2B 9a05d6162c95f5140709cbd005c1997449fb6373700e8ed3966e3379898e95f3cbdb90b387f1c7deb3f1eb33125378852a7168d0d22b433813f6c082112b0365 SHA512 fb47ab53fe240d5b0824dd068c6dda473d3e71ae6f5dfccaa17262a8b6de0e1dde05d83975e53bbfcf43f10ef5c634fc024f94613937927ae93f1adad1dadb19

View File

@ -0,0 +1,133 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CARGO_OPTIONAL=yes
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=maturin
PYTHON_COMPAT=( python3_{11..13} pypy3_11 )
PYTHON_REQ_USE="threads(+)"
CRATES="
asn1@0.20.0
asn1_derive@0.20.0
autocfg@1.4.0
base64@0.22.1
bitflags@2.6.0
cc@1.2.1
cfg-if@1.0.0
foreign-types-shared@0.1.1
foreign-types@0.3.2
heck@0.5.0
indoc@2.0.5
itoa@1.0.14
libc@0.2.166
memoffset@0.9.1
once_cell@1.20.2
openssl-macros@0.1.1
openssl-sys@0.9.108
openssl@0.10.68
pem@3.0.4
pkg-config@0.3.31
portable-atomic@1.10.0
proc-macro2@1.0.92
pyo3-build-config@0.23.5
pyo3-ffi@0.23.5
pyo3-macros-backend@0.23.5
pyo3-macros@0.23.5
pyo3@0.23.5
quote@1.0.37
self_cell@1.0.4
shlex@1.3.0
syn@2.0.89
target-lexicon@0.12.16
unicode-ident@1.0.14
unindent@0.2.3
vcpkg@0.2.15
"
inherit cargo distutils-r1 flag-o-matic multiprocessing pypi
VEC_P=cryptography_vectors-$(ver_cut 1-3)
DESCRIPTION="Library providing cryptographic recipes and primitives"
HOMEPAGE="
https://github.com/pyca/cryptography/
https://pypi.org/project/cryptography/
"
SRC_URI+="
${CARGO_CRATE_URIS}
test? (
$(pypi_sdist_url cryptography_vectors "$(ver_cut 1-3)")
)
"
LICENSE="|| ( Apache-2.0 BSD ) PSF-2"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-3.0
"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-libs/openssl-1.0.2o-r6:0=
$(python_gen_cond_dep '
>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
' 'python*')
"
DEPEND="
${RDEPEND}
"
BDEPEND="
${RUST_DEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/certifi[${PYTHON_USEDEP}]
>=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}]
dev-python/iso8601[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/pyasn1-modules[${PYTHON_USEDEP}]
dev-python/pytest-subtests[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
)
"
# Files built without CFLAGS/LDFLAGS, acceptable for rust
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/cryptography/hazmat/bindings/_rust.*.so"
distutils_enable_tests pytest
src_unpack() {
cargo_src_unpack
}
src_prepare() {
distutils-r1_src_prepare
sed -i -e 's:--benchmark-disable::' pyproject.toml || die
# work around availability macros not supported in GCC (yet)
if [[ ${CHOST} == *-darwin* ]] ; then
local darwinok=0
if [[ ${CHOST##*-darwin} -ge 16 ]] ; then
darwinok=1
fi
sed -i -e 's/__builtin_available(macOS 10\.12, \*)/'"${darwinok}"'/' \
src/_cffi_src/openssl/src/osrandom_engine.c || die
fi
}
python_configure_all() {
filter-lto # bug #903908
}
python_test() {
local -x PYTHONPATH="${PYTHONPATH}:${WORKDIR}/cryptography_vectors-${PV}"
local EPYTEST_IGNORE=(
tests/bench
)
epytest -n "$(makeopts_jobs)"
}

View File

@ -1,2 +1,2 @@
DIST cython-3.0.12.tar.gz 2757617 BLAKE2B 064549e36e03424065eab081b60e2761d198490cfd4d7836ea236b833ada3962e6ed42ba1710b33418f8a31ac282cdc156ceb544ee21be80ee34b7a3d3f6c7fb SHA512 c4e85596eeea444fae983d32ce8731cc5d0d612d1f96b998db3aa7946e8be151a7ea62c6df163d875111e306c870656b82a8468dd873cacf84c7bd5671a39bc3
DIST cython-3.1.0b1.tar.gz 3192916 BLAKE2B 13a8fa48319d9c4c8cc634d3cf5af599b867466d5de4cf3a24dd342b7812a392e854d9a6152309c6ef84a2925ebfa2257792d0f4e0c8fa36580d7138a663105a SHA512 ced9d57536d3bacd274b5edc4137d400a6182b4b7a89a28cf358f843dcbb0e0e7171fb0842441a81e1d2ac12acb6fd6a3df7018fe2a8708cb188a96cb184d799
DIST cython-3.1.0rc1.tar.gz 3158411 BLAKE2B 44540e95b8b060956654a0d92fc4b8417088816a1e3f8fc17c8575a1cbd4b71a76cc69209d58c731281a310a9f6a7e2e711f88dc6855bc487d08056203cb04d8 SHA512 b0cefe1d4e248e6044af373088902475839ae06b5855b5b3bffdce5159a0f6e54802c24715a6f6e3242a250841c2ff1e56435b7ed3e304964af01a162f8a851a

View File

@ -0,0 +1,86 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_TESTED=( python3_{10..12} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 pypy3_11 python3_13{,t} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 multiprocessing pypi toolchain-funcs
DESCRIPTION="A Python to C compiler"
HOMEPAGE="
https://cython.org/
https://github.com/cython/cython/
https://pypi.org/project/Cython/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
<dev-python/numpy-2[${PYTHON_USEDEP}]
' "${PYTHON_TESTED[@]}")
)
"
PATCHES=(
"${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
"${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
# https://github.com/cython/cython/commit/a0794ffb47c9f44be94b3cd8fe6c639766cbda26
"${FILESDIR}/${P}-rdma-core-hang.patch"
)
distutils_enable_sphinx docs \
dev-python/jinja2 \
dev-python/sphinx-issues \
dev-python/sphinx-tabs
python_prepare_all() {
# Needs dev-python/pip and doesn't like 'externally-managed' (bug #927995)
rm tests/run/coverage_cmd_src_pkg_layout.srctree || die
distutils-r1_python_prepare_all
}
python_compile() {
# Python gets confused when it is in sys.path before build.
local -x PYTHONPATH=
distutils-r1_python_compile
}
python_test() {
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
einfo "Skipping tests on ${EPYTHON} (xfail)"
return
fi
# Needed to avoid confusing cache tests
unset CYTHON_FORCE_REGEN
tc-export CC
# https://github.com/cython/cython/issues/1911
local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
"${PYTHON}" runtests.py \
-vv \
-j "$(makeopts_jobs)" \
--work-dir "${BUILD_DIR}"/tests \
--no-examples \
--no-code-style \
|| die "Tests fail with ${EPYTHON}"
}
python_install_all() {
local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
distutils-r1_python_install_all
}

View File

@ -36,8 +36,6 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
"${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
# https://github.com/cython/cython/pull/6782
"${FILESDIR}/${P}-pypy3.patch"
)
distutils_enable_sphinx docs \

View File

@ -1,36 +0,0 @@
From c1e709dd260b7621f36737b585dac1fd45a7704c Mon Sep 17 00:00:00 2001
From: da-woods <dw-git@d-woods.co.uk>
Date: Sun, 6 Apr 2025 08:43:34 +0100
Subject: [PATCH] Fix __Pyx_Owned_Py_None usage as actual function (GH-6782)
In the tracing code, we are using it like a function (i.e. casting to void to mark it unused) so it has to be a function, not just a macro.
Fixes https://github.com/cython/cython/issues/6781
---
Cython/Utility/TypeConversion.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c
index b86125699c7..e085fae8eb3 100644
--- a/Cython/Utility/TypeConversion.c
+++ b/Cython/Utility/TypeConversion.c
@@ -103,7 +103,7 @@ static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#endif
}
-#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
@@ -420,6 +420,10 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
}
}
+static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
+ CYTHON_UNUSED_VAR(b);
+ return __Pyx_NewRef(Py_None);
+}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);

View File

@ -0,0 +1,54 @@
From a0794ffb47c9f44be94b3cd8fe6c639766cbda26 Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Sun, 4 May 2025 21:48:27 +0200
Subject: [PATCH] Prevent infinite loop in type inference when a variable is
named like the type of its value (e.g. list += []).
Closes https://github.com/cython/cython/issues/6835
---
Cython/Compiler/ExprNodes.py | 2 +-
tests/run/type_inference.pyx | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index a0413ab8d62..b02154a0b30 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -2042,7 +2042,7 @@ def infer_type(self, env):
return self.inferred_type
return py_object_type
elif (self.entry.type.is_extension_type or self.entry.type.is_builtin_type) and \
- self.name == self.entry.type.name:
+ not self.is_target and self.name == self.entry.type.name:
# Unfortunately the type attribute of type objects
# is used for the pointer to the type they represent.
return type_type
diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx
index b746d05d9f3..226455dae0d 100644
--- a/tests/run/type_inference.pyx
+++ b/tests/run/type_inference.pyx
@@ -883,3 +886,24 @@ def test_builtin_max():
a = max(self.a, self.a)
assert typeof(a) == "Python object", typeof(a)
C().get_max()
+
+
+def variable_with_name_of_type():
+ """
+ >>> variable_with_name_of_type()
+ ([], 'abc')
+ """
+ # Names like 'list.append' refer to the type and must be inferred as such,
+ # but a simple variable called 'list' is not the same and used to break type inference.
+ # See https://github.com/cython/cython/issues/6835
+ rest_list = []
+ list = [] # note: same name as type of value
+ list += rest_list
+ assert typeof(list) == 'list object', typeof(list)
+
+ rest_str = "abc"
+ str = ""
+ str += rest_str
+ assert typeof(str) == 'str object', typeof(str)
+
+ return list, str

View File

@ -1,2 +1,3 @@
DIST pip-25.0.1-py3-none-any.whl 1841526 BLAKE2B 928210cf0586b2e17cf96c341babbbf612eb08775af716588fad8840d04153d264b64098f97c8d2d7b219389d571cee8e4190195f8c5cc9f602749aad92df437 SHA512 48315489f2c0a76b49386228f9a2f675e71f20ff2f4aaaf65b2634ba5cac7c98facfbdebeb4651c65efdd2ade053a140d7a2a6b44587549d6663bc8bb5ef2220
DIST pip-25.1-py3-none-any.whl 1824948 BLAKE2B a237c46c680afca0b72da704db8f390f9723e1a9d262b31d3d1dc7c89adff2dd6908768cdbeff5dc621ade7d68ce056ec1c6373b1b500da3a098d9f9798ad925 SHA512 1f669dce82d5e9238dc4cb776097f96179be9dbacf18a825a0845437cc4c234ab5242009e8d7d5b0d383bc339d0759ea408668b8d7076861d35da275c0d0fbfe
DIST pip-25.1.1-py3-none-any.whl 1825227 BLAKE2B 13170fa08dd26edced5e5fe8d89b38f5b3b63882489d2a951a7238f950a332ce0df11109482840595984bca187960d8fe2b7aeabfcbdaf94e5586631cc1de4e3 SHA512 e0c56f04a306cba9e13ed87f7460ad5a3bda7d6c37e05098082c58acb1f7493c8061e48df279f2c476e75d12df12d0f1a74d82e00e6fc2badffe484d281c56fc

View File

@ -0,0 +1,20 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit pypi
DESCRIPTION="Shared pip wheel for ensurepip Python module"
HOMEPAGE="https://pypi.org/project/pip/"
SRC_URI="$(pypi_wheel_url "${PN#ensurepip-}")"
S=${DISTDIR}
LICENSE="Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MIT MPL-2.0 PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
src_install() {
insinto /usr/lib/python/ensurepip
doins "${A}"
}

View File

@ -1,6 +1,6 @@
DIST setuptools-75.8.2-py3-none-any.whl 1229385 BLAKE2B e2890604e9acbf23aefc94ee99927bafdc189e45c84b0e4e0b48737d120ba60590438603195e180988b26e3e8fb378812507e2a0b513bf886c3b1eb673853da5 SHA512 083447a6bd375ca99e017ec4c5e3083ee4eee32b65d911b4d5ccadfa587ec213d43562d21d0f238753cc5c54354027b8425880d7248fbbd170b0c006613f4327
DIST setuptools-78.1.0-py3-none-any.whl 1256108 BLAKE2B 3bc6328e3ca2f98df327054c308560c48849ea3374017e72111471f4d7394bb6200d181e9ce7bc5cc2732ca365ade8e7ac79a8b1bfae1a18d0364c5dea4aa151 SHA512 89b1ba752d6b1cf7820ad0ef37ad42a6614e9b88438c63264eee09f94439608e53a51bf5ff8ce9f898300d6d628a7ed582004e6a483d774f4ec285f95e23752e
DIST setuptools-78.1.1-py3-none-any.whl 1256462 BLAKE2B 1bde151681e2e20f7c1d06de5798f0891a602cb095914ba65b8a1aa24ac913ed46e571d72d9109abdeb493c50e56a642d33a67d1cd9a23e614708d72c721b29d SHA512 b599dec0591a7a5eb65c7d6fc0d96d56b0b004cb7e592837fbd80b5949e6a71009c1a376f32393634974974199fb8243e183061b9e0b9c8ee00af7c8d2a09b75
DIST setuptools-79.0.0-py3-none-any.whl 1256065 BLAKE2B b2168b63a07307ad61a3ac26f96f1af5179498323ac84deccd2e97eb391485a60ddcd96d930b42d578db10a0772e0e3348e182790fc16cdbbd02f6dad1198461 SHA512 ec6e00e3b05db9eb7794cb4b8a12b2dd5290dd5824ed33cecce69f4815da4a30a54af4626671fb107ae6b6d3fe4c00fda3b0bcd8587c9cc265bf9757c2787107
DIST setuptools-79.0.1-py3-none-any.whl 1256281 BLAKE2B 8ae51bdd1c0ccada116757c2bd765225fcf4bedc7ada18567ae12f09b6978cdbcddd4f635a39a5568b6d3ed4388e4f73af5c33a7060f2ac0d0907fc82d8fd74f SHA512 fef6cfc6f95a5bb7320f1680e1c665cb8d9a4e4227cde4d8aab8a50bed4bcf04320085b9d7d5343359f887008db5c5a861e57f3d08b7b0b2311a28adaeee6b4a
DIST setuptools-80.0.0-py3-none-any.whl 1240907 BLAKE2B 6feac214d465b395bddca823cd52855d726138285aabf60324a5073991180c5d2ec38973f75d7b018b11a42f650274d0fae1726ea13793d9eed05d86a832dc66 SHA512 d4c6f1a13754bf7b86af470fb9a39fdb3b7ad21cb926ffd88afbe2b728ac3bdc12811100f0c173e7645f80cfbc7634ba0278a1feca93e8e5be6cba57e3e63056
DIST setuptools-80.2.0-py3-none-any.whl 1240763 BLAKE2B afb1a983aa8534ab20de1889fd8460bcddad7ffb956b95a830879f03982d38da5f76f71d8c45d8134d9c0223dd3771c639f95ad9e4447e4c201dfbabaca16a3d SHA512 d3b4f97ea45a7f98b9dd711ed3bef6e5faf562a2bd114aec458b196170f8ccf53e2ae12642aeed17af65a2647c258679148c1dfe136cb2b59fa7f4fdd3768ad1
DIST setuptools-80.3.0-py3-none-any.whl 1200273 BLAKE2B 6f17d3e7ef602d31698f450714af9ee86dd3234450dfcca23d0d27d2e58c3242e77bc156d377192660cab0a3986e85615a74f611bd3b8f6951dd0cb5a3b074f4 SHA512 c6ab8430aae000d986d4edb5027f3a6f5062ff869a8ed85768ce488cb494289ab8ec85a0377928a080111b70a7959e05f9e17487eded93c84637db8a9dda6153
DIST setuptools-80.3.1-py3-none-any.whl 1201172 BLAKE2B 4daf6a4a65a4e7c0547750addbf30f92e3a386fd7fcc2a98761ec1bee5caf6ccf506f1e201a9518c34bc278ae504f8b277d6199e23df0457a603b1c05a7bb50d SHA512 85b62d19a3762c9cb5d5b79a2f5319d4d387e334711963730e4b6a72dc73be3291bf5fb6eb40a6284a8486cbe615e8af44bc299210642f70f52d3fbfd41be26c

View File

@ -5,7 +5,7 @@
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..13} python3_13t pypy3_11 )
inherit distutils-r1 pypi
@ -19,11 +19,6 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
$(python_gen_cond_dep '
dev-python/tomli[${PYTHON_USEDEP}]
' 3.{9..10})
"
BDEPEND="
test? ( dev-python/testpath[${PYTHON_USEDEP}] )
"

View File

@ -1 +1,3 @@
DIST gpep517-17.gh.tar.gz 24403 BLAKE2B 51273a2e5ea0154d3e7d974f31b31a96dfa087d8bb3a49d89960568b02632fe104e62a4217a2295ef3dcc69f86f875c4e9de1220f3ef15fbff59a44bebcaac33 SHA512 cadf5b2fbd8c00eba928c3d8c893711516f66acc9bf74fc4ad9f0261021f8f6b7c4853035e6b916deba215ecf2f1e567d82161a74b69313b7e0f296e83e75c84
DIST gpep517-18.gh.tar.gz 28211 BLAKE2B ae5409733a96248b763e33982844866e9ba3b556b9fe0b2f4503cc052015ea7b712a3041e449ba26f8ddcfb8973f963d3c240b1e4a2e5229b3c64702ad5a19bf SHA512 7fb8feda99ac023b006ddfe77f5b71d7837e013088da0da5afeaeecd139f365487ec6c2d17603a34d4694220be12eebda54391bdc6e987b6eae633449acce97a
DIST gpep517-19.gh.tar.gz 29279 BLAKE2B 1f3002e970de1e56004a0c6486c678ee9baa51d76c263d7356b3a63086615bf81c326b0a0ee313389ae046c7c451c17a1eed1b1cada8c61f0875ee007d5caa23 SHA512 463c3812f388ea7ef83aaf6b3b90de4036b0a8200038a654621822c02d46627f7adf2ed4c7accf016293f89b8c3a2080d9ac80d2f82caaa3fdd370aa98c4335b

View File

@ -0,0 +1,48 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13} python3_13t )
inherit distutils-r1
DESCRIPTION="A backend script to aid installing Python packages in Gentoo"
HOMEPAGE="
https://pypi.org/project/gpep517/
https://github.com/projg2/gpep517/
"
SRC_URI="
https://github.com/projg2/gpep517/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
>=dev-python/installer-0.5.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/tomli-1.2.3[${PYTHON_USEDEP}]
' 3.10)
"
distutils_enable_tests pytest
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -o tmp_path_retention_policy=all
}
python_install() {
python_domodule gpep517
python_newscript - gpep517 <<-EOF
#!${EPREFIX}/usr/bin/python
import sys
from gpep517.__main__ import main
sys.exit(main())
EOF
}

View File

@ -0,0 +1,48 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( pypy3_11 python3_{11..13} python3_13t )
inherit distutils-r1
DESCRIPTION="A backend script to aid installing Python packages in Gentoo"
HOMEPAGE="
https://pypi.org/project/gpep517/
https://github.com/projg2/gpep517/
"
SRC_URI="
https://github.com/projg2/gpep517/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
>=dev-python/installer-0.5.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/tomli-1.2.3[${PYTHON_USEDEP}]
' 3.10)
"
distutils_enable_tests pytest
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -o tmp_path_retention_policy=all
}
python_install() {
python_domodule gpep517
python_newscript - gpep517 <<-EOF
#!${EPREFIX}/usr/bin/python
import sys
from gpep517.__main__ import main
sys.exit(main())
EOF
}

View File

@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=flit
PYPI_PN=${PN/-/.}
PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..13} python3_13t pypy3_11 )
inherit distutils-r1 pypi
@ -23,7 +23,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390
RDEPEND="
$(python_gen_cond_dep '
dev-python/backports-tarfile[${PYTHON_USEDEP}]
' 3.10 3.11)
' 3.11)
"
BDEPEND="
test? (

View File

@ -18,7 +18,7 @@ HOMEPAGE="
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="+native-extensions"
BDEPEND="

View File

@ -0,0 +1,91 @@
From 6d5d6aed2e38e1abc625f29c0b3e97fc8c60ae3b Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Wed, 28 Aug 2024 11:16:55 +0200
Subject: [PATCH] Avoid custom "tp_new()" call and add a safe-guard that
element lookups actually return a type.
---
src/lxml/etree.pyx | 12 +++++-------
src/lxml/includes/etree_defs.h | 8 ++------
src/lxml/python.pxd | 1 -
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/lxml/etree.pyx b/src/lxml/etree.pyx
index c21d1343..90579af9 100644
--- a/src/lxml/etree.pyx
+++ b/src/lxml/etree.pyx
@@ -1636,11 +1636,6 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]:
return CSSSelector(expr, translator=translator)(self)
-cdef extern from "includes/etree_defs.h":
- # macro call to 't->tp_new()' for fast instantiation
- cdef object NEW_ELEMENT "PY_NEW" (object t)
-
-
@cython.linetrace(False)
cdef _Element _elementFactory(_Document doc, xmlNode* c_node):
cdef _Element result
@@ -1650,12 +1645,15 @@ cdef _Element _elementFactory(_Document doc, xmlNode* c_node):
if c_node is NULL:
return None
- element_class = LOOKUP_ELEMENT_CLASS(
+ element_class = <type> LOOKUP_ELEMENT_CLASS(
ELEMENT_CLASS_LOOKUP_STATE, doc, c_node)
+ if type(element_class) is not type:
+ if not isinstance(element_class, type):
+ raise TypeError(f"Element class is not a type, got {type(element_class)}")
if hasProxy(c_node):
# prevent re-entry race condition - we just called into Python
return getProxy(c_node)
- result = NEW_ELEMENT(element_class)
+ result = element_class.__new__(element_class)
if hasProxy(c_node):
# prevent re-entry race condition - we just called into Python
result._c_node = NULL
diff --git a/src/lxml/includes/etree_defs.h b/src/lxml/includes/etree_defs.h
index 17d470d0..8645869f 100644
--- a/src/lxml/includes/etree_defs.h
+++ b/src/lxml/includes/etree_defs.h
@@ -177,7 +177,7 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); }
#ifdef __GNUC__
/* Test for GCC > 2.95 */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
#define unlikely_condition(x) __builtin_expect((x), 0)
#else /* __GNUC__ > 2 ... */
#define unlikely_condition(x) (x)
@@ -190,10 +190,6 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); }
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#endif
-#define PY_NEW(T) \
- (((PyTypeObject*)(T))->tp_new( \
- (PyTypeObject*)(T), __pyx_empty_tuple, NULL))
-
#define _fqtypename(o) ((Py_TYPE(o))->tp_name)
#define lxml_malloc(count, item_size) \
@@ -268,7 +264,7 @@ static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) {
* 'inclusive' is 1). The _ELEMENT_ variants will only stop on nodes
* that match _isElement(), the normal variant will stop on every node
* except text nodes.
- *
+ *
* To traverse the node and all of its children and siblings in Pyrex, call
* cdef xmlNode* some_node
* BEGIN_FOR_EACH_ELEMENT_FROM(some_node.parent, some_node, 1)
diff --git a/src/lxml/python.pxd b/src/lxml/python.pxd
index d0877355..e0ec762e 100644
--- a/src/lxml/python.pxd
+++ b/src/lxml/python.pxd
@@ -131,7 +131,6 @@ cdef extern from "includes/etree_defs.h": # redefines some functions as macros
cdef void* lxml_unpack_xmldoc_capsule(object capsule, bint* is_owned) except? NULL
cdef bint _isString(object obj)
cdef const_char* _fqtypename(object t)
- cdef object PY_NEW(object t)
cdef bint IS_PYPY
cdef object PyOS_FSPath(object obj)

View File

@ -29,7 +29,7 @@ RESTRICT="!test? ( test )"
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
DEPEND="
>=dev-libs/libxml2-2.10.3
>=dev-libs/libxml2-2.10.3:=
>=dev-libs/libxslt-1.1.38
"
RDEPEND="

View File

@ -29,7 +29,7 @@ RESTRICT="!test? ( test )"
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
DEPEND="
>=dev-libs/libxml2-2.10.3
>=dev-libs/libxml2-2.10.3:=
>=dev-libs/libxslt-1.1.38
"
RDEPEND="

View File

@ -29,16 +29,14 @@ RESTRICT="!test? ( test )"
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
DEPEND="
>=dev-libs/libxml2-2.10.3
>=dev-libs/libxml2-2.10.3:=
>=dev-libs/libxslt-1.1.38
"
RDEPEND="
${DEPEND}
"
# cython: they are using __pyx_empty_tuple directly
BDEPEND="
virtual/pkgconfig
<dev-python/cython-3.1[${PYTHON_USEDEP}]
>=dev-python/cython-3.0.10[${PYTHON_USEDEP}]
doc? (
$(python_gen_any_dep '
@ -55,6 +53,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-5.3.0-pypy.patch"
# https://github.com/lxml/lxml/commit/6d5d6aed2e38e1abc625f29c0b3e97fc8c60ae3b
"${FILESDIR}/${PN}-5.4.0-cython-3.1.patch"
)
python_check_deps() {
@ -83,7 +83,8 @@ python_compile() {
}
python_compile_all() {
use doc && emake html
# disable automagic dep on coverage
use doc && emake CYTHON_WITH_COVERAGE= html
}
python_test() {

View File

@ -35,7 +35,7 @@ S=${WORKDIR}/${MY_P}
LICENSE="HPND"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
IUSE="avif examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib"
REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )"
RESTRICT="!test? ( test )"

View File

@ -1,3 +1,4 @@
DIST pip-24.1.gh.tar.gz 9188658 BLAKE2B 4a43ff0199d811dd30461e376f655a447f3f706a48dd97fe1d0ccf630f558e72209ccd06d98949a1541cd6b2942a816db23ce8aaa7fbbf9aef429502fb91ab92 SHA512 c60ab329fe91202ff64b5f0f90209085fbf8db0f0a05f0703f952ad69e39e2e3edb5dadc006a3f317cdd4ba4fb5abe56dfbd22792249a2d139702eec272186d1
DIST pip-25.0.1.gh.tar.gz 9224526 BLAKE2B db729b8c75d8e15c6fed1dbc9e08adc4e82114f2bbd953859ec03c7948e521629afd8cea6adb08110b987d6adf48fd600a59a3bcc27774db61ea92675ad90d42 SHA512 a6850c8567082bbf98483a45e523c4de12132136d2b0aa388ac619c02ffd0c8f6aea7d727f7d84167dadec5f1e56dd478b2233b0caa5d9b3e5cadc9e1f3dc12c
DIST pip-25.1.1.gh.tar.gz 9219969 BLAKE2B eb443451deeb71888c2fc56ac5c8cb2d0515ec0efff975fab98cfa65d1fc5e66948243b3acebf1f4b0446e46082abb9fd350816579a4f5af1292c160490ce930 SHA512 ce61c9861265139b3c5ea9be9dc246097cd75c21687cf8301f80a377d02420c4524f0d6307d2ca0232ff8715b1105343bcfdb9cac6b69503780ab2c4645558dc
DIST pip-25.1.gh.tar.gz 9220205 BLAKE2B 3e719b180dd4f039a1bf15cdd2686fdc270e842e4b9ab416306bf9ea40c037541df05af78239fe067dfa3edc27b7370ea04c1d9cec43cc6cfd2f9e8f347f41ee SHA512 d6b93aeabe6a4e046caf85c028fca380936ab65cb3c5028a7fa7dbc61cef2cf7d0c46c499fe548dc0af8f7bc30f7ecace8f257b20a60c0cc905b531f193b5a9d

View File

@ -0,0 +1,76 @@
From 23d20ea18ab4e43a4a4cb2b721d818a8dcd62542 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Mon, 28 Apr 2025 11:42:02 -0400
Subject: [PATCH] Fix new dependency-groups feature to use the stdlib tomllib
where possible
Previously, commit 88c9f31ad8a5ffe0bb31ab500b8ddd1b9ff6a5dd modified pip
to use the stdlib on versions of python where this module is in the
stdlib. As justified there:
Although a tomli copy is vendored, doing this conditional import allows:
- automatically upgrading the code, when the time comes to drop py3.10
support
- slightly simplifying debundling support, as it's no longer necessary
to depend on a tomli(-wheel)? package on sufficiently newer versions
of python.
https://github.com/pypa/pip/pull/13065 added a new feature, including a
vendored "dependency_groups" library that likewise supports using the
stdlib tomllib via `dependency_groups/_toml_compat.py`. But the code in
pip itself to use dependency_groups manually loads pyproject.toml and
passes it to dependency_groups, and fails to use the same compatibility
dispatch as both the pre-existing pip code and dependency_groups itself.
Add back the conditional logic.
---
news/13356.vendor.rst | 1 +
src/pip/_internal/req/req_dependency_group.py | 11 ++++++++---
tests/unit/test_req_dependency_group.py | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
create mode 100644 news/13356.vendor.rst
diff --git a/src/pip/_internal/req/req_dependency_group.py b/src/pip/_internal/req/req_dependency_group.py
index 8f124de5b81..e81dd45522a 100644
--- a/src/pip/_internal/req/req_dependency_group.py
+++ b/src/pip/_internal/req/req_dependency_group.py
@@ -1,6 +1,11 @@
+import sys
from typing import Any, Dict, Iterable, Iterator, List, Tuple
-from pip._vendor import tomli
+if sys.version_info >= (3, 11):
+ import tomllib
+else:
+ from pip._vendor import tomli as tomllib
+
from pip._vendor.dependency_groups import DependencyGroupResolver
from pip._internal.exceptions import InstallationError
@@ -65,10 +70,10 @@ def _load_pyproject(path: str) -> Dict[str, Any]:
"""
try:
with open(path, "rb") as fp:
- return tomli.load(fp)
+ return tomllib.load(fp)
except FileNotFoundError:
raise InstallationError(f"{path} not found. Cannot resolve '--group' option.")
- except tomli.TOMLDecodeError as e:
+ except tomllib.TOMLDecodeError as e:
raise InstallationError(f"Error parsing {path}: {e}") from e
except OSError as e:
raise InstallationError(f"Error reading {path}: {e}") from e
diff --git a/tests/unit/test_req_dependency_group.py b/tests/unit/test_req_dependency_group.py
index b596f6fc5d7..1b180f8d7f8 100644
--- a/tests/unit/test_req_dependency_group.py
+++ b/tests/unit/test_req_dependency_group.py
@@ -120,7 +120,7 @@ def epipe_toml_load(*args: Any, **kwargs: Any) -> None:
raise OSError(errno.EPIPE, "Broken pipe")
monkeypatch.setattr(
- "pip._internal.req.req_dependency_group.tomli.load", epipe_toml_load
+ "pip._internal.req.req_dependency_group.tomllib.load", epipe_toml_load
)
with pytest.raises(InstallationError, match=r"Error reading pyproject\.toml"):

View File

@ -53,7 +53,7 @@ BDEPEND="
test? (
$(python_gen_cond_dep '
dev-python/ensurepip-setuptools
<dev-python/ensurepip-wheel-0.46
dev-python/ensurepip-wheel
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
@ -78,6 +78,8 @@ python_prepare_all() {
"${FILESDIR}/pip-23.1-no-coverage.patch"
# prepare to unbundle dependencies
"${FILESDIR}/pip-25.0.1-unbundle.patch"
# https://github.com/pypa/pip/pull/13356
"${FILESDIR}/${P}-tomli-dep.patch"
)
distutils-r1_python_prepare_all

View File

@ -0,0 +1,181 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# please bump dev-python/ensurepip-pip along with this package!
DISTUTILS_USE_PEP517=setuptools
PYTHON_TESTED=( pypy3_11 python3_{11..13} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
PYTHON_REQ_USE="ssl(+),threads(+)"
inherit distutils-r1 shell-completion
DESCRIPTION="The PyPA recommended tool for installing Python packages"
HOMEPAGE="
https://pip.pypa.io/en/stable/
https://pypi.org/project/pip/
https://github.com/pypa/pip/
"
SRC_URI="
https://github.com/pypa/pip/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~mips ~ppc ~riscv ~x86"
IUSE="test-rust"
# see src/pip/_vendor/vendor.txt
RDEPEND="
>=dev-python/cachecontrol-0.14.2[${PYTHON_USEDEP}]
>=dev-python/dependency-groups-1.3.0[${PYTHON_USEDEP}]
>=dev-python/distlib-0.3.9[${PYTHON_USEDEP}]
>=dev-python/distro-1.9.0[${PYTHON_USEDEP}]
>=dev-python/msgpack-1.1.0[${PYTHON_USEDEP}]
>=dev-python/packaging-25.0[${PYTHON_USEDEP}]
>=dev-python/platformdirs-4.3.7[${PYTHON_USEDEP}]
>=dev-python/pyproject-hooks-1.2.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.32.3[${PYTHON_USEDEP}]
>=dev-python/rich-14.0.0[${PYTHON_USEDEP}]
>=dev-python/resolvelib-1.1.0[${PYTHON_USEDEP}]
>=dev-python/setuptools-70.3.0[${PYTHON_USEDEP}]
>=dev-python/tomli-w-1.2.0[${PYTHON_USEDEP}]
>=dev-python/truststore-0.10.1[${PYTHON_USEDEP}]
>=dev-python/typing-extensions-4.13.2[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/ensurepip-setuptools
dev-python/ensurepip-wheel
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/scripttest[${PYTHON_USEDEP}]
<dev-python/setuptools-80[${PYTHON_USEDEP}]
dev-python/virtualenv[${PYTHON_USEDEP}]
dev-python/werkzeug[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
test-rust? (
dev-python/cryptography[${PYTHON_USEDEP}]
)
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
distutils_enable_tests pytest
python_prepare_all() {
local PATCHES=(
"${FILESDIR}/pip-23.1-no-coverage.patch"
# prepare to unbundle dependencies
"${FILESDIR}/pip-25.0.1-unbundle.patch"
)
distutils-r1_python_prepare_all
# unbundle dependencies
rm -r src/pip/_vendor || die
find -name '*.py' -exec sed -i \
-e 's:from pip\._vendor import:import:g' \
-e 's:from pip\._vendor\.:from :g' \
{} + || die
if use test; then
local wheels=(
"${BROOT}"/usr/lib/python/ensurepip/{setuptools,wheel}-*.whl
)
mkdir tests/data/common_wheels/ || die
cp "${wheels[@]}" tests/data/common_wheels/ || die
fi
}
python_configure() {
if use test && has_version "dev-python/pip[${PYTHON_USEDEP}]"; then
"${EPYTHON}" -m pip check ||
die "${EPYTHON} -m pip check failed, tests will fail"
fi
}
python_compile_all() {
# 'pip completion' command embeds full $0 into completion script, which confuses
# 'complete' and causes QA warning when running as "${PYTHON} -m pip".
# This trick sets correct $0 while still calling just installed pip.
local pipcmd='import sys; sys.argv[0] = "pip"; __file__ = ""; from pip._internal.cli.main import main; sys.exit(main())'
"${EPYTHON}" -c "${pipcmd}" completion --bash > completion.bash || die
"${EPYTHON}" -c "${pipcmd}" completion --zsh > completion.zsh || die
}
python_test() {
if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
einfo "Skipping tests on ${EPYTHON}"
return 0
fi
local EPYTEST_DESELECT=(
tests/functional/test_inspect.py::test_inspect_basic
# Internet
tests/functional/test_config_settings.py::test_backend_sees_config_via_sdist
tests/functional/test_install.py::test_double_install_fail
tests/functional/test_install.py::test_install_sdist_links
tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed
tests/functional/test_lock.py::test_lock_archive
tests/functional/test_lock.py::test_lock_vcs
# broken by system site-packages use
tests/functional/test_freeze.py::test_freeze_with_setuptools
tests/functional/test_pip_runner_script.py::test_runner_work_in_environments_with_no_pip
tests/functional/test_uninstall.py::test_basic_uninstall_distutils
tests/unit/test_base_command.py::test_base_command_global_tempdir_cleanup
tests/unit/test_base_command.py::test_base_command_local_tempdir_cleanup
tests/unit/test_base_command.py::test_base_command_provides_tempdir_helpers
# broken by unbundling
"tests/functional/test_debug.py::test_debug[vendored library versions:]"
tests/functional/test_debug.py::test_debug__library_versions
tests/functional/test_python_option.py::test_python_interpreter
tests/functional/test_uninstall.py::test_uninstall_non_local_distutils
)
local EPYTEST_IGNORE=(
# requires proxy.py
tests/functional/test_proxy.py
)
case ${EPYTHON} in
pypy3*)
EPYTEST_DESELECT+=(
# unexpected tempfiles?
tests/functional/test_install_config.py::test_do_not_prompt_for_authentication
tests/functional/test_install_config.py::test_prompt_for_authentication
)
;;
esac
if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then
EPYTEST_DESELECT+=(
tests/functional/test_install.py::test_install_sends_client_cert
tests/functional/test_install_config.py::test_do_not_prompt_for_authentication
tests/functional/test_install_config.py::test_prompt_for_authentication
tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed
)
fi
local -x PIP_DISABLE_PIP_VERSION_CHECK=1
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
local EPYTEST_XDIST=1
# rerunfailures because test suite breaks if packages are installed
# in parallel
epytest -m "not network" -o tmp_path_retention_policy=all \
-p rerunfailures --reruns=5 --use-venv
}
python_install_all() {
local DOCS=( AUTHORS.txt docs/html/**/*.rst )
distutils-r1_python_install_all
newbashcomp completion.bash pip
newzshcomp completion.zsh _pip
}

View File

@ -1,11 +1,10 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
EAPI=7
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..13} pypy3_11 )
inherit distutils-r1 pypi

View File

@ -1 +1,2 @@
DIST poetry_core-2.1.2.tar.gz 364452 BLAKE2B 0ba281c8a30c43ed9c93b5ae8bfad85664eede117e5a9ecb2f98686201a2a77f88bbe8870b72d9998afba8a70e3f9147d002614c411196c5e183ef43b2d9dbc8 SHA512 4cd6f91acf108539b478bded2d930947a177b36eaf10bbb25092c6617a2391fc9f4286ef25186642fcd25750967df375c183434446275c91a5b456e972b1c9c8
DIST poetry_core-2.1.3.tar.gz 365027 BLAKE2B d3cd1536a8466f784b2cd6a835997c480cdc11d24afe4e0b757879b2acc4795e33485fc9bf6adccf5afbf475d4b1748959fb146a6c01cf8508d6c27a7abe52e0 SHA512 eb82164aef3ce00fc14d55db8065b95feca15a78e1c69ca58c8c0b1018404b173a80c61d448513f938535a03e73df99978b51b3494065bd1c99bc8a14e224ba8

View File

@ -0,0 +1,66 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3 pypy3_11 python3_{10..13} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
inherit distutils-r1 pypi
DESCRIPTION="Poetry PEP 517 Build Backend"
HOMEPAGE="
https://github.com/python-poetry/poetry-core/
https://pypi.org/project/poetry-core/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
# check inside vendors/pyproject.toml
# (note that some are indirect deps)
RDEPEND="
>=dev-python/fastjsonschema-2.21.1[${PYTHON_USEDEP}]
>=dev-python/lark-1.2.2[${PYTHON_USEDEP}]
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/build[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/tomli-w[${PYTHON_USEDEP}]
>=dev-python/trove-classifiers-2022.5.19[${PYTHON_USEDEP}]
>=dev-python/virtualenv-20.21[${PYTHON_USEDEP}]
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
distutils_enable_tests pytest
src_prepare() {
# remove vendoring of dependencies
rm -r src/poetry/core/_vendor || die
sed -e '/__vendor_site__/d' -i src/poetry/core/__init__.py || die
distutils-r1_src_prepare
}
python_test() {
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
einfo "Skipping tests on ${EPYTHON} (unported deps)"
return
fi
# Poetry expects test to be run inside a git repository, otherwise
# VCS-related logic doesn't get triggered. An empty repository
# suffices, though.
git init || die
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -p pytest_mock
}

View File

@ -1,6 +1,6 @@
DIST setuptools-75.8.2.tar.gz 1344083 BLAKE2B 7d4dff2c0948bb411ef5f70e5f5f91bc0e230b155a97419d263f88e54a94390fd7dcadad14105f4d886a25024bf4c95e776ae7b25e4b1d6f17e45e6060b99da2 SHA512 adf7f5d2eab7621b03c86e3f96857b176631108dc8a0eba2b16b87e394bff0b607998bc24cc074cd3f7b0ed6dbe0bd753cce5af2f108fce2473fb50b22f32913
DIST setuptools-78.1.0.tar.gz 1367827 BLAKE2B d82320d11829e43e6841cd6b5a9bd4e16cfc9e7e2f97f64ac2ab1956ed68587ca6c74a07781f6afeefd3a949c23dee374460bdd327b7a5d908f33b2882f3d87d SHA512 e0b9562a8b3bb7a6b664da84ef37e4f4f71df5dd3129b636ece798878e62bf4be60ff6b6643a98b7047e540e14c931eeb54b4e08c583ac1a86ffb5dc5e921c68
DIST setuptools-78.1.1.tar.gz 1368163 BLAKE2B 45dd7ea3a4e237c65323f5a4645b70a483a41ef1c4d0f30f977bb5cfd48c41f283c24b756d8494eb87a78e239d0ebc727e0611ac0b8aef6ca1178c04db92b54d SHA512 0a44bb3f9e5c9b247ada0854552042e7733d6908a8b2ce82d750a7bebbd94a15c9f453343dc131e34cfa641bec300611d57ea8e52ee8ad4971a026ad6cc8b938
DIST setuptools-79.0.0.tar.gz 1367685 BLAKE2B b85eae52bd372c97248ad9e9d8544f151b7c95fe5037f1c7dd86205dbceca207925d009e9ef9ea3b9342627812adb1d9f25387a4056bd704c41ee17881c1cd40 SHA512 ba701e80ec7e85ea8c54f617c5ee84f5ba9de0feeb8c33018a2eaeee4d059a38bf9380f93afff7dcd39068da872d38d8cbea6732eb44c3f87c8a02e6dc26758f
DIST setuptools-79.0.1.tar.gz 1367909 BLAKE2B d495a22753400b3b0ef71423e2c9b5adaad1a065d1f9638b5da8161b29c453495701c3efaa3abd2482777e186ba992bd7b57090dfc711d9cdfdaa8254616a8ff SHA512 5b68d7cc775f4318e178f7d7f69c60a01b1abc607411e88c88e3507a08bd85eed241b915d4be5f3ada90df4b68718056c2ba032943c1f53fe68d171c7d728179
DIST setuptools-80.0.0.tar.gz 1354221 BLAKE2B e9cabaccc8563f95fef103177e7c4f7a71e9ca01294d0912a1cf060e195a68fcf971d0966386823a504ef231f8724bf9ed1ba01f7587de581102e5df66ed71f3 SHA512 b0ba9269b9fb029d39e454c4278a82b92203dc638a3b102e0bed322d022db5fbd2bb7f82c707c9d1cfbba9a6718a25e3870f0e7fb5e821889517a127073c64b7
DIST setuptools-80.2.0.tar.gz 1354232 BLAKE2B 2eb5f9b51632c865533bb018e268da7e9b52f1cecdb9da0eb0da713ee4e44d0827c6340b5c1f663d3b8b4df08849c32972498980de287fab6101593d5aeb47ca SHA512 a684eb3ef4049c6d05aca9cd77a015e63047cdc84460af798ac1dc1d87a970370176ac7fd87e250be155e61dddd77e89ad84adb5557f04d1a1059cd449c08c53
DIST setuptools-80.3.0.tar.gz 1314475 BLAKE2B 26fb2b0408221a51f4664a983927be79936b89e3daffb71f1d6ad76a2b752ee10f3958ac9be9fb7d8c78906b6cff33b19c16d248649600d6921083bdfc841d04 SHA512 f492360d8eec2a33a70328cf6e7e017290dea510ffa14fe12ef0161bd72a46d6078ff099a885f256ced0862c3551b6ef3af449a4638b309f6b55070dcd482c51
DIST setuptools-80.3.1.tar.gz 1315082 BLAKE2B 65207edf080d80599b2fe82caed638221bbe1155f745fd8cd02bd9da5934b1880782eb285f5be44088e189684385e7fbbd2bd0750fcd27aaf556f0a44214573d SHA512 be5157aa1f1a7f1e3e11b971ffedac509303d4919d590c1f741dd1c4966c5dc83168b458d3aad66dd9874c7f8f4c8c5bbded6b4dbf6ed91f0d05b1c65229a789

View File

@ -7,7 +7,7 @@ EAPI=8
# please bump dev-python/ensurepip-setuptools along with this package!
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_TESTED=( python3_{11..13} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t )
PYTHON_REQ_USE="xml(+)"
@ -34,9 +34,6 @@ RDEPEND="
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
>=dev-python/platformdirs-4.2.2[${PYTHON_USEDEP}]
>=dev-python/wheel-0.44.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/tomli-2.0.1[${PYTHON_USEDEP}]
' 3.10)
!<=dev-libs/gobject-introspection-1.76.1-r0
!=dev-libs/gobject-introspection-1.78.1-r0
!=dev-libs/gobject-introspection-1.80.1-r1

View File

@ -7,7 +7,7 @@ EAPI=8
# please bump dev-python/ensurepip-setuptools along with this package!
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_TESTED=( python3_{11..13} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t )
PYTHON_REQ_USE="xml(+)"
@ -34,9 +34,6 @@ RDEPEND="
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
>=dev-python/platformdirs-4.2.2[${PYTHON_USEDEP}]
>=dev-python/wheel-0.44.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/tomli-2.0.1[${PYTHON_USEDEP}]
' 3.10)
!<=dev-libs/gobject-introspection-1.76.1-r0
!=dev-libs/gobject-introspection-1.78.1-r0
!=dev-libs/gobject-introspection-1.80.1-r1
@ -100,6 +97,7 @@ python_test() {
local EPYTEST_DESELECT=(
# network
setuptools/tests/test_build_meta.py::test_legacy_editable_install
setuptools/tests/test_develop.py::TestNamespaces::test_namespace_package_importable
setuptools/tests/test_distutils_adoption.py
setuptools/tests/test_editable_install.py
setuptools/tests/test_virtualenv.py::test_no_missing_dependencies

View File

@ -7,7 +7,7 @@ EAPI=8
# please bump dev-python/ensurepip-setuptools along with this package!
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_TESTED=( python3_{11..13} pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t )
PYTHON_REQ_USE="xml(+)"
@ -26,7 +26,6 @@ IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
!<dev-python/setuptools-rust-1.8.0
dev-python/jaraco-collections[${PYTHON_USEDEP}]
>=dev-python/jaraco-functools-4[${PYTHON_USEDEP}]
>=dev-python/jaraco-text-3.7.0-r1[${PYTHON_USEDEP}]
@ -34,12 +33,6 @@ RDEPEND="
>=dev-python/packaging-24.2[${PYTHON_USEDEP}]
>=dev-python/platformdirs-4.2.2[${PYTHON_USEDEP}]
>=dev-python/wheel-0.44.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
>=dev-python/tomli-2.0.1[${PYTHON_USEDEP}]
' 3.10)
!<=dev-libs/gobject-introspection-1.76.1-r0
!=dev-libs/gobject-introspection-1.78.1-r0
!=dev-libs/gobject-introspection-1.80.1-r1
"
BDEPEND="
${RDEPEND}
@ -99,7 +92,9 @@ python_test() {
local EPYTEST_DESELECT=(
# network
setuptools/tests/integration/test_pbr.py::test_pbr_integration
setuptools/tests/test_build_meta.py::test_legacy_editable_install
setuptools/tests/test_develop.py::TestNamespaces::test_namespace_package_importable
setuptools/tests/test_distutils_adoption.py
setuptools/tests/test_editable_install.py
setuptools/tests/test_virtualenv.py::test_no_missing_dependencies

View File

@ -22,7 +22,7 @@ S=${WORKDIR}/py-${P}
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
# setuptools is needed for distutils import
DEPEND=">=dev-libs/tree-sitter-0.25.0:="

View File

@ -1 +1,3 @@
DIST trove_classifiers-2025.4.11.15.tar.gz 16321 BLAKE2B b011b524d267506aef4d91ac6d365e08e419fb57b424259b080de8cb7205cd8c4c6df52e29532b9dc19ca36f41b0793ac25a8824e9d2328735357efa369b2157 SHA512 5eb5d892a751105319c003e4a370d2f69b614a1f2bea8904865b7da9f4d2648ffe57fba1cebc1ec21dab74d02b3223eb72af478ddd69635e45b0424621cefa9a
DIST trove_classifiers-2025.4.28.22.tar.gz 16883 BLAKE2B 9598b19874f7deaeb15333a7f97cb91a7d82fe34d26d6d4e526bf857ed777539cad89949628196f2bbff187511fc5bca2327aeaacec4052611c5f2d82c4bb8a8 SHA512 4863ff031d9c83177099b5c1e04e2a22396055209b88e60dd44e22a8357889f27572444e0a1fbef65b7b37919cb9d7f8cb548b7007fd878d8fe92c9cd39b864e
DIST trove_classifiers-2025.5.1.12.tar.gz 16876 BLAKE2B 27ae91479d2a811978b3f1447568f5849341a7fda5c825ebf0dd0502d85f206d63f4687463708031637da4313d0182abc05b6b710a6f32fd714167ac766a587d SHA512 af3c0ee51e7ce3e7ec0eb1fd901ac3d0c02f6c0ba1c77d3ba66e0770bf5300144f636dcbf608f046a21789cfc780f651be222b7d23f359a672fde0210af966b5

View File

@ -0,0 +1,45 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13} python3_13t )
inherit distutils-r1 pypi
DESCRIPTION="Canonical source for classifiers on PyPI (pypi.org)"
HOMEPAGE="
https://github.com/pypa/trove-classifiers/
https://pypi.org/project/trove-classifiers/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
distutils_enable_tests pytest
src_configure() {
grep -q 'build-backend = "setuptools' pyproject.toml ||
die "Upstream changed build-backend, recheck"
# write a custom pyproject.toml to ease hatchling bootstrap
cat > pyproject.toml <<-EOF || die
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "trove-classifiers"
version = "${PV}"
description = "Canonical source for classifiers on PyPI (pypi.org)."
[project.scripts]
trove-classifiers = "trove_classifiers.__main__:cli"
EOF
}
python_test() {
epytest
"${EPYTHON}" -m tests.lib || die
}

View File

@ -0,0 +1,45 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( pypy3_11 python3_{11..13} python3_13t )
inherit distutils-r1 pypi
DESCRIPTION="Canonical source for classifiers on PyPI (pypi.org)"
HOMEPAGE="
https://github.com/pypa/trove-classifiers/
https://pypi.org/project/trove-classifiers/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
distutils_enable_tests pytest
src_configure() {
grep -q 'build-backend = "setuptools' pyproject.toml ||
die "Upstream changed build-backend, recheck"
# write a custom pyproject.toml to ease hatchling bootstrap
cat > pyproject.toml <<-EOF || die
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "trove-classifiers"
version = "${PV}"
description = "Canonical source for classifiers on PyPI (pypi.org)."
[project.scripts]
trove-classifiers = "trove_classifiers.__main__:cli"
EOF
}
python_test() {
epytest
"${EPYTHON}" -m tests.lib || die
}

View File

@ -1,2 +1 @@
DIST wheel-0.45.1.tar.gz 107545 BLAKE2B 13c8d60a2e39ded3d911c9e03915b01bda201f7e8cd6de456484ce6eeb2a990861a01f26e5d9f2ac4ca0ab2b6d0fea9db437d6f82cb39db9b1059c3c53202ec0 SHA512 df45f00e9eaeae2f27f813f31591590c961da2f6bff15bba6fb2a14d529c221f39b29894b8da408fe49cd4b760840a0e05c4baef377ccfacd9983c0bba83d6d8
DIST wheel-0.46.1.tar.gz 54400 BLAKE2B 078ffb044d3c156e61081d0708d1f559f715a47d071f678af73cfdafe9e80a66121cd8f489783383de87a9963e377f05e60df6da27825d6e3ed0285fdeaa3030 SHA512 69219fb100d47da42999e0d0e4a023ac43489eb7f1755cb08f6d72a26bda1d435b3a9738340379b1a7f0054330711c7ca9865736cb0463a3f49004c25b61ebfe

View File

@ -1,41 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 pypy3_11 )
inherit distutils-r1 pypi
DESCRIPTION="A built-package format for Python"
HOMEPAGE="
https://github.com/pypa/wheel/
https://pypi.org/project/wheel/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
RDEPEND="
>=dev-python/packaging-24.0[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/setuptools[${PYTHON_USEDEP}]
)
"
EPYTEST_DESELECT=(
# fails if any setuptools plugin imported the module first
tests/test_bdist_wheel.py::test_deprecated_import
)
distutils_enable_tests pytest
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest
}

View File

@ -1,7 +1 @@
DIST bpftool-7.4.0.tar.gz 472915 BLAKE2B ae7b6bc6cb742712981ba8972bcecccc63d440b2a77c5a14f91ba5106c013774313d65fd3f42b843ba4027ab17cf9d44d256270f7f8ad11907714f16f3149078 SHA512 08a3095b37a9b897400f2be7dbb9de10d129ae4eef193d03955fdf84017cd3a5d7419e856aa68a425e609419868e8b1dd5409b4f218cc24feeb059c1898cdff4
DIST bpftool-libbpf-v7.5.0-sources.tar.gz 1510032 BLAKE2B cc9beac4034317f89ae3c1088d1b1a1948778bcdb51d7ed7f566e4e5ab720c1128ca467d51d0bc3ffe7b1f69800249362baef5dfaf858275050f96b744fdbca6 SHA512 db12c305b77fea3689dbc1ce94527f0f21fa9de21fcdb36385e3fe492137335bb393f90e456c06601495ccc984230a531c432709db6514b545e0aeeda7ca3c99
DIST libbpf-1.4.7.tar.gz 1016441 BLAKE2B 10be52c7e97b2f08edd33cb263c4737bb52edfd2226f0c5b86d4f95b584b81f8f6b1ede469e9ad6c231e55b6d6b9a038160662606c3f30dc79b1336aaaa90e74 SHA512 f09ff28ac75b0d0c1bfe7d233aee6a00e5c21f185646b2afe11b7bd048d74962f893237437dd81a762768f9235b9f2a2a33cb297201b2aa3e98f7c6f58e5b365
DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068
DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579
DIST patch-6.8.2.xz 247244 BLAKE2B a85078230548543c38550a5546689d0b44a54208cdad591ab34e10dec9348ce2f74e45bf85f373b14977d40556067e2e2c17ac4b6791fbb8aaba98feccd3cdac SHA512 a8e32b89f7680670c69c62f356846bb65b57614f979114627a9a2f945d7dc97c921d30197dffa993e5b18e499ba8c7196046ffdf0e721528a5378d1ee65a9ba5
DIST patch-6.9.2.xz 16184 BLAKE2B 8a37e96c253b55b57c86f1654f2ea8bf65af96b1b38213e90032cb918bb8eea992d6ddbfa6a6774a229ab2e2288ab57bdb6cbad6e7e393c123f24850e06847c9 SHA512 a27af24f0caaa5de3811b6db5acc2d72b96df9ebb5c44bad99a949d871fb06c6ffd2be10cfc35b246d430c7be2291701f802aed47eaa8818ad12b8818a60f3ec

View File

@ -1,123 +0,0 @@
# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit estack linux-info optfeature python-any-r1 bash-completion-r1 toolchain-funcs
MY_PV="${PV/_/-}"
MY_PV="${MY_PV/-pre/-git}"
DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps"
HOMEPAGE="https://kernel.org/"
LINUX_V="${PV:0:1}.x"
LINUX_VER=$(ver_cut 1-2)
LINUX_PATCH=patch-${PV}.xz
SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
S_K="${WORKDIR}/linux-${LINUX_VER}"
S="${S_K}/tools/bpf/bpftool"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86"
IUSE="caps +llvm"
RDEPEND="
sys-libs/binutils-libs:=
sys-libs/zlib:=
virtual/libelf:=
caps? ( sys-libs/libcap:= )
llvm? ( llvm-core/llvm:= )
"
DEPEND="
${RDEPEND}
>=sys-kernel/linux-headers-5.8
"
BDEPEND="
${LINUX_PATCH+dev-util/patchutils}
${PYTHON_DEPS}
app-arch/tar
dev-python/docutils
"
CONFIG_CHECK="~DEBUG_INFO_BTF"
# src_unpack and src_prepare are copied from dev-util/perf since
# it's building from the same tarball, please keep it in sync with perf
src_unpack() {
local paths=(
tools/bpf kernel/bpf
tools/{arch,build,include,lib,perf,scripts} {scripts,include,lib} "arch/*/lib"
)
# We expect the tar implementation to support the -j and --wildcards option
echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
gtar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
"${paths[@]/#/linux-${LINUX_VER}/}" || die
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
> ${P}.patch
eend $? || die "filterdiff failed"
eshopts_pop
fi
local a
for a in ${A}; do
[[ ${a} == ${LINUX_SOURCES} ]] && continue
[[ ${a} == ${LINUX_PATCH} ]] && continue
unpack ${a}
done
}
src_prepare() {
default
if [[ -n ${LINUX_PATCH} ]] ; then
pushd "${S_K}" >/dev/null || die
eapply "${WORKDIR}"/${P}.patch
popd || die
fi
# Use rst2man or rst2man.py depending on which one exists (#930076)
type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' Documentation/Makefile || die
# remove -Werror (bug 887981)
sed -i -e 's/\-Werror//g' ../../lib/bpf/Makefile || die
}
bpftool_make() {
local arch=$(tc-arch-kernel)
tc-export AR CC LD
emake V=1 VF=1 \
HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
EXTRA_CFLAGS="${CFLAGS}" ARCH="${arch}" BPFTOOL_VERSION="${MY_PV}" \
prefix="${EPREFIX}"/usr \
bash_compdir="$(get_bashcompdir)" \
feature-libcap="$(usex caps 1 0)" \
feature-llvm="$(usex llvm 1 0)" \
"$@"
}
src_compile() {
bpftool_make
bpftool_make -C Documentation
}
src_install() {
bpftool_make DESTDIR="${D}" install
bpftool_make mandir="${ED}"/usr/share/man -C Documentation install
}
pkg_postinst() {
optfeature "clang-bpf-co-re support" llvm-core/clang[llvm_targets_BPF]
}

View File

@ -1,123 +0,0 @@
# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
inherit estack linux-info optfeature python-any-r1 bash-completion-r1 toolchain-funcs
MY_PV="${PV/_/-}"
MY_PV="${MY_PV/-pre/-git}"
DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps"
HOMEPAGE="https://kernel.org/"
LINUX_V="${PV:0:1}.x"
LINUX_VER=$(ver_cut 1-2)
LINUX_PATCH=patch-${PV}.xz
SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}"
LINUX_SOURCES="linux-${LINUX_VER}.tar.xz"
SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}"
S_K="${WORKDIR}/linux-${LINUX_VER}"
S="${S_K}/tools/bpf/bpftool"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86"
IUSE="caps +llvm"
RDEPEND="
sys-libs/binutils-libs:=
sys-libs/zlib:=
virtual/libelf:=
caps? ( sys-libs/libcap:= )
llvm? ( llvm-core/llvm:= )
"
DEPEND="
${RDEPEND}
>=sys-kernel/linux-headers-5.8
"
BDEPEND="
${LINUX_PATCH+dev-util/patchutils}
${PYTHON_DEPS}
app-arch/tar
dev-python/docutils
"
CONFIG_CHECK="~DEBUG_INFO_BTF"
# src_unpack and src_prepare are copied from dev-util/perf since
# it's building from the same tarball, please keep it in sync with perf
src_unpack() {
local paths=(
kernel/bpf tools/{arch,bpf,build,include,lib,perf,scripts}
scripts include lib "arch/*/include" "arch/*/lib" "arch/*/tools"
)
# We expect the tar implementation to support the -j and --wildcards option
echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}"
gtar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \
"${paths[@]/#/linux-${LINUX_VER}/}" || die
if [[ -n ${LINUX_PATCH} ]] ; then
eshopts_push -o noglob
ebegin "Filtering partial source patch"
filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \
> ${P}.patch
eend $? || die "filterdiff failed"
eshopts_pop
fi
local a
for a in ${A}; do
[[ ${a} == ${LINUX_SOURCES} ]] && continue
[[ ${a} == ${LINUX_PATCH} ]] && continue
unpack ${a}
done
}
src_prepare() {
default
if [[ -n ${LINUX_PATCH} ]] ; then
pushd "${S_K}" >/dev/null || die
eapply "${WORKDIR}"/${P}.patch
popd || die
fi
# Use rst2man or rst2man.py depending on which one exists (#930076)
type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' Documentation/Makefile || die
# remove -Werror (bug 887981)
sed -i -e 's/\-Werror//g' ../../lib/bpf/Makefile || die
}
bpftool_make() {
local arch=$(tc-arch-kernel)
tc-export AR CC LD
emake V=1 VF=1 \
HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \
EXTRA_CFLAGS="${CFLAGS}" ARCH="${arch}" BPFTOOL_VERSION="${MY_PV}" \
prefix="${EPREFIX}"/usr \
bash_compdir="$(get_bashcompdir)" \
feature-libcap="$(usex caps 1 0)" \
feature-llvm="$(usex llvm 1 0)" \
"$@"
}
src_compile() {
bpftool_make
bpftool_make -C Documentation
}
src_install() {
bpftool_make DESTDIR="${D}" install
bpftool_make mandir="${ED}"/usr/share/man -C Documentation install
}
pkg_postinst() {
optfeature "clang-bpf-co-re support" llvm-core/clang[llvm_targets_BPF]
}

View File

@ -1,130 +0,0 @@
# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {15..19} )
LLVM_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..13} )
inherit bash-completion-r1 linux-info llvm-r1 python-any-r1 toolchain-funcs
DESCRIPTION="Tool for inspection and simple manipulation of eBPF programs and maps"
HOMEPAGE="https://github.com/libbpf/bpftool"
if [[ ${PV} == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/libbpf/bpftool.git"
EGIT_SUBMODULES=(libbpf)
else
# bpftool typically vendors whatever libbpf is current at the time
# of a release, while libbpf publishes minor updates more frequently.
# Uncomment the following to bundle an updated libbpf e.g. in case of
# security or crasher bugs in libbpf and to keep the two synchronized.
# This allows us to quickly update the vendored lib with a revbump.
# Currently bpftool-x.y vendors libbpf-1.y; DO NOT mix different y versions.
# See the libbpf repo (https://github.com/libbpf/libbpf) for possible updates.
LIBBPF_VERSION=1.4.7
if [[ ! -z ${LIBBPF_VERSION} ]] ; then
SRC_URI="https://github.com/libbpf/bpftool/archive/refs/tags/v${PV}.tar.gz -> bpftool-${PV}.tar.gz
https://github.com/libbpf/libbpf/archive/refs/tags/v${LIBBPF_VERSION}.tar.gz
-> libbpf-${LIBBPF_VERSION}.tar.gz"
else
# use tarball with bundled libbpf
SRC_URI="https://github.com/libbpf/bpftool/releases/download/v${PV}/bpftool-libbpf-v${PV}-sources.tar.gz"
S="${WORKDIR}/bpftool-libbpf-v${PV}-sources"
fi
KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
fi
LICENSE="|| ( GPL-2 BSD-2 )"
SLOT="0"
IUSE="caps llvm"
REQUIRED_USE="llvm? ( ${LLVM_REQUIRED_USE} )"
RDEPEND="
caps? ( sys-libs/libcap:= )
llvm? ( $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}') )
!llvm? ( sys-libs/binutils-libs:= )
sys-libs/zlib:=
virtual/libelf:=
"
DEPEND="
${RDEPEND}
>=sys-kernel/linux-headers-5.8
"
BDEPEND="
${PYTHON_DEPS}
app-arch/tar
dev-python/docutils
$(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}[llvm_targets_BPF]')
"
CONFIG_CHECK="~DEBUG_INFO_BTF"
PATCHES=(
"${FILESDIR}"/7.4-001-mount-bpffs-on-provided-dir-instead-of-parent-dir.patch
"${FILESDIR}"/7.4-002-set-DESTDIR-to-empty-when-building-libbpf.patch
"${FILESDIR}"/7.4-003-fix-typo-in-usage-help.patch
"${FILESDIR}"/7.4-004-fix-the-wrong-format-specifier.patch
"${FILESDIR}"/7.4-005-fix-undefined-behavior-caused-by-shifting-into-the-sign-bit.patch
"${FILESDIR}"/7.4-006-fix-undefined-behavior-in-qsort.patch
"${FILESDIR}"/7.4-007-define-PACKAGE-at-build-time-when-trying-to-detect-libbfd.patch
"${FILESDIR}"/7.4-008-always-disable-unused-CLI-arguments-warning-for-feature-probe.patch
)
pkg_setup() {
python-any-r1_pkg_setup
use llvm && llvm-r1_pkg_setup
}
src_prepare() {
default
# prepare libbpf if necessary
if [[ ! -z ${LIBBPF_VERSION} ]] ; then
rm -rf libbpf || die
ln -s "${WORKDIR}/libbpf-${LIBBPF_VERSION}" libbpf || die
fi
# remove -Werror from libbpf (bug 887981)
sed -i -e 's/\-Werror//g' libbpf/src/Makefile || die
# remove -Werror from bpftool feature detection
sed -i -e 's/-Werror//g' src/Makefile.feature || die
# remove hardcoded/unhelpful flags from bpftool
sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' src/Makefile || die
# Use rst2man or rst2man.py depending on which one exists (#930076)
type -P rst2man >/dev/null || sed -i -e 's/rst2man/rst2man.py/g' docs/Makefile || die
}
bpftool_make() {
tc-export AR CC LD
emake \
ARCH="$(tc-arch-kernel)" \
CLANG="$(get_llvm_prefix -b)/bin/clang" \
HOSTAR="$(tc-getBUILD_AR)" \
HOSTCC="$(tc-getBUILD_CC)" \
HOSTLD="$(tc-getBUILD_LD)" \
bash_compdir="$(get_bashcompdir)" \
feature-libcap="$(usex caps 1 0)" \
feature-llvm="$(usex llvm 1 0)" \
prefix="${EPREFIX}"/usr \
V=1 \
"$@"
}
src_compile() {
bpftool_make -C src
bpftool_make -C docs
}
src_install() {
bpftool_make DESTDIR="${D}" -C src install
bpftool_make mandir="${ED}"/usr/share/man -C docs install
}

View File

@ -5,7 +5,7 @@ EAPI=8
LLVM_COMPAT=( {15..20} )
LLVM_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit bash-completion-r1 linux-info llvm-r1 python-any-r1 toolchain-funcs
@ -65,6 +65,8 @@ BDEPEND="
CONFIG_CHECK="~DEBUG_INFO_BTF"
PATCHES=( "${FILESDIR}/7.5.0-setting-error-code-in-do_loader.patch" )
pkg_setup() {
python-any-r1_pkg_setup
use llvm && llvm-r1_pkg_setup
@ -88,7 +90,20 @@ src_prepare() {
# remove hardcoded/unhelpful flags from bpftool
sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' src/Makefile || die
# always build bpf bits with std=gnu11 for kernel compatibility (bug 955156)
sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die
if ! use clang; then
# make people aware of what they are doing
ewarn "Using bpf-toolchain instead of clang due to USE=-clang."
ewarn "Please report any odd behaviours you observe, since using gcc for BPF"
ewarn "is still under development in both the Linux kernel and gcc itself."
# prevent attribute warning about preserve_access_index
# since gcc does not support '#pragma clang attribute push':
# https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=675b4e2
sed -i 's/std=gnu11/& -DBPF_NO_PRESERVE_ACCESS_INDEX/g' src/Makefile || die
# remove bpf target & add assembly annotations to fix CO-RE feature detection
sed -i -e 's/-target bpf/-dA/' src/Makefile.feature || die

View File

@ -1,11 +1,11 @@
# Copyright 2021-2024 Gentoo Authors
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( {15..20} )
LLVM_OPTIONAL=1
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..13} )
inherit bash-completion-r1 linux-info llvm-r1 python-any-r1 toolchain-funcs
@ -88,7 +88,20 @@ src_prepare() {
# remove hardcoded/unhelpful flags from bpftool
sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' src/Makefile || die
# always build bpf bits with std=gnu11 for kernel compatibility (bug 955156)
sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die
if ! use clang; then
# make people aware of what they are doing
ewarn "Using bpf-toolchain instead of clang due to USE=-clang."
ewarn "Please report any odd behaviours you observe, since using gcc for BPF"
ewarn "is still under development in both the Linux kernel and gcc itself."
# prevent attribute warning about preserve_access_index
# since gcc does not support '#pragma clang attribute push':
# https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=675b4e2
sed -i 's/std=gnu11/& -DBPF_NO_PRESERVE_ACCESS_INDEX/g' src/Makefile || die
# remove bpf target & add assembly annotations to fix CO-RE feature detection
sed -i -e 's/-target bpf/-dA/' src/Makefile.feature || die

View File

@ -1,255 +0,0 @@
From 54bcb7c7fecb33d40266223d4bba49ad38e59ee3 Mon Sep 17 00:00:00 2001
From: Sahil Siddiq <icegambit91@gmail.com>
Date: Fri, 5 Apr 2024 00:52:19 +0530
Subject: [PATCH] bpftool: Mount bpffs on provided dir instead of parent dir
When pinning programs/objects under PATH (eg: during "bpftool prog
loadall") the bpffs is mounted on the parent dir of PATH in the
following situations:
- the given dir exists but it is not bpffs.
- the given dir doesn't exist and the parent dir is not bpffs.
Mounting on the parent dir can also have the unintentional side-
effect of hiding other files located under the parent dir.
If the given dir exists but is not bpffs, then the bpffs should
be mounted on the given dir and not its parent dir.
Similarly, if the given dir doesn't exist and its parent dir is not
bpffs, then the given dir should be created and the bpffs should be
mounted on this new dir.
Fixes: 2a36c26fe3b8 ("bpftool: Support bpffs mountpoint as pin path for prog loadall")
Signed-off-by: Sahil Siddiq <icegambit91@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/2da44d24-74ae-a564-1764-afccf395eeec@isovalent.com/T/#t
Link: https://lore.kernel.org/bpf/20240404192219.52373-1-icegambit91@gmail.com
Closes: https://github.com/libbpf/bpftool/issues/100
Changes since v1:
- Split "mount_bpffs_for_pin" into two functions.
This is done to improve maintainability and readability.
Changes since v2:
- mount_bpffs_for_pin: rename to "create_and_mount_bpffs_dir".
- mount_bpffs_given_file: rename to "mount_bpffs_given_file".
- create_and_mount_bpffs_dir:
- introduce "dir_exists" boolean.
- remove new dir if "mnt_fs" fails.
- improve error handling and error messages.
Changes since v3:
- Rectify function name.
- Improve error messages and formatting.
- mount_bpffs_for_file:
- Check if dir exists before block_mount check.
Changes since v4:
- Use strdup instead of strcpy.
- create_and_mount_bpffs_dir:
- Use S_IRWXU instead of 0700.
- Improve error handling and formatting.
---
src/common.c | 96 ++++++++++++++++++++++++++++++++++++++++++------
src/iter.c | 2 +-
src/main.h | 3 +-
src/prog.c | 5 ++-
src/struct_ops.c | 2 +-
5 files changed, 92 insertions(+), 16 deletions(-)
diff --git a/src/common.c b/src/common.c
index cc6e6aae..958e92ac 100644
--- a/src/common.c
+++ b/src/common.c
@@ -244,29 +244,101 @@ int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type)
return fd;
}
-int mount_bpffs_for_pin(const char *name, bool is_dir)
+int create_and_mount_bpffs_dir(const char *dir_name)
{
char err_str[ERR_MAX_LEN];
- char *file;
- char *dir;
+ bool dir_exists;
int err = 0;
- if (is_dir && is_bpffs(name))
+ if (is_bpffs(dir_name))
return err;
- file = malloc(strlen(name) + 1);
- if (!file) {
+ dir_exists = access(dir_name, F_OK) == 0;
+
+ if (!dir_exists) {
+ char *temp_name;
+ char *parent_name;
+
+ temp_name = strdup(dir_name);
+ if (!temp_name) {
+ p_err("mem alloc failed");
+ return -1;
+ }
+
+ parent_name = dirname(temp_name);
+
+ if (is_bpffs(parent_name)) {
+ /* nothing to do if already mounted */
+ free(temp_name);
+ return err;
+ }
+
+ if (access(parent_name, F_OK) == -1) {
+ p_err("can't create dir '%s' to pin BPF object: parent dir '%s' doesn't exist",
+ dir_name, parent_name);
+ free(temp_name);
+ return -1;
+ }
+
+ free(temp_name);
+ }
+
+ if (block_mount) {
+ p_err("no BPF file system found, not mounting it due to --nomount option");
+ return -1;
+ }
+
+ if (!dir_exists) {
+ err = mkdir(dir_name, S_IRWXU);
+ if (err) {
+ p_err("failed to create dir '%s': %s", dir_name, strerror(errno));
+ return err;
+ }
+ }
+
+ err = mnt_fs(dir_name, "bpf", err_str, ERR_MAX_LEN);
+ if (err) {
+ err_str[ERR_MAX_LEN - 1] = '\0';
+ p_err("can't mount BPF file system on given dir '%s': %s",
+ dir_name, err_str);
+
+ if (!dir_exists)
+ rmdir(dir_name);
+ }
+
+ return err;
+}
+
+int mount_bpffs_for_file(const char *file_name)
+{
+ char err_str[ERR_MAX_LEN];
+ char *temp_name;
+ char *dir;
+ int err = 0;
+
+ if (access(file_name, F_OK) != -1) {
+ p_err("can't pin BPF object: path '%s' already exists", file_name);
+ return -1;
+ }
+
+ temp_name = strdup(file_name);
+ if (!temp_name) {
p_err("mem alloc failed");
return -1;
}
- strcpy(file, name);
- dir = dirname(file);
+ dir = dirname(temp_name);
if (is_bpffs(dir))
/* nothing to do if already mounted */
goto out_free;
+ if (access(dir, F_OK) == -1) {
+ p_err("can't pin BPF object: dir '%s' doesn't exist", dir);
+ err = -1;
+ goto out_free;
+ }
+
if (block_mount) {
p_err("no BPF file system found, not mounting it due to --nomount option");
err = -1;
@@ -276,12 +348,12 @@ int mount_bpffs_for_pin(const char *name, bool is_dir)
err = mnt_fs(dir, "bpf", err_str, ERR_MAX_LEN);
if (err) {
err_str[ERR_MAX_LEN - 1] = '\0';
- p_err("can't mount BPF file system to pin the object (%s): %s",
- name, err_str);
+ p_err("can't mount BPF file system to pin the object '%s': %s",
+ file_name, err_str);
}
out_free:
- free(file);
+ free(temp_name);
return err;
}
@@ -289,7 +361,7 @@ int do_pin_fd(int fd, const char *name)
{
int err;
- err = mount_bpffs_for_pin(name, false);
+ err = mount_bpffs_for_file(name);
if (err)
return err;
diff --git a/src/iter.c b/src/iter.c
index 6b0e5202..5c39c2ed 100644
--- a/src/iter.c
+++ b/src/iter.c
@@ -76,7 +76,7 @@ static int do_pin(int argc, char **argv)
goto close_obj;
}
- err = mount_bpffs_for_pin(path, false);
+ err = mount_bpffs_for_file(path);
if (err)
goto close_link;
diff --git a/src/main.h b/src/main.h
index b8bb08d1..9eb764fe 100644
--- a/src/main.h
+++ b/src/main.h
@@ -142,7 +142,8 @@ const char *get_fd_type_name(enum bpf_obj_type type);
char *get_fdinfo(int fd, const char *key);
int open_obj_pinned(const char *path, bool quiet);
int open_obj_pinned_any(const char *path, enum bpf_obj_type exp_type);
-int mount_bpffs_for_pin(const char *name, bool is_dir);
+int mount_bpffs_for_file(const char *file_name);
+int create_and_mount_bpffs_dir(const char *dir_name);
int do_pin_any(int argc, char **argv, int (*get_fd_by_id)(int *, char ***));
int do_pin_fd(int fd, const char *name);
diff --git a/src/prog.c b/src/prog.c
index 9cb42a33..4c4cf16a 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -1778,7 +1778,10 @@ static int load_with_options(int argc, char **argv, bool first_prog_only)
goto err_close_obj;
}
- err = mount_bpffs_for_pin(pinfile, !first_prog_only);
+ if (first_prog_only)
+ err = mount_bpffs_for_file(pinfile);
+ else
+ err = create_and_mount_bpffs_dir(pinfile);
if (err)
goto err_close_obj;
diff --git a/src/struct_ops.c b/src/struct_ops.c
index d573f264..aa43dead 100644
--- a/src/struct_ops.c
+++ b/src/struct_ops.c
@@ -515,7 +515,7 @@ static int do_register(int argc, char **argv)
if (argc == 1)
linkdir = GET_ARG();
- if (linkdir && mount_bpffs_for_pin(linkdir, true)) {
+ if (linkdir && create_and_mount_bpffs_dir(linkdir)) {
p_err("can't mount bpffs for pinning");
return -1;
}

View File

@ -1,38 +0,0 @@
From 06c61eccd3b8a6ff3df3e451a2a93058913124fc Mon Sep 17 00:00:00 2001
From: jinzhiguang <jinzhiguang@kylinos.cn>
Date: Sun, 7 Apr 2024 16:54:33 +0800
Subject: [PATCH] mirror: Set DESTDIR to empty when building libbpf
If a value is assigned to the variable DESTDIR when compiling bpftool,
this variable will be passed to libbpf's Makefile.
In this case, libbpf's header files will be installed in an unexpected
directory, causing bpftool to be unable to find the header files.
Signed-off-by: jinzhiguang <jinzhiguang@kylinos.cn>
---
src/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index a3bc6a0..d48d22f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -42,7 +42,7 @@ $(LIBBPF_OUTPUT) $(BOOTSTRAP_OUTPUT) $(LIBBPF_BOOTSTRAP_OUTPUT) $(LIBBPF_HDRS_DI
$(LIBBPF): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_OUTPUT)
$(Q)$(MAKE) -C $(BPF_DIR) OBJDIR=$(patsubst %/,%,$(LIBBPF_OUTPUT)) \
- PREFIX=$(LIBBPF_DESTDIR:/=) $(LIBBPF) install_headers
+ DESTDIR="" PREFIX=$(LIBBPF_DESTDIR:/=) $(LIBBPF) install_headers
$(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_DIR)
$(call QUIET_INSTALL, $@)
@@ -50,7 +50,7 @@ $(LIBBPF_INTERNAL_HDRS): $(LIBBPF_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_HDRS_
$(LIBBPF_BOOTSTRAP): $(wildcard $(BPF_DIR)/*.[ch] $(BPF_DIR)/Makefile) | $(LIBBPF_BOOTSTRAP_OUTPUT)
$(Q)$(MAKE) -C $(BPF_DIR) OBJDIR=$(patsubst %/,%,$(LIBBPF_BOOTSTRAP_OUTPUT)) \
- PREFIX=$(LIBBPF_BOOTSTRAP_DESTDIR:/=) \
+ DESTDIR="" PREFIX=$(LIBBPF_BOOTSTRAP_DESTDIR:/=) \
ARCH= CROSS_COMPILE= CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)" $@ install_headers
$(LIBBPF_BOOTSTRAP_INTERNAL_HDRS): $(LIBBPF_BOOTSTRAP_HDRS_DIR)/%.h: $(BPF_DIR)/%.h | $(LIBBPF_BOOTSTRAP_HDRS_DIR)

View File

@ -1,30 +0,0 @@
From a44a93bb7ed0d8e62220b534df92ea2a678fb4b7 Mon Sep 17 00:00:00 2001
From: Donald Hunter <donald.hunter@gmail.com>
Date: Wed, 17 Jul 2024 14:45:08 +0100
Subject: [PATCH] bpftool: Fix typo in usage help
The usage help for "bpftool prog help" contains a ° instead of the _
symbol for cgroup/sendmsg_unix. Fix the typo.
Fixes: 8b3cba987e6d ("bpftool: Add support for cgroup unix socket address hooks")
Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240717134508.77488-1-donald.hunter@gmail.com
---
src/prog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/prog.c b/src/prog.c
index 40ea743..2ff949e 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -2489,7 +2489,7 @@ static int do_help(int argc, char **argv)
" cgroup/connect_unix | cgroup/getpeername4 | cgroup/getpeername6 |\n"
" cgroup/getpeername_unix | cgroup/getsockname4 | cgroup/getsockname6 |\n"
" cgroup/getsockname_unix | cgroup/sendmsg4 | cgroup/sendmsg6 |\n"
- " cgroup/sendmsg°unix | cgroup/recvmsg4 | cgroup/recvmsg6 | cgroup/recvmsg_unix |\n"
+ " cgroup/sendmsg_unix | cgroup/recvmsg4 | cgroup/recvmsg6 | cgroup/recvmsg_unix |\n"
" cgroup/getsockopt | cgroup/setsockopt | cgroup/sock_release |\n"
" struct_ops | fentry | fexit | freplace | sk_lookup }\n"
" ATTACH_TYPE := { sk_msg_verdict | sk_skb_verdict | sk_skb_stream_verdict |\n"

View File

@ -1,38 +0,0 @@
From cb035aad23cf92254d8d3c7631e5b642e6805bd1 Mon Sep 17 00:00:00 2001
From: Zhu Jun <zhujun2@cmss.chinamobile.com>
Date: Wed, 24 Jul 2024 04:11:20 -0700
Subject: [PATCH] tools/bpf: Fix the wrong format specifier
The format specifier of "unsigned int" in printf() should be "%u", not
"%d".
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240724111120.11625-1-zhujun2@cmss.chinamobile.com
---
src/xlated_dumper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/xlated_dumper.c b/src/xlated_dumper.c
index 567f56d..d009434 100644
--- a/src/xlated_dumper.c
+++ b/src/xlated_dumper.c
@@ -349,7 +349,7 @@ void dump_xlated_plain(struct dump_data *dd, void *buf, unsigned int len,
double_insn = insn[i].code == (BPF_LD | BPF_IMM | BPF_DW);
- printf("% 4d: ", i);
+ printf("%4u: ", i);
print_bpf_insn(&cbs, insn + i, true);
if (opcodes) {
@@ -415,7 +415,7 @@ void dump_xlated_for_graph(struct dump_data *dd, void *buf_start, void *buf_end,
}
}
- printf("%d: ", insn_off);
+ printf("%u: ", insn_off);
print_bpf_insn(&cbs, cur, true);
if (opcodes) {

View File

@ -1,47 +0,0 @@
From a0f887bbdc525006f7662f4a83e240f2c46d3418 Mon Sep 17 00:00:00 2001
From: Kuan-Wei Chiu <visitorckw@gmail.com>
Date: Sun, 8 Sep 2024 22:00:09 +0800
Subject: [PATCH] bpftool: Fix undefined behavior caused by shifting into the sign bit
Replace shifts of '1' with '1U' in bitwise operations within
__show_dev_tc_bpf() to prevent undefined behavior caused by shifting
into the sign bit of a signed integer. By using '1U', the operations
are explicitly performed on unsigned integers, avoiding potential
integer overflow or sign-related issues.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240908140009.3149781-1-visitorckw@gmail.com
---
src/net.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/net.c b/src/net.c
index 2a51f1c..3c50fc6 100644
--- a/src/net.c
+++ b/src/net.c
@@ -486,9 +486,9 @@ static void __show_dev_tc_bpf(const struct ip_devname_ifindex *dev,
if (prog_flags[i] || json_output) {
NET_START_ARRAY("prog_flags", "%s ");
for (j = 0; prog_flags[i] && j < 32; j++) {
- if (!(prog_flags[i] & (1 << j)))
+ if (!(prog_flags[i] & (1U << j)))
continue;
- NET_DUMP_UINT_ONLY(1 << j);
+ NET_DUMP_UINT_ONLY(1U << j);
}
NET_END_ARRAY("");
}
@@ -497,9 +497,9 @@ static void __show_dev_tc_bpf(const struct ip_devname_ifindex *dev,
if (link_flags[i] || json_output) {
NET_START_ARRAY("link_flags", "%s ");
for (j = 0; link_flags[i] && j < 32; j++) {
- if (!(link_flags[i] & (1 << j)))
+ if (!(link_flags[i] & (1U << j)))
continue;
- NET_DUMP_UINT_ONLY(1 << j);
+ NET_DUMP_UINT_ONLY(1U << j);
}
NET_END_ARRAY("");
}

View File

@ -1,49 +0,0 @@
From 37e304df400c69347189449b38864705cc88b987 Mon Sep 17 00:00:00 2001
From: Kuan-Wei Chiu <visitorckw@gmail.com>
Date: Tue, 10 Sep 2024 23:02:07 +0800
Subject: [PATCH] bpftool: Fix undefined behavior in qsort(NULL, 0, ...)
When netfilter has no entry to display, qsort is called with
qsort(NULL, 0, ...). This results in undefined behavior, as UBSan
reports:
net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null
Although the C standard does not explicitly state whether calling qsort
with a NULL pointer when the size is 0 constitutes undefined behavior,
Section 7.1.4 of the C standard (Use of library functions) mentions:
"Each of the following statements applies unless explicitly stated
otherwise in the detailed descriptions that follow: If an argument to a
function has an invalid value (such as a value outside the domain of
the function, or a pointer outside the address space of the program, or
a null pointer, or a pointer to non-modifiable storage when the
corresponding parameter is not const-qualified) or a type (after
promotion) not expected by a function with variable number of
arguments, the behavior is undefined."
To avoid this, add an early return when nf_link_info is NULL to prevent
calling qsort with a NULL pointer.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240910150207.3179306-1-visitorckw@gmail.com
---
src/net.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/net.c b/src/net.c
index 3c50fc6..d2242d9 100644
--- a/src/net.c
+++ b/src/net.c
@@ -880,6 +880,9 @@ static void show_link_netfilter(void)
nf_link_count++;
}
+ if (!nf_link_info)
+ return;
+
qsort(nf_link_info, nf_link_count, sizeof(*nf_link_info), netfilter_link_compar);
for (id = 0; id < nf_link_count; id++) {

View File

@ -1,48 +0,0 @@
From bf9e0609acb97d73a7ebf3e8910b0119cd943dfb Mon Sep 17 00:00:00 2001
From: Quentin Monnet <qmo@kernel.org>
Date: Mon, 14 Oct 2024 17:43:25 +0100
Subject: [PATCH] mirror: Define PACKAGE at build time when trying to detect libbfd
Feature detection from the Makefile.feature for libbfd (with the
different variants of the probe) may fail on some systems where the
bfd.h and dis-asm.h headers expect the PACKAGE or PACKAGE_VERSION macros
to be defined [0]. In the kernel tree, feature detection addresses it by
defining the PACKAGE macro when invoking the compiler [1]. Add a similar
definition for the mirror repository.
Note that this issue has remained undetected for a while. This is
because the bfd.h included in some distributions (Debian/Ubuntu, for
example) does not contain the inclusion guard [2].
[0] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/bfd-in.h;h=04e65aad5f0c235a5013513c545e57a01e96541f;hb=binutils-2_43_1#l27
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/build/feature/Makefile?h=v6.11#n114
[2] https://git.launchpad.net/ubuntu/+source/binutils/tree/debian/rules?h=applied/2.43.1-5#n1031
Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Quentin Monnet <qmo@kernel.org>
---
src/Makefile.feature | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.feature b/src/Makefile.feature
index 131c67e..90f9e7c 100644
--- a/src/Makefile.feature
+++ b/src/Makefile.feature
@@ -45,7 +45,7 @@ LIBBFD_PROBE += ' bfd_demangle(0, 0, 0);'
LIBBFD_PROBE += ' return 0;'
LIBBFD_PROBE += '}'
LIBBFD_PROBE_CMD = printf '%b\n' $(LIBBFD_PROBE) | \
- $(CC) $(CFLAGS) -Wall -Werror -x c - $(1) -o /dev/null >/dev/null
+ $(CC) $(CFLAGS) -Wall -Werror -x c -DPACKAGE='"bpftool"' - $(1) -o /dev/null >/dev/null
define libbfd_build
$(call detect,$(LIBBFD_PROBE_CMD))
@@ -78,7 +78,7 @@ DISASSEMBLER_PROBE += ' return 0;'
DISASSEMBLER_PROBE += '}'
DISASSEMBLER_PROBE_CMD = printf '%b\n' $(1) | \
- $(CC) $(CFLAGS) -Wall -Werror -x c - -lbfd -lopcodes -S -o - >/dev/null
+ $(CC) $(CFLAGS) -Wall -Werror -x c -DPACKAGE='"bpftool"' - -lbfd -lopcodes -S -o - >/dev/null
define disassembler_build
$(call detect,$(DISASSEMBLER_PROBE_CMD))
endef

View File

@ -1,38 +0,0 @@
From 3be8ac358900c5f57028b2b6501407a14167a9bb Mon Sep 17 00:00:00 2001
From: Quentin Monnet <qmo@kernel.org>
Date: Thu, 17 Oct 2024 11:22:14 +0100
Subject: [PATCH] mirror: Always disable unused CLI arguments warning for feature probe
In commit 8a2d7d510ccd ("mirror: Fix features detection for building
with clang") we prevented clang to error out when encountering unused
command-line arguments in the feature probes, because we do add unused
arguments for some of the probes when retrieving arguments from
llvm-config, and we don't want probes to fail because of that.
At the time, the issue was apparent for the LLVM-based disassembler, so
we added -Wno-unused-command-line-argument when $(LLVM) was enabled,
only. We missed the case when we're building bpftool with clang instead
of gcc, without building the LLVM disassembler. Let's disable the
warning unconditionally instead to fix this case.
Reported-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Quentin Monnet <qmo@kernel.org>
---
src/Makefile.feature | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/Makefile.feature b/src/Makefile.feature
index 90f9e7c..b08e7b9 100644
--- a/src/Makefile.feature
+++ b/src/Makefile.feature
@@ -4,9 +4,7 @@ pound := \#
CFLAGS_BACKUP := $(CFLAGS)
CFLAGS := $(EXTRA_CFLAGS)
-ifneq ($(LLVM),)
- CFLAGS += -Wno-unused-command-line-argument
-endif
+CFLAGS += -Wno-unused-command-line-argument
ifeq ($(V),1)
LOG=$(warning $(1))

View File

@ -0,0 +1,45 @@
Patch from: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=02a4694107b4c830d4bd6d194e98b3ac0bc86f29
Adapted patch prefix to match the GH mirror sources.
From 91588da58ed38e4ec870d479ab2d9467288893d2 Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@kernel.org>
Date: Tue, 11 Mar 2025 12:12:37 +0900
Subject: bpf: bpftool: Setting error code in do_loader()
From: Sewon Nam <swnam0729@gmail.com>
[ Upstream commit 02a4694107b4c830d4bd6d194e98b3ac0bc86f29 ]
We are missing setting error code in do_loader() when
bpf_object__open_file() fails. This means the command's exit status code
will be successful, even though the operation failed. So make sure to
return the correct error code. To maintain consistency with other
locations where bpf_object__open_file() is called, return -1.
[0] Closes: https://github.com/libbpf/bpftool/issues/156
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Sewon Nam <swnam0729@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Quentin Monnet <qmo@kernel.org>
Reviewed-by: Quentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/d3b5b4b4-19bb-4619-b4dd-86c958c4a367@stanley.mountain/t/#u
Link: https://lore.kernel.org/bpf/20250311031238.14865-1-swnam0729@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bpf/bpftool/prog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
index e71be67f1d865..52ffb74ae4e89 100644
--- a/src/prog.c
+++ b/src/prog.c
@@ -1928,6 +1928,7 @@ static int do_loader(int argc, char **argv)
obj = bpf_object__open_file(file, &open_opts);
if (!obj) {
+ err = -1;
p_err("failed to open object file");
goto err_close_obj;
}

View File

@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/gperf/${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
src_prepare() {
default

Some files were not shown because too many files have changed in this diff Show More