Merge pull request #3459 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-11-03

Weekly portage-stable package updates 2025-11-03
This commit is contained in:
Krzesimir Nowak 2025-11-10 15:31:36 +01:00 committed by GitHub
commit 3f74e83ad3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
404 changed files with 15699 additions and 9166 deletions

View File

@ -79,6 +79,7 @@ app-alternatives/awk
app-alternatives/bc
app-alternatives/bzip2
app-alternatives/cpio
app-alternatives/gpg
app-alternatives/gzip
app-alternatives/lex
app-alternatives/ninja

View File

@ -0,0 +1,2 @@
- coreutils ([CVE-2025-5278](https://www.cve.org/CVERecord?id=CVE-2025-5278))
- go ([CVE-2025-47912](https://www.cve.org/CVERecord?id=CVE-2025-47912), [CVE-2025-58183](https://www.cve.org/CVERecord?id=CVE-2025-58183), [CVE-2025-58185](https://www.cve.org/CVERecord?id=CVE-2025-58185), [CVE-2025-58186](https://www.cve.org/CVERecord?id=CVE-2025-58186), [CVE-2025-58187](https://www.cve.org/CVERecord?id=CVE-2025-58187), [CVE-2025-58188](https://www.cve.org/CVERecord?id=CVE-2025-58188), [CVE-2025-58189](https://www.cve.org/CVERecord?id=CVE-2025-58189), [CVE-2025-61723](https://www.cve.org/CVERecord?id=CVE-2025-61723), [CVE-2025-61724](https://www.cve.org/CVERecord?id=CVE-2025-61724), [CVE-2025-61725](https://www.cve.org/CVERecord?id=CVE-2025-61725))

View File

@ -0,0 +1,19 @@
- SDK: cmake ([4.1.2](https://cmake.org/cmake/help/v4.1/release/4.1.html#id22) (includes [4.1.1](https://cmake.org/cmake/help/v4.1/release/4.1.html#id21), [4.1](https://cmake.org/cmake/help/v4.1/release/4.1.html), [4.0](https://cmake.org/cmake/help/v4.0/release/4.0.html)))
- SDK: go ([1.25.3](https://go.dev/doc/devel/release#go1.25.minor))
- base, dev: btrfs-progs ([6.17](https://github.com/kdave/btrfs-progs/releases/tag/v6.17))
- base, dev: cifs-utils ([7.4](https://lwn.net/Articles/1024956/))
- base, dev: coreutils ([9.8](https://lists.gnu.org/archive/html/info-gnu/2025-09/msg00005.html))
- base, dev: hwdata ([0.399](https://github.com/vcrhonek/hwdata/releases/tag/v0.399))
- base, dev: inih ([62](https://github.com/benhoyt/inih/releases/tag/r62) (includes [61](https://github.com/benhoyt/inih/releases/tag/r61)))
- base, dev: iproute2 ([6.17.0](https://lore.kernel.org/all/20250929095042.48200315@hermes.local/))
- base, dev: kbd ([2.9.0](https://github.com/legionus/kbd/releases/tag/v2.9.0))
- base, dev: libtirpc ([1.3.7](https://git.linux-nfs.org/?p=steved/libtirpc.git;a=log;h=refs/tags/libtirpc-1-3-7))
- base, dev: samba ([4.22.5](https://www.samba.org/samba/history/samba-4.22.5.html) (includes [4.22.4](https://www.samba.org/samba/history/samba-4.22.4.html)))
- base, dev: strace ([6.17](https://github.com/strace/strace/releases/tag/v6.17))
- base, dev: util-linux ([2.41.2](https://github.com/util-linux/util-linux/blob/v2.41.2/Documentation/releases/v2.41.2-ReleaseNotes))
- dev: portage ([3.0.69.3](https://gitweb.gentoo.org/proj/portage.git/tree/NEWS?h=portage-3.0.69.3) (includes [3.0.69.2](https://gitweb.gentoo.org/proj/portage.git/tree/NEWS?h=portage-3.0.69.2), [3.0.69.1](https://gitweb.gentoo.org/proj/portage.git/tree/NEWS?h=portage-3.0.69.1), [3.0.69](https://gitweb.gentoo.org/proj/portage.git/tree/NEWS?h=portage-3.0.69)))
- sysext-overlaybd: overlaybd ([1.0.16](https://github.com/containerd/overlaybd/releases/tag/v1.0.16))
- sysext-podman: netavark ([1.16.1](https://github.com/containers/netavark/releases/tag/v1.16.1) (includes [1.16.0](https://github.com/containers/netavark/releases/tag/v1.16.0)))
- sysext-python: more-itertools ([10.8.0](https://github.com/more-itertools/more-itertools/releases/tag/v10.8.0))
- sysext-python: setuptools-scm ([9.2.0](https://github.com/pypa/setuptools-scm/releases/tag/v9.2.0) (includes [9.1.0](https://github.com/pypa/setuptools-scm/releases/tag/v9.1.0), [9.0.0](https://github.com/pypa/setuptools-scm/releases/tag/v9.0.0)))
- sysext-python: trove-classifiers ([2025.9.11.17](https://github.com/pypa/trove-classifiers/releases/tag/2025.9.11.17) (includes (2025.9.9.12)[https://github.com/pypa/trove-classifiers/releases/tag/2025.9.9.12], [2025.9.8.13](https://github.com/pypa/trove-classifiers/releases/tag/2025.9.8.13)))

View File

@ -56,9 +56,6 @@ dev-cpp/azure-security-keyvault-keys
=dev-libs/cowsql-1.15.9 ~arm64
=dev-libs/ding-libs-0.6.2-r1 ~arm64
# CVE-2025-7039
=dev-libs/glib-2.84.4 ~amd64 ~arm64
# The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet.
=dev-libs/jose-12 **
@ -74,16 +71,9 @@ dev-cpp/azure-security-keyvault-keys
# Catalyst 4 is not stable yet, but earlier versions are masked now.
=dev-util/catalyst-4.0.0 ~amd64 ~arm64
# CVE-2025-7039
=dev-util/gdbus-codegen-2.84.4 ~amd64 ~arm64
=dev-util/glib-utils-2.84.4 ~amd64 ~arm64
# Keep versions on both arches in sync.
=net-firewall/conntrack-tools-1.4.8-r1 ~arm64
# Needed to address CVE-2025-2312.
=net-fs/cifs-utils-7.3 ~amd64 ~arm64
# Keep versions on both arches in sync.
=net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64
=net-libs/libnetfilter_cttimeout-1.0.1 ~arm64
@ -100,6 +90,7 @@ dev-cpp/azure-security-keyvault-keys
sys-apps/azure-vm-utils
# Keep versions on both arches in sync.
=sys-apps/coreutils-9.8-r1 ~amd64
=sys-apps/zram-generator-1.2.1 ~arm64
=sys-auth/sssd-2.9.7 ~arm64
=sys-boot/mokutil-0.7.2 **
@ -108,9 +99,7 @@ sys-apps/azure-vm-utils
=sys-cluster/ipvsadm-1.31-r1 ~arm64
# Keep versions on both arches in sync.
=sys-devel/binutils-2.45-r1 ~arm64
=sys-fs/lxcfs-6.0.4 ~arm64
=sys-libs/binutils-libs-2.45-r1 ~arm64
=app-containers/containerd-2.1* ~amd64 ~arm64
=app-containers/runc-1.3* ~amd64 ~arm64

View File

@ -7,6 +7,7 @@ app-alternatives/awk gawk
app-alternatives/bc gnu
app-alternatives/bzip2 reference
app-alternatives/cpio gnu
app-alternatives/gpg reference
app-alternatives/gzip reference
app-alternatives/lex flex
app-alternatives/ninja reference

View File

@ -1,5 +1,5 @@
# We don't ship GnuTLS by default, and smartcard has a dep loop
app-crypt/gnupg smartcard ssl
# Smartcard has a dep loop.
app-crypt/gnupg smartcard
# Our ISOs are not built with Catalyst.
dev-util/catalyst iso

View File

@ -0,0 +1,25 @@
From 72d823c414a1416dffc2276e5a0a17f03c5e4549 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Mon, 28 Jul 2025 12:16:50 +0100
Subject: [PATCH 1/2] Patch Photon after fetching to fix cross issues
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
---
CMake/Findphoton.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMake/Findphoton.cmake b/CMake/Findphoton.cmake
index c905bd9..5507f66 100644
--- a/CMake/Findphoton.cmake
+++ b/CMake/Findphoton.cmake
@@ -6,6 +6,7 @@ FetchContent_Declare(
photon
GIT_REPOSITORY https://github.com/alibaba/PhotonLibOS.git
GIT_TAG v0.6.17
+ PATCH_COMMAND patch -p1 -i @FILESDIR@/photon-cross.patch
)
if(BUILD_TESTING)
--
2.51.0

View File

@ -0,0 +1,25 @@
From eae89e8432d993417e6f0e17ae519b4e02f72c9b Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Fri, 7 Nov 2025 12:06:05 +0100
Subject: [PATCH 2/2] Patch yaml-cpp after fetching to fix cmake issues
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 753b081..03b2ab9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,6 +53,7 @@ if (NOT yaml-cpp_FOUND)
yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG 0.8.0
+ PATCH_COMMAND patch -p1 -i @FILESDIR@/yaml-cpp-cmake-4.0.patch
)
FetchContent_MakeAvailable(yaml-cpp)
endif()
--
2.51.0

View File

@ -1,128 +0,0 @@
From de68119855229db8e457043d86bbb38bbd5d55d9 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Fri, 25 Jul 2025 17:12:03 +0100
Subject: [PATCH 1/3] Fix cross-compiling by using CMAKE_SYSTEM_PROCESSOR
rather than uname -m
There is no need to check the architecture twice. Also check for arm64
(MacOS) wherever we check for aarch64 (Linux).
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,10 +9,8 @@ enable_language(C)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -DNDEBUG -g")
-# Get CPU arch
-execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-if (NOT (${ARCH} STREQUAL x86_64) AND NOT (${ARCH} STREQUAL aarch64) AND NOT (${ARCH} STREQUAL arm64))
- message(FATAL_ERROR "Unknown CPU architecture ${ARCH}")
+if (NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) AND NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) AND NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL arm64))
+ message(FATAL_ERROR "Unknown CPU architecture ${CMAKE_SYSTEM_PROCESSOR}")
endif ()
option(OBD_VER "Overlaybd version" "overlaybd/0.0.0-undefined")
@@ -25,7 +23,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -Wall -Werror=sign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -Wall -Werror=sign-compare -DOVERLAYBD_VER=${OBD_VER}")
-if (${ARCH} STREQUAL aarch64)
+if ((CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL arm64))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc -fsigned-char -fno-stack-protector -fomit-frame-pointer")
endif ()
--- a/src/overlaybd/zfile/CMakeLists.txt
+++ b/src/overlaybd/zfile/CMakeLists.txt
@@ -2,19 +2,13 @@ file(GLOB SOURCE_ZFILE "*.cpp")
file(GLOB SOURCE_LZ4 "lz4/*.c")
file(GLOB SOURCE_CRC32 "crc32/crc32c.cpp")
-# Get CPU arch
-execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-if (NOT (${ARCH} STREQUAL x86_64) AND NOT (${ARCH} STREQUAL aarch64))
- message(FATAL_ERROR "Unknown CPU architecture ${ARCH}")
-endif ()
-
set (CMAKE_CXX_STANDARD 17)
add_library(crc32_lib STATIC ${SOURCE_CRC32})
target_include_directories(crc32_lib PUBLIC
${PHOTON_INCLUDE_DIR}
)
-if (${ARCH} STREQUAL x86_64)
+if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
target_compile_options(crc32_lib PUBLIC -msse4.2 -mcrc32)
else()
target_compile_options(crc32_lib PRIVATE -march=native -mcpu=generic+crc)
--
2.49.0
From ee0e074c256ea1bcbcff2ed5a3e311becaf122cc Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Mon, 28 Jul 2025 12:05:19 +0100
Subject: [PATCH 2/3] Respect aarch64 -march=|-mcpu= flag and check whether
-mcpu=native works
Packagers may specify a target system up front, which should be
respected. The CRC extensions are not strictly necessary as there is a
software fallback.
Otherwise, use -mcpu=native if it works (it won't when cross-compiling)
or -mcpu=generic+crc.
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,16 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -Wall -Werror=sign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -Wall -Werror=sign-compare -DOVERLAYBD_VER=${OBD_VER}")
if ((CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL arm64))
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc -fsigned-char -fno-stack-protector -fomit-frame-pointer")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -fno-stack-protector -fomit-frame-pointer")
+ if (NOT CMAKE_CXX_FLAGS MATCHES "-march=|-mcpu=")
+ include(CheckCXXCompilerFlag)
+ check_cxx_compiler_flag(-mcpu=native COMPILER_HAS_NATIVE_FLAG)
+ if (COMPILER_HAS_NATIVE_FLAG)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
+ else ()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=generic+crc")
+ endif ()
+ endif ()
endif ()
set(CMAKE_CXX_STANDARD_LIBRARIES "-static-libgcc ${CMAKE_CXX_STANDARD_LIBRARIES}")
--- a/src/overlaybd/zfile/CMakeLists.txt
+++ b/src/overlaybd/zfile/CMakeLists.txt
@@ -10,8 +10,6 @@ target_include_directories(crc32_lib PUBLIC
if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
target_compile_options(crc32_lib PUBLIC -msse4.2 -mcrc32)
-else()
- target_compile_options(crc32_lib PRIVATE -march=native -mcpu=generic+crc)
endif()
if(ENABLE_DSA OR ENABLE_ISAL)
--
2.49.0
From 2e4edd416a42fad0e8d7ac21855a4e81f34f1e82 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <jlecuirot@microsoft.com>
Date: Mon, 28 Jul 2025 12:16:50 +0100
Subject: [PATCH 3/3] Patch Photon after fetching to fix cross issues
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
--- a/CMake/Findphoton.cmake
+++ b/CMake/Findphoton.cmake
@@ -6,6 +6,7 @@ FetchContent_Declare(
photon
GIT_REPOSITORY https://github.com/alibaba/PhotonLibOS.git
GIT_TAG v0.6.17
+ PATCH_COMMAND patch -p1 -i @FILESDIR@/photon-cross.patch
)
if(BUILD_TESTING)
--
2.49.0

View File

@ -1,11 +0,0 @@
--- a/CMake/Findtcmu.cmake
+++ b/CMake/Findtcmu.cmake
@@ -4,7 +4,7 @@ set(FETCHCONTENT_QUIET false)
FetchContent_Declare(
tcmu
GIT_REPOSITORY https://github.com/data-accelerator/photon-libtcmu.git
- GIT_TAG main
+ GIT_TAG 813fd65361bb2f348726b9c41478a44211847614
)
if(BUILD_TESTING)

View File

@ -0,0 +1,42 @@
From 10a573aa85db4eeb13df9e9cfa7047a0dc55d334 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Mon, 24 Mar 2025 08:32:25 +0100
Subject: [PATCH] [cmake] Require minimum CMake version 3.5
Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.
---
CMakeLists.txt | 5 +++--
test/CMakeLists.txt | 1 -
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46dc180..ee04e75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,6 @@
-# 3.5 is actually available almost everywhere, but this a good minimum
-cmake_minimum_required(VERSION 3.4)
+# 3.5 is actually available almost everywhere.
+# 3.30 as the upper policy limit avoids CMake deprecation warnings.
+cmake_minimum_required(VERSION 3.5...3.30)
# enable MSVC_RUNTIME_LIBRARY target property
# see https://cmake.org/cmake/help/latest/policy/CMP0091.html
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 351b03f..210e629 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -2,7 +2,6 @@ find_package(Threads REQUIRED)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(BUILD_MOCK ON CACHE BOOL "" FORCE)
-set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
add_subdirectory(
"${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.11.0"
--
2.51.0

View File

@ -44,13 +44,13 @@ RDEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-cross.patch
"${FILESDIR}"/${PN}-pin-tcmu.patch
"${FILESDIR}"/0001-Patch-Photon-after-fetching-to-fix-cross-issues.patch
"${FILESDIR}"/0002-Patch-yaml-cpp-after-fetching-to-fix-cmake-issues.patch
)
src_prepare() {
cmake_src_prepare
sed -i "s:@FILESDIR@:${FILESDIR}:g" CMake/Findphoton.cmake || die
sed -i "s:@FILESDIR@:${FILESDIR}:g" CMakeLists.txt CMake/Findphoton.cmake || die
}
src_configure() {
@ -58,7 +58,7 @@ src_configure() {
# runtime. Only DSA hard requires at least AVX2. However, the code doesn't
# try especially hard to avoid these instructions from being implicitly used
# outside these runtime checks. :(
# ISAL similarly leads to "illegal instruction" termination on QEMU.
# ISAL similarly leads to "illegal instruction" termination on QEMU.
local mycmakeargs=(
-DBUILD_SHARED_LIBS=no
-DBUILD_TESTING=no

View File

@ -1,2 +1,2 @@
DIST eselect-1.4.29.tar.xz 185948 BLAKE2B bb387a14c81d5ff5bf2e6e703465b24140b047f1464dee3c7fc0a125c9d94544a9afd801b42d2902dd6dee1af705f7dcfad854286d7e243a0f654cec35ab8eea SHA512 0466be2634f9d632d628cb11793d604002d989c222758ed33259c6b1dede80765d80f782242b22704e890bde84b2e1e3b3fb3d31574812cc803aad64ba8e7cf6
DIST eselect-1.4.30.tar.xz 186060 BLAKE2B f58c2bdacfcb933aef2414e65866a4be33d02ddc42005770fd4f3200a7aa0437d31301ac35991309d51f2e95e8be2eafa0590600281801c6c63db08b3451b9ef SHA512 89ff9af40849e5d712716c35705e21bfc5d073536da8750566368d519d1b7de823575ffe730faabab4170ca773df31e7bb9d633d8e48361704102987c5d3e681
DIST eselect-1.4.31.tar.xz 186520 BLAKE2B f40851ffea69c0d8b0142b49669e1112fc34384b0c8f1f6ce8aebbfd48fb6a6f8239e8682d7fe8b49c9d27cc9f7cee4b7c781baef7780e347df90f7cd4b5131e SHA512 ffcd6cdb5aef51b2949893abfc3af356d3011e256671eaae588e3fe6ff41f7bf74167dccef8c794422704097c3351f5c457009b051bbc8f008b2d2f250fa9c1b

View File

@ -1,7 +1,7 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
# Packages sharing a common release tarball:
# app-admin/eselect
@ -16,7 +16,7 @@ SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz"
LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-4.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"
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="doc emacs vim-syntax"
# coreutils for realpath

View File

@ -0,0 +1,28 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ALTERNATIVES=(
"reference:>=app-crypt/gnupg-2.4.8-r1[alternatives(-),nls?,ssl?]"
)
inherit app-alternatives
DESCRIPTION="gpg symlink"
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="nls ssl"
RDEPEND="
!app-crypt/gnupg[-alternatives(-)]
"
src_install() {
local alt=$(get_alternative)
dodir /usr/bin
dosym "gpg-${alt}" /usr/bin/gpg
dosym "gpgv-${alt}" /usr/bin/gpgv
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
}

View File

@ -0,0 +1,35 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ALTERNATIVES=(
"reference:>=app-crypt/gnupg-2.4.8-r1[alternatives(-),nls?,ssl?]"
)
inherit app-alternatives
DESCRIPTION="gpg symlink"
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="nls ssl"
RDEPEND="
!app-crypt/gnupg[-alternatives(-)]
!=app-crypt/gnupg-2.4.8-r1
!=app-crypt/gnupg-2.5.13-r1
"
src_install() {
local alt=$(get_alternative)
dodir /usr/bin
dosym "gpg-${alt}" /usr/bin/gpg
dosym "gpgv-${alt}" /usr/bin/gpgv
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
newman - gpg.1 <<<".so gpg-${alt}.1"
newman - gpgv.1 <<<".so gpgv-${alt}.1"
newman - gpg2.1 <<<".so gpg.1"
newman - gpgv2.1 <<<".so gpgv.1"
}

View File

@ -0,0 +1,36 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ALTERNATIVES=(
"reference:>=app-crypt/gnupg-2.4.8-r1[alternatives(-),nls?,ssl?]"
"freepg:app-crypt/freepg[nls?,ssl?]"
"sequoia:app-crypt/sequoia-chameleon-gnupg"
)
inherit app-alternatives
DESCRIPTION="gpg symlink"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls ssl"
RDEPEND="
!app-crypt/gnupg[-alternatives(-)]
"
src_install() {
local alt=$(get_alternative)
case ${alt} in
sequoia)
alt=sq
;;
esac
dodir /usr/bin
dosym "gpg-${alt}" /usr/bin/gpg
dosym "gpgv-${alt}" /usr/bin/gpgv
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
}

View File

@ -0,0 +1,44 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
ALTERNATIVES=(
"reference:>=app-crypt/gnupg-2.4.8-r2[alternatives(-),nls?,ssl?]"
"freepg:>=app-crypt/freepg-2.5.12_p1-r1[nls?,ssl?]"
"sequoia:>=app-crypt/sequoia-chameleon-gnupg-0.13.1-r3"
)
inherit app-alternatives
DESCRIPTION="gpg symlink"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="nls ssl"
RDEPEND="
!app-crypt/gnupg[-alternatives(-)]
!=app-crypt/freepg-2.5.12_p1-r0
!=app-crypt/gnupg-2.4.8-r1
!=app-crypt/gnupg-2.5.13-r1
"
src_install() {
local alt=$(get_alternative)
case ${alt} in
sequoia)
alt=sq
;;
esac
dodir /usr/bin
dosym "gpg-${alt}" /usr/bin/gpg
dosym "gpgv-${alt}" /usr/bin/gpgv
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
newman - gpg.1 <<<".so gpg-${alt}.1"
newman - gpgv.1 <<<".so gpgv-${alt}.1"
newman - gpg2.1 <<<".so gpg.1"
newman - gpgv2.1 <<<".so gpgv.1"
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<maintainer type="person">
<email>mgorny@gentoo.org</email>
<name>Michał Górny</name>
</maintainer>
<use>
<flag name="freepg">
Symlink to <pkg>app-crypt/freepg</pkg>.
</flag>
<flag name="reference">
Symlink to <pkg>app-crypt/gnupg</pkg>.
</flag>
<flag name="sequoia">
Symlink to <pkg>app-crypt/sequoia-chameleon-gnupg</pkg>.
</flag>
</use>
</pkgmetadata>

View File

@ -1,2 +1,4 @@
DIST libarchive-3.8.1.tar.xz 5950428 BLAKE2B 92ce11758ea050c7f5b3b2440566b71d29d4fe3ee90ee3455117585ef629eb7cfbe6f3c67bfb309c38d02118ef8f71c1c30ffe14466bfef7929c6d6134b11fc8 SHA512 c794d1c6e6a6dcf4072438dc4e8ce5b1530bbe9ad40afad18f4e6a444aa5d85e48c58cfbd8af41d4d25e93844956de3ce262cb1d68097d2e5f95bd87b5a982b7
DIST libarchive-3.8.1.tar.xz.asc 659 BLAKE2B 0965437c5087b29c356280613fba546c0f08cbe3996c885957e1424304f3ea1cb4651168b34c3389ec6119bd5ab99160dc530dced31490cd2f6e8c3850e77223 SHA512 540ea8203920c1e8e6934f20c0f6b592a309c82f82561960d9adff3a3a09cf28c7a3d92070682b6b420ef82c6e30d6e9741d8c3e5473a78390da5137e61c05bd
DIST libarchive-3.8.2.tar.xz 5853628 BLAKE2B 4f5ed9afbedccf0f754b38743259a62f45d8407ddea8955e301b79b8c9c7653e633b58998a43d7a4bf8cfd35488b20af76ea8f948267230be0557797513b71a6 SHA512 0a6796a8b9f66ebfb4ed0d03f9ef85519855fe5835c060bd9d17e3d5d70f565f74f94e7a570c4f6787557d15f1264fc55900d8a66b34b15892e2b6e4b3eecdf1
DIST libarchive-3.8.2.tar.xz.asc 659 BLAKE2B dc7183efc8e96a13d519d250194a9044c390042e1abc2257c82bc5c43453ad9fdbc5872643b6c008e8f6762356ced64304ed90c60edab034a4ef1ce3d91d26e0 SHA512 e1705acf226f14d9143efbc0b1649fcd2e10706966d21bf0c54f702db7eb64332b9f3927a7fa6c8322cb1a929af81bc584c1e6111c4d3c6523aee8ed7a8b4e1e

View File

@ -0,0 +1,174 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit libtool multilib-minimal toolchain-funcs verify-sig
DESCRIPTION="Multi-format archive and compression library"
HOMEPAGE="
https://www.libarchive.org/
https://github.com/libarchive/libarchive/
"
SRC_URI="
https://www.libarchive.de/downloads/${P}.tar.xz
verify-sig? ( https://www.libarchive.de/downloads/${P}.tar.xz.asc )
"
LICENSE="BSD BSD-2 BSD-4 public-domain"
SLOT="0/13"
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="
acl blake2 +bzip2 +e2fsprogs expat +iconv lz4 +lzma lzo nettle
static-libs test xattr +zstd
"
RESTRICT="!test? ( test )"
RDEPEND="
sys-libs/zlib:=[${MULTILIB_USEDEP}]
acl? ( virtual/acl:=[${MULTILIB_USEDEP}] )
blake2? ( app-crypt/libb2:=[${MULTILIB_USEDEP}] )
bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
expat? ( dev-libs/expat:=[${MULTILIB_USEDEP}] )
!expat? ( dev-libs/libxml2:=[${MULTILIB_USEDEP}] )
iconv? ( virtual/libiconv:=[${MULTILIB_USEDEP}] )
dev-libs/openssl:=[${MULTILIB_USEDEP}]
lz4? ( >=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.2.5-r1:=[${MULTILIB_USEDEP}] )
lzo? ( >=dev-libs/lzo-2:=[${MULTILIB_USEDEP}] )
nettle? ( dev-libs/nettle:=[${MULTILIB_USEDEP}] )
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
kernel_linux? (
virtual/os-headers
e2fsprogs? ( sys-fs/e2fsprogs[${MULTILIB_USEDEP}] )
)
test? (
app-arch/lrzip
app-arch/lz4
app-arch/lzip
app-arch/lzop
app-arch/xz-utils
app-arch/zstd
lzma? ( app-arch/xz-utils[extra-filters(+)] )
)
"
BDEPEND="
virtual/pkgconfig
verify-sig? ( >=sec-keys/openpgp-keys-libarchive-20221209 )
elibc_musl? ( sys-libs/queue-standalone )
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libarchive.org.asc
# false positives (checks for libc-defined hash functions)
QA_CONFIG_IMPL_DECL_SKIP=(
SHA256_Init SHA256_Update SHA256_Final
SHA384_Init SHA384_Update SHA384_Final
SHA512_Init SHA512_Update SHA512_Final
)
PATCHES=(
# https://github.com/libarchive/libarchive/issues/2069
# (we can simply update the command since we don't support old lrzip)
"${FILESDIR}/${PN}-3.7.2-lrzip.patch"
)
src_prepare() {
default
# Needed for flags to be respected w/ LTO
elibtoolize
}
multilib_src_configure() {
export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923
local myconf=(
$(use_enable acl)
$(use_enable static-libs static)
$(use_enable xattr)
$(use_with blake2 libb2)
$(use_with bzip2 bz2lib)
$(use_with expat)
$(use_with !expat xml2)
$(use_with iconv)
$(use_with lz4)
$(use_with lzma)
$(use_with lzo lzo2)
$(use_with nettle)
--with-zlib
$(use_with zstd)
# Windows-specific
--without-cng
)
if multilib_is_native_abi ; then
myconf+=(
--enable-bsdcat="$(tc-is-static-only && echo static || echo shared)"
--enable-bsdcpio="$(tc-is-static-only && echo static || echo shared)"
--enable-bsdtar="$(tc-is-static-only && echo static || echo shared)"
--enable-bsdunzip="$(tc-is-static-only && echo static || echo shared)"
)
else
myconf+=(
--disable-bsdcat
--disable-bsdcpio
--disable-bsdtar
--disable-bsdunzip
)
fi
ECONF_SOURCE="${S}" econf "${myconf[@]}"
}
multilib_src_compile() {
if multilib_is_native_abi ; then
emake
else
emake libarchive.la
fi
}
src_test() {
mkdir -p "${T}"/bin || die
# tests fail when lbzip2[symlink] is used in place of ref bunzip2
ln -s "${BROOT}/bin/bunzip2" "${T}"/bin || die
# workaround lrzip broken on 32-bit arches with >= 10 threads
# https://bugs.gentoo.org/927766
cat > "${T}"/bin/lrzip <<-EOF || die
#!/bin/sh
exec "$(type -P lrzip)" -p1 "\${@}"
EOF
chmod +x "${T}/bin/lrzip" || die
local -x PATH=${T}/bin:${PATH}
multilib-minimal_src_test
}
multilib_src_test() {
# sandbox is breaking long symlink behavior
local -x SANDBOX_ON=0
local -x LD_PRELOAD=
# some locales trigger different output that breaks tests
local -x LC_ALL=C.UTF-8
emake check
}
multilib_src_install() {
if multilib_is_native_abi ; then
emake DESTDIR="${D}" install
else
local install_targets=(
install-includeHEADERS
install-libLTLIBRARIES
install-pkgconfigDATA
)
emake DESTDIR="${D}" "${install_targets[@]}"
fi
# Libs.private: should be used from libarchive.pc instead
find "${ED}" -type f -name "*.la" -delete || die
# https://github.com/libarchive/libarchive/issues/1766
sed -e '/Requires\.private/s:iconv::' \
-i "${ED}/usr/$(get_libdir)/pkgconfig/libarchive.pc" || die
}

View File

@ -1,4 +1,6 @@
DIST netavark-1.14.1.crate 167516 BLAKE2B b6ec5eaef66798416fc0fc82f6de81d07feb52a95946a3844a9f4b34c16bfaa37bc3b5228e38b912d40381d30940f7e49bf052426989f20fffc712e2c4499ebb SHA512 ae7892858e85fda499742e9c9553f7e5e887bd62f155832b630c4b4fc0b32f52469d72d901d9b222816f324ec4f877cb758c9edad22e282eee77e05d98b05fc6
DIST netavark-1.15.2.crate 169643 BLAKE2B fcc3a3b691a4bc0dfcbc180408ee9d8c7f15275c8ec0b8ae27f63a6d84ff425a0035ab4c17328d31f4b6a9dbbeaab0f48188111f82ddf6e3be9994eff3944e5b SHA512 6b9880b4150b52818f7bb2179acf2b4ffe87ab36a0aa8cf0c4442781f818842236d4acb41077729e8a25d134b96639cd311f0a505d276df02e5cd5e0a83cce82
DIST netavark-1.16.1.crate 173635 BLAKE2B c2d45164e5c7a6689e5dae4921163a128e7525eef75a5b98a810539c13988a4880727831c22252e418bf3c987e1e729a6bb001e9dacb48b1c73603053fd0abc4 SHA512 8d20e5cc1bd8d80eaf7a9263985478f27b994dbff0da9b4378e4be0beb71121624348b152d3891b78512e598e2887815534c806518e64ff8f95eed305fa33132
DIST netavark-v1.14.1-vendor.tar.gz 18508797 BLAKE2B 8b63673700f26e19ac2c2274e71a803bf99ba7aec58d8f66320e0cdd7c72c016f16083df46b0b454bd91df5e62e5c4170bcb2ee636c094a5578951bd8f38eb24 SHA512 84545bcb791a698a20d3b1f41502beaa568a5e519156cbb6e9d28bef34a24ed006a87cd77c8d972f63ad9c3ef9049637b15bd0d446d80c88dcdd9f268486959a
DIST netavark-v1.15.2-vendor.tar.gz 21528390 BLAKE2B b1cc108b27e9c545baff6e52a17189200b3757216a35954b370ebf1dede2344094fad1885559c6397234387535cb921361b289ca938021d97544e2fd13d4dd54 SHA512 52f3512dae21f54a364e2287e43ea47d6ef36d291522ddf36a4c5ae24a40d1f0997ea4902ad0e28a466fc2a058d5122d405d2b675d3250599b8ca49deb771d19
DIST netavark-v1.16.1-vendor.tar.gz 22434836 BLAKE2B d1b6d4954b54bfd9088428f82098a8f78ef5bec500643a0c2c570827e74be1e4fbfe9f516cf7a9506325b847ee8b6ab07fa47b9b0936b2e462ee1b52e27edfda SHA512 fdfb63c58314e89ee1ef1b95a34b07aec82c15958dfc379e3ee4475c13f9864b6c02e33b45ea59a17fd9921669fd7c0c3d9078d319983cfbd1f76ea22afd5be4

View File

@ -0,0 +1,61 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
[[ ${PV} == 9999* ]] || CRATES="${PN}@${PV}"
RUST_MIN_VER="1.83"
inherit cargo systemd
DESCRIPTION="A container network stack"
HOMEPAGE="https://github.com/containers/netavark"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/containers/netavark.git"
else
SRC_URI="${CARGO_CRATE_URIS} https://github.com/containers/netavark/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz"
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv"
fi
# main
LICENSE="Apache-2.0"
# deps
LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB"
SLOT="0"
BDEPEND="dev-go/go-md2man
dev-libs/protobuf[protoc(+)]"
QA_FLAGS_IGNORED="
usr/libexec/podman/${PN}"
QA_PRESTRIPPED="
usr/libexec/podman/${PN}"
ECARGO_VENDOR="${WORKDIR}/vendor"
src_unpack() {
if [[ ${PV} == 9999* ]]; then
git-r3_src_unpack
cargo_live_src_unpack
else
cargo_src_unpack
fi
}
src_prepare() {
default
sed -i -e "s|m0755 bin|m0755 $(cargo_target_dir)|g;" Makefile || die
}
src_compile() {
cargo_src_compile
export PREFIX="${EPREFIX}"/usr SYSTEMDDIR="$(systemd_get_systemunitdir)"
emake docs
}
# Following is needed because we want to use `make install` instead of `cargo install` (exported by cargo.eclass)
src_install() {
default
}

View File

@ -4,3 +4,5 @@ DIST gnupg-2.4.8.tar.bz2 8017685 BLAKE2B ab7126aac6c7bf323075c68084c963f75d93c72
DIST gnupg-2.4.8.tar.bz2.sig 119 BLAKE2B 4f94b2abc40b17cfab44f28fc2a2ae5246f8356141a3932a92b5adb78002c7064bb132a6529079bc14900036f90d9d318d7d01818999150e2c875b88a3fca265 SHA512 9fb54be4e99ecee6c7b649d6f0ef24a25e81c0af57e07ccdd512a1ea2ebf7558dd25518b7b78347e4a216167849e6285bb91ec23d0968966aba0784d45f02a06
DIST gnupg-2.5.12.tar.bz2 8225353 BLAKE2B cab3802d08acf96772071c42949c55e78734447a29d3088b7c08636282cf38f92fcf35ce6ded5df9a18b2725a27500980d1616f5d3850df05f9543a43453d5c0 SHA512 fa0510f24b844e2ee122543421e0ee47415cb5a1599c28abe2ec22830c378b50125e70289fd227bd6ca35bb3d6a40928955f42b44b24f657733b93c64d6d27d8
DIST gnupg-2.5.12.tar.bz2.sig 266 BLAKE2B b52d3f2d3af94061c5210ede10b074d871e9782ae92974a58480e6e0cfa29e5d6622b67b24989bb757e96a0cbb8ff9df2d15b69ecc5b5c531880920f45907b9f SHA512 ff141f5dc30cd81494c8a50f86b673fe9c0fc74d344fb868f922285851929ed863b66fe52e973d0ab869391394e7fe6a0efc83b7b2383f28771a1cd6ca62be3b
DIST gnupg-2.5.13.tar.bz2 8227840 BLAKE2B d898a86d2c13a8daa4dc4ab96376610768710bfa719d4e21d77c97d41e377305aa606df20bab1ac8d9553783e67afe2c42970374f3be19128686a781fcc13f1f SHA512 76f355bae2b600935996a33597577f60e332c274ce72cfff936ef0435b0990b6c811942ad9ec58c2f0e518814b43ff1e301058ef2797b178404d2b3eb91dbaf9
DIST gnupg-2.5.13.tar.bz2.sig 119 BLAKE2B 12a9a4a6d2a1cc8f38acf64e6c6d975e813a759d4de5ca6755fdc237c54b2497a60f355a2accf75623ea765a9238bfbf3b4bf58844a3d6059880b11deac51f01 SHA512 59a9f07cbc97272b87f43c7aba323616b7bcc6b5217e5a373a75ec24bdfc70e76d137ec4be57012298447fc3e21ff834a8600a8730de0e5539c731151379fffd

View File

@ -24,7 +24,7 @@ S="${WORKDIR}/${MY_P}"
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"
IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
IUSE="+alternatives bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
@ -53,6 +53,9 @@ RDEPEND="
"
PDEPEND="
app-crypt/pinentry
alternatives? (
app-alternatives/gpg[-freepg(-)]
)
"
BDEPEND="
virtual/pkgconfig
@ -173,8 +176,15 @@ my_src_install() {
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
if use alternatives; then
# rename for app-alternatives/gpg
mv "${ED}"/usr/bin/gpg{,-reference} || die
mv "${ED}"/usr/bin/gpgv{,-reference} || die
else
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
fi
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
@ -194,3 +204,14 @@ my_src_install_all() {
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}
pkg_postinst() {
# If /usr/bin/gpg and /usr/bin/gpgv do not exist, provide them.
if [[ ! -e ${EROOT}/usr/bin/gpg ]]; then
ln -sf -- gpg-reference "${EROOT}"/usr/bin/gpg || die
fi
if [[ ! -e ${EROOT}/usr/bin/gpgv ]]; then
ln -sf -- gpgv-reference "${EROOT}"/usr/bin/gpgv || die
fi
}

View File

@ -0,0 +1,218 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
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"
IUSE="+alternatives bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-2.5.0:=
>=dev-libs/libgcrypt-1.9.1:=
>=dev-libs/libgpg-error-1.46
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
tofu? ( >=dev-db/sqlite-3.27 )
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
ssl? ( >=net-libs/gnutls-3.2:0= )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
PDEPEND="
app-crypt/pinentry
alternatives? (
app-alternatives/gpg[-freepg(-)]
)
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
)
src_prepare() {
default
GNUPG_SYSTEMD_UNITS=(
dirmngr.service
dirmngr.socket
gpg-agent-browser.socket
gpg-agent-extra.socket
gpg-agent.service
gpg-agent.socket
gpg-agent-ssh.socket
)
cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i "${T}"/gpg-agent-ssh.socket || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use_enable tofu keyboxd)
$(use_enable tofu sqlite)
$(usex tpm '--with-tss=intel' '--disable-tpm2d')
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# https://dev.gnupg.org/T7368
append-cppflags -D_XOPEN_SOURCE=500
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
if use alternatives; then
# rename for app-alternatives/gpg
mv "${ED}"/usr/bin/gpg{,-reference} || die
mv "${ED}"/usr/bin/gpgv{,-reference} || die
mv "${ED}"/usr/share/man/man1/gpg{,-reference}.1 || die
mv "${ED}"/usr/share/man/man1/gpgv{,-reference}.1 || die
else
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
fi
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}
pkg_postinst() {
# If /usr/bin/gpg and /usr/bin/gpgv do not exist, provide them.
if [[ ! -e ${EROOT}/usr/bin/gpg ]]; then
ln -sf -- gpg-reference "${EROOT}"/usr/bin/gpg || die
fi
if [[ ! -e ${EROOT}/usr/bin/gpgv ]]; then
ln -sf -- gpgv-reference "${EROOT}"/usr/bin/gpgv || die
fi
}

View File

@ -0,0 +1,221 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
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"
IUSE="+alternatives bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-3.0.0:=
>=dev-libs/libgcrypt-1.11.0:=
>=dev-libs/libgpg-error-1.56
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
tofu? ( >=dev-db/sqlite-3.27 )
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
ssl? ( >=net-libs/gnutls-3.2:0= )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
PDEPEND="
app-crypt/pinentry
alternatives? (
app-alternatives/gpg[-freepg(-)]
)
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
)
src_prepare() {
default
GNUPG_SYSTEMD_UNITS=(
dirmngr.service
dirmngr.socket
gpg-agent-browser.socket
gpg-agent-extra.socket
gpg-agent.service
gpg-agent.socket
gpg-agent-ssh.socket
)
cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i "${T}"/gpg-agent-ssh.socket || die
# Since 2.5.3, --supervised is called --deprecated-supervised. See
# https://dev.gnupg.org/rGa019a0fcd8dfb9d1eae5bc991fdd54b7cf55641e
sed -i "s/--supervised/--deprecated-supervised/g" "${T}"/*.service || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use_enable tofu keyboxd)
$(use_enable tofu sqlite)
$(usex tpm '--with-tss=intel' '--disable-tpm2d')
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# https://dev.gnupg.org/T7368
export ac_cv_should_define__xopen_source=yes
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
if use alternatives; then
# rename for app-alternatives/gpg
mv "${ED}"/usr/bin/gpg{,-reference} || die
mv "${ED}"/usr/bin/gpgv{,-reference} || die
else
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
fi
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}
pkg_postinst() {
# If /usr/bin/gpg and /usr/bin/gpgv do not exist, provide them.
if [[ ! -e ${EROOT}/usr/bin/gpg ]]; then
ln -sf -- gpg-reference "${EROOT}"/usr/bin/gpg || die
fi
if [[ ! -e ${EROOT}/usr/bin/gpgv ]]; then
ln -sf -- gpgv-reference "${EROOT}"/usr/bin/gpgv || die
fi
}

View File

@ -0,0 +1,222 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintainers should:
# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
# (find the one for the current release then subscribe to it +
# any subsequent ones linked within so you're covered for a while.)
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
# in-source builds are not supported: https://dev.gnupg.org/T6313#166339
inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig
MY_P="${P/_/-}"
DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
HOMEPAGE="https://gnupg.org/"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )"
S="${WORKDIR}/${MY_P}"
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"
IUSE="+alternatives bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( tofu )"
# Existence of executables is checked during configuration.
# Note: On each bump, update dep bounds on each version from configure.ac!
DEPEND="
>=dev-libs/libassuan-3.0.0:=
>=dev-libs/libgcrypt-1.11.0:=
>=dev-libs/libgpg-error-1.56
>=dev-libs/libksba-1.6.3
>=dev-libs/npth-1.2
sys-libs/zlib
bzip2? ( app-arch/bzip2 )
ldap? ( net-nds/openldap:= )
readline? ( sys-libs/readline:0= )
smartcard? ( usb? ( virtual/libusb:1 ) )
tofu? ( >=dev-db/sqlite-3.27 )
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= )
ssl? ( >=net-libs/gnutls-3.2:0= )
"
RDEPEND="
${DEPEND}
nls? ( virtual/libintl )
selinux? ( sec-policy/selinux-gpg )
wks-server? ( virtual/mta )
"
PDEPEND="
app-crypt/pinentry
alternatives? (
app-alternatives/gpg[-freepg(-)]
)
"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/texinfo )
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-gnupg )
"
DOCS=(
ChangeLog NEWS README THANKS TODO VERSION
doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
)
PATCHES=(
"${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch
)
src_prepare() {
default
GNUPG_SYSTEMD_UNITS=(
dirmngr.service
dirmngr.socket
gpg-agent-browser.socket
gpg-agent-extra.socket
gpg-agent.service
gpg-agent.socket
gpg-agent-ssh.socket
)
cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die
# Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
# idea borrowed from libdbus, see
# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
#
# This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
# which in turn requires discovery in Autoconf, something that upstream deeply resents.
sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
-i "${T}"/gpg-agent-ssh.socket || die
# Since 2.5.3, --supervised is called --deprecated-supervised. See
# https://dev.gnupg.org/rGa019a0fcd8dfb9d1eae5bc991fdd54b7cf55641e
sed -i "s/--supervised/--deprecated-supervised/g" "${T}"/*.service || die
}
my_src_configure() {
# Upstream don't support LTO, bug #854222.
filter-lto
local myconf=(
$(use_enable bzip2)
$(use_enable nls)
$(use_enable smartcard scdaemon)
$(use_enable ssl gnutls)
$(use_enable test all-tests)
$(use_enable test tests)
$(use_enable tofu)
$(use_enable tofu keyboxd)
$(use_enable tofu sqlite)
$(usex tpm '--with-tss=intel' '--disable-tpm2d')
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver')
$(use_enable wks-server wks-tools)
$(use_with ldap)
$(use_with readline)
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
# As of GnuPG 2.3, the mailprog substitution is used for the binary called
# by wks-client & wks-server; and if it's autodetected but not not exist at
# build time, then then 'gpg-wks-client --send' functionality will not
# work. This has an unwanted side-effect in stage3 builds: there was a
# [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
# the build where the install guide previously make the user chose the
# logger & mta early in the install.
--with-mailprog=/usr/libexec/sendmail
--disable-ntbtls
--enable-gpgsm
--enable-large-secmem
CC_FOR_BUILD="$(tc-getBUILD_CC)"
GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
)
if use prefix && use usb; then
# bug #649598
append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0"
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# https://dev.gnupg.org/T7368
export ac_cv_should_define__xopen_source=yes
fi
# bug #663142
if use user-socket; then
myconf+=( --enable-run-gnupg-user-socket )
fi
# glib fails and picks up clang's internal stdint.h causing weird errors
tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h
econf "${myconf[@]}"
}
my_src_compile() {
default
use doc && emake -C doc html
}
my_src_test() {
export TESTFLAGS="--parallel=$(makeopts_jobs)"
default
}
my_src_install() {
emake DESTDIR="${D}" install
use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert
if use alternatives; then
# rename for app-alternatives/gpg
mv "${ED}"/usr/bin/gpg{,-reference} || die
mv "${ED}"/usr/bin/gpgv{,-reference} || die
mv "${ED}"/usr/share/man/man1/gpg{,-reference}.1 || die
mv "${ED}"/usr/share/man/man1/gpgv{,-reference}.1 || die
else
dosym gpg /usr/bin/gpg2
dosym gpgv /usr/bin/gpgv2
echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
fi
dodir /etc/env.d
echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
use doc && dodoc doc/gnupg.html/*
}
my_src_install_all() {
einstalldocs
use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot}
use doc && dodoc doc/*.png
# Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed.
dodoc "${FILESDIR}"/README-systemd
systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}"
}
pkg_postinst() {
# If /usr/bin/gpg and /usr/bin/gpgv do not exist, provide them.
if [[ ! -e ${EROOT}/usr/bin/gpg ]]; then
ln -sf -- gpg-reference "${EROOT}"/usr/bin/gpg || die
fi
if [[ ! -e ${EROOT}/usr/bin/gpgv ]]; then
ln -sf -- gpgv-reference "${EROOT}"/usr/bin/gpgv || die
fi
}

View File

@ -6,6 +6,9 @@
<name>Gentoo Base System</name>
</maintainer>
<use>
<flag name="alternatives">
Install renamed, for compatibility with <pkg>app-alternatives/gpg</pkg>.
</flag>
<flag name="smartcard">
Build scdaemon software. Enables usage of OpenPGP cards. For
other type of smartcards, try <pkg>app-crypt/gnupg-pkcs11-scd</pkg>.

View File

@ -32,7 +32,10 @@ IUSE="common-lisp static-libs test"
RESTRICT="!test? ( test )"
RDEPEND="
>=app-crypt/gnupg-2
|| (
app-alternatives/gpg[reference]
app-alternatives/gpg[freepg(-)]
)
>=dev-libs/libassuan-2.5.3:=
>=dev-libs/libgpg-error-1.46-r1:=
"

View File

@ -5,6 +5,9 @@
<email>base-system@gentoo.org</email>
<name>Gentoo Base System</name>
</maintainer>
<upstream>
<remote-id type="cpe">cpe:/a:gnu:nano</remote-id>
</upstream>
<longdescription>
GNU nano - an enhanced clone of the Pico text editor.

View File

@ -7,9 +7,11 @@ DIST qemu-10.0.2.tar.xz 135678180 BLAKE2B be4ddf050d2102cefded5b4967222df749ee8a
DIST qemu-10.0.3.tar.xz 135736600 BLAKE2B 382800d9a9f5241123ebeb43d8eaa6a4aaf9acae0df7a25f2c7831aa7eeb97014cff29886c53f03ea0a1ac98729b85bad1e4d5634e592a373af84f79a9219adc SHA512 7f37c2df5ac7048fb32f1d89a7c2da0929be9d2f5767bc209ca1e99167f196fb5867fc8b69f915c8c349c58089ce3d7e08c9a3f35a73223abff258b9a5bf3466
DIST qemu-10.0.4.tar.xz 141652160 BLAKE2B 987b69f2d9f2e98a1447c321a00a5c8df7114285c2bfabe7e127d57afb8b1d0b56dc34967be9e161652fd07dc25a0b09135a01758a82973ef819d71a2d5c6748 SHA512 1737124306b293401362ce33b5ce226df237cc577466afdff510b7f8e851e16708c7ec8d282e86dce3d66b54d1ff14876ac448061faf43d59de375b817155a1e
DIST qemu-10.0.5.tar.xz 141642600 BLAKE2B bd7abfd5a977cf47862f0a7b26ce4e36c857dd858e0d0def652c00e9186fe476f461005b673bac6031162b5de47d412c1b7faebdbf4456487501f6d4a37f69b7 SHA512 c87948868910f458aeb724ebfe71db10f0ca1e9e0e6b4c4f082c2776d1c8f64c36f65bc5714d4625f6919d4064452f4378a7578273b69db6d4295d90b75fc86f
DIST qemu-10.0.6.tar.xz 141762220 BLAKE2B 89ee1fd339b2ca047023b738415f839d2042cfbdb9305901fecc70142f2d8d208a34562d81e803ddd2438964adb36b7965ca92538f91f98291e97c43b61baa12 SHA512 7d5c2c28c74517909a1dcbf517cf88631241afc24e25e5a5bc8ead2af3c818360e1ce8241cb477deeae528aab3e198ba40a5bb78c6205b28430600c0f2f5294b
DIST qemu-10.1.0-docs.tar.xz 2788092 BLAKE2B c9f1138e6eb19966da05b5be6e28640cabf698cb7c4247e0a69b29ed71d462423ba356efc8c0f26a727a58b4adc84edc3eefbff12a35e0c93e475f0ab51e6ff7 SHA512 96d9133d83991014c3ce9a57273a017f45bf29ae3f7029c5b926c8c5fbfd0e8da80dbbecca038b981312cec68b931a0471837a0aebd3e5dbc1648eb49e28ecc9
DIST qemu-10.1.0.tar.xz 141999456 BLAKE2B 025012e73cdd2468b1b0fdef9b34aae41893780cfcad0d52c05e7f67ff7a9969c8c596f006b8a7e6f1b59e39da8fdec07d6f241911c604502755acd26bb750b6 SHA512 20552a524b6b298181df1af7084b470ded3fe8d1505f05011dda3c33cbc3d91f518ce026b44ba1a8b7f34c64ae81afddceda383066f4772a3a2a6333a2638caf
DIST qemu-10.1.1.tar.xz 142046220 BLAKE2B 3617898fb4275e1e18f9567e9a9137ad0f3e3e3bc6a1b77301fd59614047757d77a9b810ece2e504ff47c1b98e2b9881a1ff551a4bc356c87c0d5d85f471a59b SHA512 72ca08894fb63c734163a53c6a836a6237de0f9f4ece4570e871bf80bcfba43fb5d4f11715564e0aef7244b7b3c4fe1890d5f10bbb05528b592d25cd95a57dfa
DIST qemu-10.1.2.tar.xz 142050300 BLAKE2B 6e6e27c5de4f70f928a19ef64c00adbcb9723882db3eabd6acd7543f6b3d886db2862cf75ddcec86012c103d6927be464f03e2a3e91873b87cbbcafa0be95671 SHA512 4defbcb78f65ba3d8079466bdb3ab29e26f10129723e045d34901e7d524656e5ff729dc97fb33537febe2596eb0b21a02aadd88007eb5b226e599bd236213263
DIST qemu-9.1.0-docs.tar.xz 2376072 BLAKE2B 31d13133b3a2e21a7d9b5af028407610ae8f2fa61dd296fc35e57fc12eb66cfd1a39ec5e3b5a3852095d10a388f424f8a38417b3ab58ca30d0817ece779328cf SHA512 5b705b577daad6aa010d5c713db9dc314114334b89901840ebcecc9032595a969f5ad9054e42b36b2be5ef9f5d6dc1159841ff46dbb08314b5c48491aa631040
DIST qemu-9.1.3.tar.xz 132492084 BLAKE2B 268c8fb91dd5fc4e393a46a578537338861e5d2a92c381517447c6c2fe67604ed9aacc96371c864dc7f4a800cc9b9f94118d17c5dcc24f3fac5be0a18ca553e5 SHA512 e7b938e72eb4a8a4a6680ce3b282a4e5cbd1ad30003bed959e51ea2621acea7434b4366ef6559e3622fac8865ad212702f393ba7698be38cf2fc8f264b951318
DIST qemu-9.2.0-docs.tar.xz 2431076 BLAKE2B 420148b9d7cafbdc9aea21b0d0a84a53ca0d17fb99fc34ae4c0786fa7d4ce40838f4b3173508b90742d6dfbfd4b58dda25b2e5cd1394241b0b56a64fe5705d9b SHA512 88816e326e9eac9acf0a1c73e677552845d6885e220b55e795241c40d2c1bd1b1994a22e56f95046e420225e0b7dc839d459f1c1e5318c8c36392727a86b3008

View File

@ -0,0 +1,18 @@
see https://bugs.gentoo.org/964165, patch sent to qemu-devel ml
passt needs gio but not gdbus-codegen. Make gdbus-codegen optional,
dbus_display which requires it will still fail as expected.
--- a/meson.build
+++ b/meson.build
@@ -1126,8 +1126,7 @@ if not get_option('gio').auto() or have_system
gio = not_found
endif
if gio.found()
- gdbus_codegen = find_program('gdbus-codegen',
- required: get_option('gio'))
+ gdbus_codegen = find_program('gdbus-codegen', required: false)
gio_unix = dependency('gio-unix-2.0', required: get_option('gio'),
method: 'pkg-config')
gio = declare_dependency(dependencies: [gio, gio_unix],
--
2.51.0

View File

@ -276,7 +276,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -290,7 +290,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -276,7 +276,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -290,7 +290,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -290,7 +290,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -44,7 +44,7 @@ else
fi
S="${WORKDIR}/${MY_P}"
[[ "${PV}" != *_rc* ]] && KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv x86"
[[ "${PV}" != *_rc* ]] && KEYWORDS="amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv x86"
fi
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
@ -290,7 +290,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

File diff suppressed because it is too large Load Diff

View File

@ -291,7 +291,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -291,7 +291,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

File diff suppressed because it is too large Load Diff

View File

@ -277,7 +277,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -276,7 +276,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -276,7 +276,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0

View File

@ -291,7 +291,7 @@ PPC_FIRMWARE_DEPEND="
# See bug #913084 for pip dep
BDEPEND="
$(python_gen_impl_dep)
${PYTHON_DEPS}
dev-python/distlib[${PYTHON_USEDEP}]
dev-lang/perl
>=dev-build/meson-0.63.0
@ -636,6 +636,7 @@ qemu_src_configure() {
$(conf_notuser opengl)
$(conf_notuser pam auth-pam)
$(conf_notuser passt)
$(conf_notuser passt gio)
$(conf_notuser png)
$(conf_notuser rbd)
$(conf_notuser sasl vnc-sasl)

View File

@ -6,7 +6,7 @@ EAPI=8
# Note: if bumping pax-utils because of syscall changes in glibc, please
# revbump glibc and update the dependency in its ebuild for the affected
# versions.
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..14} )
inherit meson python-single-r1

View File

@ -1,4 +1,4 @@
# Copyright 2022-2024 Gentoo Authors
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -6,7 +6,7 @@ EAPI=8
# Note: if bumping pax-utils because of syscall changes in glibc, please
# revbump glibc and update the dependency in its ebuild for the affected
# versions.
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_COMPAT=( python3_{11..14} )
inherit meson python-single-r1

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit meson python-r1 tmpfiles

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE="xml(+),threads(+)"
inherit meson python-r1 tmpfiles

View File

@ -25,8 +25,12 @@ SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
# gpg[sequoia] fails w/ 0.13.1 because of missing --lsign-key
RDEPEND="
app-crypt/gnupg
|| (
app-alternatives/gpg[reference]
app-alternatives/gpg[freepg(-)]
)
dev-libs/openssl
sec-keys/openpgp-keys-gentoo-release
sys-apps/gentoo-functions

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
@ -25,8 +25,12 @@ SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
# gpg[sequoia] fails w/ 0.13.1 because of missing --lsign-key
RDEPEND="
app-crypt/gnupg
|| (
app-alternatives/gpg[reference]
app-alternatives/gpg[freepg(-)]
)
dev-libs/openssl
sec-keys/openpgp-keys-gentoo-release
sys-apps/gentoo-functions

View File

@ -1,4 +1,5 @@
DIST bash-completion-2.14.0.tar.xz 428980 BLAKE2B c28ec0cd348a3954461f7a865823a358e47c4b479c7812baa6d54aef856c958510967806550e62784955f9daf233a0b01edade19884e534df857472a3196e63e SHA512 2e12d2e57c932b931a6cfe59234f9d33d715538d6ea4eb72ed4ed3d8d2cf2cedaf08fcb6abaf3117e06115d892283e38a07b3abe5c91c026d2c06a0f64e347bd
DIST bash-completion-2.15.0.tar.xz 457836 BLAKE2B d2234cb2baf8494d2159e8abe6780e0879efb6fe9e851c0d51ebf09363c83652ef610658e2beca181adc0d6c844472a68a219be8b3ca51271fdfc53477f174ba SHA512 3b7e98801c3ceab7853c0603bdaa0cd6f0a658e0f7f24b092f341bd1794633b62d33e664035b6ab3c03b5a3dd941b16f87a415aade8a2707578c59cc48b1a9f7
DIST bash-completion-2.16.0.tar.xz 464764 BLAKE2B 389be47536f8f9aa383ff85bf19a00562b30b6d3e3652feaa01284987af13c2dc9850b59341956dd8e94e54251cd36902a60d5e3420ebfa2567216546144f675 SHA512 3711d6cb53cedff94efca0325479ac73f40b536fce250dbcc18ef120a8d0d2248f086ca26e245d163e6058d1b1087d57ced041317163d0e25592d6cb7acbc102
DIST bash-completion-2.17.0.tar.xz 482896 BLAKE2B ee11f2bff82b0852979e4843c7ad5e5b976e4d1e44ab5ed1b96da64fe9b32d91150f12f32bf7c6c0286cd2a0c424d786bbad47066403c71f8d3c8425487427dd SHA512 79f7a22de7df7a6a5cad2e8088ce7e013a3cd5542f3af825c04b2607c824022913dd775202ddab7964dd759e50d5bdf9be6451c70d488efaef10f7cf2f7ac73e
DIST bashcomp-2.0.3.tar.gz 3539 BLAKE2B 75304d144792cc7f6ad5455a05a65c33c646d6f7384d020a06a1fcf012cd51625a3dd0750ad539253453b1eede196c340286a1e81737f0835b5091609ba01295 SHA512 b2bd185ccbd4456939ccc731cc1983fcec2b9564a9920642a753fadd5d897fdb96b925ac1524657629d621d45b37d99076c8ae72511a827e96ff6c388d720008

View File

@ -19,7 +19,7 @@ SRC_URI="
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"
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 )"

View File

@ -0,0 +1,171 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
BASHCOMP_P=bashcomp-2.0.3
PYTHON_COMPAT=( python3_{11..13} )
inherit autotools 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 )"
RDEPEND="
>=app-shells/bash-4.3_p30-r1:0
sys-apps/miscfiles
!<app-text/tree-2.1.1-r1
!!<=net-fs/mc-2025.04.16.18.13.26-r0
"
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
# For GNU mailman, which isn't packaged. If mailman isn't installed,
# it triggers a QA warning.
arch
# Now installed by patchutils
interdiff
)
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
# Only needed for ${PN}-2.16.0-libsecret-completion.patch
eautoreconf
}
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
test/t/unit/test_unit_dequote.py
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
test/t/test_make.py::TestMake::test_6 #bug 931744
)
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 /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() {
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

@ -24,9 +24,9 @@ DIST bash-5.2.tar.gz 10950833 BLAKE2B 51b196e710794ebad8eac28c31c93eb99ac1a7db30
DIST bash-5.2.tar.gz.sig 95 BLAKE2B 2991b7c46ef1cdca08062f419be47fca7551f4c5d9aad8a5c1da74974f5e7707d23914b4cecf9b6c9610471146b2c49b611bb62a5d974f1c37cceb77b719851c SHA512 a161664f124f906be32709f66702f8f780e6d52e558ea45e71ec60a959c9435ff68477ee65a0a9f6c0051d5592f5044fb3b410cf3cd3ae5a8a323789b01be258
DIST bash-5.3.tar.gz 11355854 BLAKE2B 82d1b54322bbd1e8c2a93380f1b2888a42a1d7186e504f41cee705a0fdd41463d8f20baa1755051e1396192f8ebd089524767d933a9e0b5fb76f2588601539bb SHA512 426702c8b0fb9e0c9956259973ce5b657890fd47f4f807a64febf20077bb48d0b91474ed6e843d2ef277186b46c5fffa79b808da9b48d4ec027d5e2de1b28ed8
DIST bash-5.3.tar.gz.sig 95 BLAKE2B 2fb04e4f699fdee6e583581821cf9a5fa435a00febf7893a344371f11ccb964545386c98dfb2d8f5d0efc74aafe9d491b544e90ae4716bdc286ac48d942430f0 SHA512 c77c0898f03e80a042574a486686cc296b96426f6cdb7a6d2376ecd5182ba03477bfcbd95ea3db499c11866d3f4ae99012a37662ccb6f83dfd6b59f671349dc7
DIST bash-5.4_alpha_pre20250918-cf8a2518c8b94f75b330d398f5daa0ee21417e1b.tar.gz 16611222 BLAKE2B 4c6f4713da5f1b103176980b5def4c8643ca43b2c97faf3cab61f64baf562c3871bb0f5843164de617eb4f9dcab5c5a11ddd1f31e8614ddc5ff00c41893c4ef7 SHA512 2d0b90277c6e9130064d712c6167e5a2871b0485251cca746a57055e08626b9a11be0cb134f082446ee8db82043eb1eb7f8b20fa58e8cdc859638f50cb16d56d
DIST bash-5.4_alpha_pre20251001-4f536430e45d847d6945133690312a8e94762254.tar.gz 16561642 BLAKE2B 8d33d6916e9590d1ce842621318de7c11c6b5994312c07aabff289714723bce4a58f395f38e76ebad83eb65693fcd90c9cc844e79e3c6762ce582ab60a6c2d30 SHA512 b83d6ef0972dbab6ad050a5c6a5d2a349640c706efdedd1ed37068f04d7289a93c225bb45cc96fb8f164239cd3786621a7089dc887dba1abd6314ab4679cab26
DIST bash-5.4_alpha_pre20251007-25c6aa5b230167c6471898539c46dd2891d891a5.tar.gz 16566456 BLAKE2B 3623eaf45fa81666f2e5c7e8d38f89a24f95f1e697c8e8c7f728ef7a867563bc2880b10efcb8365bcc3e1352eaec153bffa79e49a79d8a09780d6079434c0ae7 SHA512 1d98f20baa6af53f08a15606f398d4546b8e16946f0621d8d96fb964adea2f8ace7b474d83e6997ce6473b807d6d30a47dd3492cd3bef7f6be8ba669784e4b67
DIST bash-5.4_alpha_pre20251017-6edfd0bf647cac5c3af3c15aabf49e27528ddf78.tar.gz 16570801 BLAKE2B 29c7f54cac6176d77b1465ed2f5cedfa05418e9d6b3cac8d90d0086571f09c9e7783f6ea6cc20bcd550b677bba161eb9654f463861077d683b97d86781369976 SHA512 2e7d2be1406ba2595c1ea534e1d63a3fd83e700df2037bf629a7455ee2f5c70b4f795dfe428087928ea38fd718fdada56a9aef6ec6fe81778c6d0a37b9fc66b7
DIST bash-5.4_alpha_pre20251023-403b32faf6a5b31ed58a42d1ff696fb8d3d7d5b9.tar.gz 16571919 BLAKE2B 286c0af611ac80122770370b53e2eaab3c3650411b9b72dadff69c7ae8a7859c37e1fddb357978a008777464b90bfedc3012fddc22c704a43ab1b61dcae605eb SHA512 773dca859277fc952f18fb057bca2839870942b895b46ada7a5f4125c0f33a502ff6cb96468e0aabb7cbe8634d6ae8098dc6a2fda24aef0a362769f56ec77525
DIST bash-5.4_alpha_pre20251027-c299f535be51179b1e0c989ad9ba4365e182ec28.tar.gz 16575720 BLAKE2B d3bc83b5ad252f84037d9639b1eaee13e56a006f2c0fe4b4bc00c662f05067965d8f26dca886137947f80bd923491fb5feaebb992e1f7515b7298715237b35dc SHA512 52698edc1d70029c8212a23457b5384942614e05c225cf66cea34290aacaf2e85f07ca4106f2ce242dff84d89ed45051f79cb4646cb2a22c4f74513f62c6393d
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

@ -75,7 +75,7 @@ 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"
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"

View File

@ -75,7 +75,7 @@ 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"
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"

View File

@ -21,7 +21,7 @@ case ${PV} in
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT="cf8a2518c8b94f75b330d398f5daa0ee21417e1b"
BASH_COMMIT="6edfd0bf647cac5c3af3c15aabf49e27528ddf78"
fi
;;
*_p*)
@ -78,6 +78,9 @@ 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"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
@ -272,7 +275,9 @@ src_compile() {
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die

View File

@ -21,7 +21,7 @@ case ${PV} in
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT="4f536430e45d847d6945133690312a8e94762254"
BASH_COMMIT="403b32faf6a5b31ed58a42d1ff696fb8d3d7d5b9"
fi
;;
*_p*)
@ -78,6 +78,9 @@ 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"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
@ -272,7 +275,9 @@ src_compile() {
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die

View File

@ -21,7 +21,7 @@ case ${PV} in
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
if [[ ${PV} =~ _pre[0-9]{8}$ ]]; then
BASH_COMMIT="25c6aa5b230167c6471898539c46dd2891d891a5"
BASH_COMMIT="c299f535be51179b1e0c989ad9ba4365e182ec28"
fi
;;
*_p*)
@ -78,6 +78,9 @@ 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"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
@ -272,7 +275,9 @@ src_compile() {
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die

View File

@ -78,6 +78,9 @@ 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"
# As of 5.4_alpha_pre20251016, bash tests finally exit non-0 on failure.
# The differences look harmless but need investigation and fixing.
RESTRICT="test"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
@ -272,7 +275,9 @@ src_compile() {
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
# Testsuite isn't expected to pass for bash right now, but it
# also doesn't matter for PGO.
nonfatal emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die

View File

@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
inherit distutils-r1 optfeature readme.gentoo-r1
DESCRIPTION="A plain text human readable/writable document format"

View File

@ -14,6 +14,8 @@ CMAKE_DOCS_VERSION=$(ver_cut 1-2).0
# See bug #784815
CMAKE_DOCS_USEFLAG="+doc"
CMAKE_QA_COMPAT_SKIP=1 # bug #964514; cmake itself is the last pkg we worry about
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
# ... but seems fine as of 3.22.3?
# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.

View File

@ -16,6 +16,8 @@ CMAKE_DOCS_VERSION=4.0.0_rc1
# See bug #784815
CMAKE_DOCS_USEFLAG="+doc"
CMAKE_QA_COMPAT_SKIP=1 # bug #964514; cmake itself is the last pkg we worry about
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
# ... but seems fine as of 3.22.3?
# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.
@ -51,7 +53,7 @@ else
)"
if [[ ${PV} != *_rc* ]] ; 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"
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
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20250904 )"

View File

@ -16,6 +16,8 @@ CMAKE_DOCS_VERSION=4.0.0_rc1
# See bug #784815
CMAKE_DOCS_USEFLAG="+doc"
CMAKE_QA_COMPAT_SKIP=1 # bug #964514; cmake itself is the last pkg we worry about
# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja
# ... but seems fine as of 3.22.3?
# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759.

View File

@ -18,7 +18,7 @@ elif [[ $(ver_cut 3) -ge 90 || $(ver_cut 4) -ge 90 ]] ; then
else
SRC_URI="mirror://gnu/make/${P}.tar.lz"
SRC_URI+=" verify-sig? ( mirror://gnu/make/${P}.tar.lz.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"
fi
LICENSE="GPL-3+"

View File

@ -41,7 +41,7 @@ RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -41,7 +41,7 @@ RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -41,7 +41,7 @@ RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -48,7 +48,7 @@ RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -48,7 +48,7 @@ RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -49,7 +49,7 @@ REQUIRED_USE="test-full? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -52,7 +52,7 @@ REQUIRED_USE="test-full? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -53,7 +53,7 @@ REQUIRED_USE="test-full? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -53,7 +53,7 @@ REQUIRED_USE="test-full? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -52,7 +52,7 @@ REQUIRED_USE="test-full? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
>=dev-libs/gobject-introspection-1.82.0-r2
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]

View File

@ -7,7 +7,7 @@ EAPI=8
# tips & notes.
GUILE_COMPAT=( 2-2 3-0 )
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_COMPAT=( python3_{11..14} )
inherit flag-o-matic guile-single linux-info python-single-r1 strip-linguas toolchain-funcs
export CTARGET=${CTARGET:-${CHOST}}

View File

@ -7,7 +7,7 @@ EAPI=8
# tips & notes.
GUILE_COMPAT=( 2-2 3-0 )
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_COMPAT=( python3_{11..14} )
inherit flag-o-matic guile-single linux-info python-single-r1 strip-linguas toolchain-funcs
export CTARGET=${CTARGET:-${CHOST}}

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

@ -1,2 +1,2 @@
DIST go1.24.7.src.tar.gz 30794506 BLAKE2B 850ffc97c83843c83d4dfb672dbe18c16b6feda5b76b70213241d583b5ef6c2c8d0bf532e15fa58cb4fceaaf1f66b52166d3badfc294ebecd1076ddd9c7a572e SHA512 656bb879244ba888af18b6e609fb2c4bc067b919827b9026c3ee44b3e2d0c7bffde262945de989880066196846b669c215da2e8c5d9adfb8491bb5d52af0d49a
DIST go1.25.1.src.tar.gz 31974863 BLAKE2B a9f0d27a292b8197ed2307bcfe90af0adccaa1e0e8de0d59df5b65f57ac7dd2cbaee1905401f81af994934fa83070e42c24ff6090affe56461198e89457842c7 SHA512 e77ae799a0dcd4ded40a196c3645da5b7e808e417831d2c5441387b0fd0ed5f946b678305294c52fda0a258889225c24c6073bb0973c3531ba4aa107b6afe849
DIST go1.24.9.src.tar.gz 30800154 BLAKE2B 30e5ea7dac441a94bd023e152075651583b697c555da73e1581b6eef3dfdee0f7c30a774b8e9704940af60c43e97c8e8ba89b9e84d672a4805b5c969a4140ee8 SHA512 f553a6bdafa9e59d33756c99f6180dcb7e51762733f300488cdab1d42b918e0fff87fa42d714a6b667e039dd22e1ea14ef5f6e3eb1c9c215ff620d559a5c091a
DIST go1.25.3.src.tar.gz 31980799 BLAKE2B 4119c93544545b3e30b93ce4e1e9420447f7c9f8c68f9ef9debc8359028225e875e976aad91e390e3f0c7e5747d68d1e070280bd8376a56bd83c1894d68e6427 SHA512 91d32bbff864c06b5ee7b914d3d95c59462352a4c395adba85eaab72704a8aa4d19ac2a361ed64774dce3c8e01a8d4feadf1a788814f6d7b4072a3bdfefbb3b4

View File

@ -0,0 +1,86 @@
From e02a9d02d0181394e243cbc3b356e86896a78e2c Mon Sep 17 00:00:00 2001
From: Roland Shoemaker <roland@golang.org>
Date: Wed, 08 Oct 2025 17:13:12 -0700
Subject: [PATCH] [release-branch.go1.24] net/url: allow IP-literals with IPv4-mapped IPv6 addresses
The security fix we applied in CL709857 was overly broad. It applied
rules from RFC 2732, which disallowed IPv4-mapped IPv6 addresses, but
these were later allowed in RFC 3986, which is the canonical URI syntax
RFC.
Revert the portion of CL709857 which restricted IPv4-mapped addresses,
and update the related tests.
Updates #75815
Fixes #75831
Change-Id: I3192f2275ad5c386f5c15006a6716bdb5282919d
Reviewed-on: https://go-review.googlesource.com/c/go/+/710375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ethan Lee <ethanalee@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
(cherry picked from commit 9db7e30bb42eed9912f5e7e9e3959f3b38879d5b)
---
diff --git a/src/net/url/url.go b/src/net/url/url.go
index c686239..1d9c1cd 100644
--- a/src/net/url/url.go
+++ b/src/net/url/url.go
@@ -670,13 +670,13 @@
// Per RFC 3986, only a host identified by a valid
// IPv6 address can be enclosed by square brackets.
- // This excludes any IPv4 or IPv4-mapped addresses.
+ // This excludes any IPv4, but notably not IPv4-mapped addresses.
addr, err := netip.ParseAddr(unescapedHostname)
if err != nil {
return "", fmt.Errorf("invalid host: %w", err)
}
- if addr.Is4() || addr.Is4In6() {
- return "", errors.New("invalid IPv6 host")
+ if addr.Is4() {
+ return "", errors.New("invalid IP-literal")
}
return "[" + unescapedHostname + "]" + unescapedColonPort, nil
} else if i := strings.LastIndex(host, ":"); i != -1 {
diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go
index 3206558..6084fac 100644
--- a/src/net/url/url_test.go
+++ b/src/net/url/url_test.go
@@ -726,7 +726,7 @@
{"https://[2001:db8::1]/path", true}, // compressed IPv6 address with path
{"https://[fe80::1%25eth0]/path?query=1", true}, // link-local with zone, path, and query
- {"https://[::ffff:192.0.2.1]", false},
+ {"https://[::ffff:192.0.2.1]", true},
{"https://[:1] ", false},
{"https://[1:2:3:4:5:6:7:8:9]", false},
{"https://[1::1::1]", false},
@@ -1672,16 +1672,17 @@
{"cache_object:foo/bar", true},
{"cache_object/:foo/bar", false},
- {"http://[192.168.0.1]/", true}, // IPv4 in brackets
- {"http://[192.168.0.1]:8080/", true}, // IPv4 in brackets with port
- {"http://[::ffff:192.168.0.1]/", true}, // IPv4-mapped IPv6 in brackets
- {"http://[::ffff:192.168.0.1]:8080/", true}, // IPv4-mapped IPv6 in brackets with port
- {"http://[::ffff:c0a8:1]/", true}, // IPv4-mapped IPv6 in brackets (hex)
- {"http://[not-an-ip]/", true}, // invalid IP string in brackets
- {"http://[fe80::1%foo]/", true}, // invalid zone format in brackets
- {"http://[fe80::1", true}, // missing closing bracket
- {"http://fe80::1]/", true}, // missing opening bracket
- {"http://[test.com]/", true}, // domain name in brackets
+ {"http://[192.168.0.1]/", true}, // IPv4 in brackets
+ {"http://[192.168.0.1]:8080/", true}, // IPv4 in brackets with port
+ {"http://[::ffff:192.168.0.1]/", false}, // IPv4-mapped IPv6 in brackets
+ {"http://[::ffff:192.168.0.1000]/", true}, // Out of range IPv4-mapped IPv6 in brackets
+ {"http://[::ffff:192.168.0.1]:8080/", false}, // IPv4-mapped IPv6 in brackets with port
+ {"http://[::ffff:c0a8:1]/", false}, // IPv4-mapped IPv6 in brackets (hex)
+ {"http://[not-an-ip]/", true}, // invalid IP string in brackets
+ {"http://[fe80::1%foo]/", true}, // invalid zone format in brackets
+ {"http://[fe80::1", true}, // missing closing bracket
+ {"http://fe80::1]/", true}, // missing opening bracket
+ {"http://[test.com]/", true}, // domain name in brackets
}
for _, tt := range tests {
u, err := Parse(tt.in)

View File

@ -0,0 +1,86 @@
From 83449b7e2f261c94ea46842012c0992a3a714ce5 Mon Sep 17 00:00:00 2001
From: Roland Shoemaker <roland@golang.org>
Date: Wed, 08 Oct 2025 17:13:12 -0700
Subject: [PATCH] [release-branch.go1.25] net/url: allow IP-literals with IPv4-mapped IPv6 addresses
The security fix we applied in CL709857 was overly broad. It applied
rules from RFC 2732, which disallowed IPv4-mapped IPv6 addresses, but
these were later allowed in RFC 3986, which is the canonical URI syntax
RFC.
Revert the portion of CL709857 which restricted IPv4-mapped addresses,
and update the related tests.
Updates #75815
Fixes #75832
Change-Id: I3192f2275ad5c386f5c15006a6716bdb5282919d
Reviewed-on: https://go-review.googlesource.com/c/go/+/710375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ethan Lee <ethanalee@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
(cherry picked from commit 9db7e30bb42eed9912f5e7e9e3959f3b38879d5b)
---
diff --git a/src/net/url/url.go b/src/net/url/url.go
index 40faa7c..1c50e06 100644
--- a/src/net/url/url.go
+++ b/src/net/url/url.go
@@ -673,13 +673,13 @@
// Per RFC 3986, only a host identified by a valid
// IPv6 address can be enclosed by square brackets.
- // This excludes any IPv4 or IPv4-mapped addresses.
+ // This excludes any IPv4, but notably not IPv4-mapped addresses.
addr, err := netip.ParseAddr(unescapedHostname)
if err != nil {
return "", fmt.Errorf("invalid host: %w", err)
}
- if addr.Is4() || addr.Is4In6() {
- return "", errors.New("invalid IPv6 host")
+ if addr.Is4() {
+ return "", errors.New("invalid IP-literal")
}
return "[" + unescapedHostname + "]" + unescapedColonPort, nil
} else if i := strings.LastIndex(host, ":"); i != -1 {
diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go
index 3206558..6084fac 100644
--- a/src/net/url/url_test.go
+++ b/src/net/url/url_test.go
@@ -726,7 +726,7 @@
{"https://[2001:db8::1]/path", true}, // compressed IPv6 address with path
{"https://[fe80::1%25eth0]/path?query=1", true}, // link-local with zone, path, and query
- {"https://[::ffff:192.0.2.1]", false},
+ {"https://[::ffff:192.0.2.1]", true},
{"https://[:1] ", false},
{"https://[1:2:3:4:5:6:7:8:9]", false},
{"https://[1::1::1]", false},
@@ -1672,16 +1672,17 @@
{"cache_object:foo/bar", true},
{"cache_object/:foo/bar", false},
- {"http://[192.168.0.1]/", true}, // IPv4 in brackets
- {"http://[192.168.0.1]:8080/", true}, // IPv4 in brackets with port
- {"http://[::ffff:192.168.0.1]/", true}, // IPv4-mapped IPv6 in brackets
- {"http://[::ffff:192.168.0.1]:8080/", true}, // IPv4-mapped IPv6 in brackets with port
- {"http://[::ffff:c0a8:1]/", true}, // IPv4-mapped IPv6 in brackets (hex)
- {"http://[not-an-ip]/", true}, // invalid IP string in brackets
- {"http://[fe80::1%foo]/", true}, // invalid zone format in brackets
- {"http://[fe80::1", true}, // missing closing bracket
- {"http://fe80::1]/", true}, // missing opening bracket
- {"http://[test.com]/", true}, // domain name in brackets
+ {"http://[192.168.0.1]/", true}, // IPv4 in brackets
+ {"http://[192.168.0.1]:8080/", true}, // IPv4 in brackets with port
+ {"http://[::ffff:192.168.0.1]/", false}, // IPv4-mapped IPv6 in brackets
+ {"http://[::ffff:192.168.0.1000]/", true}, // Out of range IPv4-mapped IPv6 in brackets
+ {"http://[::ffff:192.168.0.1]:8080/", false}, // IPv4-mapped IPv6 in brackets with port
+ {"http://[::ffff:c0a8:1]/", false}, // IPv4-mapped IPv6 in brackets (hex)
+ {"http://[not-an-ip]/", true}, // invalid IP string in brackets
+ {"http://[fe80::1%foo]/", true}, // invalid zone format in brackets
+ {"http://[fe80::1", true}, // missing closing bracket
+ {"http://fe80::1]/", true}, // missing opening bracket
+ {"http://[test.com]/", true}, // domain name in brackets
}
for _, tt := range tests {
u, err := Parse(tt.in)

View File

@ -18,7 +18,7 @@ case ${PV} in
inherit git-r3
;;
*)
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz "
S="${WORKDIR}"/go
KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
@ -67,6 +67,7 @@ go_cross_compile() {
PATCHES=(
"${FILESDIR}"/go-1.24-skip-gdb-tests.patch
"${FILESDIR}"/go-1.24-dont-force-gold-arm.patch
"${FILESDIR}"/go-1.24.9-ipv6-validation.patch # https://go-review.googlesource.com/c/go/+/712142
"${FILESDIR}"/go-never-download-newer-toolchains.patch
)

View File

@ -18,7 +18,7 @@ case ${PV} in
inherit git-r3
;;
*)
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz "
S="${WORKDIR}"/go
KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
@ -68,6 +68,7 @@ PATCHES=(
"${FILESDIR}"/go-1.24-skip-gdb-tests.patch
"${FILESDIR}"/go-1.24-dont-force-gold-arm.patch
"${FILESDIR}"/go-1.25-no-dwarf5.patch
"${FILESDIR}"/go-1.25.3-ipv6-validation.patch # https://go-review.googlesource.com/c/go/+/712240
"${FILESDIR}"/go-never-download-newer-toolchains.patch
)

View File

@ -18,7 +18,7 @@ case ${PV} in
inherit git-r3
;;
*)
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
SRC_URI="https://go.dev/dl/go${MY_PV}.src.tar.gz "
S="${WORKDIR}"/go
# KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
;;
@ -65,6 +65,7 @@ go_cross_compile() {
}
PATCHES=(
"${FILESDIR}"/go-1.24-skip-gdb-tests.patch
"${FILESDIR}"/go-1.24-dont-force-gold-arm.patch
"${FILESDIR}"/go-never-download-newer-toolchains.patch
)

View File

@ -0,0 +1,92 @@
https://github.com/netwide-assembler/nasm/commit/44e89ba9b650b5e1533bca43682e167f51a3511f
From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
Date: Sun, 12 Oct 2025 12:48:32 -0700
Subject: [PATCH] compiler.h: drop the stupid C++-style cast-to-bool hack
The C++-style cast-to-bool hack was broken in concept that it doesn't help the
fundamental problem -- implicit conversions are broken for the
backwards compatibility enum definition -- as well as in
implementation, as it misspelled __STDC_VERSION__ as __STDC_VERSION.
The #ifdef bool test *should* have prevented this problem, but
apparently several compilers do define "bool" in <stdbool.h> even when
it is a keyword, in violation of the C23 spec.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -181,19 +181,10 @@ size_t strlcpy(char *, const char *, size_t);
char * pure_func strrchrnul(const char *, int);
#endif
-#if !defined(__cplusplus) || (__STDC_VERSION >= 202311L)
/* C++ and C23 have bool, false, and true as proper keywords */
+#if !defined(__cplusplus) || (__STDC_VERSION__ >= 202311L)
# ifdef HAVE_STDBOOL_H
-/* If <stdbool.h> exists, include it explicitly to prevent it from
- begin included later, causing the "bool" macro to be defined. */
# include <stdbool.h>
-# ifdef bool
-/* Force bool to be a typedef instead of a macro. What a "clever" hack
- this is... */
- typedef bool /* The macro definition of bool */
-# undef bool
- bool; /* No longer the macro definition */
-# endif
# elif defined(HAVE___BOOL)
typedef _Bool bool;
# define false 0
@@ -201,14 +192,10 @@ char * pure_func strrchrnul(const char *, int);
# else
/* This is a bit dangerous, because casting to this ersatz bool
will not produce the same result as the standard (bool) cast.
- Instead, use the bool() constructor-style macro defined below. */
+ Instead, use the explicit construct !!x instead of relying on
+ implicit conversions or casts. */
typedef enum bool { false, true } bool;
# endif
-/* This amounts to a C++-style conversion cast to bool. This works
- because C ignores an argument-taking macro when used without an
- argument and because bool was redefined as a typedef if it previously
- was defined as a macro (see above.) */
-# define bool(x) ((bool)!!(x))
#endif
/* Create a NULL pointer of the same type as the address of
@@ -321,11 +308,11 @@ static inline void *mempset(void *dst, int c, size_t n)
* less likely to be taken.
*/
#ifdef HAVE___BUILTIN_EXPECT
-# define likely(x) __builtin_expect(bool(x), true)
-# define unlikely(x) __builtin_expect(bool(x), false)
+# define likely(x) __builtin_expect(!!(x), true)
+# define unlikely(x) __builtin_expect(!!(x), false)
#else
-# define likely(x) bool(x)
-# define unlikely(x) bool(x)
+# define likely(x) (!!(x))
+# define unlikely(x) (!!(x))
#endif
#ifdef HAVE___BUILTIN_PREFETCH
https://github.com/netwide-assembler/nasm/commit/746e7c9efa37cec9a44d84a1e96b8c38f385cc1f
From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
Date: Sun, 12 Oct 2025 13:05:55 -0700
Subject: [PATCH] compiler.h: the test for "neither C++ nor C23" still wrong
The test needs to test for neither nor; as it was it tested "(not C++)
or C23" which was not at all what was intended...
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -182,7 +182,7 @@ char * pure_func strrchrnul(const char *, int);
#endif
/* C++ and C23 have bool, false, and true as proper keywords */
-#if !defined(__cplusplus) || (__STDC_VERSION__ >= 202311L)
+#if !defined(__cplusplus) && (__STDC_VERSION__ < 202311L)
# ifdef HAVE_STDBOOL_H
# include <stdbool.h>
# elif defined(HAVE___BOOL)

View File

@ -41,6 +41,9 @@ QA_CONFIG_IMPL_DECL_SKIP=(
__bswap_16
__bswap_32
__bswap_64
# has fallback code to handle this missing on musl
stdc_leading_zeros
)
# [fonts note] doc/psfonts.ph defines ordered list of font preference.
@ -60,6 +63,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-2.15-bsd-cp-doc.patch
"${FILESDIR}"/${P}-musl.patch # merged upstream
)
src_prepare() {

View File

@ -18,18 +18,24 @@ DIST Python-3.13.7.tar.xz 22769492 BLAKE2B 8654588ed12e8cd1d691a1869ed1db0d4b9db
DIST Python-3.13.7.tar.xz.asc 963 BLAKE2B ae8721488c7ce01c9c6fe1b184526044900b39d033b0ba1ac573c742cf99a902b32cfefc9b73af8573667b47c71b8356fced5abf0a4b581ef8d0aff1bbcacf47 SHA512 71cd002c18ebb47861abd3309c8cf38972d3d916cca5595d895ba3940719243c66fa28595c2370a8846d9d1c4b3cb4ac5baeda9e9cf94be30302892d01df5e87
DIST Python-3.13.8.tar.xz 22681576 BLAKE2B 83054e8d26b0f5641ef19b86e3fa692e4474495acf7d38eb1dee654811116def55ed742b60ee64e9e78a1895b74830d6e71bd8758529c70d8d78880e66082d2f SHA512 8569959f24083824f6644b839c6ebd587e67fb74b3c5fed9ef44bfbbba46076e98db33a27218b2d44edd15b3b05ae85e94b71491598cbb871d7d43a9d6fa2b84
DIST Python-3.13.8.tar.xz.asc 963 BLAKE2B 83b334a8a8c456776ad91a52f153808938eddcaf4a34209b94174f8859ddb207a6d57fafb48749cd5578fd9547ca4f20339946c7d89d8d1e26c724b8224bbf25 SHA512 ea5bae3f5a909d16526b614085cd4543153800348dd82ef90945ceed19acbab8db76f7c1279e39d26b9e69608aa0f7cf1eab9a562d00fd1c9badd5b0fafc5c21
DIST Python-3.13.9.tar.xz 22681368 BLAKE2B 8fbf9b9e0dcc480a5bac82d5c18d6fdb630769364c6963d40a86f222a5b77b2b596a743c771e710f4ada9c5dada5b65fcbf2fdf3601179ad7aea4fddb61fbadd SHA512 ffc9b6e545bf5cf8f3b945f85442eb4bd28cca9adb92d8c253f44078ec2e9758f802bf72c48e0d7e503c02b2dc754c58ee913cd3b7d8e8808fac2a0aa4e006a8
DIST Python-3.13.9.tar.xz.asc 963 BLAKE2B 7989940e3dfc62c553016f9d2b9aef447e770d63b2508f287e14495ba3e98326279d2bdb3b96bbc65ff2a859253bc43d8ce5387873842f656a66abef8380a3b7 SHA512 c33fba3a6b22dccc08beb7f13bd61a25a30f609a54da7c8dfd3b3b4a3490a7b24c11f9617a835388f22709fb09375d35febc417cf104a18f5bec3b43ec999e82
DIST Python-3.14.0.tar.xz 23595844 BLAKE2B 0fe495d62819c9066240927ceff022dc36920cfd9aa7f80f09fd82a6baf42fe0ef85aed7087418ad9769504e62dc0592cf9c06a542335d83ab65fc6399b5ac76 SHA512 46e9e205c3a084cba68bf7f267ab2fd0862a05430165e0eb713f2d6b3a1a4452f72f563de5de55caea824be9df56f66dd568f4814941667a9bb0954229772c53
DIST Python-3.14.0.tar.xz.sigstore 5374 BLAKE2B 50ed6dada3a7dfcfeb47e0cc55568c0e2ea01a5710f341d6423bb5b0982897b13a7a7c91d8b7c995499f687b17a6cf432fdcd3338b0ac658d19a8ad032438957 SHA512 147bf060a55b9108efb6f6a7f478c0b4dc1e7b1e215b842fb8adfe1b96bbe8d1b49ad352455e047d694638130f8533e3ea1c3a246e9ed0fde0d08e80113a6c44
DIST Python-3.14.0rc2.tar.xz 23566140 BLAKE2B 6871d31eba6167f2d0b2d098b1582e465b1bb8df90ede41bba57b8dbdcb087ceba7cc047e93e43cf93c3c36d3166f4f99ab4c321566ec64cdc4c0e65c0abd1da SHA512 8021dc8e23239fd9e53fafd1fcaa1108da41ef376ee5b5e9c8dfd74995537131990239cd83de45b8bd5fb52b44c4dc08df1c837f69ce82c5b2d99ddf3ea5ef77
DIST Python-3.14.0rc2.tar.xz.sigstore 4942 BLAKE2B 650404fe155c874f05d114dda6ff47ef90b9ed09f6d40f7a3757a3f0fe4420380cb2e52696dda76badccd86b31117e6f8b906a61881b8f65949d00d692abd959 SHA512 2cce5b68b32f9f0f400e5c2d571ad9ce479cff904690ddd454ea69b612cd8c5c003f632f8866a220be46e5e56b92a1dfb12c4e12b381fc7c58710635be5ea715
DIST Python-3.14.0rc3.tar.xz 23585028 BLAKE2B a74f441855f20001e04e576bb85227f73907213c435e7cdebcd3d5f04962181ebf7ab9d8fd7503ed51696fa4d285cd64c74a9c48e13250db6b5b3fce8e20bbb4 SHA512 15c55660fc0168bd0f2348fa6d669352b422a626b151b7a7131eb338459e552a15908874ad872eea0eea48801d5a489647e1643bf00548fd6d9c1aff6fc2044f
DIST Python-3.14.0rc3.tar.xz.sigstore 5278 BLAKE2B f03ca95d4c143547533744e943045f22d493ad5c05f41644c20007792b6b4dd8fe3677a3bbab62b44c05dcf370e4bce109ed3fba1ac094f564c86538d6be8ec4 SHA512 8101d92af5e4fb67f5d7a378d817ffa8982898865986f1ed47ec0009b2203af4f797d60a07eb50453a85833a23349c472e9be4a7e10c2c9ea7f18c30ae45544c
DIST Python-3.15.0a1.tar.xz 23646768 BLAKE2B 63ccff58638d59b8c0061bf0a91c437c441bb2c08c6a76f51d38021c9122ea884474d52643389e10cddfa37644da69c3fd4267358c5dcf0bd86d4a3aaf5786a6 SHA512 5b86de5c935403b46b718d3a151f26c18e6ff5e468ee03c4dd09fd49c31b57560523ea24b5cd2e5283bbc0daf5621c7145d0af4ba67a23671b0652ce5cdad483
DIST Python-3.15.0a1.tar.xz.sigstore 5138 BLAKE2B 58268279c2f1db2e0350a3219300c2a96780df8d9f524db1526e3792c8b2ca94d1088ca8dabca8a583eeca7a0f429f90687643b5fe4c8e20414e68a3b138d969 SHA512 3f77187359658235c016dd8a8f42e87b23e1e1f5fd7c693e612267344e00aa8e464995f197ab8b0d44a0cf1c53311ecdf323ae670e6e7ee0375e01c80a7de37a
DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61
DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed
DIST Python-3.9.23.tar.xz 19659284 BLAKE2B 17c7c9acec1e2f2e9d146b2c35738ea05cf16609f267dd784668ab43bcce7be93e164c14106f9640a060326ebb2b8bd4ee4e58086bdced4ca611d7f96dbb3699 SHA512 ad2eb2eebff286a16ad631339bc0890b0686cf5e669d28905a98f96e9b1af6673d255f36bf19e146aa4de8d012587dc6b3193e903718f9cdba4b97041318f418
DIST Python-3.9.23.tar.xz.asc 833 BLAKE2B a17a88b1997ece75e6447398d20c67e4b1be6d64204e6ac20aa4650e465b0657e7ae8bd497602d2e3c7193b50ecf7d15a1eb996942a05aab117eb25446dab159 SHA512 10187b0df66743308548780f82872d032530f8233f539cf66a2cfbdef1095b760f81f2fcc1759f003cc6f20752be91bdef71e4d821e76a75c0c85df112335698
DIST Python-3.9.24.tar.xz 20176216 BLAKE2B fbd910311debada90533946c64e5749c710d336e915fe4f6cfa17362a490896b53a2289d653a96905652522d6b51d4bb4cbd7e73189aebc817dbf8aaa3a0d38b SHA512 54be1c0805e66aa68b4c71e07a4234176203868ecdb6dfdc1859b04b95858bde26990dd1c5ac1001ce4b55513c05cd63310155c6c6666707e27fb79c159870bb
DIST Python-3.9.24.tar.xz.asc 833 BLAKE2B 683ad8fce00518c2b31f1221d208dc8d57ec20cd2b20442b031964444b38b6e5a1e39e736417b64deb11d6a68cdeb7d17b1ebfd9176275dab64e07b33e87afca SHA512 50459b5a540e5e699ee2dffd8988369c0a15bd00cfa76d8b148ea7ad648205b8454521bd0a30dc39d6497b0ebcb85a037aedd56d8188c854d1d4409859aeead2
DIST Python-3.9.25.tar.xz 20183236 BLAKE2B 01c5af78659324e2a596611c11c0fa982f81faf9b401afe1a96399b58321e39c41e46a932e1e4437f3f2bb2d76d8482e852fc66e6f960a4928f7fc99b62dfb7e SHA512 33fd65952cc3ce5df83825aa32a103935815bdd5a016e5fd9896cafb068a3f89b3a6134458a2694e4f0f4f8a9fbe84739b53116264728b32cde0f03ab210cb19
DIST Python-3.9.25.tar.xz.asc 833 BLAKE2B 3ab506f78b53aed0b3ebbeb620e3763857aafca7756f0f9a594fdc27c2fc8b002e338ae34d54f7e9e5a52fa701d3ab4de44ab4f4328034d77a207f066abafc2e SHA512 83f0a0e558aa89a106bdffeeb9b0fa2685fbd7be5c5954f9176c59c6c7023716207b07239f202b3508cbb98ca34572161955f0bfd3732fdb9265721cd6723dbe
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
DIST python-gentoo-patches-3.10.18.tar.xz 29664 BLAKE2B dd69f7866cebad2536b41056571d74cbd90800062b06612b7509c9ce8f258aef66586f3c6e08f52caaceb7b0a01a52502b9c763b6f7d94caac0e929d9d77219b SHA512 b4cf4ff2d7e5b73e1102acc2183c4da3e734bdbec1c284d1fef8aceba0d49246dcdc954d3e4119521fde1e895bab0754b34b346b736b46ce45aff1afc6d38cef
DIST python-gentoo-patches-3.10.18_p2.tar.xz 40708 BLAKE2B 9fb59889ffec1215511b0a1540d4765366ae850c43ea4fa41cdb65ffbae073b03288cf4071a0451cfc240a0e3a172224121c583ede5baa0784e47509aba83a1f SHA512 58404ae035becbac51031ac1dab84191f2ea342f763f9ac9ca0ded10bc2c3ece4c68d1b49f202c1ccf8faf5c5417f779d56a977da93af27c15aa08754e8bded8
@ -44,11 +50,14 @@ DIST python-gentoo-patches-3.13.4.tar.xz 8912 BLAKE2B e3d9f2a12f801dc75e09c53017
DIST python-gentoo-patches-3.13.5_p1.tar.xz 19756 BLAKE2B ecc594573bbe3a28364d541d5e1014778c342b6e8ecb09e5e9def238ce73d51f178d02ae91bedce3f7aee4a753f2653aee4f4035f238fa60d603baa59ce4e89b SHA512 a60f3cf65b57aa6c85f59dc5f36fbabe1fa19a5225c3e224c99696bb3d1186b54bdad94627638a3a73b66ceb5958b3a5dcb2b83d13357c71ded04c98ad7da0b9
DIST python-gentoo-patches-3.13.7_p1.tar.xz 8944 BLAKE2B f7d7769328fc5cb83f03a8e30602a556be032b71bf068871d22a2ae234fbe865a8f3801300c959d216274025b824fa1d0e5c8cc866c5e6ab38c0b484dc1c1b75 SHA512 a102b66d3b1766261b5bc56ed08c88dc0b34480750177b1d6051bc8b5e9e51df956dc604c5e3509b02fb0dd09d00473f7955652d41cf76299537e18c9bc16389
DIST python-gentoo-patches-3.13.8.tar.xz 8956 BLAKE2B a98766abfe50feb591e3aa7b7964fdcecd43cadff088735152417d6bad5fe6e6055bc41cdfa74332790775c8b333f35e28f381dc557b9c89c7bd4aafb0e846f3 SHA512 9ee23e972a90eb9578c469af255d2559d4aa454a9b8716075baded60ff6e457a96b69cce3427bba8daddbb4a47d388b1316019fd397b13c8db71cf4882e3f3f5
DIST python-gentoo-patches-3.13.9.tar.xz 8952 BLAKE2B 9941b3dd241adcdde64b38bdc3a610e8f3a820b0b4ff03b06ed6d1c26c91af0567cd1e979a8f1d0cfcd05a1568a182ee87944b27ecef22ec139de001e9085624 SHA512 bd12075b144300f1f922175077345fe38a7067282c057fbc256ef646a3e58dca68c029f1449ce4c40d6e7b62444579d6f892f28d73ddc8f859b48636012e3814
DIST python-gentoo-patches-3.14.0.tar.xz 7992 BLAKE2B 8faff97c198abc1549d7c871c82ff649bbdbe18f9cfdad31aa7b6535391fff8e6adc387a120a6298ede8842421bc103cfae27da807e651c9898d4edb192f4fd7 SHA512 7bc425a89d0f3ebbdab4f52ce1300e16512bda4f08968222e8e68f22d3a794fc7d32a00644f4949810ebb41da0ffd4a5a962dcbee86c7660cd4214406ad16b01
DIST python-gentoo-patches-3.14.0b1.tar.xz 5680 BLAKE2B 514b3edc3025e5bf675d371b5ada17dea426856edf1fb6095c2ee400eae95bd4265ef81fe593ae9338e801e7d0a25b1d5ba2d05ca563fd9dd020114b13575746 SHA512 74289e42cf532b54bb1b66a283ec19156f8a36ba38764209c133842314c9efb2ce2ebcba5aa9213bcf7fc0c8a5ca9b6e7adbd5dbfa4397233136d7cd55f53ee7
DIST python-gentoo-patches-3.14.0rc2_p1.tar.xz 7988 BLAKE2B fdcdb5a7319172284f8ad7bc8a1a1ce92f5eee3e6864cf5e7055093b9128928de2a17dce443dd786679ac1f7a33ffa2f7993ea6aa279a904bc9126e2db199f48 SHA512 b30f2b2d5b6fd6263533ebea6545c52e2bb365d035652bbbb215ab828685e2c48585a0544c0fead43c9622c82f51f327e946911d9cbc8717b92e5f75169234ea
DIST python-gentoo-patches-3.14.0rc3.tar.xz 7992 BLAKE2B fd4f0be9f78a6d1f193c62db16f896ee19445f2dd95ffff4f1bca0b55dca0c837dc7a2e4fc07b8633043091e2fc8aa170e6782d66710ce371388896f65b4d68d SHA512 2ab39d1265e51747b2a20fc0dfe8b7391847bace5b5c88561be2c2de6ab2595813d2c84ab32d9df022f8f075f48968b4fd0106140e6eedfee56a6a7201b311b6
DIST python-gentoo-patches-3.15.0a1.tar.xz 3820 BLAKE2B 1ee2ae65f079807d2665b050d4fbd744e71a7db8b14b80f52c32ae0c4593220037f0f7793cb8889fa3cde08b27ca8a2325e578bdf594f0eb1d1fdba90598369c SHA512 ddd00f3d6e22e7757ffe7c55ef7137e8d69377524c4047796594aca73f8d430efef2cb4a6dfe48b6d0fbef3cfae4812ead888ed49270d9b951e872879d2396ab
DIST python-gentoo-patches-3.8.20_p7.tar.xz 54544 BLAKE2B e31fc9fb5e98b62b0f70165670ec58ed4fa932cfc95d5287c249015a3a372fdbf0d1ba08cb98f63c2dc500700edfd6ffea6db670385d2c86a4fdb92ffb991192 SHA512 a9e7e4976be226931a503af2c986da207d060d4ce436af61f5e8427da513639adbed32bb0061963b83fef275a5de91707ab13b7a9abf3a7472ee0e2c5310eda1
DIST python-gentoo-patches-3.9.23.tar.xz 37148 BLAKE2B a7c0514037169b9938b2180ec2dd22063621d532367f6febfa47da43f47534559baab992d9c5257271121af755b8445346d4d92582e7e11b6468a1c359f28bf2 SHA512 73ef00a7aa671016de396c9e1c4bb5f5c1a97dc735739f806d809f987e802ec440370bf4c85468097547284a5d2b476cbffcec3cf219b7cb6fc890d5029eb5bd
DIST python-gentoo-patches-3.9.23_p2.tar.xz 48060 BLAKE2B 2d4ddd3aa48fc52b9f63fbc6020e534234b4183366d121e836544cab93632cd05439205893a11bb505f679946b0690f0962eb0fc029e624cb1c61bc0936127be SHA512 61b3e2c7e8629e1c522c9de8ce9384ee8d1f90ca5ef0f7b902e6315c80196e5f13e0258f8002405a2a752e1c9b5e60f5c3c767c07554d83635fa074bce8a86bd
DIST python-gentoo-patches-3.9.24.tar.xz 36604 BLAKE2B 216cb86380a7655b991ae2b19d6bdb5016a29b5051213d0eb34bc463a7c763c01db982786a69d729c1cfe2be93ced2c35dd0df47861a9a89cc240369a54eb19b SHA512 df2eb206e765f8fa73fe9e9cf69d9660c277f64effdbda01b18ef16a77391b3ff4bffe7d29c45cabf0403496ede0cf5759bfe047b330e8e8d2594fe14336fee1
DIST python-gentoo-patches-3.9.25.tar.xz 36604 BLAKE2B 11d35dcbc8979fe37e27a00dfef9683f0bf40514415be416d322f0509109edeb58a2e0b9218cfa3b3326654f5923d165511d203504ca2b52971ad136f8a454d1 SHA512 234bae116b2a5af00506cb76a0b86dfb8cf1f84ee980a358f3642bb717cff4d6f10388b2a07f12118588a174de4d2fd6ad2e3ab24704f9c85f36cb33d51f0c65

View File

@ -0,0 +1,611 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic linux-info
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
inherit verify-sig
REAL_PV=${PV#0.}
MY_PV=${REAL_PV}
MY_P="Python-${MY_PV%_p*}"
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl test tk valgrind
"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-crypt/libb2
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER%t}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
ewarn "Freethreading build is considered experimental upstream. Using it"
ewarn "could lead to unexpected breakage, including race conditions"
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
ewarn "you can reproduce the problem with dev-lang/python. Instead,"
ewarn "please consider reporting freethreading problems upstream."
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--disable-gil
$(use_with debug assertions)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Fix collision with GIL-enabled build.
rm "${ED}/usr/bin/python${PYVER%t}" || die
mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if use tk; then
# rename to avoid collision with dev-lang/python
mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
else
rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-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
# pydoc
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}

View File

@ -0,0 +1,598 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
VERIFY_SIG_METHOD=sigstore
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic linux-info
inherit multiprocessing pax-utils toolchain-funcs verify-sig
REAL_PV=${PV#0.}
MY_PV=${REAL_PV/_alpha/a}
MY_P="Python-${MY_PV%_p*}"
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
dev-python/ensurepip-wheel
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
tail-call-interp? (
|| (
>=sys-devel/gcc-15:*
>=llvm-core/clang-19:*
)
)
"
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER%t}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
ewarn "Freethreading build is considered experimental upstream. Using it"
ewarn "could lead to unexpected breakage, including race conditions"
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
ewarn "you can reproduce the problem with dev-lang/python. Instead,"
ewarn "please consider reporting freethreading problems upstream."
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
if use tail-call-interp; then
tc-check-min_ver gcc 15
tc-check-min_ver clang 19
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
# Test terminates abruptly which corrupts written profile data
# bug #964023
-x test_pyrepl
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--disable-gil
$(use_with debug assertions)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with tail-call-interp)
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Fix collision with GIL-enabled build.
rm "${ED}/usr/bin/python${PYVER%t}" || die
mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if use tk; then
# rename to avoid collision with dev-lang/python
mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
else
rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
}

View File

@ -0,0 +1,616 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
LLVM_COMPAT=( 18 )
LLVM_OPTIONAL=1
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
inherit verify-sig
MY_PV=${PV}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-crypt/libb2
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
jit? (
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
llvm-core/llvm:${LLVM_SLOT}
')
)
verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 )
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
if use jit; then
ewarn "USE=jit is considered experimental upstream. Using it"
ewarn "could lead to unexpected breakage, including race conditions"
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
ewarn "please consider reporting JIT problems upstream."
fi
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
use jit && llvm-r1_pkg_setup
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--enable-gil
$(use_with debug assertions)
$(use_enable jit experimental-jit)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-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
# pydoc
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}

View File

@ -0,0 +1,603 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
LLVM_COMPAT=( 19 )
LLVM_OPTIONAL=1
VERIFY_SIG_METHOD=sigstore
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic linux-info llvm-r1
inherit multiprocessing pax-utils toolchain-funcs verify-sig
MY_PV=${PV/_alpha/a}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
dev-python/ensurepip-wheel
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
jit? (
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
llvm-core/llvm:${LLVM_SLOT}
')
)
tail-call-interp? (
|| (
>=sys-devel/gcc-15:*
>=llvm-core/clang-19:*
)
)
"
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER%t}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
if use jit; then
ewarn "USE=jit is considered experimental upstream. Using it"
ewarn "could lead to unexpected breakage, including race conditions"
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
ewarn "please consider reporting JIT problems upstream."
fi
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
use jit && llvm-r1_pkg_setup
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
if use tail-call-interp; then
tc-check-min_ver gcc 15
tc-check-min_ver clang 19
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
# Test terminates abruptly which corrupts written profile data
# bug #964023
-x test_pyrepl
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--enable-gil
$(use_with debug assertions)
$(use_enable jit experimental-jit)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with tail-call-interp)
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
}

View File

@ -0,0 +1,566 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit prefix toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth debug +ensurepip examples gdbm +ncurses pgo +readline
+sqlite +ssl test tk valgrind
"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? ( >=sys-libs/readline-4.1:= )
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
app-arch/xz-utils
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
"
PDEPEND="
ensurepip? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
pkg_pretend() {
use test && check-reqs_pkg_pretend
}
pkg_setup() {
use test && check-reqs_pkg_setup
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
rm -r Modules/expat || die
rm -r Modules/_ctypes/libffi* || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# https://bugs.gentoo.org/850151
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
# force the correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs)
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
eautoreconf
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
local disable
use gdbm || disable+=" gdbm"
use ncurses || disable+=" _curses _curses_panel"
use readline || disable+=" readline"
use sqlite || disable+=" _sqlite3"
use ssl || export PYTHON_DISABLE_SSL="1"
use tk || disable+=" _tkinter"
export PYTHON_DISABLE_MODULES="${disable}"
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
powerpc64-*) # big endian
COMMON_TEST_SKIPS+=(
-x test_descr
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
-x test_descr
# bug 931908
-x test_exceptions
)
;;
esac
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_concurrent_futures
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
profile_task_flags+=(
-x test_os
)
;;
hppa*)
profile_task_flags+=(
-x test_descr
# bug 931908
-x test_exceptions
-x test_os
)
;;
powerpc64-*) # big endian
profile_task_flags+=(
# bug 931908
-x test_exceptions
)
;;
riscv*)
profile_task_flags+=(
-x test_statistics
)
;;
esac
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
local -x PROFILE_TASK="${profile_task_flags[*]}"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-ffi
--with-system-libmpdec
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with debug assertions)
$(use_enable pgo optimizations)
$(use_with valgrind)
)
# disable implicit optimization/debugging flags
local -x OPT=
# https://bugs.gentoo.org/700012
if tc-is-lto; then
append-cflags $(test-flags-CC -ffat-lto-objects)
myeconfargs+=(
--with-lto
)
fi
if tc-is-cross-compiler ; then
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910 and bug #864911.
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross.
--without-lto
--disable-optimizations
)
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}"
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross.
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Avoid as many dependencies as possible for the cross build.
cat >> Makefile <<-EOF || die
MODULE_NIS=disabled
MODULE__DBM=disabled
MODULE__GDBM=disabled
MODULE__DBM=disabled
MODULE__SQLITE3=disabled
MODULE__HASHLIB=disabled
MODULE__SSL=disabled
MODULE__CURSES=disabled
MODULE__CURSES_PANEL=disabled
MODULE_READLINE=disabled
MODULE__TKINTER=disabled
MODULE_PYEXPAT=disabled
MODULE_ZLIB=disabled
EOF
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the Python it was pointed to
# immediately.
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
hprefixify setup.py
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
emake DESTDIR="${D}" altinstall
# Remove static library
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use ensurepip; then
rm -r "${libdir}"/ensurepip || die
fi
if ! use sqlite; then
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
}

View File

@ -664,62 +664,43 @@ DIST rust-1.90.0-x86_64-unknown-linux-gnu.tar.xz 202999512 BLAKE2B 2aeaca36f5211
DIST rust-1.90.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c4dcbac0cf9f470eba5a4cc21d32a4ae8814d2e259138935c3abc783ba13a4017ef6eb9902bc5609e0a9bceb0ee880927de17c7e22ff870a79e9844482e3e4ea SHA512 4b030294eb39d7a89756988edc24e8777e10227e41159bb835a16fca9253b60fea20b29bd2c2fa6bd8f3e77164de6aacd589162cb4a240a64cfb38f39c644036
DIST rust-1.90.0-x86_64-unknown-linux-musl.tar.xz 294424352 BLAKE2B e07514b7542b5a2ec20ae08c2e6e55ea1570bcc827b2851c86a3582bd73f69c0b70b18053030033f74a6d3c472fc4cae431a7404b594a7b12a17c01afe8b96a7 SHA512 fffdfd588b20aa518f361f6e4f6c32844d377356d520f8bd1b9f8a7e062be5c2db5e736a2b93619b2d0f182f49eeeaa22075e4692c7683c0ecb4a231522d4cbd
DIST rust-1.90.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 85238bc602c31a435de5f336a0646589259973fbe6c2d737fd6423b4e5721b2448222b6be5f2bb4fe309a60162a8ed66dbdad6dbd338dbddcab12586461965da SHA512 729042345408572f3134702150984182716728cb42df76d8b1f1dc986b579b3bf911a3c64230a61638d3b8d064e28cce3aa0afcbbcd719b49e02b4f3009721b0
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-gnu.tar.xz 172095376 BLAKE2B 9d328275e10cfadbacc495682b09339307693574af9bbfc2b206c55847b0ea9e1843118cae255caafc05d87d49b167f9c1483481b96a169b860ac08fe1debbae SHA512 1fd287fb305309def4e5df8a4e009f6d50cb423d47f4bb51c5ba63dfd91c9d235d4bade9b50a7a775b81c922fad092cdca62e342b9f2a97b8161b078dff1a83c
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c647795becfce97eb628fa5f03d6ed7919c97bd4605043d192b46e32c8c33255db68433a2615d17e5f26205d0e5c986cd95b34cdd83826bf6916b64c4b8b1c1 SHA512 9aa0f5fe204801b1ee413209068d9702196ae119e1d8bfb57a3d5b458cba8be371e370a9e57a254d23cc4ef61d89db7fd5ff1721e69d31d06ddc4faf76d72326
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-musl.tar.xz 253053588 BLAKE2B 08fa0f52fbbbdf8a658e5f86062c3590977424af505f0edd32cc1477b6acfad5aea516b434a7f0af240591575f9ea58908f331c9e80fc53eab9fc92566c944da SHA512 2e1dd7cd752caea77d65ea2a2532365d06b4f3dde4fb667ca99e95f65cd9a9dbb01334cb68b538f702c3fc275fe97ccbe6f0e8fe7d6b3b2595a2fe325e49ac19
DIST rust-1.91.0_beta20250928-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 18b462a6b075c0dcd2b675554f677319c70e1467222cc336bf2b6e1c8d58269407943e20f7f28b9365b0d8f0a491f9938dea636af580aa63a85cf8b1a8d7ce5d SHA512 707dadd60adb97a95e944a4b645380750e63957892f310eb0037edd3e99f3c4359c5f0353b9da0cc807384fc2addb83a9cceffe859d9469ace964e0e465ef0bb
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabi.tar.xz 236628464 BLAKE2B fc6ee14abf174c02bb23f954fe7486e9834bf3a9ddf043c044d9f4f7e9d26c171b906ab901be4b773e0e751294e6123cc563f03f1519fe4e7a3c6b6d339cb89b SHA512 31f5c8c2e7b82538d17f3d0db4d32ee46321d4ef5044146846740039d3bdfc8c72c5b4ae5df43daeb0fb89c7dc6317e9053fd83eacb4fb47600204a8a5c7d3fc
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 94ab04b4da8615663658341183496321f9417b75fb3968a025a0add46ce15739821ebe41313d803622656bd9ce47012e11c18a1ac0aa6e50495a76f39d48a600 SHA512 ab5e7cf268f4df4ab77afbbc5624fd261bc5775a97d667fc93b7d3fdd976a43bc6d3d70653aae01ec44b2abcbcd14dc689cd99894f203696e1047bf1195b86aa
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabihf.tar.xz 237170812 BLAKE2B d239947b16bf9330c3fec200db9dda8ae030842256bcb3d3ef95814c0786495e679cfc3a9eeda0a8d7be63fd3b38508773b42b8c35862e8738e01bdaff8c9815 SHA512 d77f57fc1e473977b5688c4a32ea8990a85d91a3ae06e98abed2cd940d974fc2b564e971f9e3c0e57ef97c4b8d25ceef560968a36f8b3d8759baa8b4fc038b30
DIST rust-1.91.0_beta20250928-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7cad77cd70c514cc7c128eb0780be1cd16311fe3215c14850c679d9aa3fbbea067f6acf9eed4ff53822386c0e2876009de4805aa7a9e89afc43434e7b15970b3 SHA512 e54e2dd1a34091d8da89c38e254f0e7eb0ab6c22c1530637fe41c033a76e2dae52f3b1b82d373c467812c79dea63331f6175009025d1d78b57a9ab9dffdb1992
DIST rust-1.91.0_beta20250928-armv7-unknown-linux-gnueabihf.tar.xz 244114520 BLAKE2B 4f04f4018d00fa9dddd4e903ef1fc5c2a93696bbcefc79e441e2a0839123424394b63c460d1a81e00194b451fde20f03753f0885af597e09674f02ffdc28d777 SHA512 5f72078cd7dcad95f0d1d5493217e094c7199a440a7cf1fd982be3b57b8a94f5d7b69caa32f00c4c5160f358843fd8e0cd2df774c5aa958dcff61b5e61f78cfe
DIST rust-1.91.0_beta20250928-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B b856d0298b55498e1dd9122c690437cd5f2d6e618ebc96f7ee6ffa015e038bca54ee34165744f8f4b7c0aaf87db95e0ff1750796e53f072276eb69ca0f371229 SHA512 6091c3cfd481e34f1abc334c26c3fc7e6976a58749fc4218111ba4ec9b4dfd262fec1ccfd8edc294b9b9f5c485015d16f5c827525dedbff6e362a59c92ecad0e
DIST rust-1.91.0_beta20250928-i686-unknown-linux-gnu.tar.xz 273860868 BLAKE2B 5be2d6233503271a032f2d7a2eb6dd8906317e18dea0b47a88caf08efdc0d1410cc728be5fd5b71fbc9d7498e7a765fd23d4f16f3b9f573bce820d60d610c2bc SHA512 f609dd8d425a4bd52d3b3251b26e298df7c2ef70237d13e64dcb8a76d8e58f3bc95722325b8a9673346a233369cb0342acc7070251d431f79850f33ab9b2db42
DIST rust-1.91.0_beta20250928-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b4acda03e93a3e712fa57e7ab20fcc56f38cbf7e5eaf4da5e18091f7ab02a32cec8d03d30d002ad7bd12b03dde12c8368739891dd559be40fa0bf87f0045d492 SHA512 06cd861bbd1603cec784af313e2da2571b9918f8f234aeee8aa9a6e2276acb6c35fa15d8db0941fc501f799869dab49014ddc9b7a9c591b445001f160649ad3b
DIST rust-1.91.0_beta20250928-loongarch64-unknown-linux-gnu.tar.xz 270049484 BLAKE2B 9499b1df9c2b7242a993a8d9090cb62304db0c34c5800e1deb3543dd5866821e58644e4ba074bfaea79c7dc06fcb08acf2858c47af61ec8d0b7bdea165a14e53 SHA512 fd785b373e4fdc8b43b47a0811fce7a84fc234f6669170bdcd2bc53f4dbfefbed532fb3af9681437698a5095bcb4207460610751f0c8d547e866ba1835a72d9b
DIST rust-1.91.0_beta20250928-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 81608c9851e03a5018cfff678f68f139500728b3763443c26964e6d4c344d1be5c310991e2a432b9f3864370872f0b9c62ba37f2c37a12dbe11feb4dd2643012 SHA512 8604dd3a3a85f94a2529d54715b8b263a6abbc19b7a6f58090b02712fe79a5e409ae4f972acfbe70fd573e39da3fece160188a90efb9c60c14c144d6e2ad9017
DIST rust-1.91.0_beta20250928-powerpc-unknown-linux-gnu.tar.xz 262935108 BLAKE2B e8de89b16da5b9aa52a22cb77d3785e9ebccaf521ac443b9ed9a2985dfc362505ed29117eff5a9a74571a2e8a9332900fd930183dda94a721068cf28a81e7d97 SHA512 805f8311a4acfbaac019a4e1fd59545e0c30c76a26049332ab77e4af10f363b0af8e92fbf0ec7bda325f93bdabe3291d54a9ec448454d67bac85ad4557a11f71
DIST rust-1.91.0_beta20250928-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6b399ba4e1013a8cafbf3dd91702ac33a8cc14ccc7a03cdab8e187f42646b4abf2fb88c5436619511bed12ef97a9584241e5f5d4425ddd74a7e0a00e8ea17507 SHA512 333edc84f2484b8185b126da68b4f883086e3842b56c9cc385ffa642e112262cb273d9c829c74a03f0649a41c806540971536cc92ce49fd5a3aedaf6ef2a268e
DIST rust-1.91.0_beta20250928-powerpc64-unknown-linux-gnu.tar.xz 261871320 BLAKE2B 47cce41a6ba2a233ecf1abcdeda799507f8195b57cbc686cfb467539b62960d220135a36c5b185835515d3d64f332489b39f5c05c21c4265183dd8425026a3b7 SHA512 f7a03f9deea8996a25663073b6f7035d9c8ef60f7528c139994bc14a1055d4fbf8d2a900d80bfdea7e1be0bd281e39fca4a863fc45f27ed23918247f79d6d45a
DIST rust-1.91.0_beta20250928-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10d1e3e88dfce122284992ba2d94f8dedd0e5b1979b0ec8ec90d09a615dcb2a05287e4069f8c13801c490ebc26de4f25d74cc63d91911ac6fd0b055952e3ef71 SHA512 e8eec3b36b6b1bec852786f5a4d7976461b81b093c63248dc4faa994e5c263f007cbabda59a898b9d097bd756856434f4e6afe0a94cf56281f4963f4ab781b57
DIST rust-1.91.0_beta20250928-powerpc64le-unknown-linux-gnu.tar.xz 283662436 BLAKE2B 4990cc15f7085b1aa326004b2bb0e81c7501dfe99cc2816a1b1f051ac682dd3ae27c72f55da06062ec55a87a1cd13dac65dd27b438443fa22895359705d35e04 SHA512 4658cadfcc990088b0c42f85d9fe4051c7581c03b72e5d849558d74e1ae746e101e6243737f4b9686b3b501adf05da199b798323f163e9a6c3cb8b3f631706e3
DIST rust-1.91.0_beta20250928-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e694b6bbea80e15f5989ac6f6e85699d2b6f285bc7c60d2172e8c554c9d414f1871c9d0446d4063e34a0e0d4f376dc5a74c373520cc3ecb847acdd1aad2c992d SHA512 853030df7476125cf4b33129266018a2a4006dc31cc5707805a569b019381c7bd735f83a3478b259181cc5d5da1568e95c836f4f2df715b2bf669116d700e536
DIST rust-1.91.0_beta20250928-riscv64gc-unknown-linux-gnu.tar.xz 259277484 BLAKE2B 302863ba3bc95950b117c747a74cabc5791cbdeffdb23b8703c1e5a4cf68d0d5cc22212d7669c8af0b8459272f4105004b7b1cb785ff37557d856a6e2c17b763 SHA512 aa510f0494b0d9512493ceab1c1552ae2e2cbecf6155c2ebe0c6ab20fd7b8581b720d4a6c720431ac2a3ff0493d83fb55f1cb46b3256c112ced9b6ba5f31ac1b
DIST rust-1.91.0_beta20250928-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b74230bc6956193e3b7016a1dd74c7263b1e3d271bdd6180ca87e5bb27ef1aa12149cff9666acd974f325cf630fb6b9a4faf4714e8424c6286e4987e508d4d01 SHA512 eafec3f4ddec5cb489a76a9c02ea2579885748e28807c5faddcd43411aef86475a3b53f998e64e2232800b25e004d27868de23c802499f7a0b50895f6c211486
DIST rust-1.91.0_beta20250928-s390x-unknown-linux-gnu.tar.xz 247379756 BLAKE2B 4b62291f0645750b601c5b10f892d8c2ec30f223c9a9bbaf4f3d6498911da4c109e8020a9536c0a85b73afa80fe9eb40368d85ed453c3395fc64d0bafc1533c5 SHA512 078a94df9d2187af8635e73081387de551bcc2bad5d6b4449825b92b87a4a331822ee7029e5c27f7b5618fd839e920e6763c8bc267e49c7ff24bd73e1d5fe48d
DIST rust-1.91.0_beta20250928-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c282c7f79c5396ae9e419468fd88bf094246c69678f2a6c6a65ff9cb73cb4c21190ed794dfb3ea0482c7986d515ba9f5d417354d5803e9fba473ca5b7837933 SHA512 37644c5cf4aad7430d048f36a8cac0a042f461757c89d59cda5f80a3eb84ff84eeab5efcbf806ca715036403299416dbf95f774642ef57888e95159db73cfbfb
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-gnu.tar.xz 207672796 BLAKE2B 3a1530ecb26dd8b278fdf3541ae43ceeda5ab8f64d2df5a057c4d487c1d9886bea1798db74d8da6a3d4b5908b593173ba0a7c80ab66b685c98da634f587e54da SHA512 0650169048f5e2ba845b5fde0a061244dcc78bd3f50688429c096bb13b746199baea6428335fb352f2eb94206cfe288b0f47864b35e8b173ac24d0815e3d8d7e
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0cca15af7dd687338b4bf1c3466d3361516a9a3a75d0101a4b2668f3b9b3b7ab495138c6b93160f10f1362d4ef8392c05d0a32c793f817686abc6db9f3de07ed SHA512 7bfca67933a63fc2802c9b000a4d986d0b87d3f075fc5fa7ab71f3cc9994e0d8625c8d88c95c8a7ed328c4cdfb9fb959955d4988c097163e7abb336b4ce3d6c6
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-musl.tar.xz 303415480 BLAKE2B a8bad917244cf6641d5ede5e41cefc262e7edb8cf6cb2498c63d2af1b93b08286c86cc0e39928c9061d6ae21e344d91a2f569f61a7464981929883f2ac21ee17 SHA512 676ad4f6ed23dc5152a0d19f522d36d65d70d6d43adf5ef6a622f77f69c2fd6074988a3b58405eafc06d6004eb56cf49638a23ac10db53adc18fd20ea3f3c3e0
DIST rust-1.91.0_beta20250928-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b54b7007ae859d6a096c9bb927d4cfef976874a426b74ece4f147a6914484fd21beb30cef71736ca38260d0d551cd00a45e936cce27fddf191b958770ac91f31 SHA512 3c796d3e4e0c13fafca3693e9a0c6ab3dc76fcb464b6157147ef5af05152c9d8620d89be5ca7a0a2815d74633fd40ff496ef602b4deb0d38d85bd07d8a497207
DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-gnu.tar.xz 169413468 BLAKE2B 5f15fb75cc40be2389da96f77c78d59f61ec966c5b5747b4363bb638661d88f8944e6adc42f64e42a1f56f9022a32fbdeb446bf6fcc92bd455c72c256ba9ce5f SHA512 cb96e3760da1138e67d11023d0bd45c3d8e9f6fcf6097244e0e3dffe8ffc606dc907000799db590c4686a62341a71ae5f144602e558378d1cd7db18b0ab5a85b
DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 467955d95c435bdf02c38a087431abcf3fd2a7ae53d452f7f8f47c0a62206fbdf60ad6ebb674d4a33ccc82dca179ef0156ad66fe6e7229df0ad0b742105f2a49 SHA512 fff55a39cc3c9a0d3e8f59004163d27ea74d4a80ebc2f26851c73ad2bc67f97153258be79a5b7e613d1aecca8064de9c58ab56dbb29372d327af48c162f39fb3
DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-musl.tar.xz 244357468 BLAKE2B 5218537948b4ab12005382058ff2d506190bec936a08db7ae74ca7aa525cbbff863dc468ab13037b6839abb82306593825a4aad0517fa5302a36adfdfe04aa1e SHA512 54fbefb26bfaf891b1181abde38f350b48b19b984467e9cdbc4096451b51145953675fdda1fff0749498dddd19583cb1525f38148707d02d6daccb2af4433244
DIST rust-1.91.0_beta20251009-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B cb68322a4c9a7a61c86c4086eec75f6835b7e35083cb9f4cac021d8a0508fd3fd00ac8c6e854f828fc138826752b9e321a368d83d22ea487cc3e266da1493198 SHA512 b56cc826a981ac07484df73fda4b9f24cff3105fd23442be488a41c933505a432ba967d6b7dd9a086eaace93039fe2fbd0b4273acb333290c4224e81f35cd413
DIST rust-1.91.0_beta20251009-arm-unknown-linux-gnueabi.tar.xz 224676888 BLAKE2B 81a0c429b3891bb8e3729be3e4a33faefdd29cc187e9a197f2be78341085093cea56ddf8a1ff5ead12dc3786b597ccfad8629506bae36e94a4bb501a76d16b72 SHA512 6dbd3fe4b33f66933e6ccd968acacd7849ebf93076e1a05d157055ad537c329849799a8690a05e533b56e00f5a3638cf8fc40bc94db79f8fa9067e920c612be3
DIST rust-1.91.0_beta20251009-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B cabc21e352ece556b2465364d0910950ba7fb84962d22bc4734b0218bb14a117684daa7739e77d62c1127fec6da2078a77ffc96b6307a4baac0cf40bc1814266 SHA512 5e0371b1d52118a9b43c4cee18e699d816efc857da51956bcdcfce119393a9668b75edc7368119b59060fa9cd82c114d7a221de2f4f9de57936bdac08191bad1
DIST rust-1.91.0_beta20251009-arm-unknown-linux-gnueabihf.tar.xz 225164724 BLAKE2B 5926180bbed8d888816714922cae7fe7b51e09860f6693115b6793acff6331ef880bd5c27d0d769a894592d9553760976fbb18a464d0e1312ec8210a0759d1fb SHA512 821dccae3ecd91a4e2a1f5f7edef32fc77fe13b38ada5835773c231fd51c4d507cfce757adf0718f830775822994b337bd94e16a2b04a247fd43a215c0abccd1
DIST rust-1.91.0_beta20251009-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B b54e1b475b3281b1b663f796d026a461de1b516726c2444ae556615b9c782779ccdb90570eff3a110f50fa0313373d083fe9b6024ef7c98b71264567a45fd5a5 SHA512 7608db4a60bd693aaf868759053e409b6ca030a84c80f0da1c996cfd45583d55d5e64d2c265b129e826d4c32b9dc060a72d0353fb42ba98e92d2eca316493049
DIST rust-1.91.0_beta20251009-armv7-unknown-linux-gnueabihf.tar.xz 229700512 BLAKE2B c1fadc832253361736864f2ad44aabf2202ae00f5c2b02053ef982358b1de278deffb95dffc747de63b78ffb417439803a75c8ff6e54cecada9d532294534dec SHA512 1a4be7d5c1efd8077edc0bab9afffb3dea9385cd8adc75d1b89ad0a6f61c4def766ed3838608b9b1e66544e88755ec9c6381650c4e2f41ae396e9b630122bb36
DIST rust-1.91.0_beta20251009-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 18644feb8c130537ee4396148ef8334929414b94b15a22182bbd9855b8902478f35ce7359410344af47ef7f0e6678666bc3d5e96f15f52ef38baa2e15e1d02ab SHA512 0519e3a35a2f89ebbfe90c7a3ab9ebcc3f6cc1c23508e95252559319a66e21fe35e5fb8b5189010dadfa34b1b3fc4b5718c9897b3e211b69bed0cc2d184166cc
DIST rust-1.91.0_beta20251009-i686-unknown-linux-gnu.tar.xz 266811976 BLAKE2B 9891683a80675ac52d49111268378010e83c651530091aa90d9e2d2c0c086d03bc0a203a0fc93b3619f7c0db92a4d2680ed57f639771443da2e09a529d75d946 SHA512 1b0c873f0761fb033ee0fac892340b485730375d46ccc4848ad8c15bff43833d3758385f75a8469067035926d5bcd1af31e97f16339ad8b6e80a2e6d30f2fd04
DIST rust-1.91.0_beta20251009-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d2fecf2db909b6887980a9892ea47865f84c32fd921593f4ce7c8ba5d6224e455222561755feca8be7ef67b1d9e97dc4a9c84b4fd8f69e9ac7a0aefb180444f5 SHA512 f87472e7c849cbf9f52f4f38b78d6691fd0cad5b4c16d9fb2f017b6bee3c4a10da360c15cfaa2ecc5dc4e3132fd68cbc11913c5bf11ee77120bdbcdc0fb7f9bf
DIST rust-1.91.0_beta20251009-loongarch64-unknown-linux-gnu.tar.xz 259844264 BLAKE2B 0d4bd996fbbf1a8615e5ba42da8e3dae3009bc6a671a885abd646769ac4b549b8ea859412bf8ecc6d1b45b782259488b9f5ff4c8531258a25ef56cffc40824d5 SHA512 01966b4271734e973f8cd69f839e98dd04fe6fe9742af2b1225f6df651bcf63259d9b00263a482b8025267ba1c634c74027ed3250a5159c81be0f02b35a264e6
DIST rust-1.91.0_beta20251009-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 62c05db951367bafc8b72339f3eecad40e10a0b1620d2e5ad9eb039b7a45b176b0f2743179e2c2d3d3da893baf17d3dea46174fe0f22ae6cc97c9503c239903b SHA512 cacb5d64be85b0346c185a46cbfc253bfe25ecd85ca62fa123ad76550e7569ce2ad678fa6f36dfae17da5c3d7ada86dc03ae626ba3dcad25bd80db176a644092
DIST rust-1.91.0_beta20251009-powerpc-unknown-linux-gnu.tar.xz 249572892 BLAKE2B b5311cf7c23c7cc85b49638b9a0b99c8c539d86c045deb251d3c9dcd8c064264421111284d0adbdf8537bdc8cf559c536ed17c6366950ddc368750022aa77dbf SHA512 4aa70b7c3a639077eb7724871d9b00bf738cb0106a96bf53b2b0ebea1c907b9e7dfc134fece05d25d6c854a97934c3399a82d50cf0d05e027af00e18fe64b977
DIST rust-1.91.0_beta20251009-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6ca85376fb225ec8d212de45692e2d33c70131a04339957c6f3f4d77ce5bb80b249b514ceb70e12b649c93c3f0ffa689949fb3c069f04cb250cf0641b0313578 SHA512 f66ec732583e1420dc9558cd453f246dd3b84dadc95b0d940127a37d0f383f3518418017fc116532032e2df83f75ad76c534924923418c90b9a600c75905e863
DIST rust-1.91.0_beta20251009-powerpc64-unknown-linux-gnu.tar.xz 251085480 BLAKE2B dfb2ea024e6f27e29441f1b6bb372de194bf4099bee99f11118a12236a1812d7674ae37ca69ddb684534b0bebe98b7f33addcf723fd57f36e0f873b4dfd893df SHA512 e0706c58963ebc27054418cfb7403ed0669f0e02cd3160e5a72160339e69d793025bcc65fa71b3a141109a0e8d4ac2a69c9860e8048d23358fe12fdb188f9682
DIST rust-1.91.0_beta20251009-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ad1d8921e46c18084813df0da595199d023cd1b6a28fb002d8ca185e111295f2372aea82fc808d2e02e3b9ef9005d6c832290efb2129bfa826827065cbd0997a SHA512 86f5da07d0186a0a502b5a4b3dbc9bfe3478acea3aacc42d444023d794e9350bc7160e1cee6117488a8405ac83d58185543277511757c8db76eadf43152549de
DIST rust-1.91.0_beta20251009-powerpc64le-unknown-linux-gnu.tar.xz 269690328 BLAKE2B f7bdb9e5653ffc09d82f20a3507e5eab1bee81d2b2a357d542544e138a18f4068fc3810f21816918550c5c9e74f5776c3de7fab2b1ca6116f40016edc6615ca7 SHA512 bfde7b6fded043bd60413d502ba5aedb1084be983c6f8caf5db65dde7f49ef2777840b290e0f68284b29dac6b5cd8f00ba1cbf55da84160be24828cdade2081a
DIST rust-1.91.0_beta20251009-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 11c91bab0ee1309f4c17d848dc178815ce06ff7bab5bd440d97405ebe9a4594637a52333023f9511b52dde2fc69d9ab06d7cab5a0d55041544f686661a28ca66 SHA512 42e3b07bdebf574d43ccd36b3e6ecce7d53184495d77826315abf92142ab8a2082639c9cf8dfe40e4b0196cfea031c6acb19caea958790b873743ad3be16ac52
DIST rust-1.91.0_beta20251009-riscv64gc-unknown-linux-gnu.tar.xz 248629072 BLAKE2B a01828a36090e3c45d9706d0ba60a383f4eeb013405193aee221e7b2ba6db02cd928edb0f76f6cb99b02aa5c33ad811c09ba4853cde78a41adf34f8b3b54a7a4 SHA512 c2db778110b19dae3a5a6d3d7b0775287396950934ea8326789c6a93f9a6c762e3da49ada711114a5ec1cdadefb4af1dd8e4531c9053837f4b15ae62979d7b2e
DIST rust-1.91.0_beta20251009-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d9cf40c6b96f825ef55a39079451a327607471093c4156e01f798ef772bb130191a6a07edfbdf1ef387ab9fb4f9a6af89c574176ce17519e7953981bcef1dc43 SHA512 c6cf03b4d4f97cd7eed374d21395035111f0ab30f2e9a572ddec8a758fb37fbfbeb5552459259978a860524f692efcec9d02fe1098e9a049d210d48115795573
DIST rust-1.91.0_beta20251009-s390x-unknown-linux-gnu.tar.xz 238057796 BLAKE2B 2ca1c62b69329698a7729c5ff4311f4a53557dedd35a8fb5b60e7a04e21f21a021aaa03d5f33d1c4e3ff7060f7738abc8186f77e284d9b44b1ca69bc7cff3d1e SHA512 0d52ba9318d60992e6e72c67e37990873226245d51e1a3feafc7a7e497847b4d3edf7fcc0abf6734f526086491811f81b539f156b2fc137df69d2db99e98af17
DIST rust-1.91.0_beta20251009-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 31ab9e758e489ecfb7a7d8ed60ef5fed824c511169e608c39c0ff80889b8d91d00efb5ba19baae15e3ffad9d0ea5c9df891ce072a8ee571ac640d172b69a19e6 SHA512 adb05af13250a53fa87bbf8501d6f0260565f3f2123dbf14488986a274954e03234f9366c2a34d0adaa420d69993a9fda2b520b36ca58758405ab86c305bf544
DIST rust-1.91.0_beta20251009-x86_64-unknown-linux-gnu.tar.xz 192137040 BLAKE2B dd613d631add1738d6b2f1801306547c3df27221660b604068e6060917ddc1834efda62db0afe105789bb0f7ac65abddbb27c29a3e7e314763331ea6b28ca00c SHA512 9a06f468793251ad2ee423649801dd34a6157d2e1eceb6a1e1d5587f0b715bcd3d4cb9414046ab7ef2eb82ea5a6fa9f5221bf75000ee0b3677e9a2423a0f7233
DIST rust-1.91.0_beta20251009-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 6187a6d7fc47a750d6b4d975ae725c7ae8efdfb09471fe1596bce380fd29b694fc5033b1c57cfd182928e89585139583a8194c7e194cee4a68c876f6214c5b18 SHA512 56abc040f7cdc0277600bbe596ece010c3665830bf5c81632f0b753f79eb570648b9209cf1a550bebcfbe64dd2e2d9a4eaee9b6f9d2f3405ad2ba2490d97f34a
DIST rust-1.91.0_beta20251009-x86_64-unknown-linux-musl.tar.xz 295109976 BLAKE2B aca3518420e8637278bb46e6ce73bb422724f207f68acbbe549aba67329e16e6a89576a66ac23eae9127bb648d731c457351a072314e3c07fbe4c3343ddbfa5e SHA512 44384a471539cc114cfb8971011ea16d55fb3edf46ad6cb14fc060df14ba8ee98b75a8ce284c3be134743522a922fe3c08d9faef5a7161b2e76de7e6206adede
DIST rust-1.91.0_beta20251009-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 89821eaecc25e4405c32ffda2b5a2471e18b194756f949b76a050fe49b02386aee31961efa235279954ac549fdc4d2f9d885724bb6b95004e3d62647948f8b19 SHA512 c449a2af5739d230f41d556c6a341a58d5c60bd56e654f4e125fb137da75b2ece59832b36e7c86e546d54b4edf997fa979676d85fbdb13fcdd78486ee26880de
DIST rust-1.91.0-aarch64-unknown-linux-gnu.tar.xz 169421368 BLAKE2B 5cf9486f169703e11c1460ea5ab09b90499917a60f18fcf914d4cbe727a9f253431d1e56ce7240205c422d79a51b19d9a22ca246ffd932a2e653e68be169ce9b SHA512 45a34f4211683fa72f04e7f96a611298b757ef05cfef81869900a9698fdddea2995e71dff4159a08d8c412e9a4bd05c5836d60149887be45faf2ac485f73da13
DIST rust-1.91.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 53adaa7ef5349ea28d6456b12f1bdf0332346f7724b37ad08b1fdc7c3bf487688f6e5287f25e1c6765fab7071c5ec74cf445aa43a0efaf2816fa7b4fc4b06c58 SHA512 c01e8150209c753921ae27cb32da1cc34e43a845a8e4b9d3a08ba6f5825b351c1c1121bd8cbfa84306981f24b65f3417c25f204f47946c7cb3f1d98553f80620
DIST rust-1.91.0-aarch64-unknown-linux-musl.tar.xz 245102896 BLAKE2B b9973583093d5d92abbbc006c03bae3dbbf99051f3ab9115887db90bf3efdaa824a22a2018d38096758164257a5c1d9040946981f6dfd3d8ab1e5b7b950b3af0 SHA512 1a082c46f633e12e07f214249c6bbbcebe10d19bf3908f78fc1c66106e1025b2a55b85e0e396163976cbe831761f08507523273d5734cf67e44356a5a482c884
DIST rust-1.91.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B edabb990bc2962f1a078db415b574a099eb56c6097df61af644b3ed3659f77b4a9c21dee68259cd0452bceb0e95382f0ad4e2c12ac8d5620b196bcf19a71b480 SHA512 4074e1d778b9b4684727ca659f27c63134815d8467ebcbf122670e0ffbc68f297c3d25f8795520a32e41c6e09d0c7d6a4878cae47c2909bf537fe3beb1f813cc
DIST rust-1.91.0-arm-unknown-linux-gnueabi.tar.xz 225139772 BLAKE2B 182ee75b1154bf50bd170d2332c59055882c1ca39455596eb190c36f7ccce1c257ed0a314e50b8c5cc074b50f39d686a0a22889cc6bb2b1597875fce7bcdc1a2 SHA512 f350cf523ef418554a3f6e21024380853b91d5ec372f5c2c625817ebc691341e5d46008994c15c28fc8dfb07cc0d55d861f26365c1d2e6de66cbe53df33c9620
DIST rust-1.91.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 70dd6ed821a5590063f9b029b4e0c0a41dc1281accaf6f85525805671bc06e16dea49ac6f1f063e8ad1900133c9f4d3c7753e32119097f44db22d00982f39296 SHA512 b3356c39fd2613db72976a78147affa4f40c6ed4fb016158a4065e15810a6179ac739c20167ced23fbaa23751c92d86d81126f9229c581bbd21ee53af9383956
DIST rust-1.91.0-arm-unknown-linux-gnueabihf.tar.xz 227087716 BLAKE2B a16832f706a27c452389546a680276cbe8b0395dc9e90b077d34fe061bd360dbdefc47e2fcda43c6b372668f7d39ecf8348d99253d908db9c8ef27ef405acc76 SHA512 36171c141ff22fd486b4c472cebac67faa560b0ae28e3b5361aaf76024566808d3f1221c946ed28d14a79c39c024765118d36034b4fe0bf577e0275a4a61ab2c
DIST rust-1.91.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 428a33adc68c03a11ed9d742960744e24b53ec7fde434751034080548777c1d25302d6fab12cd203602abc8fa1e47a49bd474c6b37c2c81fc9fb268ff24de94d SHA512 0bd7797b2a70bc219a0927c4869fc10bfc014ce0e86a3b01b46c1e4125bf223dfacefd81ec4d401fb1e7f4b14e427e200b698642ef6933b493e1fca37b30ec17
DIST rust-1.91.0-armv7-unknown-linux-gnueabihf.tar.xz 229097816 BLAKE2B 3fce2cf704e8cbe438bbd986a2dfc4e9c452c936342782e7911c9879ed98d031fb7cd630069eb8bad50b679911bb76a38c40f045ea724b4a6decca8db8d1e348 SHA512 4c1c0537cad743584bfb5d8dcd5ce688cc9845511d532665d6ce6377da3888e9c432e251fffbf2d3f63202c4b15e8f2bee3953a7d1c38af1ffd31bc5f23c2d06
DIST rust-1.91.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 7206ec7368787a3113f7ebd6eae81b43e3301954b24ef9053348616572cca5d7d6eb07b74fecb27d783e774df99fd3a64a86a2819761e320da86b59b7a0eacdd SHA512 883260c231a3eabdc388aae19a0c984df287409d901593bac110671392853aae8c0e882a8b42c0625404a08469649befeae507f43fc84982a1582cd4eab8c972
DIST rust-1.91.0-i686-unknown-linux-gnu.tar.xz 266687428 BLAKE2B d9622c73ec519cd59e7603b6ed782f0de2b7b16c646463fd413c2666617995f74367257cb2c099f2c55dcb98c30489a66a944b00e44758b2f92b7481329f3165 SHA512 c4930c16ddc62afe9420df3e018b587ffb291e81ae5c8f519616480022131e1ff61fb181bd4723d492bbea5e901d41eee0befd58df6ef2113c08078412829e51
DIST rust-1.91.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0c6ad121c54a969f3cede18323937cc6fb3474fbd3ea62414a318aac4c2ea556091c3cf82fa763c6e80e9378d63f8894fe8f00a6af667f095bcc7d60b855c5fa SHA512 62a4b3509f797c0930773013d536755d45c74c9f5edd4cf518579135f6948eeb6910ee373f0ad90a0733fb3eea07157e4a15703bd51a289690c6330c7b4913bb
DIST rust-1.91.0-loongarch64-unknown-linux-gnu.tar.xz 258895980 BLAKE2B 7f2db5cd33513d66c3a282aca95b578a4622bc5b8f63c5f2800ec0ff75796fb6a1d102acba03fdf425dfcc2143eff81d08d9b09d835005b117f5300287110177 SHA512 0df9cc174510675a0f988a19d68173c43aa0a5521833210c6f30a231be53515e55dac997a5e807199471035f37c1a7412dd36a7e8e475d5a66d5095375758d7a
DIST rust-1.91.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b76e7ec4eebbc4172cd3ee8c200f30f769435fc1a864dec249d88d57717947fa8f4fba18c9ae1dd9cee13775f66453f79d068ff72fb275fc56af7f6617fa1321 SHA512 93849841dc68eee8b9d87564bdcff1b293979bf1152478fa00598596d4af32af58f8a45e768db30dc15f3184f8e0d14fef8b43d9609a004045c9e60dcd900341
DIST rust-1.91.0-mips-unknown-linux-gnu.tar.xz 82068644 BLAKE2B 113346bed72941a084013593a5628f63b7d21361de54d19c063b488df0b8940d170e14888deaab7ba0a9ef87a7b6ee10eb2c851ca90ca6bfda4f903916f7ff65 SHA512 0325aa3f4a0bdfc2a397ef20cb80d12e2d70b43e28065dc49e2f481779244738b49a1c773be96d75ee3ef9a9a5b42a8e8882ac4c54eb065cecca29c74f04c623
DIST rust-1.91.0-mips64-unknown-linux-gnuabi64.tar.xz 82268924 BLAKE2B dc6a614def2d6f5bc021463eace519cae0b77991fb7b012b201ec33c88dc74ca1f45c737dfa51a5a8ea63b659bec1a51ca928b1a1b90abc699d9b798c4bf9956 SHA512 cda61ae42ff3983994068e77dc00c917e6b92e563c271e201935c3b8fec1a78da4d2b93a0ab3ab1fce43a788dd5ba5191b499d2a1f0404cbf3a4486da30077a7
DIST rust-1.91.0-mips64el-unknown-linux-gnuabi64.tar.xz 83945400 BLAKE2B 56fed51cfa0ee090bf3b339e82481c3dcac5d0be7cc788ae96e64a9ee3a3d03a625cf243537247e60a10df6ace180d4dc1ef90c2160997ef0cd4060a0decfd2f SHA512 a631e4e757f58080da7da5fe494450a398dba0a1739bb59baf2dc44fcd908f6a5fb2635c8fc6e610293c8883d0396e4132ce3cd6d7003fcdecb9069ffee1db65
DIST rust-1.91.0-mipsel-unknown-linux-gnu.tar.xz 83858016 BLAKE2B 9d407351ba6305d0c2973e1a86101a403d17865db9ab70add598d5d9dc47c80b37951792a9c8a1b16e521adb922bad8952724646cbb18c7e1ea6c5b6a683b56c SHA512 aabc993e4e8376048bad62cb49c623b360d5ac24d05cb118e9449888b69a2fee4058ae3e0122702d9c86cdeb5d700a590a5a30db5719548c81683abc7514f6f3
DIST rust-1.91.0-powerpc-unknown-linux-gnu.tar.xz 248732612 BLAKE2B 281b858e79eb569611537dda8b5264f2207765fd75e057277c4ff513496822874dfc3e29f106d94a0288a944b1b781a538b8a1aab0906d5a46ca299ad4b06d95 SHA512 ba23d658e5b0fb0cd9c91526ca9c87957b8a2365537bd191ca4cb636c059a2d1eba91c5a2d1a82c4884d93417e945cbfc899ed5bda253434b9095a767877b21b
DIST rust-1.91.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 999ea23ca7fa0bef0f8231685e9a7d841584680a488b9e6c56ac3046f44907212be434c14f4559b8b0a15b420f701dad819f45608033bc4e68ef44c4b4d1e38d SHA512 451cb1f49a5cc00d24829f6e1d23c41e5ea648c6f321cee6c4c80e203f645beb5dd825324e345b39f73436d123d094d0026fc3a414fcbd40fa91159727281c23
DIST rust-1.91.0-powerpc64-unknown-linux-gnu.tar.xz 250058172 BLAKE2B 0186cd91380b0799e72c530a1285a92acc2d9ebec4966d32c8a0bb97185f6dd6d56bed45e77ed0586bec32e1ab135a097c30a08dc5982c4961bd26ef8acfa45d SHA512 1867c7ae4aa4b515281c7b8e547846651f5e05430d8a280510c516f15258a3db6d0579e55c0da8a8895056cb57304c75fcc558c23b761bcf9a81970d57f0ec66
DIST rust-1.91.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e9fdf55b00a04956c1c77e23f3cd436b336454052d7330464dac32625f4dcefb564c4187afcf0e909666d121c811086944c918aa8b32f5af8cea8ef34f680416 SHA512 77600956d2174953bc9df9d7e2125a737544f6d65dc177df823273e1618ea2bea76cd1710cd41442a33660ac29561ec6a922ddf54ccaee2d0c068a18a6d9be9d
DIST rust-1.91.0-powerpc64-unknown-linux-musl.tar.xz 85877520 BLAKE2B 8232c63b6fcf1d2a09686485a5bd9c80aff5a87c5f3d92046504b30cee3a66e316a3aa0aaca5b26f1859fcd01811f7ad1160f9ca61f80a3d9bdf796b033c45ac SHA512 a09106ba6add748f104a4be10d123c41d82d28f11de0f90f2d6af7b717e2482e65abdd9e01a7a9b644ec47e36212dcac9c08c6bd913aec5db4ce8aab0ac8ed0f
DIST rust-1.91.0-powerpc64le-unknown-linux-gnu.tar.xz 270389192 BLAKE2B 022c98947c31f36007c018f5f457b454179fb338bf32e78113ab3b00458adaad3136a8a5c0e2e9f2125262a31f53af2bff64e808e936738679b827d9dcbf5149 SHA512 5809477ea041fcb3e961ba8a0ebf9c71312740e1c979903313f11d182712db2b9742ad7f34e5103cce6c24bbda183d6c49b2615e7e05cdb2412fe4d0ef2762a8
DIST rust-1.91.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7717513fb55569d2700a96bbd62c0ecd49e9880254b5dfafe6194827fe3dda1351593cf4f1423876270d30dc13ad122a6235b3e75a4f688344cb96e3fcd70eb2 SHA512 316a8396da39dbce37701bfacb7c0e122f56911d0cae258b8f60d6f769721314617a1657faf2a9b01f3efcdd4b1d16a776c183df87e1df644fff1a104da4be12
DIST rust-1.91.0-powerpc64le-unknown-linux-musl.tar.xz 268006080 BLAKE2B c83d0bafa2eff817fd25984a80ec64c128c3426324755d93d0add01b14a78845d45dca1c9d39b127dfa11405ad6c4f9368b91da3933cc7d26c9227f565dba990 SHA512 f4ed26d5ea585c686195dbb0d911948816db4ba92ce26eb4bc1112b1649561aa9995b934ec4c7602c7d9b43e1fed62b014e7f6c95eb1d9a0a950cdb5e3ccde92
DIST rust-1.91.0-powerpc64le-unknown-linux-musl.tar.xz.asc 801 BLAKE2B f558974aa6a20e053bb8d53c59ae763e986a6f0bd4bfe8a431f51a108f28e0dc33a9d2e2cecc2c2453f8d3911a832429dab11117923af3e39b82768f11092e10 SHA512 472b83efe99d71ad5b19e754671c4ff7fba5f99ef883402a31308fe0e495921389a4395b2cb33f3492bb3b29defeff1708b41a80480a784907abf1c64087dd2d
DIST rust-1.91.0-riscv64gc-unknown-linux-gnu.tar.xz 248610144 BLAKE2B 7819f3d284eb66e957286418e4bd3eda1de45560534f48195f9b9e436a5651964347b2b78d59cd119a4b61dd1199fffdced8fc32a1ddc9342ad90c1257dfc530 SHA512 bd49412f2e54bdbad0c5e601c11adbe1ba0dd1f594e412a6438352447984e0f17a5e09473d95291a6a173285d7b1e90723027326d4c54890ae46a120a1815c3d
DIST rust-1.91.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 844d4b7ec84e42af98a1fa113bef79d9c7b490e9e8b6f966c799908bf8915a5572c7e418632a2772bb4f90059e3e3005a2e02ee1d07a0041224056ac080cedf4 SHA512 a4033535a497129059c74c77e5bd624024d73ecda0096b094c4f162a215882e4051da3ecc1f7f859ddb763cdead4f1da0d7a6d3733dd7b73c55b7983cfa13ff4
DIST rust-1.91.0-riscv64gc-unknown-linux-musl.tar.xz 90237552 BLAKE2B ed1ba052dc514f6d0b48328496095275c92bd6c0c46bc12863b5e2248912d204ac92d02da5ddd12fdefb989533cb0b1f6f37a148e1b40933db8e0cd52b169734 SHA512 87938cdae1ba5216fd42413da30c218aa07a76f9530c2571d5d14a786234a6090c7d63468122860b18bfa47daf898f2177388a1aa5d1270f260f2e6636132d89
DIST rust-1.91.0-s390x-unknown-linux-gnu.tar.xz 237862320 BLAKE2B 8bd1ef16afad51389d06130d0ee956f0bbb444882cb729d1ce739f3ef5e6f0ad9823a6cf5520bc6bb1f3e568819d553a74fdb5afb47c670d00efdf602ab2b537 SHA512 bf1d379c4c3447ae590b372ae3af4a33756ff55129fa08e71bf1e4d6b1ef4056ac71d8129232aa32acc6a11473889e46faef5e21babb27a66de22344396a4634
DIST rust-1.91.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 479675614690dc64d9b1481c8a7e60055b6df52a2af41c8cc39c3152af9e5f227f35856831d5b44c68322e3161a34ef8f269ac59747490f3fa8c93906abc1fff SHA512 6b1610a1e0b4badf8b2eb88b33101eba9a4b93c565ec1ae797e2380886917c5a7e6d6f962fe4020904149662578ae855ab4867d6e6474076ce43b40416e08748
DIST rust-1.91.0-sparc64-unknown-linux-gnu.tar.xz 80048680 BLAKE2B c38345bcbc99b45722032d8c3b3736c43bc13717a25906c485b5fd4abc031be2b26c8d641608c5df2b75708a5898175b26b7cdfecfa4e088c937a81a9589ccfa SHA512 cbcf71739b2cc7e79aab2099dac9f7ee6828fb035e3811ab9c590d5587b363820ad3a1099175a67d000573b14a4b2cbbd666bf6ba5e5ff3398924b886c89c0f9
DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz 192170744 BLAKE2B a06c63e3c534e7456f155ff1c371525e06a3e679192163cea7f070d8602e146deafe93de430b40a9a9c1f05af841756412ec38dbec6b7a3bb13b2949a04dad15 SHA512 ba305a1b3d9d093a26cb8f19a60fe0a83c77f6739d5f1bd4801da3b12d3df5b3a6cfb19c61e3cfa971d8ea880f70e0209123063bc41115bc5c2285af1615cff8
DIST rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4bfa68287897a1b5916c04a56909aaeaa305cbdc4a9bef377295429221e48451a6f4670929c9d35e80a0d40478352702673bdae4958a924d4124c26e888ff561 SHA512 35e678a3d164b5f198e5aac2ed1c1a6af8fde83b84c84be6e3ce51a7099ae0a3e7d25510b45a1b2d6bb99599cda0f18ceec46883982bdca6ece94eb1e381ed0b
DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz 295368056 BLAKE2B 3057d8cc29bc789bd1c4d9d0779a0b2ef4b26c2278373960558a316061db72a77edf37e330eefe5c3ec66b69cf184fb46a14641162ba6ecf96f909d3ac7db100 SHA512 98a03725e216687be237358b1a6598470e98322af6cf51fc51d7ede23ae58b0107872a7f8ee2e4e69e9531b821be7145a975c86899a97728e809260b35ab7f23
DIST rust-1.91.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B a8fb18793e536aec99626bf3d85890cbbbd8c2ee5e2a2917999543bd3153b026db1072419ad464e35ecc508e3e3fcb9cae450b4f590359589545fe9adbbcc26d SHA512 0c3bce48b1ddc7d97946ad5e27f8dde91dd14743577fe60056f7c6558139bab7d8aec4ce76901abd2633a61eb122bc30595779cea047ff7a714e83fda2921cb9
DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4
DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd
DIST rust-src-1.76.0.tar.xz 2590884 BLAKE2B d1a6215dab34d7b10c3177d2b248f997d3a846388f3442567572880aa5c5bc51b56398f5d4dc32727cee7c9dbef494430d6534a76b66c4ae5ac4fed07266644d SHA512 39d2fe58fae8c8c5a6cb3fb1ef2a1c7548c018fef6ccea531659fdfecd68a4aa77125299d2cbe5b58e500337b4d074928318fa9ebce358af500d0ef27260e3ca
@ -739,5 +720,4 @@ DIST rust-src-1.87.0.tar.xz 3119800 BLAKE2B 6429eb419f17109537a2a5463b0c68f504b3
DIST rust-src-1.88.0.tar.xz 3155272 BLAKE2B bca923d2264337366b8013c45f3a40cbdfc1e1b746775161eaa66a1db653aa4ccb2a55980368ecf9808d6f4885194e2dfbf1f678d0500a43f7b2fcc0f79d27c8 SHA512 6dfe1fc3565927a9ac2ff9821ef3222cca170ff538833e1969ebe662af2cad5257c1ab3d82f5ca10aeaab40f54916a25dd96fd16449cd59e4d104b631911931b
DIST rust-src-1.89.0.tar.xz 3461444 BLAKE2B b1e43def4cc0f47f0e776d383954b339a62b3efa77d5db71180b7b7620a67bd2d2714afe0b08ae26a06d7d8c785eed03f545d91813d074cbe6641e883a2d40dd SHA512 055c09854e47d1bdfc7f393ac6f2783d35cb8cf13100deb227598ad91020f1d91e4cec1658d8e71db3c266dc6e267ab4172dc1007428cb05105dc4aac57bf89d
DIST rust-src-1.90.0.tar.xz 3473408 BLAKE2B 09e9d17af7acb38b99e33874cd4b14ad7e0e15b0580846cc32bc78657432b13091bcbf3fe95494c520bcdbabd5491b9445cb3ce3177fa149d0b89991b67b06e3 SHA512 88dd1a5f1a69ab9e4586fee4a31d7dea51a664ac32b501cab771739b8127eb4ac873d2353e819ef057734522c1bcd64d664bda3d1ff957b1448b4653be766638
DIST rust-src-1.91.0_beta20250928.tar.xz 3509016 BLAKE2B 81417db8497947d67288b1980601127cc9f737b8159e7817626fca7cb7d07fd4287fee14f0b4043c596a67d1d63b1ab9e273b6e1976f27049c86612395ee9255 SHA512 3ddd9987fac3d465b843cc05385ad482e9c18ff2c15dc2dc864fbb4988c2775766db5bec6fc35ed750ce5389d77dd9a56eafbbcb0ecdee293f5defd7e7a5ce45
DIST rust-src-1.91.0_beta20251009.tar.xz 3508592 BLAKE2B 3f629ef1d2da676bb502172ad73313f66effc4d2173ba9591fdbb86e9bfbb2efe35a043fd5c965aa0cfa805906f53678961cb51c7f61573d53201db7caf791f3 SHA512 dacb62bbc2c6ed002ca79fe5ebd6342ae71732e94f0df20b36b77f0d361310bbefbf749c4b8fd25ecf54b4592bc5d63cea730b927278f13978553ae823cff5aa
DIST rust-src-1.91.0.tar.xz 3509292 BLAKE2B b1cf99db4cbd864fda34c2068a19e8b36c99f6bb5c2fa3c22ef7aa006d4c084bd706fff872a7f87a0ded3db3dead5927153183e4425ffd90e51af468a29db48e SHA512 8d7c5a3aa11b42d5b89b38d1167f6be64de49288738e0fd949d1fe9ac3312830301d578a13de2030b45a7c51179b5adb934deb52e1070afa76520944050baa2e

View File

@ -3,7 +3,7 @@
EAPI=8
LLVM_COMPAT=( 20 )
LLVM_COMPAT=( 21 )
LLVM_OPTIONAL="yes"
inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature
@ -22,12 +22,12 @@ elif [[ ${PV} == *beta* ]]; then
else
# curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src"
SRC_URI="$(rust_all_arch_uris "rust-${PV}")
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-09-18/rust-src-${PV}.tar.xz )
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-10-30/rust-src-${PV}.tar.xz )
ppc64? ( elibc_musl? ( !big-endian? (
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
) ) )
"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~s390 ~x86" # ~ppc64 ~riscv ~sparc ~mips
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash
@ -35,7 +35,7 @@ GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/$
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
if false; then #[[ ${PV} != *9999* && ${PV} != *beta* ]]; then
if [[ ${PV} != *9999* && ${PV} != *beta* ]]; then
# Keep this separate to allow easy commenting out if not yet built
SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) "
SRC_URI+=" mips? (
@ -108,8 +108,6 @@ src_unpack() {
curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" ||
die "Failed to fetch nightly revision info"
rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
einfo "Using nightly Rust from: ${rust_bin_url}"
if use rust-src; then
einfo "Using nightly Rust-src from: ${rustc_src_url}"
@ -121,15 +119,23 @@ src_unpack() {
tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball"
fi
einfo "Fetching nightly Rust tarball ..."
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
if use verify-sig; then
einfo "Fetching nightly signature ..."
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
fi
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
local v
for v in $(multilib_get_enabled_abi_pairs); do
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
rust_bin_url=$(grep "xz_url.*rust-nightly-${rust_target}" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
einfo "Using nightly Rust from ${rust_bin_url} for ${rust_target}"
einfo "Fetching nightly Rust tarball for ${rust_target} ..."
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball for ${rust_target}"
if use verify-sig; then
einfo "Fetching nightly signature for ${rust_target} ..."
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature for ${rust_target}"
verify-sig_verify_detached "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" \
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz.asc"
fi
tar -xf "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" || die "Failed to unpack nightly tarball for ${rust_target}"
done
else
# sadly rust-src tarball does not have corresponding .asc file
# so do partial verification
@ -142,8 +148,10 @@ src_unpack() {
fi
default_src_unpack
fi
# We only want to do this for the native ABI. Non-native ABIs are
# handled differently in multilib_src_install.
case ${PV} in
*9999*)
mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
@ -287,10 +295,21 @@ multilib_src_install() {
if multilib_is_native_abi; then
rust_native_abi_install
else
local rust_target
local rust_target version
case ${PV} in
*9999*)
version=nightly
;;
*beta*)
version=beta
;;
*)
version=${PV}
;;
esac
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
dodir "/opt/${P}/lib/rustlib"
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
cp -vr "${WORKDIR}/rust-${version}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
"${ED}/opt/${P}/lib/rustlib" || die
fi

View File

@ -1,320 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_COMPAT=( 20 )
LLVM_OPTIONAL="yes"
inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature
if [[ ${PV} == *9999* ]]; then
# We need to fetch a tarball in src_unpack
PROPERTIES+=" live"
elif [[ ${PV} == *beta* ]]; then
# curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep "xz_url.*rust-src"
betaver=${PV//*beta}
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
RUST_TOOLCHAIN_BASEURL=https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/
SRC_URI="$(rust_all_arch_uris rust-beta rust-${PV})
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/rust-src-beta.tar.xz -> rust-src-${PV}.tar.xz )
"
else
# curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src"
SRC_URI="$(rust_all_arch_uris "rust-${PV}")
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-09-18/rust-src-${PV}.tar.xz )
ppc64? ( elibc_musl? ( !big-endian? (
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
) ) )
"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~s390 ~x86" # ~ppc64 ~riscv ~sparc ~mips
fi
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash
DESCRIPTION="Systems programming language from Mozilla"
HOMEPAGE="https://www.rust-lang.org/"
if false; then #[[ ${PV} != *9999* && ${PV} != *beta* ]]; then
# Keep this separate to allow easy commenting out if not yet built
SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-sparc64-unknown-linux-gnu.tar.xz ) "
SRC_URI+=" mips? (
abi_mips_o32? (
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips-unknown-linux-gnu.tar.xz )
!big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mipsel-unknown-linux-gnu.tar.xz )
)
abi_mips_n64? (
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64-unknown-linux-gnuabi64.tar.xz )
!big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-mips64el-unknown-linux-gnuabi64.tar.xz )
)
)"
SRC_URI+=" riscv? (
elibc_musl? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-riscv64gc-unknown-linux-musl.tar.xz )
)"
SRC_URI+=" ppc64? ( elibc_musl? (
big-endian? ( ${GENTOO_BIN_BASEURI}/rust-${PVR}-powerpc64-unknown-linux-musl.tar.xz )
) )"
fi
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable
IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt"
# net-misc/curl is needed for our own bootstrapped rustc, since cross-compiling bundled curl is not supported
RDEPEND="
>=app-eselect/eselect-rust-20190311
dev-libs/openssl
net-misc/curl
sys-apps/lsb-release
|| (
llvm-runtimes/libgcc
sys-devel/gcc:*
)
!dev-lang/rust:stable
!dev-lang/rust-bin:stable
"
BDEPEND="
prefix? ( dev-util/patchelf )
verify-sig? ( sec-keys/openpgp-keys-rust )
"
[[ ${PV} == *9999* ]] && BDEPEND+=" net-misc/curl"
REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
# stripping rust may break it (at least on x86_64)
# https://github.com/rust-lang/rust/issues/112286
RESTRICT="strip"
QA_PREBUILT="
opt/rust-bin-${SLOT}/bin/.*
opt/rust-bin-${SLOT}/lib/.*.so*
opt/rust-bin-${SLOT}/libexec/.*
opt/rust-bin-${SLOT}/lib/rustlib/.*/bin/.*
opt/rust-bin-${SLOT}/lib/rustlib/.*/lib/.*
"
# An rmeta file is custom binary format that contains the metadata for the crate.
# rmeta files do not support linking, since they do not contain compiled object files.
# so we can safely silence the warning for this QA check.
QA_EXECSTACK="opt/${PN}-${SLOT}/lib/rustlib/*/lib*.rlib:lib.rmeta"
VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/rust.asc"
src_unpack() {
if [[ ${PV} == *9999* ]]; then
# We need to fetch the latest nightly listing and get the apprapriate src_uri for our arch
local rust_bin_url rustc_src_url
# Cut down on webrequests by fetching the nightly toml once
curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" ||
die "Failed to fetch nightly revision info"
rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
einfo "Using nightly Rust from: ${rust_bin_url}"
if use rust-src; then
einfo "Using nightly Rust-src from: ${rustc_src_url}"
# We need to fetch the rust-src tarball
einfo "Fetching nightly rust-src tarball ..."
curl --progress-bar -L "${rustc_src_url}" -o "${WORKDIR}/rust-src-${PV}.tar.xz" ||
die "Failed to fetch nightly rust-src tarball."
# no verify-sig here, just unpack it
tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball"
fi
einfo "Fetching nightly Rust tarball ..."
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
if use verify-sig; then
einfo "Fetching nightly signature ..."
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
fi
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
else
# sadly rust-src tarball does not have corresponding .asc file
# so do partial verification
if use verify-sig; then
for f in ${A}; do
if [[ -f ${DISTDIR}/${f}.asc ]]; then
verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc"
fi
done
fi
default_src_unpack
fi
case ${PV} in
*9999*)
mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
;;
*beta*)
mv "${WORKDIR}/rust-beta-$(rust_abi)" "${S}" || die
;;
*)
mv "${WORKDIR}/rust-${PV}-$(rust_abi)" "${S}" || die
;;
esac
}
patchelf_for_bin() {
local filetype=$(file -b ${1})
if [[ ${filetype} == *ELF*interpreter* ]]; then
einfo "${1}'s interpreter changed"
patchelf ${1} --set-interpreter ${2} || die
elif [[ ${filetype} == *script* ]]; then
hprefixify ${1}
fi
}
rust_native_abi_install() {
pushd "${S}" >/dev/null || die
local std="$(grep 'std' ./components || die "std not found in components")"
local components=( "rustc" "cargo" "${std}" )
use doc && components+=( "rust-docs" )
use clippy && components+=( "clippy-preview" )
use rustfmt && components+=( "rustfmt-preview" )
if use rust-analyzer; then
local analysis="$(grep 'analysis' ./components || die "analysis not found in components")"
components+=( "rust-analyzer-preview" "${analysis}" )
fi
# Rust component 'rust-src' is extracted from separate archive
if use rust-src; then
einfo "Combining rust and rust-src installers"
case ${PV} in
*9999*)
mv -v "${WORKDIR}/rust-src-nightly/rust-src" "${S}" || die
;;
*beta*)
mv -v "${WORKDIR}/rust-src-beta/rust-src" "${S}" || die
;;
*)
mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die
;;
esac
echo rust-src >> ./components || die
components+=( "rust-src" )
fi
edo ./install.sh \
--components="$(IFS=,; echo "${components[*]}")" \
--disable-verify \
--prefix="${ED}/opt/rust-bin-${SLOT}" \
--mandir="${ED}/opt/rust-bin-${SLOT}/man" \
--disable-ldconfig
docompress /opt/${P}/man/
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done
eend $?
fi
local symlinks=(
cargo
rustc
rustdoc
rust-gdb
rust-gdbgui
rust-lldb
)
use clippy && symlinks+=( clippy-driver cargo-clippy )
use rustfmt && symlinks+=( rustfmt cargo-fmt )
use rust-analyzer && symlinks+=( rust-analyzer )
einfo "installing eselect-rust symlinks and paths"
local i
for i in "${symlinks[@]}"; do
# we need realpath on /usr/bin/* symlink return version-appended binary path.
# so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
local ver_i="${i}-bin-${SLOT}"
ln -v "${ED}/opt/rust-bin-${SLOT}/bin/${i}" "${ED}/opt/rust-bin-${SLOT}/bin/${ver_i}" || die
dosym -r "/opt/rust-bin-${SLOT}/bin/${ver_i}" "/usr/bin/${ver_i}"
done
# symlinks to switch components to active rust in eselect
dosym -r "/opt/rust-bin-${SLOT}/lib" "/usr/lib/rust/lib-bin-${SLOT}"
dosym -r "/opt/rust-bin-${SLOT}/man" "/usr/lib/rust/man-bin-${SLOT}"
dosym -r "/opt/rust-bin-${SLOT}/lib/rustlib" "/usr/lib/rustlib-bin-${SLOT}"
dosym -r "/opt/rust-bin-${SLOT}/share/doc/rust" "/usr/share/doc/rust-bin-${SLOT}"
# make all capital underscored variable
local CARGO_TRIPLET="$(rust_abi)"
CARGO_TRIPLET="${CARGO_TRIPLET//-/_}"
CARGO_TRIPLET="${CARGO_TRIPLET^^}"
cat <<-_EOF_ > "${T}/50${P}"
MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${SLOT}"
$(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"")
_EOF_
doenvd "${T}/50${P}"
# note: eselect-rust adds EROOT to all paths below
cat <<-_EOF_ > "${T}/provider-${PN}-${SLOT}"
/usr/bin/cargo
/usr/bin/rustdoc
/usr/bin/rust-gdb
/usr/bin/rust-gdbgui
/usr/bin/rust-lldb
/usr/lib/rustlib
/usr/lib/rust/lib
/usr/lib/rust/man
/usr/share/doc/rust
_EOF_
if use clippy; then
echo /usr/bin/clippy-driver >> "${T}/provider-${PN}-${SLOT}"
echo /usr/bin/cargo-clippy >> "${T}/provider-${PN}-${SLOT}"
fi
if use rustfmt; then
echo /usr/bin/rustfmt >> "${T}/provider-${PN}-${SLOT}"
echo /usr/bin/cargo-fmt >> "${T}/provider-${PN}-${SLOT}"
fi
if use rust-analyzer; then
echo /usr/bin/rust-analyzer >> "${T}/provider-${PN}-${SLOT}"
fi
insinto /etc/env.d/rust
doins "${T}/provider-${PN}-${SLOT}"
popd >/dev/null || die
}
multilib_src_install() {
if multilib_is_native_abi; then
rust_native_abi_install
else
local rust_target
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
dodir "/opt/${P}/lib/rustlib"
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
"${ED}/opt/${P}/lib/rustlib" || die
fi
# BUG: installs x86_64 binary on other arches
rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
}
pkg_postinst() {
eselect rust update
if has_version dev-debug/gdb || has_version llvm-core/lldb; then
elog "Rust installs helper scripts for calling GDB and LLDB,"
elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}."
fi
if has_version app-editors/emacs; then
optfeature "emacs support for rust" app-emacs/rust-mode
fi
if has_version app-editors/gvim || has_version app-editors/vim; then
optfeature "vim support for rust" app-vim/rust-vim
fi
}
pkg_postrm() {
eselect rust cleanup
}

View File

@ -3,7 +3,7 @@
EAPI=8
LLVM_COMPAT=( 20 )
LLVM_COMPAT=( 21 )
LLVM_OPTIONAL="yes"
inherit edo llvm-r1 multilib prefix rust-toolchain verify-sig multilib-minimal optfeature
@ -21,8 +21,8 @@ elif [[ ${PV} == *beta* ]]; then
"
else
# curl -Ls static.rust-lang.org/dist/channel-rust-${PV}.toml | grep "xz_url.*rust-src"
SRC_URI="$(rust_all_arch_uris "${PV}")
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-01-30/rust-src-${PV}.tar.xz )
SRC_URI="$(rust_all_arch_uris "rust-${PV}")
rust-src? ( ${RUST_TOOLCHAIN_BASEURL%/}/2025-09-18/rust-src-${PV}.tar.xz )
"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@ -104,8 +104,6 @@ src_unpack() {
curl -Ls static.rust-lang.org/dist/channel-rust-nightly.toml > "${WORKDIR}/channel-rust-nightly.toml" ||
die "Failed to fetch nightly revision info"
rustc_src_url=$(grep 'xz_url.*rust-src' "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
rust_bin_url=$(grep "xz_url.*rust-nightly-$(rust_abi)" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
einfo "Using nightly Rust from: ${rust_bin_url}"
if use rust-src; then
einfo "Using nightly Rust-src from: ${rustc_src_url}"
@ -117,15 +115,23 @@ src_unpack() {
tar -xf "${WORKDIR}/rust-src-${PV}.tar.xz" || die "Failed to unpack nightly rust-src tarball"
fi
einfo "Fetching nightly Rust tarball ..."
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball"
if use verify-sig; then
einfo "Fetching nightly signature ..."
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature"
verify-sig_verify_detached "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" \
"${WORKDIR}/rust-nightly-$(rust_abi).tar.xz.asc"
fi
tar -xf "${WORKDIR}/rust-nightly-$(rust_abi).tar.xz" || die "Failed to unpack nightly tarball"
local v
for v in $(multilib_get_enabled_abi_pairs); do
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
rust_bin_url=$(grep "xz_url.*rust-nightly-${rust_target}" "${WORKDIR}/channel-rust-nightly.toml" | cut -d '"' -f 2)
einfo "Using nightly Rust from ${rust_bin_url} for ${rust_target}"
einfo "Fetching nightly Rust tarball for ${rust_target} ..."
curl --progress-bar -L "${rust_bin_url}" -O || die "Failed to fetch nightly tarball for ${rust_target}"
if use verify-sig; then
einfo "Fetching nightly signature for ${rust_target} ..."
curl --progress-bar -L "${rust_bin_url}.asc" -O || die "Failed to fetch nightly signature for ${rust_target}"
verify-sig_verify_detached "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" \
"${WORKDIR}/rust-nightly-${rust_target}.tar.xz.asc"
fi
tar -xf "${WORKDIR}/rust-nightly-${rust_target}.tar.xz" || die "Failed to unpack nightly tarball for ${rust_target}"
done
else
# sadly rust-src tarball does not have corresponding .asc file
# so do partial verification
@ -138,8 +144,10 @@ src_unpack() {
fi
default_src_unpack
fi
# We only want to do this for the native ABI. Non-native ABIs are
# handled differently in multilib_src_install.
case ${PV} in
*9999*)
mv "${WORKDIR}/rust-nightly-$(rust_abi)" "${S}" || die
@ -283,10 +291,21 @@ multilib_src_install() {
if multilib_is_native_abi; then
rust_native_abi_install
else
local rust_target
local rust_target version
case ${PV} in
*9999*)
version=nightly
;;
*beta*)
version=beta
;;
*)
version=${PV}
;;
esac
rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
dodir "/opt/${P}/lib/rustlib"
cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
cp -vr "${WORKDIR}/rust-${version}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
"${ED}/opt/${P}/lib/rustlib" || die
fi

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