diff --git a/changelog/security/2024-08-14-weekly-updates.md b/changelog/security/2024-08-14-weekly-updates.md new file mode 100644 index 0000000000..70f4fe99bd --- /dev/null +++ b/changelog/security/2024-08-14-weekly-updates.md @@ -0,0 +1,2 @@ +- SDK: re2c ([CVE-2022-23901](https://nvd.nist.gov/vuln/detail/CVE-2022-23901)) +- curl ([CVE-2024-7264](https://nvd.nist.gov/vuln/detail/CVE-2024-7264)) diff --git a/changelog/updates/2024-08-14-weekly-updates.md b/changelog/updates/2024-08-14-weekly-updates.md new file mode 100644 index 0000000000..8bd5326857 --- /dev/null +++ b/changelog/updates/2024-08-14-weekly-updates.md @@ -0,0 +1,6 @@ +- curl ([8.9.1](https://curl.se/ch/8.9.1.html)) +- elfutils ([0.191](https://inbox.sourceware.org/elfutils-devel/CAJDtP-SJhJ8cjTpkNpi+F0nzVJ2pZsEai8Ewpp4yJmsO_H5-NA@mail.gmail.com/T/#u)) +- gce, sysext-python: setuptools ([71.1.0](https://github.com/pypa/setuptools/blob/v71.1.0/NEWS.rst) (includes [71.0.0](https://github.com/pypa/setuptools/blob/v71.0.0/NEWS.rst))) +- libmicrohttpd ([1.0.1](https://lists.gnu.org/archive/html/libmicrohttpd/2024-02/msg00005.html) (inlcudes [1.0.0](https://lists.gnu.org/archive/html/libmicrohttpd/2024-02/msg00000.html))) +- lz4 ([1.10.0](https://github.com/lz4/lz4/releases/tag/v1.10.0)) +- npth ([1.7](https://git.gnupg.org/cgi-bin/gitweb.cgi?p=npth.git;a=blob;f=NEWS;h=c1b631b4294eabfef29baefd60e1b0dfecce710d;hb=75c68399ef3bbb5d024f2a60474a7214fa479016)) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords index 96cbc4a5ca..9caea5e3ac 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords @@ -23,7 +23,7 @@ =app-containers/runc-1.1.13 ~amd64 ~arm64 # Seems to be the only available ebuild in portage-stable right now. -=app-crypt/adcli-0.9.2 ~amd64 ~arm64 +=app-crypt/adcli-0.9.2 ~arm64 # Needed by arm64-native SDK =app-crypt/ccid-1.5.4 ~arm64 @@ -46,6 +46,7 @@ # Keep versions on both arches in sync. =dev-cpp/glog-0.6.0 ~arm64 +=dev-lang/python-3.11.9_p1 ~amd64 # Accept unstable host Rust compilers. =dev-lang/rust-1.80.0 ~amd64 ~arm64 @@ -91,8 +92,8 @@ dev-util/catalyst ~amd64 ~arm64 =net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64 =net-libs/libnetfilter_cttimeout-1.0.1 ~arm64 -# Needed to address CVE-2024-6197 and CVE-2024-6874. -=net-misc/curl-8.9.0 ~amd64 ~arm64 +# Needed to address CVE-2024-6197, CVE-2024-6874 and CVE-2024-7264. +=net-misc/curl-8.9.1-r1 ~amd64 ~arm64 # Keep versions on both arches in sync. =sys-apps/kexec-tools-2.0.28 ~arm64 @@ -106,7 +107,3 @@ dev-util/catalyst ~amd64 ~arm64 # Accept unstable host Rust compilers. =virtual/rust-1.80.0 ~amd64 ~arm64 - -# Accept unstable aardvark-dns to fix 'time' -# dependency compilation issue with Rust 1.80 -=app-containers/aardvark-dns-1.11.0 ~amd64 ~arm64 diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use index 2f0b0c111d..76542fa53a 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use @@ -10,7 +10,10 @@ dev-libs/libxml2 -python dev-libs/libxslt -python dev-util/perf -doc dev-vcs/git webdav curl -net-misc/curl kerberos telnet + +# Mask support for http3 for now (unavailable on arm64 for now, and +# I'm not sure we really need it.) +net-misc/curl kerberos telnet -http3 -quic -curl_quic_openssl net-misc/iputils arping tracepath sys-devel/gettext -git diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch new file mode 100644 index 0000000000..150216b334 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/files/libarchive-3.7.4-INT_MAX.patch @@ -0,0 +1,26 @@ +From 6ff1cd1e487ddf545337b88da3f1f5ca69a2f958 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Mon, 6 May 2024 20:46:26 -0700 +Subject: [PATCH] Define INT_MAX via `#include ` (#2170) + +#2110 added usages of INT_MAX here without adding the necessary header. + +Resolves #2162 +--- + tar/bsdtar.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tar/bsdtar.c b/tar/bsdtar.c +index 42baab286..f0e71afd1 100644 +--- a/tar/bsdtar.c ++++ b/tar/bsdtar.c +@@ -43,6 +43,9 @@ + #ifdef HAVE_LANGINFO_H + #include + #endif ++#ifdef HAVE_LIMITS_H ++#include ++#endif + #ifdef HAVE_LOCALE_H + #include + #endif diff --git a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.4.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.4.ebuild index 7c609d3a3f..695219f457 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/libarchive/libarchive-3.7.4.ebuild @@ -74,6 +74,8 @@ 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" + # https://github.com/libarchive/libarchive/commit/6ff1cd1e487ddf545337b88da3f1f5ca69a2f958 + "${FILESDIR}/${PN}-3.7.4-INT_MAX.patch" ) src_prepare() { diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch new file mode 100644 index 0000000000..0d056b9883 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/files/1.10.0-meson-do-not-force-c99-mode.patch @@ -0,0 +1,44 @@ +https://github.com/lz4/lz4/pull/1485 + +From bce6a94c25a9077fdcd7c94079a24f9713b192e1 Mon Sep 17 00:00:00 2001 +From: Fabian Groffen +Date: Tue, 30 Jul 2024 21:50:06 +0200 +Subject: [PATCH] meson: do not force c99 mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On Solaris/OpenIndiana hosts forcing (old) C99 means disabling POSIX +2001 functionality, resulting in errors like + +In file included from ../../../net/ptah/export/gentoo/working-repos/lz4/programs/bench.c:39: +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h: In function UTIL_getOpenFileSize’: +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:156:23: error: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration] + 156 | # define UTIL_fileno fileno + | ^~~~~~ +../../../net/ptah/export/gentoo/working-repos/lz4/programs/util.h:325:10: note: in expansion of macro ‘UTIL_fileno’ + 325 | fd = UTIL_fileno(file); + | ^~~~~~~~~~~ + +These can be fixed either by forcing a standard to be applied in programs/platform.h or by not forcing the compiler to use an old standard. + +Since CMake and Makefile don't force C99 by default either, just drop it from +meson.build. + +Signed-off-by: Fabian Groffen +--- + build/meson/meson.build | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/build/meson/meson.build b/build/meson/meson.build +index fc6408af6..7e1696802 100644 +--- a/build/meson/meson.build ++++ b/build/meson/meson.build +@@ -16,7 +16,6 @@ project( + 'c', + license: 'BSD-2-Clause-Patent AND GPL-2.0-or-later', + default_options: [ +- 'c_std=c99', + 'buildtype=release', + 'warning_level=3' + ], diff --git a/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild index 7cbc02aadc..92380bad6d 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/lz4/lz4-1.10.0-r1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/lz4/lz4/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD-2 GPL-2" SLOT="0/1.10.0-meson" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="static-libs test" RESTRICT="!test? ( test )" @@ -19,6 +19,8 @@ EMESON_SOURCE=${S}/build/meson PATCHES=( "${FILESDIR}/${PV}-fix-freestanding-test.patch" + # https://github.com/lz4/lz4/pull/1485 + "${FILESDIR}/${PV}-meson-do-not-force-c99-mode.patch" ) multilib_src_configure() { diff --git a/sdk_container/src/third_party/portage-stable/app-containers/aardvark-dns/aardvark-dns-1.11.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/aardvark-dns/aardvark-dns-1.11.0.ebuild index 1e5d082427..3f6fb3a7a9 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/aardvark-dns/aardvark-dns-1.11.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/aardvark-dns/aardvark-dns-1.11.0.ebuild @@ -15,7 +15,7 @@ if [[ ${PV} == 9999* ]]; then else SRC_URI="${CARGO_CRATE_URIS}" SRC_URI+="https://github.com/containers/aardvark-dns/releases/download/v${PV}/${PN}-v${PV}-vendor.tar.gz" - KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" + KEYWORDS="amd64 arm64 ~ppc64 ~riscv" fi # main diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild index 37fb304f40..ba038ec845 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/adcli/adcli-0.9.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2023 Gentoo Authors +# Copyright 2021-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="https://gitlab.freedesktop.org/realmd/adcli/-/archive/${PV}/${P}.tar.bz LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" +KEYWORDS="amd64 ~arm64 ~x86" IUSE="doc" DEPEND=" @@ -31,5 +31,7 @@ src_prepare() { } src_configure() { - econf $(use_enable doc) + econf \ + $(use_enable doc) \ + KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config } diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml index ba25ee6d9d..115e9d64a6 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-crypt/efitools/metadata.xml @@ -1,7 +1,5 @@ - - tamiko@gentoo.org - + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild index 5b2191cfb0..0a5b46a69f 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild @@ -95,6 +95,10 @@ src_prepare() { # 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 + + # definition of getpeername etc uses different things like socket_fd_t + [[ ${CHOST} == *-solaris* ]] && + append-cflags $(test-flags-CC -Wno-incompatible-pointer-types) } my_src_configure() { @@ -132,7 +136,7 @@ my_src_configure() { --enable-large-secmem CC_FOR_BUILD="$(tc-getBUILD_CC)" - ac_cv_path_GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" + GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" $("${S}/configure" --help | grep -o -- '--without-.*-prefix') ) diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gpgme/gpgme-1.23.2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gpgme/gpgme-1.23.2.ebuild index 4a1dffbc25..729e18d1df 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gpgme/gpgme-1.23.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/gpgme/gpgme-1.23.2.ebuild @@ -152,6 +152,7 @@ gpgme_src_configure() { $(use test || echo "--disable-gpgconf-test --disable-gpg-test --disable-gpgsm-test --disable-g13-test") --enable-languages="${languages[*]}" $(use_enable static-libs static) + GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" ) ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest index 94a3276c6f..870a599475 100644 --- a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/Manifest @@ -1,2 +1,3 @@ DIST eclass-manpages-20240512.tar.xz 452732 BLAKE2B e39fe919e90d24247ff1a5153359d4bc9dae8d4d8a47c0d2231a6364e64b046f813d507aa95cf5b7fca9de862678d7d584381fa94d6a4019cc07d5474d73f8e3 SHA512 a798cd71eb33a63bc8ceeaf1103f130425e4b82d379d413ce09605f4c9648447d01f97875cfe2efdd09a2dace7a73bf3a74f223168da8035ef13f1a52dd58677 DIST eclass-manpages-20240614.tar.xz 450756 BLAKE2B 50435ab646a238f47cc96573af3d8ed53e14b700c9284253a2a9efbda40fc058f475a9900e56c3d6575ceafa4385eec89d9d1df87dd5ec94425c69daf258ab0e SHA512 80c0ba3eac7affc670f10d2eca58293bb79de94cc3b9d2349dd9b2227efd02b08d7e8a095161b484f87b3e23042afea73fadbd0cff867006bfbbb748a5051c55 +DIST eclass-manpages-20240811.tar.xz 455124 BLAKE2B dde9ffe7baa7fcb6904af47a5fb7bf05103c2646b682e27fd3454eaf2ee4708d059c666eddbd39571899d23bcc8ef411e75f16c905048a103f818f396e390794 SHA512 d62979614e1301bba51798280f21baa46a55c594f4345f07b1c21b772bb22cc0be2db55a2d3b190bf2a5921c727329266743a2f2b0ad0ef2a14f1a967c779e55 diff --git a/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20240811.ebuild b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20240811.ebuild new file mode 100644 index 0000000000..83b196078a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-doc/eclass-manpages/eclass-manpages-20240811.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Instructions to make a dist tarball: +# git clone https://github.com/projg2/eclass-to-manpage.git +# cd eclass-to-manpage +# make dist ECLASSDIR=~/g/eclass/ + +DESCRIPTION="Collection of Gentoo eclass manpages" +HOMEPAGE="https://github.com/projg2/eclass-to-manpage" +SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +# Keep the keywords stable. No need to change to ~arch. +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" + +BDEPEND="sys-apps/gawk" + +src_install() { + emake install DESTDIR="${D}" PREFIX="${EPREFIX}/usr" +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/Manifest b/sdk_container/src/third_party/portage-stable/app-shells/bash/Manifest index 5517d1ff31..1ced1cf52b 100644 --- a/sdk_container/src/third_party/portage-stable/app-shells/bash/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/Manifest @@ -30,6 +30,8 @@ DIST bash-5.3_alpha_p20240706-a91b8b077300b0a2a7daefe02f0363f9116e00d5.tar.xz 85 DIST bash-5.3_alpha_p20240711-d3e86e66ce857a8dc02e3116fd98b6e5b34d6364.tar.xz 8532476 BLAKE2B bae60589e733f29f4dab827c1c68899f4770c4cb2ca58af19e10bb833820644d336ada480be60b4dabb82441ae68f64494074387057d8b56efe8d5b9befd2a13 SHA512 ef677d2641607b75a000bef4b6eb9b359553ae6c3f930285989b97c036bfd1f7ecfa9240af1873af11dda42d1eca68da9c4b7567876e0bca878e8469dde0d0af DIST bash-5.3_alpha_p20240718-6c703092759ace29263ea96374e18412c59acc7f.tar.xz 8535120 BLAKE2B 7dd47829ca71689c138af9acd2657cee732f43abc82506ad76e65eb038e39acd31e208e985714460d76fbfb354517c3597fd85d459969541af950382ae7796c9 SHA512 41e07ed4fa90f8b645faf6c26766048fa51a3e3bd420dc875898fc9a1d674c05fe35f12b1c4d6ac6e6374736e6052e17e235a94c205c4bda80183f8065035182 DIST bash-5.3_alpha_p20240726-d5ef283cbdd08217efdc55974a6a8a2c52a7562f.tar.xz 8534860 BLAKE2B 93ced89c621522554bb3f8c2e23ab2a6d8500beedb023064006cbd5777719195c2dbaabe6a04d737cb33d940c8a40ad2b3cdbce43b18e2b074d0d050dac77559 SHA512 d651cf0da9ed62d2e54ac526ef55a2a8eba274b430b627fc9e146bbc1d936363cf248388439dac485b653f6bfedcb21269c4b5f4662646080ecfe07390572450 +DIST bash-5.3_alpha_p20240730-e45ec6f76bea49cf8df306ac45022306831ed086.tar.xz 8535992 BLAKE2B 3f05f740987d3119f5e3c6bee1521a66c634737f9cf30fb911d1f03351e6c946a5c3de45fbdf817854613e23165ccf329b0c332639b593060dde33b53eae0e3d SHA512 2d1d6302ea60f1bec1d67d9f5f237573219080dea35ea29dd2cc3df4a8f41a2f89845ca3775e7044a1751fdb0b18db2ab4bc05cbd8679b745205868d048fbcc9 +DIST bash-5.3_alpha_p20240810-772e7e760e8a098e4d8dee21cf11090be4757918.tar.xz 8537400 BLAKE2B c12004b20b64e51c82e845d6c80bfb3cc70be19ec2a0e74cc0b25a86ad37bfb16ad9a115f128d895244485f869c1504b084775536e694000126bef2726126807 SHA512 87a97e6cf365d4780d9ec308b3f12f0d271c57eb69e716912004ececc038ff0db79a91ff6d1a04a14dba4785893b3f5dd0ca1e9f461c72c89476525acadbdf8f DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071 DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883 DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399 @@ -432,3 +434,15 @@ DIST bash52-025 1454 BLAKE2B 5d18e00cc44710f078037f25c61741a078bb0fc906d6d5555e5 DIST bash52-025.sig 95 BLAKE2B aff63f1a0a753b632f0d2ce4cf8f4117689469150d41dd0e0d7f76fca973d52fb16f3957b12709826e50705f921fe141108b1046de05d17b40216ed5d4a00893 SHA512 079888adce1cb8583b547d67005f179614f1c42756de20acdb9e24763dec145a421c68e7ceb48d42b853ae7fcb07e051cc1ca56f9dfd337c9a1b001618df2828 DIST bash52-026 1372 BLAKE2B ebe3bc47dadf5d689258c5ccf9883838d3383dc43bec68d2a6767b6348cf1515a98ec9e445c3110e8eb0d87e742c20a0d4ddb70649ec94217f55aad7d18552af SHA512 571993da2b8067ef5b7b705aee65dd414ee70b216ffbcb9fab7c08807b87a72465594c3f1576c795ae86bf951911cdde70ad1037e851b88ee379c4237ccff6fe DIST bash52-026.sig 95 BLAKE2B 175df0703ee5374094d41761ebc2827d34cb97328ea8e486cc9e5c946e482a7d0a16a7ac45e11296500cff8ac4c013e60b07d34abf8b3478527a80f742fbe85e SHA512 6db725ffcf429e04551b2fde329067696b20bef9418b57cff56a62f31c262d0b800061284469eb9f809ca49516516735213dc05defab52ff864ac3b214336559 +DIST bash52-027 1881 BLAKE2B b76ce03456e064f17db00e9026aa53656a063c195faa02c7d51da8d173f7525fe5411bf526f19ee9e717ee1ec957de7e73f5af851a68d5cb554f2c4492ab3844 SHA512 644ef1ea0ce002913b443cfc74d1376b3b8d1c7c976c88cfcec663313563ea905af3aa7ab7236e0ee8336195b01cfc7f2a5a738c5f787a637be92cda937f571e +DIST bash52-027.sig 95 BLAKE2B 7120dc764120e108fbafd80dcd5010aea2f79f7508fda375740f7601c5e7508f2c830673101fe528a79cb4a7a5718ebd5dcf5e7ae81943008b128b10bb57ab8b SHA512 ad76bc672e53c62a8554a2889d420294f7dde0a996cb3058ca8a3a4108b53d35ed56dbcd0601f1984b3ae26dfe5eb6d99c9d46ebe78f0947b82502bef2419152 +DIST bash52-028 1571 BLAKE2B 58fdeecf6dd685103c7dc0e7c200cae65206e5fb3360d798b9cec05fc935ebae139bdf142f6018c9837d1780eb7c5cecff0a945369c14fa575e6801c46a15a31 SHA512 0e59ee230c2f9394814578e56270efa93e5ed8ed2fbf0c0777fdfad4d3f01f560923a80792998789c901068d88371f984f539fdebbec726759eeb7966d324328 +DIST bash52-028.sig 95 BLAKE2B 62d4663cfb25b470635321815e0860434c2edb35b220450d0123fc0bee2d80f29af060c34c765a48d75b49030f17d50852a1540be28fc615ebdd3f32391fe4d1 SHA512 e3e37ac8e6a29688c4c9dd318fc767331eec39bf947670060ebd42fd8262aad400152dc02d1d459f00170e6b788cf95d4a0a6dd62a2eae4af5bc67ebc80ece5d +DIST bash52-029 3619 BLAKE2B 01ddb0acc5b6067e729320692284d61735ace62eeede81a74b7628fe6899da61d921a11bd0d22d0e6f2e241e7b0cb64591654a34a33916739e35e23d5cc6f5bd SHA512 b0b134347fbe0916b9c0fc60a9dbc6b6ebc7439bd5a12d0cda29a0012cbbcc16414392597764c24b8ca716ce727bce7da7fae39acc3cdba9506efb01014a43ae +DIST bash52-029.sig 95 BLAKE2B 49c408e8da095c130868b3fab7afb85408307a10d9154dda818e014cec2ec973e1fc2a96dcd7a1769d1581e3c1d758d172bfa066d7b1ea6fdbb80e062d24ef64 SHA512 11aeca6b46a5cdf518b26a59a972e956455cb4d15aedd968ad36f8100bfc38448f89fe7a72dbecfa8da9fe556a194dda9bb34f1d16c2408b92b0e594f163f262 +DIST bash52-030 4111 BLAKE2B d0cf114642393eb2e2d060eac339674c8ce10af4d54bbcee0f450854d27373ede9dd159caf6d05fc69429ad357d666b47f6781ef590287f33a535b2c26d8754d SHA512 515902fd567dfbbca3d4f6d98a7f2f5a9d1ad323d829f9b90839de4807592708dea3d52f67cb868617278f9c8c6bb299ab3310d898be344d63e824043f17fe2d +DIST bash52-030.sig 95 BLAKE2B b8edc295a6646721ce7be79ebac2331a36c0b84ca9f5a6b6e8c2da0674f1279debaf941bbbddd56e2b868afc60a92a34fd312e049fc8524ba1e88ca5cb952acc SHA512 2592d5b7f62a23dd16153691053e462342ae33f347349348de98487c52d2e73ab0d46216505925bc887bceb069bcb5c1c5ce7ce803e62eec7ef0458dbaf1fb69 +DIST bash52-031 1159 BLAKE2B dac378115906e21fc754267c42e129e2374c9b63f879d1717d79930589618d4d8d17821b2f529d1851db7567d3efdfb0410c18e6869047e3d87443b29d507289 SHA512 08f3e3cb6a6554ea6d1b1f5cbcd156cb75f9c0c5350801b67352a1c2ffec0d02d90c0947736fd52de304e549a1b919ea0ff42e23a8cf63a721a351ea1732bea5 +DIST bash52-031.sig 95 BLAKE2B 50e5c0b3afb0ffc8b1863bde645316d7c7c49e8b396041ca1dcf269c50b532aaccf0c3fb5a5e64036ece9054d8ccf78f7e829ecf0fbdcf8531ba57230b129f1c SHA512 f656d8fbbe79450fbf193e5c2aebc85cfc425703495f2925aa774d5c0e742ebf523c191264673c6dd76fa6071c39d5155698687475eb634cd6553e86266f91a5 +DIST bash52-032 1529 BLAKE2B 55aab849da0fcc69ab3516d9d7ff2858b5f15cbeaddf66282f43f272b52d646c2c41c2ceef632a2ae8f13c25d92e85f49fbc6de989ed4f6ac4bb7bea7fc59a5d SHA512 9eb277d2d92b9ec49f70582e52305bc45b425b189ba2a15c51c537e07ccf9cb894c1ca44fa399b04297fe51027aff7f169f41efe2d60895ca55c421c0778ef32 +DIST bash52-032.sig 95 BLAKE2B 23a5cd003c957932d0c0192b63a5e8e7366bf939c3f54ff91b444e3729607c88677fdf4a5b435e47da4a64624b10d8696e4e950fac8fbb6932bb4c64506d1f9f SHA512 d3b08c3d0efee81a8507b530405a886259438bfc4c2ab984dbe80d30177775aacf6448a2673f0bd274fe46c938a8b8d46844d3794374bafce63f7c1d8bf4efe1 diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.2_p32.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.2_p32.ebuild new file mode 100644 index 0000000000..c279cf9bca --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.2_p32.ebuild @@ -0,0 +1,402 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. See ftp://ftp.gnu.org/gnu/bash/bash-5.2-patches/. +case ${PV} in + *_p*) + PLEVEL=${PV##*_p} + ;; + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.2_p1" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" + "${FILESDIR}/${PN}-5.2_p15-random-ub.patch" + "${FILESDIR}/${PN}-5.2_p15-configure-clang16.patch" + "${FILESDIR}/${PN}-5.2_p21-wpointer-to-int.patch" + "${FILESDIR}/${PN}-5.2_p21-configure-strtold.patch" + "${FILESDIR}/${PN}-5.2_p32-memory-leaks.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240730.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240730.ebuild new file mode 100644 index 0000000000..99ac03b993 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240730.ebuild @@ -0,0 +1,411 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. +case ${PV} in + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *_p*) + PLEVEL=${PV##*_p} + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.3_alpha" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + # It can be useful to have snapshots in the pre-release period once + # the first alpha is out, as various bugs get reported and fixed from + # the alpha, and the next pre-release is usually quite far away. + # + # i.e. if it's worth packaging the alpha, it's worth packaging a followup. + BASH_COMMIT="e45ec6f76bea49cf8df306ac45022306831ed086" + SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.xz -> ${P}-${BASH_COMMIT}.tar.xz" + S=${WORKDIR}/${PN}-${BASH_COMMIT} +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + S=${WORKDIR}/${MY_P} + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + default + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + # wcsnwidth(), substring() issues with -Wlto-type-mismatch, reported + # upstream to Chet by email. + filter-lto + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240810.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240810.ebuild new file mode 100644 index 0000000000..e204911b1f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_alpha_p20240810.ebuild @@ -0,0 +1,411 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic toolchain-funcs prefix verify-sig + +# Uncomment if we have a patchset. +#GENTOO_PATCH_DEV="sam" +#GENTOO_PATCH_VER="${PV}" + +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +MY_PATCHES=() + +# Determine the patchlevel. +case ${PV} in + 9999|*_alpha*|*_beta*|*_rc*) + # Set a negative patchlevel to indicate that it's a pre-release. + PLEVEL=-1 + ;; + *_p*) + PLEVEL=${PV##*_p} + ;; + *) + PLEVEL=0 +esac + +# The version of readline this bash normally ships with. Note that we only use +# the bundled copy of readline for pre-releases. +READLINE_VER="8.3_alpha" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git" + EGIT_BRANCH=devel + inherit git-r3 +elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + # It can be useful to have snapshots in the pre-release period once + # the first alpha is out, as various bugs get reported and fixed from + # the alpha, and the next pre-release is usually quite far away. + # + # i.e. if it's worth packaging the alpha, it's worth packaging a followup. + BASH_COMMIT="772e7e760e8a098e4d8dee21cf11090be4757918" + SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.xz -> ${P}-${BASH_COMMIT}.tar.xz" + S=${WORKDIR}/${PN}-${BASH_COMMIT} +else + my_urls=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}.tar.gz" ) + + # bash-5.1 -> bash51 + my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.} + + for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do + printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}" + my_urls+=( {'mirror://gnu/bash','ftp://ftp.cwru.edu/pub/bash'}/"${MY_P}-patches/${my_patch_ver}" ) + MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" ) + done + + SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )" + S=${WORKDIR}/${MY_P} + + unset -v my_urls my_p my_patch_idx my_patch_ver +fi + +if [[ ${GENTOO_PATCH_VER} ]]; then + SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz" +fi + +LICENSE="GPL-3+" +SLOT="0" +if (( PLEVEL >= 0 )); then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:= + nls? ( virtual/libintl ) +" +if (( PLEVEL >= 0 )); then + DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )" +fi +RDEPEND=" + ${DEPEND} +" +# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011). +BDEPEND=" + pgo? ( dev-util/gperf ) + verify-sig? ( sec-keys/openpgp-keys-chetramey ) +" + +# EAPI 8 tries to append it but it doesn't exist here. +QA_CONFIGURE_OPTIONS="--disable-static" + +PATCHES=( + #"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/ + + # Patches to or from Chet, posted to the bug-bash mailing list. + "${FILESDIR}/${PN}-5.0-syslog-history-extern.patch" +) + +pkg_setup() { + # bug #7332 + if is-flag -malign-double; then + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + + if use bashlogger; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then + default + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + + if [[ ${GENTOO_PATCH_VER} ]]; then + unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + fi + fi +} + +src_prepare() { + # Include official patches. + (( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}" + + # Clean out local libs so we know we use system ones w/releases. The + # touch utility is invoked for the benefit of config.status. + if (( PLEVEL >= 0 )); then + rm -rf lib/{readline,termcap}/* \ + && touch lib/{readline,termcap}/Makefile.in \ + && sed -i -E 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in \ + || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches, bug #407985. + sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \ + && touch -r . doc/* \ + || die + + # Sometimes hangs (more noticeable w/ pgo), bug #907403. + rm tests/run-jobs || die + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local -a myconf + + # Upstream only test with Bison and require GNUisms like YYEOF and + # YYERRCODE. The former at least may be in POSIX soon: + # https://www.austingroupbugs.net/view.php?id=1269. + # configure warns on use of non-Bison but doesn't abort. The result + # may misbehave at runtime. + unset -v YACC + + # wcsnwidth(), substring() issues with -Wlto-type-mismatch, reported + # upstream to Chet by email. + filter-lto + + myconf=( + --disable-profiling + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + --with-curses + + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h. + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \ + -DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + use nls || myconf+=( --disable-nls ) + + if (( PLEVEL >= 0 )); then + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash" + else + # Disable the plugins logic by hand since bash doesn't provide + # a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + + sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die + fi + + # bug #444070 + tc-export AR + + econf "${myconf[@]}" +} + +src_compile() { + local -a pgo_generate_flags pgo_use_flags + local flag + + # -fprofile-partial-training because upstream notes the test suite isn't + # super comprehensive. + # https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo + if use pgo; then + pgo_generate_flags=( + -fprofile-update=atomic + -fprofile-dir="${T}"/pgo + -fprofile-generate="${T}"/pgo + ) + pgo_use_flags=( + -fprofile-use="${T}"/pgo + -fprofile-dir="${T}"/pgo + ) + if flag=$(test-flags-CC -fprofile-partial-training); then + pgo_generate_flags+=( "${flag}" ) + pgo_use_flags+=( "${flag}" ) + fi + fi + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others + + # Build Bash and run its tests to generate profiles. + if (( ${#pgo_generate_flags[@]} )); then + # Used in test suite. + unset -v A + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check + + if tc-is-clang; then + llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die + fi + + # Rebuild Bash using the profiling data we just generated. + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" + use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others + fi +} + +src_test() { + # Used in test suite. + unset -v A + + default +} + +src_install() { + local d f + + default + + my_prefixify() { + while read -r; do + if [[ $REPLY == *$1* ]]; then + REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"} + fi + printf '%s\n' "${REPLY}" || ! break + done < "$2" || die + } + + dodir /bin + mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc + + insinto /etc/bash/bashrc.d + my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | newins - 10-gentoo-color.bash + newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r1.bash 10-gentoo-title.bash + if [[ ! ${EPREFIX} ]]; then + doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash + fi + + insinto /etc/skel + for f in bash{_logout,_profile,rc}; do + newins "${FILESDIR}/dot-${f}" ".${f}" + done + + if use plugins; then + exeinto "/usr/$(get_libdir)/bash" + set -- examples/loadables/*.o + doexe "${@%.o}" + + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples; then + for d in examples/{functions,misc,scripts,startup-files}; do + exeinto "/usr/share/doc/${PF}/${d}" + docinto "${d}" + for f in "${d}"/*; do + if [[ ${f##*/} != @(PERMISSION|*README) ]]; then + doexe "${f}" + else + dodoc "${f}" + fi + done + done + fi + + # Install bash_builtins.1 and rbash.1. + emake -C doc DESTDIR="${D}" install_builtins + sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die + doman "${T}"/rbash.1 + + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then + mkdir -p -- "${EROOT}"/etc/bash \ + && mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \ + || die + fi +} + +pkg_postinst() { + local old_ver + + # If /bin/sh does not exist, provide it. + if [[ ! -e ${EROOT}/bin/sh ]]; then + ln -sf -- bash "${EROOT}"/bin/sh || die + fi + + read -r old_ver <<<"${REPLACING_VERSIONS}" + if [[ ! $old_ver ]]; then + : + elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then + return + fi + + while read -r; do ewarn "${REPLY}"; done <<'EOF' +Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash. + +Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the +characteristics of the operating environment, it may contain a command to set +the terminal's window title. Those who were already choosing to customise the +PROMPT_COMMAND variable are now advised to append their commands like so: + +PROMPT_COMMAND+=('custom command goes here') + +Gentoo no longer defaults to having bash set the window title in the case +that the terminal is controlled by sshd(8), unless screen is launched on the +remote side or the terminal reliably supports saving and restoring the title +(as alacritty, foot and tmux do). Those wanting for the title to be set +regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d +drop-in - to set PROMPT_COMMMAND like so: + +PROMPT_COMMAND=(genfun_set_win_title) + +Those who would prefer for bash never to interfere with the window title may +now opt out of the default title setting behaviour, either with the "unset -v +PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired. +EOF +} diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch b/sdk_container/src/third_party/portage-stable/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch new file mode 100644 index 0000000000..0c60e70d3c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/files/bash-5.2_p32-memory-leaks.patch @@ -0,0 +1,130 @@ +[Compared to bash-5.2_p26-memory-leaks.patch, this drops a hunk for +builtins/evalstring.c as the open_redir_file issue is fixed in patch 31 +upstream for bash-5.2] + +https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00036.html +https://lists.gnu.org/archive/html/bug-bash/2024-01/txtm8yNNPR9RQ.txt + +For evalstring.c: +* https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00011.html +* https://git.savannah.gnu.org/cgit/bash.git/diff/builtins/evalstring.c?h=devel&id=81f7b44564cd1510788035cea7c59631865a7db2&dt=1#n766 + +From 711ab85262884f2b91f09eceb9aefd0e2426ce67 Mon Sep 17 00:00:00 2001 +From: Grisha Levit +Date: Sat, 3 Jun 2023 16:51:26 -0400 +Subject: [PATCH] various leaks + +Found mostly by normal usage running a no-bash-malloc build with clang's +LeakSanitizer enabled. So far seems to provide very accurate results. + +* arrayfunc.c +- quote_compound_array_word: make sure to free VALUE +- bind_assoc_var_internal: if assigning to a dynamic variable, make sure + to free the key (usually assoc_insert would do it) + +* bashline.c +- bash_command_name_stat_hook: free original *NAME if we are going to + change what it points to (what the callers seem to expect) + +* builtins/evalstring.c +- parse_and_execute: make sure to dispose of the parsed command + resulting from a failed function import attempt + +* examples/loadables/stat.c +- loadstat: bind_assoc_variable does not free its VALUE argument so make + sure to do it + +* subst.c +- param_expand: free temp1 value for codepaths that don't do it +--- + arrayfunc.c | 6 +++++- + bashline.c | 1 + + builtins/evalstring.c | 4 ++++ + examples/loadables/stat.c | 1 + + subst.c | 2 ++ + 5 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/arrayfunc.c b/arrayfunc.c +index 2c05d15b..8ba64084 100644 +--- arrayfunc.c ++++ arrayfunc.c +@@ -208,7 +208,10 @@ bind_assoc_var_internal (entry, hash, key, value, flags) + newval = make_array_variable_value (entry, 0, key, value, flags); + + if (entry->assign_func) +- (*entry->assign_func) (entry, newval, 0, key); ++ { ++ (*entry->assign_func) (entry, newval, 0, key); ++ FREE (key); ++ } + else + assoc_insert (hash, key, newval); + +@@ -985,6 +988,7 @@ quote_compound_array_word (w, type) + if (t != w+ind) + free (t); + strcpy (nword + i, value); ++ free (value); + + return nword; + } +diff --git a/bashline.c b/bashline.c +index c85b05b6..bd7548cc 100644 +--- bashline.c ++++ bashline.c +@@ -1928,6 +1928,7 @@ bash_command_name_stat_hook (name) + result = search_for_command (cname, 0); + if (result) + { ++ FREE (*name); + *name = result; + return 1; + } +diff --git a/builtins/evalstring.c b/builtins/evalstring.c +index df3dd68e..20c6a4a7 100644 +--- builtins/evalstring.c ++++ builtins/evalstring.c +@@ -461,6 +461,8 @@ parse_and_execute (string, from_file, flags) + should_jump_to_top_level = 0; + last_result = last_command_exit_value = EX_BADUSAGE; + set_pipestatus_from_exit (last_command_exit_value); ++ dispose_command(command); ++ global_command = (COMMAND *)NULL; + reset_parser (); + break; + } + +diff --git a/examples/loadables/stat.c b/examples/loadables/stat.c +index 1e60e7b6..ed5c9764 100644 +--- examples/loadables/stat.c ++++ examples/loadables/stat.c +@@ -349,6 +349,7 @@ loadstat (vname, var, fname, flags, fmt, sp) + key = savestring (arraysubs[i]); + value = statval (i, fname, flags, fmt, sp); + v = bind_assoc_variable (var, vname, key, value, ASS_FORCE); ++ free (value); + } + return 0; + } +diff --git a/subst.c b/subst.c +index 1ac6eb2d..ff0602da 100644 +--- subst.c ++++ subst.c +@@ -10727,6 +10727,7 @@ comsub: + { + chk_atstar (temp, quoted, pflags, quoted_dollar_at_p, contains_dollar_at); + tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, 0); ++ free (temp1); + if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) + return (tdesc); + ret = tdesc; +@@ -10739,6 +10740,7 @@ comsub: + { + set_exit_status (EXECUTION_FAILURE); + report_error (_("%s: invalid variable name for name reference"), temp); ++ free (temp1); + return (&expand_wdesc_error); /* XXX */ + } + else +-- +2.43.0 diff --git a/sdk_container/src/third_party/portage-stable/dev-build/cmake/Manifest b/sdk_container/src/third_party/portage-stable/dev-build/cmake/Manifest index 219ca184c9..607028b239 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/cmake/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-build/cmake/Manifest @@ -1,7 +1,3 @@ -DIST cmake-3.27.0-docs.tar.xz 521348 BLAKE2B 319c84195c37b1944bb5d3fde1aeae75623fc90a734c1ba74d730cd5678bff75806f7aa8aa8171fd7878a09b3316c9c0ee23c0c055e869a4385f54987f86d801 SHA512 e9c300526f9fe4e450e921308b7af42f4b8972f2f546f7bbf2dffb4ca696793fe09f1610636b05c82b1cf74ed8ef95377bec69e15f8c9197d6960e674e0d5400 -DIST cmake-3.27.9-SHA-256.txt 1646 BLAKE2B abfef38f8994d7684a44caaa4a5efa1ac8fbe38bd8e8c98bf341cf813f77ee54bea58f7b3ab7f68b3f5d992519396fd15a1f72a1d9587f593d80b8d2f8ba36e7 SHA512 310c45281735cf9812d9d1cf22a656c5b44e596ef7032a8b7b09900ef838e74b884599b42ed2f5469946f371d431b7d4b1e44f6cd49dfb36ea49d88b187b4804 -DIST cmake-3.27.9-SHA-256.txt.asc 833 BLAKE2B 57d52fc2f3233662af13eb362ec82626c4821267f55f1313907513b61cee5b8481936da2b03c908c507b3e0919e4811e90c6cb47568420a8b2187c7942de9f1e SHA512 cad2007e356eac480b2cb93778f90152788e33be2e565b38535a2d205794054e5d67d4ed7db0765a05017aedc5f1af21556535a084014fe6c446bc13258253da -DIST cmake-3.27.9.tar.gz 10984490 BLAKE2B 66f8fb6e301ed19f993fde6c4f9e336124be6373d49b58d130ce59f4e5225cd27e02813856636b51c2521403c3a56c200ce646de5c35be2b25b5e6240c98bdb4 SHA512 56ce723b0b6d09b420a2f89ba1636cdfb1bc305bc2df91ae716f866bee07f5d702d75efbddfbaf724f47382df809107fe1e6d046314cd2f1ff07bca34ad6340a DIST cmake-3.28.0-docs.tar.xz 525776 BLAKE2B b643f76012768f0100c51f0dd146230eba25b634ab4f9abd9c739b0b257e4b1d54aa01be8d2dcd27a7b1d9822bf13eb8af16ff3c6984eeefdeb58988a164bc26 SHA512 474dc77e44240de921013219bd7cdc4aee80214fbf38d60dc2ddb53c0fda8a11c466c01bbee2abbd32b711ec7524678515e39a79a5634354a6cb38f9683e229f DIST cmake-3.28.5-SHA-256.txt 1646 BLAKE2B 763cbec9ede58cc43a7435e3fe97a9a9f28b201712f52d98ecdf8035887232fe6000675c9bab90f275ff6d44406839f04352784a921dcbc9d65c5e2440b53f52 SHA512 0fdeed277d113e4642c11b87b98305da43213bd89566e3aaaf427a11e168d9e6754632c2fd76fae542d29fddfa8b67c3c0df19f741c53fdd3aea8ce7bec73ff3 DIST cmake-3.28.5-SHA-256.txt.asc 833 BLAKE2B bde735a577b556bc30ae1a5de0df8533243c955cc5d222537b3323e7108900af2f01799a4bfa843d953b141cc76a19aed77bfba15cf4e2c3cc36a0e7e844e853 SHA512 d495afd2ce4e16f8d3ecc0b319d59c3634aae71c26110d14225f9dd628bfe173cdd94818c69c930ef5cfff3b331445e192db0082188e0822155184e3f6f80e7d @@ -22,3 +18,6 @@ DIST cmake-3.30.0.tar.gz 11500060 BLAKE2B 62b3f3d5ed92f7f118991f36ba7098ff20c202 DIST cmake-3.30.1-SHA-256.txt 1646 BLAKE2B 39c8a32acb873f3b2b35af543006ef4ebc976f1939f4a857e55048654c60c23ee79cde0f1c625a7388f612d5ad594fa4ddfc89e4bb6e13764ffc78ce2e70f0e4 SHA512 bf3ba7218d504c75474b048b7c8b5db3928994fa269ea3762e68a751905403f87946c3dfdfbf63836d87f5180c905ed57b0d287bec97b04ee0e81f1f420a8c5f DIST cmake-3.30.1-SHA-256.txt.asc 833 BLAKE2B 5232626cc85bbcf0f44a9df4904ede8935c4d028b9604c9749a04b6eb2d51f648c817412b7870ae7f3e635dd88a44143568985d4ed2322d5239c5935e073a92b SHA512 b2a7b344a2d6350e55721860e7579a70c767b94b04a88b73a9fb1e9830658689561f9467d09eed87b2dce00106917543cf69ede5c7ed66a529359a1f6427dbc5 DIST cmake-3.30.1.tar.gz 11500521 BLAKE2B 0e604ecc6b7da1c1c1baa81488a033aef6fa39cbddaaf43364193dda3e30d02a072f58a75573723e71653a2d1b34d09a7e1d0cc98280d76801d262bf54ffe77d SHA512 e3b38d309554a4239b8048434d770d3ac4533280a82c1bec65c37c9b0996cdf1753185e38deb4fb5da890ddc3d39c1d5c075e2ab0f7e0c52d61f5d556851fd20 +DIST cmake-3.30.2-SHA-256.txt 1646 BLAKE2B b36e1e099261d80bde7c57564d3030bc99b12ed3f6a70f69de16d81f6e6da567e3cfa792d010921017a02eaf238b056e7eb2cf330e6c6711aa3a4bd835732b57 SHA512 7991c834ed2e384d863793725fbe0b6195824f4e14a665ddd71348ecfa8bd03dddb46d0e9f26cc75b7d9e0a2eb90bdec01b7e79f32ff1a9cc9a8fcdd1d060de3 +DIST cmake-3.30.2-SHA-256.txt.asc 833 BLAKE2B cf99bfec2bd4cc8c828162353ceac9ebae2d7ad02c5df77873a751df7314eb56266525c755ba2f9015e043c9bb6c8218251b47744741c02fb81a80f93809ab32 SHA512 d7f07fcdd02b1846bafff4a3e08e38a2cce38131358a783097555d7934dddc82a67c3a6b84cbd8731171d82e293ff18f7e5e66d0d3bbb7d200da3904089e923d +DIST cmake-3.30.2.tar.gz 11500719 BLAKE2B 85873311000831d2a8acb2c9d7f107e7fcef9dcd56f47307bd384a26c1b63d8f15b41989944e41969d6637139d916101fe236d3fe448a76f5b18b7809570ad5d SHA512 2b4c4ebb2213e19a08b9bf5a3cf0427dd2bfc44c7d86734abf5524c311bbce7e79f76d08e4df87a1e4508fe9fa05a28333068dc3bab308ef9724a9beeb39daab diff --git a/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.27.9.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.2.ebuild similarity index 88% rename from sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.27.9.ebuild rename to sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.2.ebuild index 2ab3b43733..7957c7bb58 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.27.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.2.ebuild @@ -19,8 +19,8 @@ CMAKE_DOCS_USEFLAG="+doc" # TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759. CMAKE_MAKEFILE_GENERATOR="emake" CMAKE_REMOVE_MODULES_LIST=( none ) -inherit bash-completion-r1 cmake elisp-common flag-o-matic multiprocessing \ - toolchain-funcs virtualx xdg-utils +inherit bash-completion-r1 cmake flag-o-matic multiprocessing \ + toolchain-funcs xdg-utils MY_P="${P/_/-}" @@ -47,7 +47,7 @@ else https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc )" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20230817 )" fi @@ -59,7 +59,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="BSD" SLOT="0" -IUSE="${CMAKE_DOCS_USEFLAG} dap emacs gui ncurses qt6 test" +IUSE="${CMAKE_DOCS_USEFLAG} dap gui ncurses qt6 test" RESTRICT="!test? ( test )" RDEPEND=" @@ -72,7 +72,6 @@ RDEPEND=" sys-libs/zlib virtual/pkgconfig dap? ( dev-cpp/cppdap ) - emacs? ( >=app-editors/emacs-23.1:* ) gui? ( !qt6? ( dev-qt/qtcore:5 @@ -102,12 +101,8 @@ PATCHES=( "${FILESDIR}"/${PN}-3.27.0_rc1-0003-Prefer-pkgconfig-in-FindBLAS.patch "${FILESDIR}"/${PN}-3.27.0_rc1-0004-Ensure-that-the-correct-version-of-Qt-is-always-used.patch "${FILESDIR}"/${PN}-3.27.0_rc1-0005-Respect-Gentoo-s-Python-eclasses.patch - "${FILESDIR}"/${PN}-3.27.0_rc1-0006-Filter-out-distcc-warnings-to-avoid-confusing-CMake.patch # Upstream fixes (can usually be removed with a version bump) - # pkgconf - # fixes https://github.com/pkgconf/pkgconf/issues/317 - "${FILESDIR}"/${PN}-3.27.4-0001-FindPkgConfig-ignore-whitespace-separators-in-versio.patch ) cmake_src_bootstrap() { @@ -157,6 +152,14 @@ src_prepare() { sed -i -e '/define CMAKE_USE_XCODE/s/XCODE/NO_XCODE/' \ -e '/cmGlobalXCodeGenerator.h/d' \ Source/cmake.cxx || die + # Disable system integration, bug #933744 + sed -i -e 's/__APPLE__/__DISABLED__/' \ + Source/cmFindProgramCommand.cxx \ + Source/CPack/cmCPackGeneratorFactory.cxx || die + sed -i -e 's/__MAC_OS_X_VERSION_MIN_REQUIRED/__DISABLED__/' \ + Source/cmMachO.cxx || die + sed -i -e 's:CPack/cmCPack\(Bundle\|DragNDrop\|PKG\|ProductBuild\)Generator.cxx::' \ + Source/CMakeLists.txt || die # Disable isysroot usage with GCC, we've properly instructed # where things are via GCC configuration and ldwrapper @@ -182,13 +185,9 @@ src_prepare() { -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" - if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then - CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" - cmake_src_bootstrap - fi -} + ## in theory we could handle these flags in src_configure, as we do in many other packages. But we *must* + ## handle them as part of bootstrapping, sadly. -src_configure() { # Fix linking on Solaris [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl @@ -196,6 +195,13 @@ src_configure() { # https://gitlab.kitware.com/cmake/cmake/-/issues/20740 filter-lto + if ! has_version -b \>=${CATEGORY}/${PN}-3.13 || ! cmake --version &>/dev/null ; then + CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" + cmake_src_bootstrap + fi +} + +src_configure() { local mycmakeargs=( -DCMAKE_USE_SYSTEM_LIBRARIES=ON -DCMake_ENABLE_DEBUGGER=$(usex dap) @@ -214,11 +220,6 @@ src_configure() { cmake_src_configure } -src_compile() { - cmake_src_compile - use emacs && elisp-compile Auxiliary/cmake-mode.el -} - src_test() { # Fix OutDir and SelectLibraryConfigurations tests # these are altered thanks to our eclass @@ -226,6 +227,8 @@ src_test() { "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \ || die + unset CLICOLOR CLICOLOR_FORCE CMAKE_COMPILER_COLOR_DIAGNOSTICS CMAKE_COLOR_DIAGNOSTICS + pushd "${BUILD_DIR}" > /dev/null || die # Excluded tests: @@ -246,7 +249,9 @@ src_test() { -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \ ) - virtx cmake_src_test + local -x QT_QPA_PLATFORM=offscreen + + cmake_src_test } src_install() { @@ -257,11 +262,6 @@ src_install() { doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/man*/*.[0-8] fi - if use emacs; then - elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi - insinto /usr/share/vim/vimfiles/syntax doins Auxiliary/vim/syntax/cmake.vim @@ -275,8 +275,6 @@ src_install() { } pkg_postinst() { - use emacs && elisp-site-regen - if use gui; then xdg_icon_cache_update xdg_desktop_database_update @@ -285,8 +283,6 @@ pkg_postinst() { } pkg_postrm() { - use emacs && elisp-site-regen - if use gui; then xdg_icon_cache_update xdg_desktop_database_update diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r5.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r5.ebuild new file mode 100644 index 0000000000..e16880542a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230125.3-r5.ebuild @@ -0,0 +1,68 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="Abseil Common Libraries (C++), LTS Branch" +HOMEPAGE="https://abseil.io/" +SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/${PV%%.*}.0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="test" + +RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + test? ( + sys-libs/timezone-data + ) +" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-20230125.2-musl-1.2.4.patch #906218 + "${FILESDIR}"/${PN}-random-tests.patch #935417 + "${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337 + "${FILESDIR}/${PN}-include-cstdint.patch" #937307 +) + +src_prepare() { + cmake_src_prepare + + # un-hardcode abseil compiler flags + sed -i \ + -e '/"-maes",/d' \ + -e '/"-msse4.1",/d' \ + -e '/"-mfpu=neon"/d' \ + -e '/"-march=armv8-a+crypto"/d' \ + absl/copts/copts.py || die + + # now generate cmake files + python_fix_shebang absl/copts/generate_copts.py + absl/copts/generate_copts.py || die +} + +multilib_src_configure() { + local mycmakeargs=( + # We use -std=c++14 here so that abseil-cpp's string_view is used + # See the discussion in https://github.com/gentoo/gentoo/pull/32281. + -DCMAKE_CXX_STANDARD=14 + -DABSL_ENABLE_INSTALL=TRUE + -DABSL_USE_EXTERNAL_GOOGLETEST=ON + -DABSL_PROPAGATE_CXX_STD=TRUE + # TEST_HELPERS needed for protobuf (bug #915902) + -DABSL_BUILD_TEST_HELPERS=ON + -DABSL_BUILD_TESTING=$(usex test ON OFF) + $(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests. + ) + + cmake_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230802.0-r4.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230802.0-r4.ebuild new file mode 100644 index 0000000000..81fab0813b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20230802.0-r4.ebuild @@ -0,0 +1,68 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="Abseil Common Libraries (C++), LTS Branch" +HOMEPAGE="https://abseil.io/" +SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/${PV%%.*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" + +RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + test? ( + sys-libs/timezone-data + ) +" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" + "${FILESDIR}/${PN}-random-tests.patch" #935417 + "${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337 + "${FILESDIR}/${PN}-include-cstdint.patch" +) + +src_prepare() { + cmake_src_prepare + + # un-hardcode abseil compiler flags + sed -i \ + -e '/"-maes",/d' \ + -e '/"-msse4.1",/d' \ + -e '/"-mfpu=neon"/d' \ + -e '/"-march=armv8-a+crypto"/d' \ + absl/copts/copts.py || die + + # now generate cmake files + python_fix_shebang absl/copts/generate_copts.py + absl/copts/generate_copts.py || die +} + +multilib_src_configure() { + local mycmakeargs=( + # We use -std=c++14 here so that abseil-cpp's string_view is used + # See the discussion in https://github.com/gentoo/gentoo/pull/32281. + -DCMAKE_CXX_STANDARD=14 + -DABSL_ENABLE_INSTALL=TRUE + -DABSL_USE_EXTERNAL_GOOGLETEST=ON + -DABSL_PROPAGATE_CXX_STD=TRUE + # TEST_HELPERS needed for protobuf (bug #915902) + -DABSL_BUILD_TEST_HELPERS=ON + -DABSL_BUILD_TESTING=$(usex test ON OFF) + $(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests. + ) + + cmake_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20240116.2-r4.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20240116.2-r4.ebuild new file mode 100644 index 0000000000..7c260feeb0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/abseil-cpp-20240116.2-r4.ebuild @@ -0,0 +1,68 @@ +# Copyright 2020-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake-multilib python-any-r1 + +DESCRIPTION="Abseil Common Libraries (C++), LTS Branch" +HOMEPAGE="https://abseil.io/" +SRC_URI="https://github.com/abseil/abseil-cpp/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/${PV%%.*}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="test" + +RDEPEND=">=dev-cpp/gtest-1.13.0[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + test? ( + sys-libs/timezone-data + ) +" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}/${PN}-20230802.0-sdata-tests.patch" + "${FILESDIR}/${PN}-random-tests.patch" #935417 + "${FILESDIR}/${PN}-20230802.0-conditional-use-of-lzcnt.patch" #934337 + "${FILESDIR}/${PN}-include-cstdint.patch" #937307 +) + +src_prepare() { + cmake_src_prepare + + # un-hardcode abseil compiler flags + sed -i \ + -e '/"-maes",/d' \ + -e '/"-msse4.1",/d' \ + -e '/"-mfpu=neon"/d' \ + -e '/"-march=armv8-a+crypto"/d' \ + absl/copts/copts.py || die + + # now generate cmake files + python_fix_shebang absl/copts/generate_copts.py + absl/copts/generate_copts.py || die +} + +multilib_src_configure() { + local mycmakeargs=( + # We use -std=c++14 here so that abseil-cpp's string_view is used + # See the discussion in https://github.com/gentoo/gentoo/pull/32281. + -DCMAKE_CXX_STANDARD=14 + -DABSL_ENABLE_INSTALL=TRUE + -DABSL_USE_EXTERNAL_GOOGLETEST=ON + -DABSL_PROPAGATE_CXX_STD=TRUE + # TEST_HELPERS needed for protobuf (bug #915902) + -DABSL_BUILD_TEST_HELPERS=ON + -DABSL_BUILD_TESTING=$(usex test ON OFF) + $(usex test -DBUILD_TESTING=ON '') # intentional usex, it used both variables for tests. + ) + + cmake_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/files/abseil-cpp-include-cstdint.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/files/abseil-cpp-include-cstdint.patch new file mode 100644 index 0000000000..7aa5c2f1ee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/abseil-cpp/files/abseil-cpp-include-cstdint.patch @@ -0,0 +1,33 @@ +https://github.com/abseil/abseil-cpp/commit/809e5de7b92950849289236a5a09e9cb4f32c7b9 + +From: Christopher Fore +Date: Mon, 5 Aug 2024 10:48:19 -0400 +Subject: [PATCH] container/internal: Explicitly include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 15 will no longer include by default, resulting in build +failures in projects that do not explicitly include it. + +Error: +absl/container/internal/container_memory.h:66:27: error: ‘uintptr_t’ does not name a type + 66 | assert(reinterpret_cast(p) % Alignment == 0 && + | ^~~~~~~~~ +absl/container/internal/container_memory.h:31:1: note: ‘uintptr_t’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ + 30 | #include "absl/utility/utility.h" + +++ |+#include + 31 | + +See-also: https://gcc.gnu.org/pipermail/gcc-cvs/2024-August/407124.html +Signed-off-by: Christopher Fore +--- a/absl/container/internal/container_memory.h ++++ b/absl/container/internal/container_memory.h +@@ -17,6 +17,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/nasm/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/nasm/metadata.xml index af856ea306..4c45454f10 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/nasm/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-lang/nasm/metadata.xml @@ -2,8 +2,8 @@ - matthew@gentoo.org - Matthew Smith + arthurzam@gentoo.org + Arthur Zamarin The Netwide Assembler, NASM, is an 80x86 assembler designed for portability diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/nasm/nasm-2.16.03.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/nasm/nasm-2.16.03.ebuild index 4c03189e21..472488d3e5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/nasm/nasm-2.16.03.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/nasm/nasm-2.16.03.ebuild @@ -12,8 +12,8 @@ S="${WORKDIR}"/${P/_} LICENSE="BSD-2" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ia64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" -IUSE="doc lto" +KEYWORDS="amd64 arm64 ~ia64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x86-linux" +IUSE="doc" QA_CONFIG_IMPL_DECL_SKIP=( # Windows. @@ -75,10 +75,9 @@ src_prepare() { } src_configure() { - local myconfargs=( - $(use_enable lto) - ) - econf "${myconfargs[@]}" + # --enable-lto just appends -flto to *FLAGS + # so let users just use lto through normal make.conf *FLAGS + econf } src_compile() { diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/python/Manifest index 34c6cfd66a..8ba32f9d79 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/Manifest @@ -8,6 +8,8 @@ DIST Python-3.12.3.tar.xz 20625068 BLAKE2B fc4f57ae50183db4c8cb37d94c37a7e58da5d DIST Python-3.12.3.tar.xz.asc 963 BLAKE2B f9668dde210793f8da0e0bb026b8ec3e0b4bc3abc58e72732f8faf356b19ca88a59b9d89b4b10f77b3602d9a967f0f2f44a0f091d698bc28ba9bad8049e5e006 SHA512 c291ec5b5e4f8deba867cc517624dd9a174745f04061ef737e58f3d52b9b30318264aec350e339fe88ccb493809ca1a90a378e86d86b8ec4a4f578b1a5843624 DIST Python-3.12.4.tar.xz 20659356 BLAKE2B 4255171ef8ee1777bab829be7bbaf28a9d5073985b3b1309a41694dda5f6b4ad599df4534a1ce83ec65b357d42416cc18722ca94b4227a45ebd90e2c1df90945 SHA512 750132ee6369196096130a924f4ddb78b9a55804133e5d136a70b9280928822974d1aa559d844486df02e89155fb0d8117871e1ac532abc18174309ca4b08369 DIST Python-3.12.4.tar.xz.asc 963 BLAKE2B d4f62dca1de5f4e4b2581fc49ca55b1d87abe7c4ceb2c9087efe4b92d9e9b3bdd25949bbf82fd771b4b60bc3690be982c2f25b810d87592665f0728fbe08be9d SHA512 1102b17f395e0ec5de5368d04a4dceb8cc98dd408b68b53998071cf129eb9a6c259316a416128f1dfa37a739f86e599507502a98430348da2272442ce1b7059e +DIST Python-3.12.5.tar.xz 20422396 BLAKE2B f127d1e12d12be84d5837282757787be8a0cf702adce29b93622f91f45ba2d8cc0f5db2e8277c86b098623951b302015febd28bdabaff66b30cb06a5ef2b4a24 SHA512 7a1c30d798434fe24697bc253f6010d75145e7650f66803328425c8525331b9fa6b63d12a652687582db205f8d4c8279c8f73c338168592481517b063351c921 +DIST Python-3.12.5.tar.xz.asc 963 BLAKE2B 238167f6b4012136bc4274eee0dd4d958c4ee02d2505f9f64e5bcad15e84a9e9e12a9fc907651083543f1fce93579b752d4ccdf60c8cc421cb43e9034877bf1c SHA512 65ce92272a38cc6bf8bf56fa2a99a830cf5b33b811b1788508e7b6f8b5d3e93e0b143412f829271be40cbb4e7c154f84499239b3e8ab63b2ccf0a5a22d2f84ee DIST Python-3.13.0b1.tar.xz 21054240 BLAKE2B fba108b2971fe188a05340753a48379c9a829ce680f13dc50d95d889ef5ee833b82be157d1b011ba841c149d633e8eb64b07098bf03a2adcf711b3f688465050 SHA512 81cc1d8691bfcc8f8bb232ea15c18039d0df036f5cbc1667fec3b6c34cdf198bed97418ec775c037778c250b7bc4f35bd5fb938dd478cc17fc48c74b8a2b2d19 DIST Python-3.13.0b1.tar.xz.asc 963 BLAKE2B 1b038d2b73fdbe11a1ada18ceab4a174ae52aab68ae9c3a9952ee60a16ce3e08e54c13e0c47264442415f70bd39a06c2b0f97c3cef31330f51102dad6d4a837b SHA512 c10832b5016ad9a9588b7efd29a35272c1c07b444df116c397fed82d66f30150687d68a6853637094be2fe1d8ed0928a9cd151617c91d9eb9938ba1385bd7143 DIST Python-3.13.0b2.tar.xz 21089692 BLAKE2B 3cc77e9b7abcd8c9797a40b2a1f5ff6562a1841dd44c4785a57941b1eb4d70d20a3dc5bcf8cbfe3d1b2c7f846d7da7fd89758e113542820945da996d2c6a68af SHA512 3a37c8137958a6ebaf06f5a03b28c7817f359f346d820a9989932b1a716478647e8d1b94c1a08197bcabf68cd90443a08ab9454af9151eace52401d8b60d0c35 @@ -16,20 +18,30 @@ DIST Python-3.13.0b3.tar.xz 20841504 BLAKE2B 92760124355483da082ac9fdc7a72eb6739 DIST Python-3.13.0b3.tar.xz.asc 963 BLAKE2B 784df664961ea36cb570d685c0cf6e8fe7159161c38103f217303bc0264c73a9904021cca297a180c7dd712d4e7fcee161d741919bee49eff962a25d14568d41 SHA512 3d8bdc8c26441a12518940d264e93a8897042e297ccf9cd2ddec725716a58486475be9462582ee489bd189a4d028b43504f979298174c1b008d521b7ab5fbf1b DIST Python-3.13.0b4.tar.xz 20876136 BLAKE2B b3a7b42b03320df618af18844a8b0f1c4b88b9bcd581cacd2d40d3ecec7d0f11aac36e54913f64541a2287d7a5052aa69f8e8d0379d6bbb4fba78600bf484f75 SHA512 e556f7a4e54b688d0424b0bd84f9849b52f4f7e04c68d4d5b877d86b4f9ded92c9efaa2b7ab33f345235f35e8d544833542f7a4cb100d0ff15b7d98b8367b935 DIST Python-3.13.0b4.tar.xz.asc 963 BLAKE2B 0d9c7baa1eedce684e73359682f63c2aa6e7abc7cc77ee7fcf6d9658e93221c02412aa55f22d16337b72a680f10c70520742292da1138228f9257f81bc57d328 SHA512 243637efff94965aa4d997fe26c91a7c1aa7dcfdf7f78d35d6f4fc408b654dfa9d075d1c73bc5a90d145f6e5029ee395a86faf7e027c24a55fabfea6ca20fbd4 +DIST Python-3.13.0rc1.tar.xz 20881016 BLAKE2B 3971a233e9c3c782973e0276740f00f8f2072eeda914663cdf7fa6c5de2437c60c441184344a64e25cab5c71a02c47cf4602dd08f127f310c885386cd887fec4 SHA512 fce7664f3298cfd191a7dc20b7b47acafdc50d058a2814312c94c30b65291395957d701e4661b9bb760417942acb5d27e5b8bb479bcda9a82cf29f53772a2daf +DIST Python-3.13.0rc1.tar.xz.asc 963 BLAKE2B 1c292362cd133dbbb1df1e0cf440e8adde2bc8db9174e550d5b76a09e80d0dbc11a0250e6f041e54fe58f25dc05f071c7af1aa910ae56ece5eb430502a2ba67c SHA512 3613829d9631f46b1b1ce11bfe5bb7fbfa49d97b639bb883c86737ea6ae8d15c24c526083cafb916011bd6d0b3b5fab2b17afd367edbdce99b32e0b4b845fd22 DIST Python-3.8.19.tar.xz 18975156 BLAKE2B 57b241aeb8f99a8c30590dcb9402abbcf573f00d06e807846bc9135c0a8a4af896c4d772d34abc3c292339953f4974a203bff61a78641d91b1826770226cd7e9 SHA512 1d2a57fa15ccdaec8cdca508ba2ffb01e1ae053a3446ac709bc334480f8e913070899f01ed680cce6dc7ddfddcb27ef402fe206562249fa4c4e87be21ece0625 DIST Python-3.8.19.tar.xz.asc 833 BLAKE2B a11705011e9ea2bd6cbabc2b4c896ba94675341188eb483b881c2cb25c932e9ff25f9f589f930605b0442ff93a1f54532608b111c8ace715a406ce10809af671 SHA512 efdaae5462badcf4b98625ce8ab0e34756acea9539416e6ec428725b04539f8c38c1978de346510d669e93bbeef3ae20b1534e4c6582f89c7dc56a04c7cae140 DIST Python-3.9.19.tar.xz 19682840 BLAKE2B a12256663f0ff3b799c2193c5877aa89a434340dfa01e655f790abea70af0709b54577e1c2590add241308a8581fd6f45a22aed450bd5db2bf9fa35c4a9d619b SHA512 5577830c734e63a70bbc62cd33d263b9aa87c4381b49cb694c3559067c4c682a55506b65ec5514a8e0a5abf6294dc728e909385d449ae1c388e62f83cea9bb89 DIST Python-3.9.19.tar.xz.asc 833 BLAKE2B b48b58b8ccf4d6ba8d0d7120f04bebf59f843ffecf5fde4c3989fd9c26e3d3d1ccf4e5688f7024ae94775c8731e9ffa56799fca8596289edf93e4aac5480aaad SHA512 f7f4946243dfc56de2c84f50276b088d347f17054f50e3331d1e312e2a8e2c6ed1b4b4a807202b51137fd2af3fc9218cafa42ed348a954ace896d9a432e2defd DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f DIST python-gentoo-patches-3.10.14_p1.tar.xz 15836 BLAKE2B a850e4ad4f025fa9d38ccba937f1b3ee8443ed186c22ede58b4c7324a8541cf724590686671a9aa9194662303ce75bc80aac8ee6f9da34b793876817b6f593ff SHA512 5d969f5e5126ee675a062924a5f403de142fc5bfe4a931fd3576bcc6298a855419d305d4b1ffedacb429783a05324b36eef4c45c861c47bada0bdd840de2bca3 +DIST python-gentoo-patches-3.10.14_p2.tar.xz 19564 BLAKE2B 2ad1398e0679e73028a0614e8c4ef6bc76928f6c1d0e93c39c3bf2c23201904ee677377abb120444995154bda4251cb8f0aabafca5e6c82601a6270d0e62bf67 SHA512 6d4194b85a176a1a0f7acc3eab48829d504e66381f3008821a9a433e63f5188b444321192ad536d8219a1c3ca56dbdb5c39439401cbbb30f35a606e2b6617624 DIST python-gentoo-patches-3.11.9.tar.xz 8456 BLAKE2B 4e62837f17c1d056460df417b056a79ad78dbcdd3454761c7cda68ffe6faf8f4d4f04d5539e0ba94332fe19a751f7d5ff2c35ff969a6aa09a2c72d2ce5efbff1 SHA512 a288aa8d1d15e906e0f1762602a2122f9dc91bbd6b72123ac5d00ce55b3af324a4e8280b600fc0fb630e489e57ee1547d7595a4ede7a70e4b26d6686a8414997 +DIST python-gentoo-patches-3.11.9_p1.tar.xz 12348 BLAKE2B 885c18eb52d299c8da43fe48106a2464ce594822e8ed362150c98f749065447b7438741cacf82a71db102434a5b2a2e91778aca8609fd7ede7898f9e57a82d49 SHA512 2ed8a97692a8980e565038ad095dad8ed3daf1f8c5c5e042a0bc278c320e099962ad13b5ff919ae334674a4828c5e8f3b9c3af6b3c37e93a42374284f5ea2243 DIST python-gentoo-patches-3.12.3.tar.xz 6028 BLAKE2B 7953a48a1d95a6a33bd88060fbcac463a5469371aa0c882c3945f1fea64a63c4d45fca8451f51f4eaeea00a04267ad2e54e4cc720c95e8bb5a3477e00263b80a SHA512 4779bab2b24e59e4a77987ce3e9611d99e87c9c4d016309758c26a65fe2e11ef04d48d5af628c02b1552dc1f31b768f87448f8e19e716b4fe372941e6dacac3f DIST python-gentoo-patches-3.12.4_p1.tar.xz 7088 BLAKE2B 450b95539aaf7c8c052ca1bbcab3b1a8f1c33e8007b6c66cc290c33d88cac8bad346e13cf96508834599a59ccb6548e6dd8cbfb1e24d84539f502101b04299d0 SHA512 df874cb1d8d0f5df60fca82daa2a59cbcfeba6be72b021101a753306a09bb19ee268681b3fdb39659be923d868c727bf7aabbe8173cfd48a329c66f4727353c7 DIST python-gentoo-patches-3.12.4_p2.tar.xz 11124 BLAKE2B 8e49af60b1e514de9b77c562a8df5ae7d6caf0045e631fcf85a8f91335cf18f1df2ac611ea73d26e5b70c2537beb423a9303dcce41c2c2e2b049ee9f1e537b53 SHA512 df1d49e60d23f5f09144c57034c86f81f8d185f65c3a93bbb2b386977638bd525b45fe1dff8c7202d60ca3a5fdf96b94a492b076072713565e7449b679fde7b5 +DIST python-gentoo-patches-3.12.4_p3.tar.xz 14796 BLAKE2B 68f5235ef434f9db16e7bc635ff51b6607cfb9be713fdc3c0ef624ec0f513345f6e02e27b8ebc2b3c8a5fcd4f4f5161024407ae364bdffd3b22a7a9d3a509b30 SHA512 8e337a7234b8ad64dd82435dcda0ef4e90c21214bd7b13a83fe9ba700d5b07ce11fb33b7d34d808132120b4a077fde26278b87116bb02ccef50470c046a66d2b +DIST python-gentoo-patches-3.12.5.tar.xz 6056 BLAKE2B d9b85d98a75f6365c63ddabb8f25db3be11e7e4de22ec9426bb24160efcca25c75e3e19beec9fc2f8f8fe273c145f825c6f27ece2fca83d44cf2dbdfacae918d SHA512 72949ae8a1c796cb57e8b43d259037a723482b5a3849823c1cdc58acc012177a0ec836a4dd6ad656fe57ee1d84491c03ed9109667a953aa52bf5df7640de969f DIST python-gentoo-patches-3.13.0b1_p3.tar.xz 11056 BLAKE2B ef932bac59d2316ee8fe638a3d34ce247ff587915546038627674cd4c03179998a58336f8ebae45f1fcc94c8059d61ff6f22693f25ace1462bce275f50bfb48f SHA512 956e3da7376d60d7a593af50fff9842016a3b193180e93ab8298756c9eedfb2aaf8c1287bb75111e6340b5bac20a12dcb00ef51ecf0e12ef9ae5c98202fb071b DIST python-gentoo-patches-3.13.0b2_p9.tar.xz 11288 BLAKE2B e46bac845ce54e32446316b8a5e055905f023e88ad7fb9cfed101f0fccf6c0fef2fb9fd5b7dc4b15ec1e6c075ceaa9f07777c3cfede0f88412871beac0a54e47 SHA512 4148342d649acd98cce1f3d3c7bdbf4adad069ba555624882ddb69f00ee0e64641014086b5e60d97eac809ccb1e3e782a112eb58d7bb83bcfa3222811cbb8682 DIST python-gentoo-patches-3.13.0b3.tar.xz 5704 BLAKE2B 665f60d0a440c63ca6bbc1615333e01e0b9d3c5cd8c871157866dd70146a9afb71aecdb6f72f75de2fd8c163d011c8df538c8b278ad6a91079f3300bd05fead3 SHA512 959826aaf467235c8a144a2b94137113b273f79febd30fee0556b718132bb89b5ba97bc01a3718771cade099777f131b322682f336dfaabe18cd5838a75318fa DIST python-gentoo-patches-3.13.0b3_p1.tar.xz 8716 BLAKE2B 25b2d9f059c6f31a354b19833a3dfaab446a43ca00bbaa415e38c3ede6c4a738046469ca4ef6e184a5d7df33a8a1c5209271a1eb0728c3791e6630953bcd798f SHA512 57bbe0470e3356cef3b1880cedd18d4e84d6f64d1f398ce3e3e729744ac5f7a4dc4144333e2355f9ecf41c58382ab5708e7dbf7d480dbf797caa460862aee3bd DIST python-gentoo-patches-3.13.0b4.tar.xz 5700 BLAKE2B cc3e6d899dc51dc4a0f4b57fb5a891a61e5ba5a943edd31b55b6540f1d52a61f2a80f8ac1cdbc36ce155a83ab3942b8991fad0e83baab4c0a1080e62b30e16df SHA512 bf236ed221512a032a057f8b89b29a28e84cfaba56f58c2eaacee846db636089b2ae4534dc55ff3389cfbf1a4485e1cc2049a5cdb98ec1cd31eef71de60596c1 +DIST python-gentoo-patches-3.13.0rc1.tar.xz 5696 BLAKE2B c34beb06ea6052b297e1bc5ec790f712a6d8acfa23b16b44dd8a7fc2788a4ba266da21cc2f463e79f10749e2f4752ae34c7074a0e588e84614020e6acd86403b SHA512 a6a2e8dc2a35a76b265788658cd8ecf2f5b7f466701cf4599df300eb8914435198f26789dafa309a7dc4c23e0da2aeb905c8175611f6fa50f622e70016212202 +DIST python-gentoo-patches-3.13.0rc1_p1.tar.xz 9840 BLAKE2B f8f52be8fde89793e5692a4693c030980a32651626cc6184f962d7d9dc9209ce6593f127ff279b71fda4fafeec148af80971bdb6dcaf129f63cc52238a34630f SHA512 e0d3aaf528ffeed8335f98dd4bfd43da8274757b0ae9f6a473134e9b57eafe12b870e41e1aafa52c2bd96de1b7ab9b9f225ddf8e87eec51f088b5484b3c92852 DIST python-gentoo-patches-3.8.19_p2.tar.xz 35524 BLAKE2B a6b81e6ae907b60eea676cb65a9c693e62453dc44616baaadb294c5782a195c20eff6c2869b38ea110fe06e9e511468f4ab0c3d1811b16e0ab2833f9dc09b25b SHA512 9944c330b6062c2ac6e13fcfbc1c8835dfd078f6744cdfbc03ba787ae97c08bdae559cefadafe9dfe9be9c31f8c15ee895599b266d870f73c06a2f4b15c78dc3 +DIST python-gentoo-patches-3.8.19_p3.tar.xz 39392 BLAKE2B 451765c7546831c35f52e2772b8b43b6515f66cace2d13ed473228bf2d2b18f49b938a61d4cdf1be0fecbebfac1fc8d3d95f7597eb9d877c0b2ce495e8d419c1 SHA512 76e405ddfd3ee98dbd077f6ec83ae93d0506ddbc3b2b8884a0f38c6269ea982b635b0eb7820f6f9b2f81eb0ef514b93a5eb10437414cde4de2bfb7ea37764b3c DIST python-gentoo-patches-3.9.19_p3.tar.xz 28240 BLAKE2B 35c70b1f9a590abe9a74795f478ab788cd72c96e9d84f2756685e61324dc4203148e71b00a236bb4af8fb8315e3582ecec255b39749a653e0511d4a9f9fef725 SHA512 6b8f4dab4aa7d4d646ee4091b5cf76bbc8896d4299a3623660a2c5fec06c0cf56c0a50ac87604885cd155141bc85e0e80acdbedb7b34a813901aad021b9b8ab2 +DIST python-gentoo-patches-3.9.19_p4.tar.xz 32048 BLAKE2B 9595d508304baf36a2c8daa2ae15d3596fdfb5fed5c531fc379ee347d5b165885ade1842f094184fb7bd81a6385e45f9b77ba7bfa4334ea30292c0bc59b373e2 SHA512 5713c69ee3745246a570e0f05ac8f45baa8f9fa8a2154c930f1ddcf827a2a790cb5e308f5ff9452d3ffda5d60c167a02429af773eebf13dcb6463793cd448500 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.10.14_p2.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.10.14_p2.ebuild new file mode 100644 index 0000000000..0b054e7e08 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.10.14_p2.ebuild @@ -0,0 +1,542 @@ +# Copyright 1999-2024 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 python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build 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:= + >=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 + ensurepip? ( dev-python/ensurepip-wheels ) + 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 ) + valgrind? ( dev-debug/valgrind ) + test? ( app-arch/xz-utils ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-python ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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 +} + +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 and bug #864911. + 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. + --without-lto + --disable-optimizations + ) + + 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+=" _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+=" _ctypes _crypt" 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 + 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 + + append-flags -fwrapv + 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 + + 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 + + -x test_gdb + -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 + ) + + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # 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 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --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 readline readline "$(usex libedit editline readline)") + $(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 + build_cbuild_python + # Point the imminent CHOST build to the Python we just + # built for CBUILD. + export PATH="${WORKDIR}/${P}-${CBUILD}:${PATH}" + 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} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # musl-specific skips + use elibc_musl && test_opts+=( + # 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 + ) + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + emake DESTDIR="${D}" 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 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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.11.9_p1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.11.9_p1.ebuild new file mode 100644 index 0000000000..c61b855b21 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.11.9_p1.ebuild @@ -0,0 +1,573 @@ +# Copyright 1999-2024 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 python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build 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 + >=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 + ensurepip? ( dev-python/ensurepip-wheels ) + 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? ( app-arch/xz-utils ) + 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 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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 +} + +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 + # We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. + 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_STATE=disabled + MODULE__DBM_STATE=disabled + MODULE__GDBM_STATE=disabled + MODULE__DBM_STATE=disabled + MODULE__SQLITE3_STATE=disabled + MODULE__HASHLIB_STATE=disabled + MODULE__SSL_STATE=disabled + MODULE__CURSES_STATE=disabled + MODULE__CURSES_PANEL_STATE=disabled + MODULE_READLINE_STATE=disabled + MODULE__TKINTER_STATE=disabled + MODULE_PYEXPAT_STATE=disabled + MODULE_ZLIB_STATE=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 --with-build-python value + # immediately. + PYTHON_DISABLE_MODULES+=" _ctypes _crypt" 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 + + append-flags -fwrapv + 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 + + 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 + + -x test_gdb + -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 + ) + + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # 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 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --with-dbmliborder="${dbmliborder}" + --with-libc= + --enable-loadable-sqlite-extensions + --without-ensurepip + --without-lto + --with-system-expat + --with-system-ffi + --with-system-libmpdec + --with-platlibdir=lib + --with-pkg-config=yes + --with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip + + $(use_with debug assertions) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(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 + 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 + + 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 + + # force-disable modules we don't want built + local disable_modules=( NIS ) + use gdbm || disable_modules+=( _GDBM _DBM ) + use sqlite || disable_modules+=( _SQLITE3 ) + use ssl || disable_modules+=( _HASHLIB _SSL ) + use ncurses || disable_modules+=( _CURSES _CURSES_PANEL ) + use readline || disable_modules+=( READLINE ) + use tk || disable_modules+=( _TKINTER ) + + local mod + for mod in "${disable_modules[@]}"; do + echo "MODULE_${mod}_STATE=disabled" + done >> Makefile || die + + # 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 + export PYTHONSTRICTEXTENSIONBUILD=1 + + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # musl-specific skips + use elibc_musl && test_opts+=( + # 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 + ) + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${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}" 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 ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + 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,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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3.11.0_beta4-r2; then + ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files" + ewarn "installed previously are no longer valid and will be regenerated" + ewarn "(or ignored) on the next import. This may cause sandbox failures" + ewarn "when installing some packages and checksum mismatches when removing" + ewarn "old versions. To actively prevent this, rebuild all packages" + ewarn "installing Python 3.11 modules, e.g. using:" + ewarn + ewarn " emerge -1v /usr/lib/python3.11/site-packages" + fi + done +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.4_p3.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.4_p3.ebuild new file mode 100644 index 0000000000..a2461c6b39 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.4_p3.ebuild @@ -0,0 +1,558 @@ +# Copyright 1999-2024 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 python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build 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 + >=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 + ensurepip? ( dev-python/ensurepip-pip ) + 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? ( + app-arch/xz-utils + 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 + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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. + # 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 _crypt + 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 + + append-flags -fwrapv + 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 + + 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 + + -x test_gdb + -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 + ) + + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # 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 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --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 + + $(use_with debug assertions) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + 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} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # musl-specific skips + use elibc_musl && test_opts+=( + # 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 + ) + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" 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 ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + 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,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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.5.ebuild new file mode 100644 index 0000000000..bec993fb2e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.5.ebuild @@ -0,0 +1,558 @@ +# Copyright 1999-2024 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 python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build 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 + >=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 + ensurepip? ( dev-python/ensurepip-pip ) + 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? ( + app-arch/xz-utils + 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 + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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. + # 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 _crypt + 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 + + append-flags -fwrapv + 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 + + 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 + + -x test_gdb + -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 + ) + + # musl-specific skips + use elibc_musl && profile_task_flags+=( + # 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 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --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 + + $(use_with debug assertions) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + 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} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # musl-specific skips + use elibc_musl && test_opts+=( + # 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 + ) + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + # workaround https://bugs.gentoo.org/775416 + addwrite "/usr/lib/python${PYVER}/site-packages" + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # the Makefile rules are broken + # https://github.com/python/cpython/issues/100221 + mkdir -p "${libdir}"/lib-dynload || die + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" 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 ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + 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,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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1.ebuild new file mode 100644 index 0000000000..ba7b056987 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1.ebuild @@ -0,0 +1,658 @@ +# Copyright 1999-2024 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 llvm-r1 multiprocessing +inherit pax-utils python-utils-r1 toolchain-funcs 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build +debug +ensurepip examples gdbm +gil 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 + >=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 + ensurepip? ( dev-python/ensurepip-pip ) + 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? ( + app-arch/xz-utils + 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 ' + sys-devel/clang:${LLVM_SLOT} + sys-devel/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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 + + if ! use gil || use jit; then + ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" + ewarn "them 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[gil,-jit]. Instead," + ewarn "please consider reporting freethreading / JIT problems upstream." + fi +} + +pkg_setup() { + use jit && llvm-r1_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. + # 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 _crypt + 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 + + append-flags -fwrapv + 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=( + # failures + -x test_concurrent_futures + -x test_gdb + # flaky: https://github.com/python/cpython/issues/121973 + -x test_pyrepl + ) + + # 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 + ) + ;; + ia64*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + ) + ;; + 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_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 + --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 + + # Fails in profiling run, passes in src_test(). + -x test_capi + ) + + # 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 + ) + ;; + ia64*) + profile_task_flags+=( + -x test_signal + ) + ;; + 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --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 + + $(use_with debug assertions) + $(use_enable gil) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + 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= + 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= + + 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}" 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 ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + 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,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" + + # 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 +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3.13.0_beta2; then + ewarn "Python 3.13.0b2 has changed its module ABI. The .pyc files" + ewarn "installed previously are no longer valid and will be regenerated" + ewarn "(or ignored) on the next import. This may cause sandbox failures" + ewarn "when installing some packages and checksum mismatches when removing" + ewarn "old versions. To actively prevent this, rebuild all packages" + ewarn "installing Python 3.13 modules, e.g. using:" + ewarn + ewarn " emerge -1v /usr/lib/python3.13/site-packages" + fi + done +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1_p1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1_p1.ebuild new file mode 100644 index 0000000000..a7d766ef12 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.0_rc1_p1.ebuild @@ -0,0 +1,660 @@ +# Copyright 1999-2024 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 llvm-r1 multiprocessing +inherit pax-utils python-utils-r1 toolchain-funcs 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE=" + bluetooth build +debug +ensurepip examples gdbm +gil 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 + >=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 + ensurepip? ( dev-python/ensurepip-pip ) + 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? ( + app-arch/xz-utils + 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 ' + sys-devel/clang:${LLVM_SLOT} + sys-devel/llvm:${LLVM_SLOT} + ') + ) + verify-sig? ( >=sec-keys/openpgp-keys-python-20221025 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" +if [[ ${PV} != *_alpha* ]]; then + RDEPEND+=" + dev-lang/python-exec[python_targets_python${PYVER/./_}(-)] + " +fi + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +# 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 + + if ! use gil || use jit; then + ewarn "USE=-gil and USE=jit flags are considered experimental upstream. Using" + ewarn "them 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[gil,-jit]. Instead," + ewarn "please consider reporting freethreading / JIT problems upstream." + fi +} + +pkg_setup() { + use jit && llvm-r1_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. + # 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 _crypt + 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 + + append-flags -fwrapv + 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=( + # failures + -x test_concurrent_futures + -x test_gdb + # flaky: https://github.com/python/cpython/issues/121973 + -x test_pyrepl + # flaky: https://github.com/python/cpython/issues/122136 (bug #936314) + -x test_asyncio + ) + + # 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 + ) + ;; + ia64*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + ) + ;; + 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_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 + --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 + + # Fails in profiling run, passes in src_test(). + -x test_capi + ) + + # 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 + ) + ;; + ia64*) + profile_task_flags+=( + -x test_signal + ) + ;; + 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 + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-computed-gotos + --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 + + $(use_with debug assertions) + $(use_enable gil) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # https://bugs.gentoo.org/700012 + if tc-is-lto; then + append-cflags $(test-flags-CC -ffat-lto-objects) + 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= + 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= + + 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}" 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 ensurepip; then + rm -r "${libdir}"/ensurepip || die + fi + 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,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" + + # 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 +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 3.13.0_beta2; then + ewarn "Python 3.13.0b2 has changed its module ABI. The .pyc files" + ewarn "installed previously are no longer valid and will be regenerated" + ewarn "(or ignored) on the next import. This may cause sandbox failures" + ewarn "when installing some packages and checksum mismatches when removing" + ewarn "old versions. To actively prevent this, rebuild all packages" + ewarn "installing Python 3.13 modules, e.g. using:" + ewarn + ewarn " emerge -1v /usr/lib/python3.13/site-packages" + fi + done +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.8.19_p3.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.8.19_p3.ebuild new file mode 100644 index 0000000000..9bec4b8b2b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.8.19_p3.ebuild @@ -0,0 +1,432 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" +WANT_LIBTOOL="none" + +inherit autotools flag-o-matic multiprocessing pax-utils +inherit prefix python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86" +IUSE=" + bluetooth build 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:= + >=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 + ensurepip? ( dev-python/ensurepip-wheels ) + 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 ) + 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 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/python.org.asc + +QA_PKGCONFIG_VERSION=${PYVER} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +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 + + rm Lib/distutils/command/wininst*.exe || 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 + + append-flags -fwrapv + 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 + + 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-computed-gotos + --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_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 + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.9.19_p4.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.9.19_p4.ebuild new file mode 100644 index 0000000000..a7e58e9415 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.9.19_p4.ebuild @@ -0,0 +1,492 @@ +# Copyright 1999-2024 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 python-utils-r1 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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86" +IUSE=" + bluetooth build 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:= + >=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 + ensurepip? ( dev-python/ensurepip-wheels ) + 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 ) + 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 ) +" +RDEPEND+=" + !build? ( app-misc/mime-types ) +" + +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 + + append-flags -fwrapv + 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 + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + -x test_gdb + -x test_dtrace + -u-network + + # 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 + ) + + 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-computed-gotos + --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} + + if use pgo ; then + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + addpredict "/usr/lib/python${PYVER}/site-packages" + 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=( + -u-network + -j "$(makeopts_jobs)" + + # fails + -x test_concurrent_futures + -x test_gdb + ) + + if use sparc ; then + # bug #788022 + test_opts+=( + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + ) + fi + + # workaround docutils breaking tests + cat > Lib/docutils.py <<-EOF || die + raise ImportError("Thou shalt not import!") + EOF + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + rm Lib/docutils.py || die + + [[ ${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" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # 2to3, pydoc + ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/swig/swig-4.2.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/swig/swig-4.2.1.ebuild index ed5d711636..17b5701ff3 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/swig/swig-4.2.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/swig/swig-4.2.1.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz" LICENSE="GPL-3+ BSD BSD-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="ccache doc pcre test" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/yasm/files/yasm-1.3.0-fix-modern-c.patch b/sdk_container/src/third_party/portage-stable/dev-lang/yasm/files/yasm-1.3.0-fix-modern-c.patch new file mode 100644 index 0000000000..61f1e88634 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/yasm/files/yasm-1.3.0-fix-modern-c.patch @@ -0,0 +1,87 @@ +https://github.com/yasm/yasm/commit/f79f5e37f0e4b06d5dc303cc219929d7359dd7df +From: Biswapriyo Nath +Date: Thu, 18 May 2023 03:53:32 +0530 +Subject: [PATCH] Fix function declaration warnings with clang (#226) + +This fixes the following compiler warnings with clang + +tools/genperf/perfect.c:65:6: warning: a function definition without a prototype +is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] + +frontends/yasm/yasm.c:1379:23: warning: a function declaration without a prototype +is deprecated in all versions of C [-Wstrict-prototypes] + +modules/objfmts/elf/elf.c:225:18: warning: a function declaration without a prototype +is deprecated in all versions of C [-Wstrict-prototypes] +--- a/frontends/tasm/tasm.c ++++ b/frontends/tasm/tasm.c +@@ -817,7 +817,7 @@ opt_exe_handler(char *cmd, /*@unused@*/ char *param, int extra) + } + + static void +-apply_preproc_builtins() ++apply_preproc_builtins(void) + { + char *predef; + +@@ -853,7 +853,7 @@ apply_preproc_standard_macros(const yasm_stdmac *stdmacs) + } + + static void +-apply_preproc_saved_options() ++apply_preproc_saved_options(void) + { + constcharparam *cp, *cpnext; + +--- a/frontends/yasm/yasm.c ++++ b/frontends/yasm/yasm.c +@@ -1376,7 +1376,7 @@ opt_plugin_handler(/*@unused@*/ char *cmd, char *param, + #endif + + static void +-apply_preproc_builtins() ++apply_preproc_builtins(void) + { + char *predef; + +@@ -1409,7 +1409,7 @@ apply_preproc_standard_macros(const yasm_stdmac *stdmacs) + } + + static void +-apply_preproc_saved_options() ++apply_preproc_saved_options(void) + { + constcharparam *cp, *cpnext; + +--- a/modules/objfmts/elf/elf.c ++++ b/modules/objfmts/elf/elf.c +@@ -222,7 +222,7 @@ elf_strtab_entry_set_str(elf_strtab_entry *entry, const char *str) + } + + elf_strtab_head * +-elf_strtab_create() ++elf_strtab_create(void) + { + elf_strtab_head *strtab = yasm_xmalloc(sizeof(elf_strtab_head)); + elf_strtab_entry *entry = yasm_xmalloc(sizeof(elf_strtab_entry)); +@@ -373,7 +373,7 @@ elf_ssym_symtab_entry_print(void *data, FILE *f, int indent_level) + } + + elf_symtab_head * +-elf_symtab_create() ++elf_symtab_create(void) + { + elf_symtab_head *symtab = yasm_xmalloc(sizeof(elf_symtab_head)); + elf_symtab_entry *entry = yasm_xmalloc(sizeof(elf_symtab_entry)); +--- a/tools/genperf/perfect.c ++++ b/tools/genperf/perfect.c +@@ -62,8 +62,7 @@ Find the mapping that will produce a perfect hash + */ + + /* return the ceiling of the log (base 2) of val */ +-ub4 phash_log2(val) +-ub4 val; ++ub4 phash_log2(ub4 val) + { + ub4 i; + for (i=0; ((ub4)1<=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen + +PDEPEND=" + dbus? ( gnome-base/dconf ) + mime? ( x11-misc/shared-mime-info ) +" +# shared-mime-info needed for gio/xdgmime, bug #409481 +# dconf is needed to be able to save settings, bug #498436 + +MULTILIB_CHOST_TOOLS=( + /usr/bin/gio-querymodules$(get_exeext) +) + +PATCHES=( + "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch +) + +python_check_deps() { + python_has_version "dev-python/packaging[${PYTHON_USEDEP}]" +} + +pkg_setup() { + if use kernel_linux ; then + CONFIG_CHECK="~INOTIFY_USER" + if use test ; then + CONFIG_CHECK="~IPV6" + WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them." + fi + linux-info_pkg_setup + fi + python-any-r1_pkg_setup +} + +src_prepare() { + if use test; then + # TODO: Review the test exclusions, especially now with meson + # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163 + if ! has_version dev-util/desktop-file-utils ; then + ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system," + ewarn "think on installing it to get these tests run." + sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die + sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die + fi + + # gdesktopappinfo requires existing terminal (gnome-terminal or any + # other), falling back to xterm if one doesn't exist + #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then + # ewarn "Some tests will be skipped due to missing terminal program" + # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson + # Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready + # for backport (or in a bump) and file new issue if still fails + sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die + # desktop-app-info/launch* might fail similarly + sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die + #fi + + # https://bugzilla.gnome.org/show_bug.cgi?id=722604 + sed -i -e "/timer\/stop/d" glib/tests/timer.c || die + sed -i -e "/timer\/basic/d" glib/tests/timer.c || die + + ewarn "Tests for search-utils have been skipped" + sed -i -e "/search-utils/d" glib/tests/meson.build || die + + # Play nice with network-sandbox, but this approach would defeat the purpose of the test + #sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die + else + # Don't build tests, also prevents extra deps, bug #512022 + sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die + fi + + # Don't build fuzzing binaries - not used + sed -i -e '/subdir.*fuzzing/d' meson.build || die + + # gdbus-codegen is a separate package + sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die + sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die + + # Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon + sed -i -e '/install_dir/d' gio/tests/meson.build || die + + cat > "${T}/glib-test-ld-wrapper" <<-EOF + #!/usr/bin/env sh + exec \${LD:-ld} "\$@" + EOF + chmod a+x "${T}/glib-test-ld-wrapper" || die + sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die + + # make default sane for us + if use prefix ; then + sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die + # bug #308609, without path, bug #314057 + export PERL=perl + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + # fix standards conflicts + sed -i \ + -e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \ + -e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \ + meson.build || die + sed -i -e '/#define\s\+_POSIX_SOURCE/d' \ + glib/giounix.c || die + fi + + # disable native macOS integrations + sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \ + meson.build || die + sed -i \ + -e '/AvailabilityMacros.h/d' \ + gio/giomodule.c || die + + default + gnome2_environment_reset + # TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only +} + +multilib_src_configure() { + # TODO: figure a way to pass appropriate values for all cross properties + # that glib uses (search for get_cross_property) + #if tc-is-cross-compiler ; then + # https://bugzilla.gnome.org/show_bug.cgi?id=756473 + # TODO-meson: This should be in meson cross file as 'growing_stack' + # property; and more, look at get_cross_property + #case ${CHOST} in + #hppa*|metag*) export glib_cv_stack_grows=yes ;; + #*) export glib_cv_stack_grows=no ;; + #esac + #fi + + use debug && EMESON_BUILD_TYPE=debug + local emesonargs=( + -Ddefault_library=$(usex static-libs both shared) + -Druntime_dir="${EPREFIX}"/run + $(meson_feature selinux) + $(meson_use xattr) + -Dlibmount=enabled # only used if host_system == 'linux' + -Dman-pages=enabled + $(meson_use systemtap dtrace) + $(meson_use systemtap) + $(meson_feature sysprof) + $(meson_use doc documentation) + $(meson_use test tests) + -Dinstalled_tests=false + -Dnls=enabled + -Doss_fuzz=disabled + $(meson_native_use_feature elf libelf) + -Dmultiarch=false + $(meson_native_use_feature introspection) + ) + meson_src_configure +} + +multilib_src_test() { + export XDG_CONFIG_DIRS=/etc/xdg + export XDG_DATA_DIRS=/usr/local/share:/usr/share + export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp" + export LC_TIME=C # bug #411967 + export TZ=UTC + unset GSETTINGS_BACKEND # bug #596380 + python_setup + + # https://bugs.gentoo.org/839807 + local -x SANDBOX_PREDICT=${SANDBOX_PREDICT} + addpredict /usr/b + + # Related test is a bit nitpicking + mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die + chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die + + meson_src_test --timeout-multiplier 20 --no-suite flaky +} + +multilib_src_install() { + meson_src_install + keepdir /usr/$(get_libdir)/gio/modules +} + +multilib_src_install_all() { + # These are installed by dev-util/glib-utils + # TODO: With patching we might be able to get rid of the python-any deps + # and removals, and test depend on glib-utils instead; revisit now with + # meson + rm "${ED}/usr/bin/glib-genmarshal" || die + rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die + rm "${ED}/usr/bin/glib-mkenums" || die + rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die + rm "${ED}/usr/bin/gtester-report" || die + rm "${ED}/usr/share/man/man1/gtester-report.1" || die + # gdbus-codegen manpage installed by dev-util/gdbus-codegen + rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die +} + +pkg_preinst() { + xdg_pkg_preinst + + # Make gschemas.compiled belong to glib alone + local cache="/usr/share/glib-2.0/schemas/gschemas.compiled" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"/${cache} || die + else + touch "${ED}"${cache} || die + fi + + multilib_pkg_preinst() { + # Make giomodule.cache belong to glib alone + local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache" + + if [[ -e ${EROOT}${cache} ]]; then + cp "${EROOT}"${cache} "${ED}"${cache} || die + else + touch "${ED}"${cache} || die + fi + } + + # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache + # file due to inability to create it and GIO might not look at any of the modules there + if ! tc-is-cross-compiler ; then + multilib_foreach_abi multilib_pkg_preinst + fi +} + +pkg_postinst() { + xdg_pkg_postinst + # glib installs no schemas itself, but we force update for fresh install in case + # something has dropped in a schemas file without direct glib dep; and for upgrades + # in case the compiled schema format could have changed + gnome2_schemas_update + + multilib_pkg_postinst() { + gnome2_giomodule_cache_update \ + || die "Update GIO modules cache failed (for ${ABI})" + } + if ! tc-is-cross-compiler ; then + multilib_foreach_abi multilib_pkg_postinst + else + ewarn "Updating of GIO modules cache skipped due to cross-compilation." + ewarn "You might want to run gio-querymodules manually on the target for" + ewarn "your final image for performance reasons and re-run it when packages" + ewarn "installing GIO modules get upgraded or added to the image." + fi + + for v in ${REPLACING_VERSIONS}; do + if ver_test "$v" "-lt" "2.63.6"; then + ewarn "glib no longer installs the gio-launch-desktop binary. You may need" + ewarn "to restart your session for \"Open With\" dialogs to work." + fi + done +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update + + if [[ -z ${REPLACED_BY_VERSION} ]]; then + multilib_pkg_postrm() { + rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die + } + multilib_foreach_abi multilib_pkg_postrm + rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/glib/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/glib/metadata.xml index 30120d5d64..2566d0dec2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/glib/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/glib/metadata.xml @@ -14,6 +14,9 @@ Enable support for listing and extracting from ELF resource files with gresource tool + + Enable generating introspection data (requires dev-libs/gobject-introspection ) + Pull in shared MIME database that many glib-based applications require at runtime to detect or open files. Warning: diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/Manifest index dcf0501a11..f2b1f664fb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/Manifest @@ -1,2 +1,3 @@ DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916 DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97 +DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/gobject-introspection-common-1.80.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/gobject-introspection-common-1.80.1.ebuild new file mode 100644 index 0000000000..af171bc1cf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection-common/gobject-introspection-common-1.80.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +GNOME_ORG_MODULE="gobject-introspection" + +inherit gnome.org + +DESCRIPTION="Build infrastructure for GObject Introspection" +HOMEPAGE="https://gi.readthedocs.io/" + +LICENSE="HPND" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND="!<${CATEGORY}/${GNOME_ORG_MODULE}-${PV}" +# Use !<${PV} because mixing gobject-introspection with different version of -common can cause issues like: +# https://forums.gentoo.org/viewtopic-p-7421930.html + +src_configure() { :; } + +src_compile() { :; } + +src_install() { + insinto /usr/share/aclocal + doins m4/introspection.m4 + + insinto /usr/share/gobject-introspection-1.0 + doins Makefile.introspection +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/Manifest index dcf0501a11..f2b1f664fb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/Manifest @@ -1,2 +1,3 @@ DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916 DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97 +DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/gobject-introspection-1.80.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/gobject-introspection-1.80.1.ebuild new file mode 100644 index 0000000000..a6d1be4002 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/gobject-introspection/gobject-introspection-1.80.1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE="xml(+)" +inherit gnome.org meson python-single-r1 xdg + +DESCRIPTION="Introspection system for GObject-based libraries" +HOMEPAGE="https://gi.readthedocs.io/" + +LICENSE="LGPL-2+ GPL-2+" +SLOT="0" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" + +IUSE="doctool gtk-doc test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# virtual/pkgconfig needed at runtime, bug #505408 +RDEPEND=" + >=dev-libs/gobject-introspection-common-${PV} + >=dev-libs/glib-2.79.0:2 + dev-libs/libffi:= + doctool? ( + $(python_gen_cond_dep ' + dev-python/mako[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + ') + ) + virtual/pkgconfig + ${PYTHON_DEPS} +" +# Wants real bison, not app-alternatives/yacc +DEPEND="${RDEPEND}" +BDEPEND=" + gtk-doc? ( + >=dev-util/gtk-doc-1.19 + app-text/docbook-xml-dtd:4.3 + app-text/docbook-xml-dtd:4.5 + ) + sys-devel/bison + app-alternatives/lex + test? ( + x11-libs/cairo[glib] + $(python_gen_cond_dep ' + dev-python/mako[${PYTHON_USEDEP}] + dev-python/markdown[${PYTHON_USEDEP}] + ') + ) +" + +pkg_setup() { + python-single-r1_pkg_setup +} + +src_configure() { + local emesonargs=( + $(meson_feature test cairo) + $(meson_feature doctool) + #-Dglib_src_dir + $(meson_use gtk-doc gtk_doc) + #-Dcairo_libname + -Dpython="${EPYTHON}" + -Dbuild_introspection_data=true + #-Dgir_dir_prefix + ) + meson_src_configure +} + +src_install() { + meson_src_install + python_fix_shebang "${ED}"/usr/bin/ + python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner + + # Prevent collision with gobject-introspection-common + rm -v "${ED}"/usr/share/aclocal/introspection.m4 \ + "${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die + rmdir "${ED}"/usr/share/aclocal || die +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest index 5ca54566b7..80682a2ca2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest @@ -2,7 +2,7 @@ DIST libassuan-2.5.6.tar.bz2 577012 BLAKE2B 462af1eab69e157f65f8134a492cde01dd1e DIST libassuan-2.5.6.tar.bz2.sig 119 BLAKE2B 379c6566b2369550bfc4b4616fb71ebdbd9947c183488e2af2261db79be3fc34c5691918f3c560b46c20e02e1aa46c44ee31c1fa3727d191f5801831d34e6721 SHA512 c7765530618128a12f1118278d35d8c33d32b560073dbd691cb92c0d94b75fd5fde65cd3f5db717ddfb907b266fdddc1e7a1e2b15b1b89b7470941dbde8162e3 DIST libassuan-2.5.7.tar.bz2 605076 BLAKE2B 67cb01b7ed9be13a52a37db439666bb8eb709cc63204fe250ff57854459aa8b36655479e887b285fe9ad799c49e66f176f971ab3a871e114cfb217a1f2968d16 SHA512 ca33bd0325bbebccb63b6a84cc0aa5c85b25c6275a68df83aeb3f3729b2cd38220198a941c3479bd461f16b7ddb6b558c0664697ca3153c7fb430544303d773f DIST libassuan-2.5.7.tar.bz2.sig 238 BLAKE2B c30005d67cac32857a0dd59dc8a2b9d0d166c6cd6a413742a1d3117c050e9b1b2b96cc4c470fc3e5693ce4c5a422e2cb008b40ef7883a7d039dc9a2234229265 SHA512 b7a798da0e1252acecf8b58b9cc30a5f10fa432d2581c190e4fb064fcf10e9a1b9e07e86c73ee16f0f25ad0e782fac21142875a06487f612268be7f1a09cc1a9 -DIST libassuan-3.0.1.tar.bz2 592430 BLAKE2B 5d6a7e4e9ce1b196bc7d126786716d95896de6145b8d753e2289bd36cbc96efa216360ac127fadb7be2d577e7fa203c8c8695d4aa11afcca6ed5397dd40209cb SHA512 6914a02c20053bae0fc4c29c5c40655f1cec711983d57fa85e46df34e90b10e33d31256dd50ae7c7faa8d8d750a529bf9072da0cda3bdd77ebfedbc0e26e5e16 -DIST libassuan-3.0.1.tar.bz2.sig 119 BLAKE2B ce246ca64be1cb185d7e69e3de959bf3268ccf764117cec19a460ddeb2cd56259bd8312e6644a385626449bfcd63c194d83bcfe0c48e830e208c242e174f3273 SHA512 c87cd1690d138f21974c4f7331ccfaf9a1ae57e726699c14f8a81e2e15c5d1ff9a880c428d78d378007cb91bae613432ce25fcfc6e496686d18ff0e6438e4e84 DIST libassuan-3.0.0.tar.bz2 592353 BLAKE2B c86f7d62413c6f7a228deb47abe0388790a7c0e3c89b5ee7a7a72f72bea6502d5cbe199b10f06efc885af6fefab358dbe0e61a6f798493dcfcc63df0cfacdb55 SHA512 7c5c95c1b85bef2d4890c068a5a8ea8a1fe0d8def6ab09e5f34fc2746d8808bbb0fc168e3bd66d52ee5ed799dcf9f258f4125cda98c8384f6411bcad8d8b3139 DIST libassuan-3.0.0.tar.bz2.sig 119 BLAKE2B 0717d97dcc5746fced7e7be4e17beb51ac5856722577d58151d802d34dd2d05436da9fcc1d54c132486755f6a241ebb85e95534533e874303b0103786e4e579a SHA512 32ea59e2ccd4b0d35d098bd93a2193f6857a47ebeffd8cd884ea5e0a1abf057e23f0f4ca120e0c74b7369301566a9adc217ec444a2d90a5c5106ec4a4c8df099 +DIST libassuan-3.0.1.tar.bz2 592430 BLAKE2B 5d6a7e4e9ce1b196bc7d126786716d95896de6145b8d753e2289bd36cbc96efa216360ac127fadb7be2d577e7fa203c8c8695d4aa11afcca6ed5397dd40209cb SHA512 6914a02c20053bae0fc4c29c5c40655f1cec711983d57fa85e46df34e90b10e33d31256dd50ae7c7faa8d8d750a529bf9072da0cda3bdd77ebfedbc0e26e5e16 +DIST libassuan-3.0.1.tar.bz2.sig 119 BLAKE2B ce246ca64be1cb185d7e69e3de959bf3268ccf764117cec19a460ddeb2cd56259bd8312e6644a385626449bfcd63c194d83bcfe0c48e830e208c242e174f3273 SHA512 c87cd1690d138f21974c4f7331ccfaf9a1ae57e726699c14f8a81e2e15c5d1ff9a880c428d78d378007cb91bae613432ce25fcfc6e496686d18ff0e6438e4e84 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.0.ebuild index f936805969..4a4e55a0b1 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.0.ebuild @@ -10,7 +10,7 @@ EAPI=8 # any subsequent ones linked within so you're covered for a while.) VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit verify-sig +inherit verify-sig libtool DESCRIPTION="IPC library used by GnuPG and GPGME" HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" @@ -26,6 +26,12 @@ RDEPEND=">=dev-libs/libgpg-error-1.33" DEPEND="${RDEPEND}" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gnupg )" +src_prepare() { + default + # for Solaris shared libraries + elibtoolize +} + src_configure() { local myeconfargs=( GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.1.ebuild index f936805969..4a4e55a0b1 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-3.0.1.ebuild @@ -10,7 +10,7 @@ EAPI=8 # any subsequent ones linked within so you're covered for a while.) VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit verify-sig +inherit verify-sig libtool DESCRIPTION="IPC library used by GnuPG and GPGME" HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" @@ -26,6 +26,12 @@ RDEPEND=">=dev-libs/libgpg-error-1.33" DEPEND="${RDEPEND}" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gnupg )" +src_prepare() { + default + # for Solaris shared libraries + elibtoolize +} + src_configure() { local myeconfargs=( GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libnl/libnl-3.8.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libnl/libnl-3.8.0.ebuild index c258b57d08..fc8c3de466 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libnl/libnl-3.8.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libnl/libnl-3.8.0.ebuild @@ -22,7 +22,7 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 else SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" S="${WORKDIR}/${LIBNL_P}" fi diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.7-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.7-r1.ebuild index 04b867400a..07fc25df28 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.7-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/npth/npth-1.7-r1.ebuild @@ -11,7 +11,7 @@ SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" LICENSE="LGPL-2.1+" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="test" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild index d9b11f9f0d..e6c26cbfee 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-27.2.ebuild @@ -18,7 +18,7 @@ if [[ "${PV}" == *9999 ]]; then inherit git-r3 else SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" MY_SLOT=$(ver_cut 1-2) fi diff --git a/sdk_container/src/third_party/portage-stable/dev-python/certifi/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/certifi/Manifest index a75342220c..7c79b0bb5c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/certifi/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/certifi/Manifest @@ -1,2 +1 @@ -DIST certifi-system-store-3021.3.16.gh.tar.gz 13784 BLAKE2B c0c2322fe298d363c4ef4dada2c0db8837bf7a32d86a7b54a1b45bb3dd3c99d732b2612f25495f4a59d9692f896e2b962e7057fa5fec9998724476db48f90c2a SHA512 44953ed8a3deb5fa4aff3f74afa557219e042acea395e9cdebfd26fd43ce0bdeca07c6b6dfe91977f88852e7674b94337b93c4d78fd2da6f47a6187fa46d6668 DIST certifi-system-store-3024.7.22.gh.tar.gz 12441 BLAKE2B 445477dc557f980c5f2edf37d6683204181071e625dac66e9cc3bdeec38ba28ff385d2a92d8162de6af30fc552b64b6c8ad13a06dd6e7f2e26f02d453d69d5c4 SHA512 a4862dbb9f931322f7c62ecd877bee97679cc147acd4585642cbd215f37663f3bde7a73cf846bb0c84077c6cee1c1e4c06da9e2ce44d8dcb1e8fe6065e282feb diff --git a/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3021.3.16-r4.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3021.3.16-r4.ebuild deleted file mode 100644 index 563a3059ac..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3021.3.16-r4.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# please keep this ebuild at EAPI 7 -- sys-apps/portage dep -EAPI=7 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} pypy3 ) - -inherit distutils-r1 - -MY_P=certifi-system-store-${PV} -DESCRIPTION="A certifi hack to use system trust store on Linux/FreeBSD" -HOMEPAGE=" - https://github.com/tiran/certifi-system-store/ - https://pypi.org/project/certifi-system-store/ -" -SRC_URI=" - https://github.com/tiran/certifi-system-store/archive/v${PV}.tar.gz - -> ${MY_P}.gh.tar.gz -" -S=${WORKDIR}/${MY_P} - -LICENSE="MPL-2.0" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -RDEPEND=" - app-misc/ca-certificates -" - -PATCHES=( - "${FILESDIR}"/${P}-use-importlib.patch -) - -EPYTEST_IGNORE=( - # requires Internet - tests/test_requests.py -) - -distutils_enable_tests pytest - -src_prepare() { - sed -i -e "s^/etc^${EPREFIX}/etc^" src/certifi/core.py || die - distutils-r1_src_prepare -} - -python_compile() { - distutils-r1_python_compile - cd "${BUILD_DIR}/install$(python_get_sitedir)" || die - local distinfo=( certifi_system_store*.dist-info ) - [[ -d ${distinfo} ]] || die - ln -v -s "${distinfo}" "${distinfo/_system_store}" || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3024.7.22.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3024.7.22.ebuild index b37fdc7272..f0be26db32 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3024.7.22.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/certifi/certifi-3024.7.22.ebuild @@ -24,7 +24,7 @@ S=${WORKDIR}/${MY_P} LICENSE="MPL-2.0" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" RDEPEND=" app-misc/ca-certificates diff --git a/sdk_container/src/third_party/portage-stable/dev-python/certifi/files/certifi-3021.3.16-use-importlib.patch b/sdk_container/src/third_party/portage-stable/dev-python/certifi/files/certifi-3021.3.16-use-importlib.patch deleted file mode 100644 index 3028bfcb99..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/certifi/files/certifi-3021.3.16-use-importlib.patch +++ /dev/null @@ -1,164 +0,0 @@ -1. https://github.com/tiran/certifi-system-store/commit/6945f34b7be433dbf22946825cdb225d5d2136d5 -2. https://github.com/tiran/certifi-system-store/pull/21 - -Avoid repeated instances of https://bugs.gentoo.org/878045 when a package -has too-strict requirements and then affects other, unrelated Python -packages on the system. - -From 6945f34b7be433dbf22946825cdb225d5d2136d5 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Tue, 16 Mar 2021 16:00:08 +0100 -Subject: [PATCH] Relax patch checks (#13) - -- only check that version matches, not files are identical -- compare base directories with samefile. This fixes a problem with - lib64 symlink in virtual envs. - -Signed-off-by: Christian Heimes ---- a/src/certifi/_patch.py -+++ b/src/certifi/_patch.py -@@ -28,7 +28,7 @@ def _patch_dist_info(): - except pkg_resources.DistributionNotFound: - pass - else: -- if os.path.samefile(css_dist.egg_info, certifi_dist.egg_info): -+ if certifi_dist.version == css_dist.version: - return False, css_dist.egg_info, certifi_dist.egg_info - else: - # blow away certifi's dist-info -@@ -55,7 +55,9 @@ def _patch_dist_info(): - certifi_dir = os.path.dirname(os.path.abspath(__file__)) - dist_dir = os.path.abspath(certifi_dist.egg_info) - -- if os.path.dirname(certifi_dir) != os.path.dirname(dist_dir): -+ # compare with samefile instead of string comparison to avoid false -+ # negatives caused by venv lib64 / lib symlinks -+ if not os.path.samefile(os.path.dirname(certifi_dir), os.path.dirname(dist_dir)): - raise RuntimeError( - f"'{certifi_dir} and {dist_dir} have different parent directories." - ) - -From cdec6d20b5d716d9853e72a1519a304070395498 Mon Sep 17 00:00:00 2001 -From: Christian Heimes -Date: Wed, 22 Jun 2022 10:08:18 +0200 -Subject: [PATCH] Use importlib on Python 3.8+ - ---- a/setup.cfg -+++ b/setup.cfg -@@ -38,8 +40,9 @@ packages = certifi - include_package_data = True - zip_safe = True - setup_requires = setuptools --# hack to prevent installation on unsupported platforms Windows and macOS - install_requires = -+ setuptools; python_version < "3.8" -+ # hack to prevent installation on unsupported platforms Windows and macOS - certifi-system-store > 4000; sys_platform == "win32" or sys_platform == "darwin" - python_requires = >=3.6 - ---- a/src/certifi/_patch.py -+++ b/src/certifi/_patch.py -@@ -1,7 +1,31 @@ - import os - import shutil - import sys --import pkg_resources -+ -+if sys.version_info >= (3, 8): -+ from importlib import metadata -+ -+ PackageNotFoundError = metadata.PackageNotFoundError -+ -+ def _get_distinfo(name): -+ dist = metadata.distribution(name) -+ egg_info = dist._path -+ return dist.version, egg_info -+ -+ def _invalidate_caches(): -+ pass -+ -+else: -+ import pkg_resources -+ -+ PackageNotFoundError = pkg_resources.DistributionNotFound -+ -+ def _get_distinfo(name): -+ dist = pkg_resources.get_distribution(name) -+ return dist.version, dist.egg_info -+ -+ def _invalidate_caches(): -+ pkg_resources.working_set.__init__() - - - def _relsymlink(target, linkname): -@@ -22,22 +46,22 @@ def _relsymlink(target, linkname): - - def _patch_dist_info(): - # distribution object for the canonical project name -- css_dist = pkg_resources.get_distribution("certifi_system_store") -+ css_version, css_egg_info = _get_distinfo("certifi_system_store") - try: -- certifi_dist = pkg_resources.get_distribution("certifi") -- except pkg_resources.DistributionNotFound: -+ certifi_version, certifi_egg_info = _get_distinfo("certifi") -+ except PackageNotFoundError: - pass - else: -- if certifi_dist.version == css_dist.version: -- return False, css_dist.egg_info, certifi_dist.egg_info -+ if certifi_version == css_version: -+ return False, css_egg_info, certifi_egg_info - else: - # blow away certifi's dist-info -- shutil.rmtree(certifi_dist.egg_info) -+ shutil.rmtree(certifi_egg_info) - # reset current working set, so pkg_resources can pick up our hack -- pkg_resources.working_set.__init__() -+ _invalidate_caches() - - # certifi-system-store's dist-info -- abs_css_distinfodir = os.path.abspath(css_dist.egg_info) -+ abs_css_distinfodir = os.path.abspath(css_egg_info) - css_basedir, css_distinfodir = os.path.split(abs_css_distinfodir) - - # certifi's dist-info in same base directory -@@ -48,12 +72,12 @@ def _patch_dist_info(): - _relsymlink(target=abs_css_distinfodir, linkname=abs_certifi_distinfodir) - - # get dist info from refreshed working set -- css_dist = pkg_resources.get_distribution("certifi_system_store") -- certifi_dist = pkg_resources.get_distribution("certifi") -+ css_version, css_egg_info = _get_distinfo("certifi_system_store") -+ certifi_version, certifi_egg_info = _get_distinfo("certifi") - - # check that certifi dist-info is in same site-packages as certifi package - certifi_dir = os.path.dirname(os.path.abspath(__file__)) -- dist_dir = os.path.abspath(certifi_dist.egg_info) -+ dist_dir = os.path.abspath(certifi_egg_info) - - # compare with samefile instead of string comparison to avoid false - # negatives caused by venv lib64 / lib symlinks -@@ -65,17 +89,17 @@ def _patch_dist_info(): - # double check versions - _verify_dist_info() - -- return True, css_dist.egg_info, certifi_dist.egg_info -+ return True, css_egg_info, certifi_egg_info - - - def _verify_dist_info(): -- css_dist = pkg_resources.get_distribution("certifi_system_store") -+ css_version, css_egg_info = _get_distinfo("certifi_system_store") - try: -- certifi_dist = pkg_resources.get_distribution("certifi") -- except pkg_resources.DistributionNotFound as e: -+ certifi_version, certifi_egg_info = _get_distinfo("certifi") -+ except PackageNotFoundError as e: - raise RuntimeError(e) - else: -- if certifi_dist.version != css_dist.version: -+ if certifi_version != css_version: - raise RuntimeError( - f"'certifi.dist-info' is not an alias to " - f"'certifi_system_store.dist-info'. " - diff --git a/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest index 3cdcf35a33..964774edce 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest @@ -1 +1,2 @@ DIST cython-3.0.10.gh.tar.gz 2771679 BLAKE2B f0813afc291bdc4940cd6770a368eca4f6d9fd728e41e9c341970512196154be900600146f98ce1e5a056eaeeda2df2a59fea2a9973c3ec275fe605bfd12e418 SHA512 97aa831cea96c1f3c51653c51fadb0aea8bdfdb076a2c898862637f52b826bcb9162d1b7aade3304c5650d0b894cb1083052f036365d79cd3d390e0486b33ac5 +DIST cython-3.0.11.gh.tar.gz 2775463 BLAKE2B f5f53c328a1b48b04548f1ee7be3988451d2a8e339b785285e2d973e63b37dabc6021f32ba1691ae8dbe9ee7706a5feda399b071b4893a3be4fe4afcd608f46b SHA512 8f7982af5be1db1072b1090257a9d487dc341d79522f442f4608303d18b388349a7d586ec74e66fbffd0ce88c00ca622202729907fe7cefef71828cfd3f68fe6 diff --git a/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.0.11.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.0.11.ebuild new file mode 100644 index 0000000000..a1665cc414 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.0.11.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 python3_13 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing toolchain-funcs + +MY_P=${P/_rc/rc} +DESCRIPTION="A Python to C compiler" +HOMEPAGE=" + https://cython.org/ + https://github.com/cython/cython/ + https://pypi.org/project/Cython/ +" +SRC_URI=" + https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + ${P}.patch + xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch + test -s ${P}.patch + assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed" eend $? || die "filterdiff failed" eshopts_pop fi diff --git a/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/Manifest index c46b7e6801..3eb58284cb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/Manifest @@ -2,3 +2,4 @@ DIST glib-2.76.4.tar.xz 5274356 BLAKE2B c9ceb514ea81e1e6ab2d0efc82c48c0d8ae6c997 DIST glib-2.78.3.tar.xz 5321388 BLAKE2B 6ef754b15e1ce4377eafdfc317025ac65c3d8010a8816a0cef786cec9da2af9f7d7d1da735c971ab8c848b2dcec050330e5b0fdceb156a36d739848e6160cd19 SHA512 9c1af75fb973d23ce0286d5b7836eea45f9628c148ced5ac10e10abceda05024ae4c57f01439824d3287d986527500b7b959828b630b6e4a3314b5224f4d7246 DIST glib-2.78.4.tar.xz 5331892 BLAKE2B ada7134597d7d863e581a2bb1097ac07a63b27b53309aadab5b1d3686327ee718ad8c5c07af3fce5cc12328e728fc2c4df5fd9e69f431fa00dc634062ef7f926 SHA512 6f3a06e10e7373a2dbf0688512de4126472fb73cbec488b7983b5ffecff09c64d7e1ca462f892e8f215d3d277d103ca802bad7ef0bd0f91edf26fc6ce67187b6 DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da +DIST glib-2.80.4.tar.xz 5535760 BLAKE2B 1d2b301703b27a5c2def370e1d44b4f7b08a940969563ce9d8d7c38e5f0a32163b95523e09cedc4a57b2af84a57d63dc545abcb31b61a8066ef62ba396fb4f3c SHA512 efdc7dd1e0609b0f2d988a8cc8fd4a3fda96e8450832f905f7686f9063b727cb996e0e4e638aca62f60b76f9f04be62e089a615413e64cf298c7eef26e074570 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/gdbus-codegen-2.80.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/gdbus-codegen-2.80.4.ebuild new file mode 100644 index 0000000000..3f62df24a9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/gdbus-codegen/gdbus-codegen-2.80.4.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +GNOME_ORG_MODULE="glib" +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE="xml(+)" +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_SINGLE_IMPL=1 + +inherit gnome.org distutils-r1 + +DESCRIPTION="GDBus code and documentation generator" +HOMEPAGE="https://www.gtk.org/" + +S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen" + +LICENSE="LGPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/packaging[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + >=dev-python/docutils-0.21.1 +" + +python_prepare_all() { + PATCHES=( + "${FILESDIR}/${PN}-2.56.1-sitedir.patch" + ) + distutils-r1_python_prepare_all + + local MAJOR_VERSION=$(ver_cut 1) + local MINOR_VERSION=$(ver_cut 2) + sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die + sed -e "s:@VERSION@:${PV}:" \ + -e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \ + -e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die + cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed" + sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed" +} + +do_xsltproc_command() { + # Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils) + xsltproc \ + --nonet \ + --stringparam man.output.quietly 1 \ + --stringparam funcsynopsis.style ansi \ + --stringparam man.th.extra1.suppress 1 \ + --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 \ + -o "${2}" \ + http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \ + "${1}" || die "manpage generation failed" +} + +src_compile() { + distutils-r1_src_compile + rst2man \ + "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \ + "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1" +} + +src_test() { + einfo "Skipping tests. This package is tested by dev-libs/glib" + einfo "when merged with FEATURES=test" +} + +python_install_all() { + distutils-r1_python_install_all # no-op, but prevents QA warning + doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1" +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/Manifest index c46b7e6801..3eb58284cb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/Manifest @@ -2,3 +2,4 @@ DIST glib-2.76.4.tar.xz 5274356 BLAKE2B c9ceb514ea81e1e6ab2d0efc82c48c0d8ae6c997 DIST glib-2.78.3.tar.xz 5321388 BLAKE2B 6ef754b15e1ce4377eafdfc317025ac65c3d8010a8816a0cef786cec9da2af9f7d7d1da735c971ab8c848b2dcec050330e5b0fdceb156a36d739848e6160cd19 SHA512 9c1af75fb973d23ce0286d5b7836eea45f9628c148ced5ac10e10abceda05024ae4c57f01439824d3287d986527500b7b959828b630b6e4a3314b5224f4d7246 DIST glib-2.78.4.tar.xz 5331892 BLAKE2B ada7134597d7d863e581a2bb1097ac07a63b27b53309aadab5b1d3686327ee718ad8c5c07af3fce5cc12328e728fc2c4df5fd9e69f431fa00dc634062ef7f926 SHA512 6f3a06e10e7373a2dbf0688512de4126472fb73cbec488b7983b5ffecff09c64d7e1ca462f892e8f215d3d277d103ca802bad7ef0bd0f91edf26fc6ce67187b6 DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da +DIST glib-2.80.4.tar.xz 5535760 BLAKE2B 1d2b301703b27a5c2def370e1d44b4f7b08a940969563ce9d8d7c38e5f0a32163b95523e09cedc4a57b2af84a57d63dc545abcb31b61a8066ef62ba396fb4f3c SHA512 efdc7dd1e0609b0f2d988a8cc8fd4a3fda96e8450832f905f7686f9063b727cb996e0e4e638aca62f60b76f9f04be62e089a615413e64cf298c7eef26e074570 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/glib-utils-2.80.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/glib-utils-2.80.4.ebuild new file mode 100644 index 0000000000..4db8663897 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/glib-utils/glib-utils-2.80.4.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{10..13} ) +GNOME_ORG_MODULE="glib" + +inherit gnome.org python-single-r1 + +DESCRIPTION="Build utilities for GLib using projects" +HOMEPAGE="https://www.gtk.org/" + +LICENSE="LGPL-2.1+" +SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND="${PYTHON_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-python/docutils-0.21.1 +" + +src_configure() { :; } + +do_rst2man_command() { + rst2man \ + --syntax-highlight=none \ + "${1}" "${2}" || die "manpage generation failed" +} + +src_compile() { + sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die + sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die + sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die + do_rst2man_command docs/reference/gobject/glib-genmarshal.rst docs/reference/gobject/glib-genmarshal.1 + do_rst2man_command docs/reference/gobject/glib-mkenums.rst docs/reference/gobject/glib-mkenums.1 + do_rst2man_command docs/reference/glib/gtester-report.rst docs/reference/glib/gtester-report.1 +} + +src_install() { + python_fix_shebang gobject/glib-genmarshal + python_fix_shebang gobject/glib-mkenums + python_fix_shebang glib/gtester-report + exeinto /usr/bin + doexe gobject/glib-genmarshal + doexe gobject/glib-mkenums + doexe glib/gtester-report + doman docs/reference/gobject/glib-genmarshal.1 + doman docs/reference/gobject/glib-mkenums.1 + doman docs/reference/glib/gtester-report.1 +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest index eaf7134c3f..06c6db108c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/Manifest @@ -1,5 +1,4 @@ DIST linux-6.10.tar.xz 145142812 BLAKE2B bb243ea7493b9d63aa2df2050a3f1ae2b89ee84a20015239cf157e3f4f51c7ac5efedc8a51132b2d7482f9276ac418de6624831c8a3b806130d9c2d2124c539b SHA512 baa2487954044f991d2ae254d77d14a1f0185dd62c9f0fcaff69f586c9f906823017b8db1c4588f27b076dfa3ebb606929fec859f60ea419e7974330b9289cc2 DIST linux-6.3.tar.xz 136891752 BLAKE2B f1887c8924efa8d0cb14c4e604affd0b0168bcf20f56a37c027405c7bc11aba822a43fcb38ccb55a81a26f747d00e1ab5a6554818affbf1e1c7ef5220150fc69 SHA512 768979440f4907ba64d4481b383d6101faf208f27a0b897156123aa278c5743fe3c4f61945b2541429c532d45382aaee8899ea9d44a1d2895bfbb79bfd937f65 DIST linux-6.7.tar.xz 141406528 BLAKE2B cecdbd19905e43e485ab73b352ced18b37f2a138c97a6956cadcda5d3d271001117dc1cf896b166ff019fc7f405f9539e2ed0d6112b0890efb04d182adf4fd0e SHA512 de06de556191614bd9daf077ae239360352a402bab407748e67f1e5108c92fd933e451707840ab22fe0f9976db3d1e1b60ca9d41cf894f015ca09b3f652b74ad -DIST linux-6.8.tar.xz 142502100 BLAKE2B c6f17f816cea16e629f63e9379b98888713f57b2c5173306926471f139a9d612a0c74e119341f8075390e55e203d787d9edeb4ad5a064b18870f6f0f7ffaafb2 SHA512 5c4eb4aa1d3f7d1ea01c0f7ddeadacdece6e144fd4bdfc16b2b925d3e10dc04de3a6db69320b79a96c3560052616f001d2c09e7a1bb4f7b731e2380a7ecce068 -DIST linux-6.9.tar.xz 144034416 BLAKE2B 4cf86c3cfe6e6534745d42dfaeca59b17ea1168c4e8b615c80e6d8aac735f11283cd85fa992b440b5d4452917e94b9f08397a64af0be5894e3df23c68892377e SHA512 fed3b4cd1fbfb4d94618587c1934273d2ecc8b6e42a3d586ff8a5f24980be930f2ef803aa2923ca3bfa5e4e619f967f3af315368f24fa76f610b10443624a579 +DIST patch-6.10.3.xz 252260 BLAKE2B 65acf62ff3e326d5ebb9f47067b626a25295fde2057531cf43e537601c42b0110419c0d6eee8c7c24e5d6d88ecf30e9b76d516efb925c91817504c52780b4df1 SHA512 28ad0de2086ca4b59637f8a7c69c6f5436b53235bf52c9ee18f428748c773780c54606a5c96d71614cadd49c707a8bb11843a7393da078e15d7f554244bfb9ca diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10-bpf-capstone.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10-bpf-capstone.patch new file mode 100644 index 0000000000..ebae9a3ad0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10-bpf-capstone.patch @@ -0,0 +1,456 @@ +From a7728af2f25fe99ee72d211bb4ddec17a8601f5f Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Tue, 6 Aug 2024 11:34:05 +0200 +Subject: [PATCH] Fix bug #936439. Replay of upstream commit onto v6.10. + +Signed-off-by: Guilherme Amadio +--- + tools/perf/util/Build | 1 + + tools/perf/util/disasm.c | 187 +-------------------------------- + tools/perf/util/disasm_bpf.c | 197 +++++++++++++++++++++++++++++++++++ + tools/perf/util/disasm_bpf.h | 12 +++ + 4 files changed, 211 insertions(+), 186 deletions(-) + create mode 100644 tools/perf/util/disasm_bpf.c + create mode 100644 tools/perf/util/disasm_bpf.h + +diff --git a/tools/perf/util/Build b/tools/perf/util/Build +index da64efd8718f..384c4e06b838 100644 +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -13,6 +13,7 @@ perf-y += copyfile.o + perf-y += ctype.o + perf-y += db-export.o + perf-y += disasm.o ++perf-y += disasm_bpf.o + perf-y += env.o + perf-y += event.o + perf-y += evlist.o +diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c +index 72aec8f61b94..766cbd005f32 100644 +--- a/tools/perf/util/disasm.c ++++ b/tools/perf/util/disasm.c +@@ -15,6 +15,7 @@ + #include "build-id.h" + #include "debug.h" + #include "disasm.h" ++#include "disasm_bpf.h" + #include "dso.h" + #include "env.h" + #include "evsel.h" +@@ -1164,192 +1165,6 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil + return 0; + } + +-#if defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +-#define PACKAGE "perf" +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "bpf-event.h" +-#include "bpf-utils.h" +- +-static int symbol__disassemble_bpf(struct symbol *sym, +- struct annotate_args *args) +-{ +- struct annotation *notes = symbol__annotation(sym); +- struct bpf_prog_linfo *prog_linfo = NULL; +- struct bpf_prog_info_node *info_node; +- int len = sym->end - sym->start; +- disassembler_ftype disassemble; +- struct map *map = args->ms.map; +- struct perf_bpil *info_linear; +- struct disassemble_info info; +- struct dso *dso = map__dso(map); +- int pc = 0, count, sub_id; +- struct btf *btf = NULL; +- char tpath[PATH_MAX]; +- size_t buf_size; +- int nr_skip = 0; +- char *buf; +- bfd *bfdf; +- int ret; +- FILE *s; +- +- if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO) +- return SYMBOL_ANNOTATE_ERRNO__BPF_INVALID_FILE; +- +- pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__, +- sym->name, sym->start, sym->end - sym->start); +- +- memset(tpath, 0, sizeof(tpath)); +- perf_exe(tpath, sizeof(tpath)); +- +- bfdf = bfd_openr(tpath, NULL); +- if (bfdf == NULL) +- abort(); +- +- if (!bfd_check_format(bfdf, bfd_object)) +- abort(); +- +- s = open_memstream(&buf, &buf_size); +- if (!s) { +- ret = errno; +- goto out; +- } +- init_disassemble_info_compat(&info, s, +- (fprintf_ftype) fprintf, +- fprintf_styled); +- info.arch = bfd_get_arch(bfdf); +- info.mach = bfd_get_mach(bfdf); +- +- info_node = perf_env__find_bpf_prog_info(dso->bpf_prog.env, +- dso->bpf_prog.id); +- if (!info_node) { +- ret = SYMBOL_ANNOTATE_ERRNO__BPF_MISSING_BTF; +- goto out; +- } +- info_linear = info_node->info_linear; +- sub_id = dso->bpf_prog.sub_id; +- +- info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns); +- info.buffer_length = info_linear->info.jited_prog_len; +- +- if (info_linear->info.nr_line_info) +- prog_linfo = bpf_prog_linfo__new(&info_linear->info); +- +- if (info_linear->info.btf_id) { +- struct btf_node *node; +- +- node = perf_env__find_btf(dso->bpf_prog.env, +- info_linear->info.btf_id); +- if (node) +- btf = btf__new((__u8 *)(node->data), +- node->data_size); +- } +- +- disassemble_init_for_target(&info); +- +-#ifdef DISASM_FOUR_ARGS_SIGNATURE +- disassemble = disassembler(info.arch, +- bfd_big_endian(bfdf), +- info.mach, +- bfdf); +-#else +- disassemble = disassembler(bfdf); +-#endif +- if (disassemble == NULL) +- abort(); +- +- fflush(s); +- do { +- const struct bpf_line_info *linfo = NULL; +- struct disasm_line *dl; +- size_t prev_buf_size; +- const char *srcline; +- u64 addr; +- +- addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id]; +- count = disassemble(pc, &info); +- +- if (prog_linfo) +- linfo = bpf_prog_linfo__lfind_addr_func(prog_linfo, +- addr, sub_id, +- nr_skip); +- +- if (linfo && btf) { +- srcline = btf__name_by_offset(btf, linfo->line_off); +- nr_skip++; +- } else +- srcline = NULL; +- +- fprintf(s, "\n"); +- prev_buf_size = buf_size; +- fflush(s); +- +- if (!annotate_opts.hide_src_code && srcline) { +- args->offset = -1; +- args->line = strdup(srcline); +- args->line_nr = 0; +- args->fileloc = NULL; +- args->ms.sym = sym; +- dl = disasm_line__new(args); +- if (dl) { +- annotation_line__add(&dl->al, +- ¬es->src->source); +- } +- } +- +- args->offset = pc; +- args->line = buf + prev_buf_size; +- args->line_nr = 0; +- args->fileloc = NULL; +- args->ms.sym = sym; +- dl = disasm_line__new(args); +- if (dl) +- annotation_line__add(&dl->al, ¬es->src->source); +- +- pc += count; +- } while (count > 0 && pc < len); +- +- ret = 0; +-out: +- free(prog_linfo); +- btf__free(btf); +- fclose(s); +- bfd_close(bfdf); +- return ret; +-} +-#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +-static int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, +- struct annotate_args *args __maybe_unused) +-{ +- return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF; +-} +-#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +- +-static int +-symbol__disassemble_bpf_image(struct symbol *sym, +- struct annotate_args *args) +-{ +- struct annotation *notes = symbol__annotation(sym); +- struct disasm_line *dl; +- +- args->offset = -1; +- args->line = strdup("to be implemented"); +- args->line_nr = 0; +- args->fileloc = NULL; +- dl = disasm_line__new(args); +- if (dl) +- annotation_line__add(&dl->al, ¬es->src->source); +- +- zfree(&args->line); +- return 0; +-} +- + #ifdef HAVE_LIBCAPSTONE_SUPPORT + #include + +diff --git a/tools/perf/util/disasm_bpf.c b/tools/perf/util/disasm_bpf.c +new file mode 100644 +index 000000000000..010b961c4ae9 +--- /dev/null ++++ b/tools/perf/util/disasm_bpf.c +@@ -0,0 +1,197 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++ ++#include "util/annotate.h" ++#include "util/disasm_bpf.h" ++#include "util/symbol.h" ++#include ++#include ++ ++#if defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++#define PACKAGE "perf" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "util/bpf-event.h" ++#include "util/bpf-utils.h" ++#include "util/debug.h" ++#include "util/dso.h" ++#include "util/map.h" ++#include "util/env.h" ++#include "util/util.h" ++ ++int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args) ++{ ++ struct annotation *notes = symbol__annotation(sym); ++ struct bpf_prog_linfo *prog_linfo = NULL; ++ struct bpf_prog_info_node *info_node; ++ int len = sym->end - sym->start; ++ disassembler_ftype disassemble; ++ struct map *map = args->ms.map; ++ struct perf_bpil *info_linear; ++ struct disassemble_info info; ++ struct dso *dso = map__dso(map); ++ int pc = 0, count, sub_id; ++ struct btf *btf = NULL; ++ char tpath[PATH_MAX]; ++ size_t buf_size; ++ int nr_skip = 0; ++ char *buf; ++ bfd *bfdf; ++ int ret; ++ FILE *s; ++ ++ if (dso->binary_type != DSO_BINARY_TYPE__BPF_PROG_INFO) ++ return SYMBOL_ANNOTATE_ERRNO__BPF_INVALID_FILE; ++ ++ pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__, ++ sym->name, sym->start, sym->end - sym->start); ++ ++ memset(tpath, 0, sizeof(tpath)); ++ perf_exe(tpath, sizeof(tpath)); ++ ++ bfdf = bfd_openr(tpath, NULL); ++ if (bfdf == NULL) ++ abort(); ++ ++ if (!bfd_check_format(bfdf, bfd_object)) ++ abort(); ++ ++ s = open_memstream(&buf, &buf_size); ++ if (!s) { ++ ret = errno; ++ goto out; ++ } ++ init_disassemble_info_compat(&info, s, ++ (fprintf_ftype) fprintf, ++ fprintf_styled); ++ info.arch = bfd_get_arch(bfdf); ++ info.mach = bfd_get_mach(bfdf); ++ ++ info_node = perf_env__find_bpf_prog_info(dso->bpf_prog.env, ++ dso->bpf_prog.id); ++ if (!info_node) { ++ ret = SYMBOL_ANNOTATE_ERRNO__BPF_MISSING_BTF; ++ goto out; ++ } ++ info_linear = info_node->info_linear; ++ sub_id = dso->bpf_prog.sub_id; ++ ++ info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns); ++ info.buffer_length = info_linear->info.jited_prog_len; ++ ++ if (info_linear->info.nr_line_info) ++ prog_linfo = bpf_prog_linfo__new(&info_linear->info); ++ ++ if (info_linear->info.btf_id) { ++ struct btf_node *node; ++ ++ node = perf_env__find_btf(dso->bpf_prog.env, ++ info_linear->info.btf_id); ++ if (node) ++ btf = btf__new((__u8 *)(node->data), ++ node->data_size); ++ } ++ ++ disassemble_init_for_target(&info); ++ ++#ifdef DISASM_FOUR_ARGS_SIGNATURE ++ disassemble = disassembler(info.arch, ++ bfd_big_endian(bfdf), ++ info.mach, ++ bfdf); ++#else ++ disassemble = disassembler(bfdf); ++#endif ++ if (disassemble == NULL) ++ abort(); ++ ++ fflush(s); ++ do { ++ const struct bpf_line_info *linfo = NULL; ++ struct disasm_line *dl; ++ size_t prev_buf_size; ++ const char *srcline; ++ u64 addr; ++ ++ addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id]; ++ count = disassemble(pc, &info); ++ ++ if (prog_linfo) ++ linfo = bpf_prog_linfo__lfind_addr_func(prog_linfo, ++ addr, sub_id, ++ nr_skip); ++ ++ if (linfo && btf) { ++ srcline = btf__name_by_offset(btf, linfo->line_off); ++ nr_skip++; ++ } else ++ srcline = NULL; ++ ++ fprintf(s, "\n"); ++ prev_buf_size = buf_size; ++ fflush(s); ++ ++ if (!annotate_opts.hide_src_code && srcline) { ++ args->offset = -1; ++ args->line = strdup(srcline); ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ args->ms.sym = sym; ++ dl = disasm_line__new(args); ++ if (dl) { ++ annotation_line__add(&dl->al, ++ ¬es->src->source); ++ } ++ } ++ ++ args->offset = pc; ++ args->line = buf + prev_buf_size; ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ args->ms.sym = sym; ++ dl = disasm_line__new(args); ++ if (dl) ++ annotation_line__add(&dl->al, ¬es->src->source); ++ ++ pc += count; ++ } while (count > 0 && pc < len); ++ ++ ret = 0; ++out: ++ free(prog_linfo); ++ btf__free(btf); ++ fclose(s); ++ bfd_close(bfdf); ++ return ret; ++} ++#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, ++ struct annotate_args *args __maybe_unused) ++{ ++ return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF; ++} ++#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++ ++int symbol__disassemble_bpf_image(struct symbol *sym, struct annotate_args *args) ++{ ++ struct annotation *notes = symbol__annotation(sym); ++ struct disasm_line *dl; ++ ++ args->offset = -1; ++ args->line = strdup("to be implemented"); ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ dl = disasm_line__new(args); ++ if (dl) ++ annotation_line__add(&dl->al, ¬es->src->source); ++ ++ zfree(&args->line); ++ return 0; ++} ++ +diff --git a/tools/perf/util/disasm_bpf.h b/tools/perf/util/disasm_bpf.h +new file mode 100644 +index 000000000000..2ecb19545388 +--- /dev/null ++++ b/tools/perf/util/disasm_bpf.h +@@ -0,0 +1,12 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++ ++#ifndef __PERF_DISASM_BPF_H ++#define __PERF_DISASM_BPF_H ++ ++struct symbol; ++struct annotate_args; ++ ++int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args); ++int symbol__disassemble_bpf_image(struct symbol *sym, struct annotate_args *args); ++ ++#endif /* __PERF_DISASM_BPF_H */ +-- +2.45.2 + diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10.3-bpf-capstone.patch b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10.3-bpf-capstone.patch new file mode 100644 index 0000000000..57b298d8cc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/files/perf-6.10.3-bpf-capstone.patch @@ -0,0 +1,455 @@ +From b382a433e0178d3840a8fb4b05ba3dbecba075fa Mon Sep 17 00:00:00 2001 +From: Guilherme Amadio +Date: Tue, 6 Aug 2024 11:34:05 +0200 +Subject: [PATCH] Fix bug #936439. Replay of upstream commit onto v6.10.3. + +Signed-off-by: Guilherme Amadio +--- + tools/perf/util/Build | 1 + + tools/perf/util/disasm.c | 187 +-------------------------------- + tools/perf/util/disasm_bpf.c | 196 +++++++++++++++++++++++++++++++++++ + tools/perf/util/disasm_bpf.h | 12 +++ + 4 files changed, 210 insertions(+), 186 deletions(-) + create mode 100644 tools/perf/util/disasm_bpf.c + create mode 100644 tools/perf/util/disasm_bpf.h + +diff --git a/tools/perf/util/Build b/tools/perf/util/Build +index da64efd8718f..384c4e06b838 100644 +--- a/tools/perf/util/Build ++++ b/tools/perf/util/Build +@@ -13,6 +13,7 @@ perf-y += copyfile.o + perf-y += ctype.o + perf-y += db-export.o + perf-y += disasm.o ++perf-y += disasm_bpf.o + perf-y += env.o + perf-y += event.o + perf-y += evlist.o +diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c +index e10558b79504..766cbd005f32 100644 +--- a/tools/perf/util/disasm.c ++++ b/tools/perf/util/disasm.c +@@ -15,6 +15,7 @@ + #include "build-id.h" + #include "debug.h" + #include "disasm.h" ++#include "disasm_bpf.h" + #include "dso.h" + #include "env.h" + #include "evsel.h" +@@ -1164,192 +1165,6 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil + return 0; + } + +-#if defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +-#define PACKAGE "perf" +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "bpf-event.h" +-#include "bpf-utils.h" +- +-static int symbol__disassemble_bpf(struct symbol *sym, +- struct annotate_args *args) +-{ +- struct annotation *notes = symbol__annotation(sym); +- struct bpf_prog_linfo *prog_linfo = NULL; +- struct bpf_prog_info_node *info_node; +- int len = sym->end - sym->start; +- disassembler_ftype disassemble; +- struct map *map = args->ms.map; +- struct perf_bpil *info_linear; +- struct disassemble_info info; +- struct dso *dso = map__dso(map); +- int pc = 0, count, sub_id; +- struct btf *btf = NULL; +- char tpath[PATH_MAX]; +- size_t buf_size; +- int nr_skip = 0; +- char *buf; +- bfd *bfdf; +- int ret; +- FILE *s; +- +- if (dso__binary_type(dso) != DSO_BINARY_TYPE__BPF_PROG_INFO) +- return SYMBOL_ANNOTATE_ERRNO__BPF_INVALID_FILE; +- +- pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__, +- sym->name, sym->start, sym->end - sym->start); +- +- memset(tpath, 0, sizeof(tpath)); +- perf_exe(tpath, sizeof(tpath)); +- +- bfdf = bfd_openr(tpath, NULL); +- if (bfdf == NULL) +- abort(); +- +- if (!bfd_check_format(bfdf, bfd_object)) +- abort(); +- +- s = open_memstream(&buf, &buf_size); +- if (!s) { +- ret = errno; +- goto out; +- } +- init_disassemble_info_compat(&info, s, +- (fprintf_ftype) fprintf, +- fprintf_styled); +- info.arch = bfd_get_arch(bfdf); +- info.mach = bfd_get_mach(bfdf); +- +- info_node = perf_env__find_bpf_prog_info(dso__bpf_prog(dso)->env, +- dso__bpf_prog(dso)->id); +- if (!info_node) { +- ret = SYMBOL_ANNOTATE_ERRNO__BPF_MISSING_BTF; +- goto out; +- } +- info_linear = info_node->info_linear; +- sub_id = dso__bpf_prog(dso)->sub_id; +- +- info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns); +- info.buffer_length = info_linear->info.jited_prog_len; +- +- if (info_linear->info.nr_line_info) +- prog_linfo = bpf_prog_linfo__new(&info_linear->info); +- +- if (info_linear->info.btf_id) { +- struct btf_node *node; +- +- node = perf_env__find_btf(dso__bpf_prog(dso)->env, +- info_linear->info.btf_id); +- if (node) +- btf = btf__new((__u8 *)(node->data), +- node->data_size); +- } +- +- disassemble_init_for_target(&info); +- +-#ifdef DISASM_FOUR_ARGS_SIGNATURE +- disassemble = disassembler(info.arch, +- bfd_big_endian(bfdf), +- info.mach, +- bfdf); +-#else +- disassemble = disassembler(bfdf); +-#endif +- if (disassemble == NULL) +- abort(); +- +- fflush(s); +- do { +- const struct bpf_line_info *linfo = NULL; +- struct disasm_line *dl; +- size_t prev_buf_size; +- const char *srcline; +- u64 addr; +- +- addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id]; +- count = disassemble(pc, &info); +- +- if (prog_linfo) +- linfo = bpf_prog_linfo__lfind_addr_func(prog_linfo, +- addr, sub_id, +- nr_skip); +- +- if (linfo && btf) { +- srcline = btf__name_by_offset(btf, linfo->line_off); +- nr_skip++; +- } else +- srcline = NULL; +- +- fprintf(s, "\n"); +- prev_buf_size = buf_size; +- fflush(s); +- +- if (!annotate_opts.hide_src_code && srcline) { +- args->offset = -1; +- args->line = strdup(srcline); +- args->line_nr = 0; +- args->fileloc = NULL; +- args->ms.sym = sym; +- dl = disasm_line__new(args); +- if (dl) { +- annotation_line__add(&dl->al, +- ¬es->src->source); +- } +- } +- +- args->offset = pc; +- args->line = buf + prev_buf_size; +- args->line_nr = 0; +- args->fileloc = NULL; +- args->ms.sym = sym; +- dl = disasm_line__new(args); +- if (dl) +- annotation_line__add(&dl->al, ¬es->src->source); +- +- pc += count; +- } while (count > 0 && pc < len); +- +- ret = 0; +-out: +- free(prog_linfo); +- btf__free(btf); +- fclose(s); +- bfd_close(bfdf); +- return ret; +-} +-#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +-static int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, +- struct annotate_args *args __maybe_unused) +-{ +- return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF; +-} +-#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) +- +-static int +-symbol__disassemble_bpf_image(struct symbol *sym, +- struct annotate_args *args) +-{ +- struct annotation *notes = symbol__annotation(sym); +- struct disasm_line *dl; +- +- args->offset = -1; +- args->line = strdup("to be implemented"); +- args->line_nr = 0; +- args->fileloc = NULL; +- dl = disasm_line__new(args); +- if (dl) +- annotation_line__add(&dl->al, ¬es->src->source); +- +- zfree(&args->line); +- return 0; +-} +- + #ifdef HAVE_LIBCAPSTONE_SUPPORT + #include + +diff --git a/tools/perf/util/disasm_bpf.c b/tools/perf/util/disasm_bpf.c +new file mode 100644 +index 000000000000..c76a7d2be1a7 +--- /dev/null ++++ b/tools/perf/util/disasm_bpf.c +@@ -0,0 +1,196 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++ ++#include "util/annotate.h" ++#include "util/disasm_bpf.h" ++#include "util/symbol.h" ++#include ++#include ++ ++#if defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++#define PACKAGE "perf" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "util/bpf-event.h" ++#include "util/bpf-utils.h" ++#include "util/debug.h" ++#include "util/dso.h" ++#include "util/map.h" ++#include "util/env.h" ++#include "util/util.h" ++ ++int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args) ++{ ++ struct annotation *notes = symbol__annotation(sym); ++ struct bpf_prog_linfo *prog_linfo = NULL; ++ struct bpf_prog_info_node *info_node; ++ int len = sym->end - sym->start; ++ disassembler_ftype disassemble; ++ struct map *map = args->ms.map; ++ struct perf_bpil *info_linear; ++ struct disassemble_info info; ++ struct dso *dso = map__dso(map); ++ int pc = 0, count, sub_id; ++ struct btf *btf = NULL; ++ char tpath[PATH_MAX]; ++ size_t buf_size; ++ int nr_skip = 0; ++ char *buf; ++ bfd *bfdf; ++ int ret; ++ FILE *s; ++ ++ if (dso__binary_type(dso) != DSO_BINARY_TYPE__BPF_PROG_INFO) ++ return SYMBOL_ANNOTATE_ERRNO__BPF_INVALID_FILE; ++ ++ pr_debug("%s: handling sym %s addr %" PRIx64 " len %" PRIx64 "\n", __func__, ++ sym->name, sym->start, sym->end - sym->start); ++ ++ memset(tpath, 0, sizeof(tpath)); ++ perf_exe(tpath, sizeof(tpath)); ++ ++ bfdf = bfd_openr(tpath, NULL); ++ if (bfdf == NULL) ++ abort(); ++ ++ if (!bfd_check_format(bfdf, bfd_object)) ++ abort(); ++ ++ s = open_memstream(&buf, &buf_size); ++ if (!s) { ++ ret = errno; ++ goto out; ++ } ++ init_disassemble_info_compat(&info, s, ++ (fprintf_ftype) fprintf, ++ fprintf_styled); ++ info.arch = bfd_get_arch(bfdf); ++ info.mach = bfd_get_mach(bfdf); ++ ++ info_node = perf_env__find_bpf_prog_info(dso__bpf_prog(dso)->env, ++ dso__bpf_prog(dso)->id); ++ if (!info_node) { ++ ret = SYMBOL_ANNOTATE_ERRNO__BPF_MISSING_BTF; ++ goto out; ++ } ++ info_linear = info_node->info_linear; ++ sub_id = dso__bpf_prog(dso)->sub_id; ++ ++ info.buffer = (void *)(uintptr_t)(info_linear->info.jited_prog_insns); ++ info.buffer_length = info_linear->info.jited_prog_len; ++ ++ if (info_linear->info.nr_line_info) ++ prog_linfo = bpf_prog_linfo__new(&info_linear->info); ++ ++ if (info_linear->info.btf_id) { ++ struct btf_node *node; ++ ++ node = perf_env__find_btf(dso__bpf_prog(dso)->env, ++ info_linear->info.btf_id); ++ if (node) ++ btf = btf__new((__u8 *)(node->data), ++ node->data_size); ++ } ++ ++ disassemble_init_for_target(&info); ++ ++#ifdef DISASM_FOUR_ARGS_SIGNATURE ++ disassemble = disassembler(info.arch, ++ bfd_big_endian(bfdf), ++ info.mach, ++ bfdf); ++#else ++ disassemble = disassembler(bfdf); ++#endif ++ if (disassemble == NULL) ++ abort(); ++ ++ fflush(s); ++ do { ++ const struct bpf_line_info *linfo = NULL; ++ struct disasm_line *dl; ++ size_t prev_buf_size; ++ const char *srcline; ++ u64 addr; ++ ++ addr = pc + ((u64 *)(uintptr_t)(info_linear->info.jited_ksyms))[sub_id]; ++ count = disassemble(pc, &info); ++ ++ if (prog_linfo) ++ linfo = bpf_prog_linfo__lfind_addr_func(prog_linfo, ++ addr, sub_id, ++ nr_skip); ++ ++ if (linfo && btf) { ++ srcline = btf__name_by_offset(btf, linfo->line_off); ++ nr_skip++; ++ } else ++ srcline = NULL; ++ ++ fprintf(s, "\n"); ++ prev_buf_size = buf_size; ++ fflush(s); ++ ++ if (!annotate_opts.hide_src_code && srcline) { ++ args->offset = -1; ++ args->line = strdup(srcline); ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ args->ms.sym = sym; ++ dl = disasm_line__new(args); ++ if (dl) { ++ annotation_line__add(&dl->al, ++ ¬es->src->source); ++ } ++ } ++ ++ args->offset = pc; ++ args->line = buf + prev_buf_size; ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ args->ms.sym = sym; ++ dl = disasm_line__new(args); ++ if (dl) ++ annotation_line__add(&dl->al, ¬es->src->source); ++ ++ pc += count; ++ } while (count > 0 && pc < len); ++ ++ ret = 0; ++out: ++ free(prog_linfo); ++ btf__free(btf); ++ fclose(s); ++ bfd_close(bfdf); ++ return ret; ++} ++#else // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++int symbol__disassemble_bpf(struct symbol *sym __maybe_unused, struct annotate_args *args __maybe_unused) ++{ ++ return SYMBOL_ANNOTATE_ERRNO__NO_LIBOPCODES_FOR_BPF; ++} ++#endif // defined(HAVE_LIBBFD_SUPPORT) && defined(HAVE_LIBBPF_SUPPORT) ++ ++int ++symbol__disassemble_bpf_image(struct symbol *sym, struct annotate_args *args) ++{ ++ struct annotation *notes = symbol__annotation(sym); ++ struct disasm_line *dl; ++ ++ args->offset = -1; ++ args->line = strdup("to be implemented"); ++ args->line_nr = 0; ++ args->fileloc = NULL; ++ dl = disasm_line__new(args); ++ if (dl) ++ annotation_line__add(&dl->al, ¬es->src->source); ++ ++ zfree(&args->line); ++ return 0; ++} +diff --git a/tools/perf/util/disasm_bpf.h b/tools/perf/util/disasm_bpf.h +new file mode 100644 +index 000000000000..2ecb19545388 +--- /dev/null ++++ b/tools/perf/util/disasm_bpf.h +@@ -0,0 +1,12 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++ ++#ifndef __PERF_DISASM_BPF_H ++#define __PERF_DISASM_BPF_H ++ ++struct symbol; ++struct annotate_args; ++ ++int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args); ++int symbol__disassemble_bpf_image(struct symbol *sym, struct annotate_args *args); ++ ++#endif /* __PERF_DISASM_BPF_H */ +-- +2.45.2 + diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.9.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.3.ebuild similarity index 94% rename from sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.9.ebuild rename to sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.3.ebuild index b371ff4a86..4c50de4121 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.3.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit bash-completion-r1 estack flag-o-matic linux-info llvm toolchain-funcs python-r1 DESCRIPTION="Userland tools for Linux Performance Counters" @@ -139,8 +139,10 @@ pkg_setup() { # it's building from the same tarball, please keep it in sync with bpftool src_unpack() { local paths=( - kernel/bpf tools/{arch,bpf,build,include,lib,perf,scripts} - scripts include lib "arch/*/include" "arch/*/lib" "arch/*/tools" + 'arch/*/include/*' 'arch/*/lib/*' 'arch/*/tools/*' 'include/*' + 'kernel/bpf/*' 'lib/*' 'scripts/*' 'tools/arch/*' 'tools/bpf/*' + 'tools/build/*' 'tools/include/*' 'tools/lib/*' 'tools/perf/*' + 'tools/scripts/*' ) # We expect the tar implementation to support the -j option (both @@ -152,8 +154,9 @@ src_unpack() { if [[ -n ${LINUX_PATCH} ]] ; then eshopts_push -o noglob ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ - > ${P}.patch + xzcat "${DISTDIR}"/${LINUX_PATCH} | filterdiff -p1 ${paths[@]/#/-i} > ${P}.patch + test -s ${P}.patch + assert -n "Unpacking to ${P} from ${DISTDIR}/${LINUX_PATCH} failed" eend $? || die "filterdiff failed" eshopts_pop fi @@ -176,7 +179,8 @@ src_prepare() { pushd "${S_K}" >/dev/null || die eapply "${FILESDIR}"/perf-6.4-libtracefs.patch - eapply "${FILESDIR}"/perf-6.7-expr.patch + eapply "${FILESDIR}"/perf-6.10-expr.patch + eapply "${FILESDIR}"/perf-6.10.3-bpf-capstone.patch popd || die # Drop some upstream too-developer-oriented flags and fix the @@ -247,6 +251,7 @@ perf_make() { V=1 VF=1 HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)" + CLANG="${CHOST}-clang" PKG_CONFIG="$(tc-getPKG_CONFIG)" prefix="${EPREFIX}/usr" bindir_relative="bin" tipdir="share/doc/${PF}" diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.ebuild index 3a49940473..c26fcdac95 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.10.ebuild @@ -176,6 +176,7 @@ src_prepare() { pushd "${S_K}" >/dev/null || die eapply "${FILESDIR}"/perf-6.4-libtracefs.patch + eapply "${FILESDIR}"/perf-6.10-bpf-capstone.patch eapply "${FILESDIR}"/perf-6.10-expr.patch popd || die @@ -247,6 +248,7 @@ perf_make() { V=1 VF=1 HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)" + CLANG="${CHOST}-clang" PKG_CONFIG="$(tc-getPKG_CONFIG)" prefix="${EPREFIX}/usr" bindir_relative="bin" tipdir="share/doc/${PF}" diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.3.ebuild index 80e9fe6760..63546a59a6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.3.ebuild @@ -196,6 +196,7 @@ perf_make() { emake V=1 VF=1 \ HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" \ CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" NM="$(tc-getNM)" \ + CLANG="${CHOST}-clang" \ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ prefix="${EPREFIX}/usr" bindir_relative="bin" \ tipdir="share/doc/${PF}" \ diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.7.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.7.ebuild index 5d0dd06b32..f07ddebfbf 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.7.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.7.ebuild @@ -247,6 +247,7 @@ perf_make() { V=1 VF=1 HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)" + CLANG="${CHOST}-clang" PKG_CONFIG="$(tc-getPKG_CONFIG)" prefix="${EPREFIX}/usr" bindir_relative="bin" tipdir="share/doc/${PF}" diff --git a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.8.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.8.ebuild deleted file mode 100644 index 71d7382d45..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/perf/perf-6.8.ebuild +++ /dev/null @@ -1,338 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) -inherit bash-completion-r1 estack flag-o-matic linux-info llvm toolchain-funcs python-r1 - -DESCRIPTION="Userland tools for Linux Performance Counters" -HOMEPAGE="https://perf.wiki.kernel.org/" - -LINUX_V="${PV:0:1}.x" -if [[ ${PV} == *_rc* ]] ; then - LINUX_VER=$(ver_cut 1-2).$(($(ver_cut 3)-1)) - PATCH_VERSION=$(ver_cut 1-3) - LINUX_PATCH=patch-${PV//_/-}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/${LINUX_PATCH} - https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/testing/v${PATCH_VERSION}/${LINUX_PATCH}" -elif [[ ${PV} == *.*.* ]] ; then - # stable-release series - LINUX_VER=$(ver_cut 1-2) - LINUX_PATCH=patch-${PV}.xz - SRC_URI="https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_PATCH}" -else - LINUX_VER=${PV} -fi - -LINUX_SOURCES="linux-${LINUX_VER}.tar.xz" -SRC_URI+=" https://www.kernel.org/pub/linux/kernel/v${LINUX_V}/${LINUX_SOURCES}" - -S_K="${WORKDIR}/linux-${LINUX_VER}" -S="${S_K}/tools/perf" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" -IUSE="abi_mips_o32 abi_mips_n32 abi_mips_n64 audit babeltrace big-endian bpf caps crypt debug +doc gtk java libpfm +libtraceevent +libtracefs lzma numa perl python slang systemtap tcmalloc unwind zstd" - -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} -" - -# setuptools (and Python) are always needed even if not building Python bindings -BDEPEND=" - ${LINUX_PATCH+dev-util/patchutils} - ${PYTHON_DEPS} - >=app-arch/tar-1.34-r2 - dev-python/setuptools[${PYTHON_USEDEP}] - app-alternatives/yacc - app-alternatives/lex - virtual/pkgconfig - doc? ( - app-text/asciidoc - app-text/sgml-common - app-text/xmlto - sys-process/time - ) -" - -RDEPEND=" - audit? ( sys-process/audit ) - babeltrace? ( dev-util/babeltrace:0/1 ) - bpf? ( - dev-libs/libbpf - dev-util/bpftool - dev-util/pahole - ) - caps? ( sys-libs/libcap ) - bpf? ( - sys-devel/clang:= - sys-devel/llvm:= - ) - crypt? ( dev-libs/openssl:= ) - gtk? ( x11-libs/gtk+:2 ) - java? ( virtual/jre:* ) - libpfm? ( dev-libs/libpfm:= ) - libtraceevent? ( dev-libs/libtraceevent ) - libtracefs? ( dev-libs/libtracefs ) - lzma? ( app-arch/xz-utils ) - numa? ( sys-process/numactl ) - perl? ( dev-lang/perl:= ) - python? ( ${PYTHON_DEPS} ) - slang? ( sys-libs/slang ) - systemtap? ( dev-debug/systemtap ) - tcmalloc? ( dev-util/google-perftools ) - unwind? ( sys-libs/libunwind:= ) - zstd? ( app-arch/zstd:= ) - dev-libs/elfutils - sys-libs/binutils-libs:= - sys-libs/zlib - virtual/libcrypt -" - -DEPEND="${RDEPEND} - >=sys-kernel/linux-headers-5.10 - java? ( virtual/jdk ) -" - -QA_FLAGS_IGNORED=( - 'usr/bin/perf-read-vdso32' # not linked with anything except for libc - 'usr/libexec/perf-core/dlfilters/.*' # plugins -) - -pkg_pretend() { - if ! use doc ; then - ewarn "Without the doc USE flag you won't get any documentation nor man pages." - ewarn "And without man pages, you won't get any --help output for perf and its" - ewarn "sub-tools." - fi -} - -pkg_setup() { - local CONFIG_CHECK=" - ~DEBUG_INFO - ~FTRACE - ~FTRACE_SYSCALLS - ~FUNCTION_TRACER - ~KALLSYMS - ~KALLSYMS_ALL - ~KPROBES - ~KPROBE_EVENTS - ~PERF_EVENTS - ~UPROBES - ~UPROBE_EVENTS - " - - use bpf && llvm_pkg_setup - # We enable python unconditionally as libbpf always generates - # API headers using python script - python_setup - - if use bpf ; then - CONFIG_CHECK+="~BPF ~BPF_EVENTS ~BPF_SYSCALL ~DEBUG_INFO_BTF ~HAVE_EBPF_JIT" - fi - - linux-info_pkg_setup -} - -# src_unpack and src_prepare are copied to dev-util/bpftool since -# it's building from the same tarball, please keep it in sync with bpftool -src_unpack() { - local paths=( - kernel/bpf tools/{arch,bpf,build,include,lib,perf,scripts} - scripts include lib "arch/*/lib" "arch/*/tools" - ) - - # We expect the tar implementation to support the -j option (both - # GNU tar and libarchive's tar support that). - echo ">>> Unpacking ${LINUX_SOURCES} (${paths[*]}) to ${PWD}" - gtar --wildcards -xpf "${DISTDIR}"/${LINUX_SOURCES} \ - "${paths[@]/#/linux-${LINUX_VER}/}" || die - - if [[ -n ${LINUX_PATCH} ]] ; then - eshopts_push -o noglob - ebegin "Filtering partial source patch" - filterdiff -p1 ${paths[@]/#/-i } -z "${DISTDIR}"/${LINUX_PATCH} \ - > ${P}.patch - eend $? || die "filterdiff failed" - eshopts_pop - fi - - local a - for a in ${A}; do - [[ ${a} == ${LINUX_SOURCES} ]] && continue - [[ ${a} == ${LINUX_PATCH} ]] && continue - unpack ${a} - done -} - -src_prepare() { - default - if [[ -n ${LINUX_PATCH} ]] ; then - pushd "${S_K}" >/dev/null || die - eapply "${WORKDIR}"/${P}.patch - popd || die - fi - - pushd "${S_K}" >/dev/null || die - eapply "${FILESDIR}"/perf-6.4-libtracefs.patch - eapply "${FILESDIR}"/perf-6.7-expr.patch - popd || die - - # Drop some upstream too-developer-oriented flags and fix the - # Makefile in general - sed -i \ - -e "s@\$(sysconfdir_SQ)/bash_completion.d@$(get_bashcompdir)@" \ - "${S}"/Makefile.perf || die - # A few places still use -Werror w/out $(WERROR) protection. - sed -i -e 's@-Werror@@' \ - "${S}"/Makefile.perf "${S_K}"/tools/lib/bpf/Makefile \ - "${S_K}"/tools/lib/perf/Makefile || die - - # Avoid the call to make kernelversion - sed -i -e '/PERF-VERSION-GEN/d' Makefile.perf || die - echo "#define PERF_VERSION \"${PV}\"" > PERF-VERSION-FILE - - # The code likes to compile local assembly files which lack ELF markings. - find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' {} + -} - -puse() { usex $1 "" 1; } -perf_make() { - # The arch parsing is a bit funky. The perf tools package is integrated - # into the kernel, so it wants an ARCH that looks like the kernel arch, - # but it also wants to know about the split value -- i386/x86_64 vs just - # x86. We can get that by telling the func to use an older linux version. - # It's kind of a hack, but not that bad ... - - # LIBDIR sets a search path of perf-gtk.so. Bug 515954 - - local arch=$(tc-arch-kernel) - local java_dir - use java && java_dir="${EPREFIX}/etc/java-config-2/current-system-vm" - - # sync this with the whitelist in tools/perf/Makefile.config - local disable_libdw - if ! use amd64 && ! use x86 && \ - ! use arm && \ - ! use arm64 && \ - ! use ppc && ! use ppc64 \ - ! use s390 && \ - ! use riscv && \ - ! use loong - then - disable_libdw=1 - fi - - # perf directly invokes LD for linking without going through CC, on mips - # it is required to specify the emulation. port of below buildroot patch - # https://patchwork.ozlabs.org/project/buildroot/patch/20170217105905.32151-1-Vincent.Riera@imgtec.com/ - local linker="$(tc-getLD)" - if use mips - then - if use big-endian - then - use abi_mips_n64 && linker+=" -m elf64btsmip" - use abi_mips_n32 && linker+=" -m elf32btsmipn32" - use abi_mips_o32 && linker+=" -m elf32btsmip" - else - use abi_mips_n64 && linker+=" -m elf64ltsmip" - use abi_mips_n32 && linker+=" -m elf32ltsmipn32" - use abi_mips_o32 && linker+=" -m elf32ltsmip" - fi - fi - - # FIXME: NO_CORESIGHT - local emakeargs=( - V=1 VF=1 - HOSTCC="$(tc-getBUILD_CC)" HOSTLD="$(tc-getBUILD_LD)" - CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="${linker}" NM="$(tc-getNM)" - PKG_CONFIG="$(tc-getPKG_CONFIG)" - prefix="${EPREFIX}/usr" bindir_relative="bin" - tipdir="share/doc/${PF}" - EXTRA_CFLAGS="${CFLAGS}" - EXTRA_LDFLAGS="${LDFLAGS}" - ARCH="${arch}" - BUILD_BPF_SKEL=$(usex bpf 1 "") \ - BUILD_NONDISTRO=1 - JDIR="${java_dir}" - CORESIGHT= - GTK2=$(usex gtk 1 "") - feature-gtk2-infobar=$(usex gtk 1 "") - NO_AUXTRACE= - NO_BACKTRACE= - NO_DEMANGLE= - NO_JEVENTS=$(puse python) - NO_JVMTI=$(puse java) - NO_LIBAUDIT=$(puse audit) - NO_LIBBABELTRACE=$(puse babeltrace) - NO_LIBBIONIC=1 - NO_LIBBPF=$(puse bpf) - NO_LIBCAP=$(puse caps) - NO_LIBCRYPTO=$(puse crypt) - NO_LIBDW_DWARF_UNWIND="${disable_libdw}" - NO_LIBELF= - NO_LIBNUMA=$(puse numa) - NO_LIBPERL=$(puse perl) - NO_LIBPFM4=$(puse libpfm) - NO_LIBPYTHON=$(puse python) - NO_LIBTRACEEVENT=$(puse libtraceevent) - NO_LIBUNWIND=$(puse unwind) - NO_LIBZSTD=$(puse zstd) - NO_SDT=$(puse systemtap) - NO_SLANG=$(puse slang) - NO_LZMA=$(puse lzma) - NO_ZLIB= - TCMALLOC=$(usex tcmalloc 1 "") - WERROR=0 - LIBDIR="/usr/libexec/perf-core" - libdir="${EPREFIX}/usr/$(get_libdir)" - plugindir="${EPREFIX}/usr/$(get_libdir)/perf/plugins" - "$@" - ) - emake "${emakeargs[@]}" -} - -src_compile() { - filter-lto - - perf_make -f Makefile.perf - use doc && perf_make -C Documentation man -} - -src_test() { - : -} - -src_install() { - _install_python_ext() { - perf_make -f Makefile.perf install-python_ext DESTDIR="${D}" - } - - perf_make -f Makefile.perf install DESTDIR="${D}" - - if use python; then - python_foreach_impl _install_python_ext - fi - - if use gtk; then - local libdir - libdir="$(get_libdir)" - # on some arches it ends up in lib even on 64bit, ppc64 for instance. - [[ -f "${ED}"/usr/lib/libperf-gtk.so ]] && libdir="lib" - mv "${ED}"/usr/${libdir}/libperf-gtk.so \ - "${ED}"/usr/libexec/perf-core || die - fi - - dodoc CREDITS - - dodoc *txt Documentation/*.txt - - # perf needs this decompressed to print out tips for users - docompress -x /usr/share/doc/${PF}/tips.txt - - if use doc ; then - doman Documentation/*.1 - fi -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/re2c/re2c-3.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/re2c/re2c-3.1.ebuild index 47be69c035..102711fee8 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/re2c/re2c-3.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/re2c/re2c-3.1.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/skvadrik/re2c/releases/download/${PV}/${P}.tar.xz" LICENSE="public-domain" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="debug test" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.43.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.43.5.ebuild index 47b4f773c0..cda613862e 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.43.5.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.43.5.ebuild @@ -50,7 +50,7 @@ if [[ ${PV} != *9999 ]]; then SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )" if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi fi diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.2.ebuild index 9bcb72d246..762ee1d1c2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.2.ebuild @@ -306,6 +306,10 @@ git_emake() { OPTCFLAGS="${CFLAGS}" OPTLDFLAGS="${LDFLAGS}" + CURL_CONFIG="${ESYSROOT}/usr/bin/curl-config" + CURL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libcurl)" + CURL_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libcurl)" + PERL_PATH="${EPREFIX}/usr/bin/perl" PERL_MM_OPT="" diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r1.ebuild index 9bcb72d246..762ee1d1c2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r1.ebuild @@ -306,6 +306,10 @@ git_emake() { OPTCFLAGS="${CFLAGS}" OPTLDFLAGS="${LDFLAGS}" + CURL_CONFIG="${ESYSROOT}/usr/bin/curl-config" + CURL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libcurl)" + CURL_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libcurl)" + PERL_PATH="${EPREFIX}/usr/bin/perl" PERL_MM_OPT="" diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r2.ebuild index 9bcb72d246..762ee1d1c2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r2.ebuild @@ -306,6 +306,10 @@ git_emake() { OPTCFLAGS="${CFLAGS}" OPTLDFLAGS="${LDFLAGS}" + CURL_CONFIG="${ESYSROOT}/usr/bin/curl-config" + CURL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libcurl)" + CURL_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libcurl)" + PERL_PATH="${EPREFIX}/usr/bin/perl" PERL_MM_OPT="" diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r3.ebuild index 9bcb72d246..762ee1d1c2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r3.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999-r3.ebuild @@ -306,6 +306,10 @@ git_emake() { OPTCFLAGS="${CFLAGS}" OPTLDFLAGS="${LDFLAGS}" + CURL_CONFIG="${ESYSROOT}/usr/bin/curl-config" + CURL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libcurl)" + CURL_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libcurl)" + PERL_PATH="${EPREFIX}/usr/bin/perl" PERL_MM_OPT="" diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999.ebuild index 9bcb72d246..762ee1d1c2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-9999.ebuild @@ -306,6 +306,10 @@ git_emake() { OPTCFLAGS="${CFLAGS}" OPTLDFLAGS="${LDFLAGS}" + CURL_CONFIG="${ESYSROOT}/usr/bin/curl-config" + CURL_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libcurl)" + CURL_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libcurl)" + PERL_PATH="${EPREFIX}/usr/bin/perl" PERL_MM_OPT="" diff --git a/sdk_container/src/third_party/portage-stable/eclass/dist-kernel-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/dist-kernel-utils.eclass index 4bc3fab44a..bb058d488a 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/dist-kernel-utils.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/dist-kernel-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2023 Gentoo Authors +# Copyright 2020-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: dist-kernel-utils.eclass @@ -159,6 +159,35 @@ dist-kernel_PV_to_KV() { echo "${kv}" } +# @FUNCTION: dist-kernel_get_module_suffix +# @USAGE: +# @DESCRIPTION: +# Returns the suffix for kernel modules based on the CONFIG_MODULES_COMPESS_* +# setting in the kernel config and USE=modules-compress. +dist-kernel_get_module_suffix() { + debug-print-function ${FUNCNAME} "${@}" + + [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" + + local config=${1} + + if ! in_iuse modules-compress || ! use modules-compress; then + echo .ko + elif [[ ! -r ${config} ]]; then + die "Cannot find kernel config ${config}" + elif grep -q "CONFIG_MODULE_COMPRESS_NONE=y" "${config}"; then + echo .ko + elif grep -q "CONFIG_MODULE_COMPRESS_GZIP=y" "${config}"; then + echo .ko.gz + elif grep -q "CONFIG_MODULE_COMPRESS_XZ=y" "${config}"; then + echo .ko.xz + elif grep -q "CONFIG_MODULE_COMPRESS_ZSTD=y" "${config}"; then + echo .ko.zst + else + die "Module compression is enabled, but compressor not known" + fi +} + # @FUNCTION: dist-kernel_compressed_module_cleanup # @USAGE: # @DESCRIPTION: @@ -169,20 +198,41 @@ dist-kernel_compressed_module_cleanup() { [[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments" local path=${1} - local basename f + local config_path=/usr/src/linux-${KV_FULL}/.config + + local option + for option in config source/.config build/.config; do + if [[ -f ${path}/${option} ]]; then + config_path=${path}/${option} + break + fi + done + + local preferred= + [[ -f ${config_path} ]] && preferred=$(dist-kernel_get_module_suffix "${config_path}") + + local basename suffix while read -r basename; do local prev= - for f in "${path}/${basename}"{,.gz,.xz,.zst}; do - if [[ ! -e ${f} ]]; then - continue + for suffix in .ko .ko.gz .ko.xz .ko.zst; do + [[ ${suffix} == ${preferred} ]] && continue + local current=${path}/${basename}${suffix} + [[ -f ${current} ]] || continue + + if [[ -f ${path}/${basename}${preferred} ]]; then + # If the module with the desired compression exists, remove + # all other variations. + rm -v "${current}" || die elif [[ -z ${prev} ]]; then - prev=${f} - elif [[ ${f} -nt ${prev} ]]; then + # If not, then keep whichever of the duplicate modules is the + # newest. Normally you should not end up here. + prev=${current} + elif [[ ${current} -nt ${prev} ]]; then rm -v "${prev}" || die - prev=${f} + prev=${current} else - rm -v "${f}" || die + rm -v "${current}" || die fi done done < <( @@ -192,7 +242,8 @@ dist-kernel_compressed_module_cleanup() { -o -name '*.ko.gz' \ -o -name '*.ko.xz' \ -o -name '*.ko.zst' \ - \) | sed -e 's:[.]\(gz\|xz\|zst\)$::' | sort | uniq -d || die + \) | sed -e 's:[.]ko\(\|[.]gz\|[.]xz\|[.]zst\)$::' | + sort | uniq -d || die ) } diff --git a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass index 559342068c..9c657cc4c1 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass @@ -1926,7 +1926,7 @@ etestng() { local runner=org.testng.TestNG if [[ ${PN} != testng ]]; then - local cp=$(java-pkg_getjars --with-dependencies testng) + local cp=$(java-pkg_getjars --build-only --with-dependencies testng) else local cp=testng.jar fi diff --git a/sdk_container/src/third_party/portage-stable/eclass/python-any-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/python-any-r1.eclass index a21df8e894..c1f27cfbac 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/python-any-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/python-any-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: python-any-r1.eclass @@ -272,6 +272,7 @@ python_gen_any_dep() { # This function will call python_check_deps() if defined. python_setup() { debug-print-function ${FUNCNAME} "${@}" + _python_sanity_checks # support developer override if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then diff --git a/sdk_container/src/third_party/portage-stable/eclass/python-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/python-r1.eclass index c5fa677055..adf87c2c52 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/python-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/python-r1.eclass @@ -617,6 +617,7 @@ _python_multibuild_wrapper() { # locally, and the former two are exported to the command environment. python_foreach_impl() { debug-print-function ${FUNCNAME} "${@}" + _python_sanity_checks if [[ ${_DISTUTILS_R1_ECLASS} ]]; then if has "${EBUILD_PHASE}" prepare configure compile test install && @@ -708,6 +709,7 @@ python_foreach_impl() { # @CODE python_setup() { debug-print-function ${FUNCNAME} "${@}" + _python_sanity_checks local has_check_deps declare -f python_check_deps >/dev/null && has_check_deps=1 diff --git a/sdk_container/src/third_party/portage-stable/eclass/python-single-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/python-single-r1.eclass index 4d61f08c06..481b6cf91b 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/python-single-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/python-single-r1.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: python-single-r1.eclass @@ -393,6 +393,7 @@ python_gen_impl_dep() { # the Python build environment up for it. python_setup() { debug-print-function ${FUNCNAME} "${@}" + _python_sanity_checks unset EPYTHON diff --git a/sdk_container/src/third_party/portage-stable/eclass/rust-toolchain.eclass b/sdk_container/src/third_party/portage-stable/eclass/rust-toolchain.eclass index 111aece796..469479b849 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/rust-toolchain.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/rust-toolchain.eclass @@ -31,26 +31,29 @@ esac rust_abi() { local CTARGET=${1:-${CHOST}} case ${CTARGET%%*-} in - aarch64*gnu) echo aarch64-unknown-linux-gnu;; - aarch64*musl) echo aarch64-unknown-linux-musl;; - armv6j*h*) echo arm-unknown-linux-gnueabihf;; - armv6j*s*) echo arm-unknown-linux-gnueabi;; - armv7a*h*) echo armv7-unknown-linux-gnueabihf;; - i?86*) echo i686-unknown-linux-gnu;; - loongarch64*) echo loongarch64-unknown-linux-gnu;; - mips64el*) echo mips64el-unknown-linux-gnuabi64;; - mips64*) echo mips64-unknown-linux-gnuabi64;; - mipsel*) echo mipsel-unknown-linux-gnu;; - mips*) echo mips-unknown-linux-gnu;; - powerpc64le*) echo powerpc64le-unknown-linux-gnu;; - powerpc64*) echo powerpc64-unknown-linux-gnu;; - powerpc*) echo powerpc-unknown-linux-gnu;; - riscv64*gnu) echo riscv64gc-unknown-linux-gnu;; - riscv64*musl) echo riscv64gc-unknown-linux-musl;; - s390x*) echo s390x-unknown-linux-gnu;; - x86_64*gnu) echo x86_64-unknown-linux-gnu;; - x86_64*musl) echo x86_64-unknown-linux-musl;; - *) echo ${CTARGET};; + aarch64*gnu) echo aarch64-unknown-linux-gnu;; + aarch64*musl) echo aarch64-unknown-linux-musl;; + armv6j*h*) echo arm-unknown-linux-gnueabihf;; + armv6j*s*) echo arm-unknown-linux-gnueabi;; + armv7a*h*) echo armv7-unknown-linux-gnueabihf;; + i?86*) echo i686-unknown-linux-gnu;; + loongarch64*) echo loongarch64-unknown-linux-gnu;; + mips64el*) echo mips64el-unknown-linux-gnuabi64;; + mips64*) echo mips64-unknown-linux-gnuabi64;; + mipsel*) echo mipsel-unknown-linux-gnu;; + mips*) echo mips-unknown-linux-gnu;; + powerpc64le*gnu) echo powerpc64le-unknown-linux-gnu;; + powerpc64le*musl) echo powerpc64le-unknown-linux-musl;; + powerpc64*gnu) echo powerpc64-unknown-linux-gnu;; + powerpc64*musl) echo powerpc64-unknown-linux-musl;; + powerpc*gnu) echo powerpc-unknown-linux-gnu;; + powerpc*musl) echo powerpc-unknown-linux-musl;; + riscv64*gnu) echo riscv64gc-unknown-linux-gnu;; + riscv64*musl) echo riscv64gc-unknown-linux-musl;; + s390x*) echo s390x-unknown-linux-gnu;; + x86_64*gnu) echo x86_64-unknown-linux-gnu;; + x86_64*musl) echo x86_64-unknown-linux-musl;; + *) echo ${CTARGET};; esac } diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass index cde84e6f34..50eb310b4b 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass @@ -1,4 +1,4 @@ -# Copyright 2002-2023 Gentoo Authors +# Copyright 2002-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: toolchain-funcs.eclass @@ -251,7 +251,7 @@ tc-detect-is-softfloat() { case ${CTARGET:-${CHOST}} in # Avoid autodetection for bare-metal targets. bug #666896 - *-newlib|*-elf|*-eabi) + *-newlib|*-elf|*-eabi|arm64-apple-darwin*) return 1 ;; # arm-unknown-linux-gnueabi is ambiguous. We used to treat it as @@ -295,6 +295,8 @@ tc-tuple-is-softfloat() { # bare-metal targets have their defaults. bug #666896 *-newlib|*-elf|*-eabi) echo "no" ;; + arm64-apple-darwin*) + echo "no" ;; arm*) echo "yes" ;; *) @@ -626,7 +628,14 @@ tc-has-tls() { -*) die "Usage: tc-has-tls [-c|-l] [toolchain prefix]";; esac - : "${flags:=-fPIC -shared -Wl,-z,defs}" + case "${CHOST}" in + *-darwin*) + # bug #612370 + : ${flags:=-dynamiclib} + ;; + *) + : ${flags:=-fPIC -shared -Wl,-z,defs} + esac [[ $1 == -* ]] && shift $(tc-getCC "$@") ${flags} "${base}.c" -o "${base}" >&/dev/null local ret=$? @@ -645,6 +654,7 @@ tc-ninja_magic_to_arch() { [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} case ${host} in + arm64*) echo arm64;; aarch64*) echo arm64;; alpha*) echo alpha;; arc*) echo arc;; @@ -1032,6 +1042,7 @@ gen_usr_ldscript() { [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/ tc-is-static-only && return + use prefix && return # We only care about stuffing / for the native ABI, bug #479448 if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then @@ -1234,6 +1245,7 @@ tc-get-build-ptr-size() { # @RETURN: Shell true if we are using LTO, shell false otherwise tc-is-lto() { local f="${T}/test-lto.o" + local ret=1 case $(tc-get-compiler-type) in clang) @@ -1241,14 +1253,25 @@ tc-is-lto() { # If LTO is used, clang will output bytecode and llvm-bcanalyzer # will run successfully. Otherwise, it will output plain object # file and llvm-bcanalyzer will exit with error. - llvm-bcanalyzer "${f}" &>/dev/null && return 0 + llvm-bcanalyzer "${f}" &>/dev/null && ret=0 ;; gcc) $(tc-getCC) ${CFLAGS} -c -o "${f}" -x c - <<<"" || die - [[ $($(tc-getREADELF) -S "${f}") == *.gnu.lto* ]] && return 0 + [[ $($(tc-getREADELF) -S "${f}") == *.gnu.lto* ]] && ret=0 ;; esac - return 1 + rm -f "${f}" || die + return "${ret}" +} + +# @FUNCTION: tc-has-64bit-time_t +# @RETURN: Shell true if time_t is at least 64 bits long, false otherwise +tc-has-64bit-time_t() { + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null <<-EOF &>/dev/null + #include + int test[sizeof(time_t) >= 8 ? 1 : -1]; + EOF + return $? } fi diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass index c7c366a37a..ac236f3127 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass @@ -1214,7 +1214,14 @@ toolchain_src_configure() { # - https://git.musl-libc.org/cgit/musl/tree/INSTALL # - bug #704784 # - https://gcc.gnu.org/PR93157 - [[ ${CTARGET} == powerpc64-*-musl ]] && confgcc+=( --with-abi=elfv2 ) + # musl additionally does not support libquadmath. See: + # - https://gcc.gnu.org/PR116007 + [[ ${CTARGET} == powerpc64-*-musl ]] && confgcc+=( + --with-abi=elfv2 + --disable-libquadmath + --disable-libquadmath-support + --with-long-double-128=no + ) if in_iuse ieee-long-double; then # musl requires 64-bit long double, not IBM double-double or IEEE quad. @@ -1654,9 +1661,6 @@ gcc_do_filter_flags() { # New in GCC 14. filter-flags -Walloc-size - else - # Makes things painfully slow and no real benefit for the compiler. - append-flags $(test-flags-CC -fno-harden-control-flow-redundancy) fi # Please use USE=lto instead (bug #906007). @@ -1894,7 +1898,6 @@ gcc_do_make() { #---->> src_test <<---- # TODO: add JIT testing -# TODO: add multilib testing toolchain_src_test() { # GCC's testsuite is a special case. # @@ -1917,11 +1920,79 @@ toolchain_src_test() { local -x LD_PRELOAD= # Controls running expensive tests in e.g. the torture testsuite. + # Note that 'TEST', not 'TESTS', is correct here as it's a GCC + # testsuite variable, not ours. local -x GCC_TEST_RUN_EXPENSIVE=1 - # nonfatal here as we die if the comparison below fails. Also, note that - # the exit code of targets other than 'check' may be unreliable. - nonfatal emake -C "${WORKDIR}"/build -k "${GCC_TESTS_CHECK_TARGET}" RUNTESTFLAGS="${GCC_TESTS_RUNTESTFLAGS}" + # Use a subshell to allow meddling with flags just for the testsuite + ( + # Workaround our -Wformat-security default which breaks + # various tests as it adds unexpected warning output. + GCC_TESTS_CFLAGS+=" -Wno-format-security -Wno-format" + GCC_TESTS_CXXFLAGS+=" -Wno-format-security -Wno-format" + + # Workaround our -Wtrampolines default which breaks + # tests too. + GCC_TESTS_CFLAGS+=" -Wno-trampolines" + GCC_TESTS_CXXFLAGS+=" -Wno-trampolines" + # A handful of Ada (and objc++?) tests need an executable stack + GCC_TESTS_LDFLAGS+=" -Wl,--no-warn-execstack" + # Avoid confusing tests like Fortran/C interop ones where + # CFLAGS are used. + GCC_TESTS_CFLAGS+=" -Wno-complain-wrong-lang" + GCC_TESTS_CXXFLAGS+=" -Wno-complain-wrong-lang" + + # Issues with Ada tests: + # gnat.dg/align_max.adb + # gnat.dg/trampoline4.adb + # + # A handful of Ada tests use -fstack-check and conflict + # with -fstack-clash-protection. + # + # TODO: This isn't ideal given it obv. affects codegen + # and we want to be sure it works. + GCC_TESTS_CFLAGS+=" -fno-stack-clash-protection" + GCC_TESTS_CXXFLAGS+=" -fno-stack-clash-protection" + + # configure defaults to '-O2 -g' and some tests expect it + # accordingly. + GCC_TESTS_CFLAGS+=" -g" + + # TODO: Does this handle s390 (-m31) correctly? + # TODO: What if there are multiple ABIs like x32 too? + # XXX: Disabled until validate_failures.py can handle 'variants' + # XXX: https://gcc.gnu.org/PR116260 + #is_multilib && GCC_TESTS_RUNTESTFLAGS+=" --target_board=unix{,-m32}" + + # nonfatal here as we die if the comparison below fails. Also, note that + # the exit code of targets other than 'check' may be unreliable. + # + # CFLAGS and so on are repeated here because of tests vs building test + # deps like libbacktrace. + # + # TODO: Should we try pass in the regular user flags for the non-RUNTESTFLAGS + # instances below for building e.g. libbacktrace? + nonfatal emake -C "${WORKDIR}"/build -k "${GCC_TESTS_CHECK_TARGET}" \ + RUNTESTFLAGS=" \ + ${GCC_TESTS_RUNTESTFLAGS} \ + CFLAGS_FOR_TARGET='${GCC_TESTS_CFLAGS_FOR_TARGET:-${GCC_TESTS_CFLAGS}}' \ + CXXFLAGS_FOR_TARGET='${GCC_TESTS_CXXFLAGS_FOR_TARGET:-${GCC_TESTS_CXXFLAGS}}' \ + LDFLAGS_FOR_TARGET='${TEST_LDFLAGS_FOR_TARGET:-${GCC_TESTS_LDFLAGS}}' \ + CFLAGS='${GCC_TESTS_CFLAGS}' \ + CXXFLAGS='${GCC_TESTS_CXXFLAGS}' \ + FCFLAGS='${GCC_TESTS_FCFLAGS}' \ + FFLAGS='${GCC_TESTS_FFLAGS}' \ + LDFLAGS='${GCC_TESTS_LDFLAGS}' \ + " \ + CFLAGS_FOR_TARGET="${GCC_TESTS_CFLAGS_FOR_TARGET:-${GCC_TESTS_CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${GCC_TESTS_CXXFLAGS_FOR_TARGET:-${GCC_TESTS_CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${GCC_TESTS_LDFLAGS_FOR_TARGET:-${GCC_TESTS_LDFLAGS}}" \ + CFLAGS="${GCC_TESTS_CFLAGS}" \ + CXXFLAGS="${GCC_TESTS_CXXFLAGS}" \ + FCFLAGS="${GCC_TESTS_FCFLAGS}" \ + FFLAGS="${GCC_TESTS_FFLAGS}" \ + LDFLAGS="${GCC_TESTS_LDFLAGS}" + ) # Produce an updated failure manifest. einfo "Generating a new failure manifest ${T}/${CHOST}.xfail" @@ -1975,7 +2046,7 @@ toolchain_src_test() { eerror "GCC_TESTS_IGNORE_NO_BASELINE is set, ignoring test result and creating a new baseline..." elif [[ -n ${GCC_TESTS_REGEN_BASELINE} ]] ; then eerror "GCC_TESTS_REGEN_BASELINE is set, ignoring test result and creating using a new baseline..." - elif [[ ${ret} != 0 ]]; then + elif [[ ${ret} != 0 ]] ; then eerror "(Set GCC_TESTS_IGNORE_NO_BASELINE=1 to make this non-fatal and generate a baseline.)" die "Tests failed (failures occurred with no reference data)" fi diff --git a/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.6-r1.ebuild index 939e7b1932..2eadf62b18 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.6-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.6-r1.ebuild @@ -81,6 +81,13 @@ src_prepare() { # fails to compile in certain configurations sed -i -e 's/__APPLE__/__NO_APPLE__/' lib/system/certs.c || die + if [[ ${CHOST} == *-solaris* ]] ; then + # should be gone on next release, for gnulib memset_s breakage + append-cppflags -D__STDC_WANT_LIB_EXT1__=1 + # alloca usage, similar + sed -i -e '$a#include ' config.h.in || die + fi + # Use sane .so versioning on FreeBSD. elibtoolize } @@ -101,8 +108,6 @@ multilib_src_configure() { # GNU-stack (as doesn't support that) and when that's removed ld # complains about duplicate symbols [[ ${CHOST} == *-darwin* ]] && libconf+=( --disable-hardware-acceleration ) - # should be gone on next release, for gnulib memset_s breakage - [[ ${CHOST} == *-solaris* ]] && append-cppflags -D__STDC_WANT_LIB_EXT1__=1 # -fanalyzer substantially slows down the build and isn't useful for # us. It's useful for upstream as it's static analysis, but it's not diff --git a/sdk_container/src/third_party/portage-stable/net-libs/libmicrohttpd/libmicrohttpd-1.0.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/libmicrohttpd/libmicrohttpd-1.0.1-r1.ebuild index 24ef94c023..c5db1e3432 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/libmicrohttpd/libmicrohttpd-1.0.1-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/libmicrohttpd/libmicrohttpd-1.0.1-r1.ebuild @@ -15,7 +15,7 @@ S="${WORKDIR}"/${MY_P} LICENSE="|| ( LGPL-2.1+ !ssl? ( GPL-2+-with-eCos-exception-2 ) )" SLOT="0/12" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="debug +epoll +eventfd ssl static-libs test +thread-names verify-sig" REQUIRED_USE="epoll? ( kernel_linux )" RESTRICT="!test? ( test )" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/curl/Manifest index 531b8c0600..f629b1d12d 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/Manifest @@ -2,5 +2,5 @@ DIST curl-8.7.1.tar.xz 2707016 BLAKE2B a2a9f48d0b69c0d92fcbbda535ce55082a5243abe DIST curl-8.7.1.tar.xz.asc 488 BLAKE2B 1c91d116aecc8e98d8ec3aad68b7c96f11151e6c2716f531e5d2989e9b6b1199e180603673891d7967cdcdaee1d6b5e15160ccabe9b51590e2887022db03c2ed SHA512 f98c393997c4a32f545a8982226e8cd612395210915a4576c2ce227d0f650cff341be7bf15e989d1789abf32ac4fd9c190b9250b81e650b569e8532048746b37 DIST curl-8.8.0.tar.xz 2748860 BLAKE2B c14903bad4cbd1752a5335afa6bcc78be1a484692fce0e0a6c2061963e0e6b4e56defb8332cef32d0dbddb481ad0443b71faf3a52a6e9d945c89ecbce373d2a3 SHA512 9d2c0d3a0d8f6c31ba4fabe48f801910f886fde43dc198dc4213708d6967ed5e040a1bb7348aa1cb126577ee508a3ec36fe65256d027d861d6ffb70f6383967a DIST curl-8.8.0.tar.xz.asc 488 BLAKE2B d80c0ff357b344d7ec2b975a92f1eeb7557993b61a69e7adaaeab89c9b5a53ddade5104fe1a0ad260145db9c90fc0aae36dfc22320492db6696f290da9ff675b SHA512 37b501770225dff6b1e7bde1157f556f10ec1c597fcbbb5c8b8c370efb97a3a70f585f2f5c201b96380d68466696474a5f65a07da59b704678d6927567d25359 -DIST curl-8.9.0.tar.xz 2781828 BLAKE2B 3302ce98d937bb398fc1abcc1c403796503099e06919ea3b104c873a6fb6cd79328ea9684f5118f63ebb20bad18b94ebfbe92e87716fc24b91dcc92ff2d304b7 SHA512 922c726cfa3a73954927a32f485248d7a53a3348638a6a01add1bc0a67a7d2ee9cdb7c78b6db84bb7e2fab9d2d5487a96d9071832198b63a86d2caaef85c9310 -DIST curl-8.9.0.tar.xz.asc 488 BLAKE2B 7f35383fd98fe0947be9cb0bfb4737a185f40bb3c3e7ab001cb1bef026dec654a01059e225c0d9774c2c5a57a6ee00a4ccf4be8eb1a2db17fe7b2cdbdd06b2f1 SHA512 44cc7053ac0fddcb5131e7806fcd793d70bd49c5549b2548bbcbe60fdf913f450e45861ff6497b30eb00fd84483302ff9b6c3aea6b66728d6e54dd7ffc388408 +DIST curl-8.9.1.tar.xz 2782364 BLAKE2B 6e38e20e2b03ab5bfbb8d9797442dfdd9644fc80d7b1f7c1efb1f44e0d730524e82ccf7413b2c6f4555bd61ae42f91ec7c0201e2c0d563811c85164aa234aada SHA512 a0fe234402875db194aad4e4208b7e67e7ffc1562622eea90948d4b9b0122c95c3dde8bbe2f7445a687cb3de7cb09f20e5819d424570442d976aa4c913227fc7 +DIST curl-8.9.1.tar.xz.asc 488 BLAKE2B 437268f6e5ba5db73f205fd87f3ded1e5fc200e8bf63a83cdb7e21dfbf2f4a4620e598cd0bf5d8fa1548ade08d45b386599542cd988df46a238b85790409f42e SHA512 18acd58436d70900ab6912b84774da2c451b9dbfc83d6d00f85bbbe7894b67075918e58956fdb753fcc1486e4f10caa31139d7c68b037d7c83dc2e9c2fae9f9b diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.7.1-r3.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.7.1-r3.ebuild deleted file mode 100644 index 7877669d82..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.7.1-r3.ebuild +++ /dev/null @@ -1,370 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc -inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig - -DESCRIPTION="A Client that groks URLs" -HOMEPAGE="https://curl.se/" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/curl/curl.git" -else - SRC_URI=" - https://curl.se/download/${P}.tar.xz - verify-sig? ( https://curl.se/download/${P}.tar.xz.asc ) - " - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="BSD curl ISC test? ( BSD-4 )" -SLOT="0" -IUSE="+adns +alt-svc brotli +ftp gnutls gopher +hsts +http2 idn +imap kerberos ldap mbedtls nghttp3 +openssl +pop3" -IUSE+=" +psl +progress-meter rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" -# These select the default SSL implementation -IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" -RESTRICT="!test? ( test )" - -# Only one default ssl provider can be enabled -# The default ssl provider needs its USE satisfied -# nghttp3 = https://bugs.gentoo.org/912029 -REQUIRED_USE=" - ssl? ( - ^^ ( - curl_ssl_gnutls - curl_ssl_mbedtls - curl_ssl_openssl - curl_ssl_rustls - ) - ) - curl_ssl_gnutls? ( gnutls ) - curl_ssl_mbedtls? ( mbedtls ) - curl_ssl_openssl? ( openssl ) - curl_ssl_rustls? ( rustls ) - nghttp3? ( - !openssl - alt-svc ) -" - -# cURL's docs and CI/CD are great resources for confirming supported versions -# particulary for fast-moving targets like HTTP/2 and TCP/2 e.g.: -# - https://github.com/curl/curl/blob/master/docs/INTERNALS.md (core dependencies + minimum versions) -# - https://github.com/curl/curl/blob/master/docs/HTTP3.md (example of a feature that moves quickly) -# - https://github.com/curl/curl/blob/master/.github/workflows/quiche-linux.yml (CI/CD for TCP/2) -# However 'supported' vs 'works' are two entirely different things; be sane but -# don't be afraid to require a later version. - -RDEPEND=" - >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}] - adns? ( net-dns/c-ares:=[${MULTILIB_USEDEP}] ) - brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) - http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] ) - idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) - kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) - ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) - nghttp3? ( - >=net-libs/nghttp3-0.15.0[${MULTILIB_USEDEP}] - >=net-libs/ngtcp2-0.19.1[gnutls,ssl,-openssl,${MULTILIB_USEDEP}] - ) - psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] ) - rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) - ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] ) - ssl? ( - gnutls? ( - app-misc/ca-certificates - >=net-libs/gnutls-3.1.10:=[static-libs?,${MULTILIB_USEDEP}] - dev-libs/nettle:=[${MULTILIB_USEDEP}] - ) - mbedtls? ( - app-misc/ca-certificates - net-libs/mbedtls:=[${MULTILIB_USEDEP}] - ) - openssl? ( - >=dev-libs/openssl-0.9.7:=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}] - ) - rustls? ( >=net-libs/rustls-ffi-0.12.1:=[${MULTILIB_USEDEP}] - > libcurl.pc || die -} - -multilib_src_compile() { - default - - if multilib_is_native_abi; then - # Shell completions - ! tc-is-cross-compiler && emake -C scripts - fi -} - -# There is also a pytest harness that tests for bugs in some very specific -# situations; we can rely on upstream for this rather than adding additional test deps. -multilib_src_test() { - # See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721 - # -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches) - # -v: verbose - # -a: keep going on failure (so we see everything which breaks, not just 1st test) - # -k: keep test files after completion - # -am: automake style TAP output - # -p: print logs if test fails - # Note: if needed, we can skip specific tests. See e.g. Fedora's packaging - # or just read https://github.com/curl/curl/tree/master/tests#run. - # Note: we don't run the testsuite for cross-compilation. - # Upstream recommend 7*nproc as a starting point for parallel tests, but - # this ends up breaking when nproc is huge (like -j80). - # The network sandbox causes tests 241 and 1083 to fail; these are typically skipped - # as most gentoo users don't have an 'ip6-localhost' - multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083" -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi; then - # Shell completions - ! tc-is-cross-compiler && emake -C scripts DESTDIR="${D}" install - fi -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die - rm -rf "${ED}"/etc/ || die -} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0-r1.ebuild index 1e9f3de2f0..585156f0e2 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0-r1.ebuild @@ -21,7 +21,7 @@ else https://curl.se/download/${P}.tar.xz verify-sig? ( https://curl.se/download/${P}.tar.xz.asc ) " - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="BSD curl ISC test? ( BSD-4 )" diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1-r1.ebuild similarity index 82% rename from sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0.ebuild rename to sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1-r1.ebuild index db51f02670..68501e8298 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.8.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1-r1.ebuild @@ -26,16 +26,25 @@ fi LICENSE="BSD curl ISC test? ( BSD-4 )" SLOT="0" -IUSE="+adns +alt-svc brotli +ftp gnutls gopher +hsts +http2 idn +imap kerberos ldap mbedtls nghttp3 +openssl +pop3" -IUSE+=" +psl +progress-meter rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" -# These select the default SSL implementation -IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" +IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3" +IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" +# These select the default tls implementation / which quic impl to use +IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" RESTRICT="!test? ( test )" -# Only one default ssl provider can be enabled -# The default ssl provider needs its USE satisfied -# nghttp3 = https://bugs.gentoo.org/912029 +# Only one default ssl / quic provider can be enabled +# The default provider needs its USE satisfied +# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day. +# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e REQUIRED_USE=" + quic? ( + ^^ ( + curl_quic_openssl + curl_quic_ngtcp2 + ) + http3 + ssl + ) ssl? ( ^^ ( curl_ssl_gnutls @@ -44,13 +53,25 @@ REQUIRED_USE=" curl_ssl_rustls ) ) + curl_quic_openssl? ( + curl_ssl_openssl + quic + !gnutls + !mbedtls + !rustls + ) + curl_quic_ngtcp2? ( + curl_ssl_gnutls + quic + !mbedtls + !openssl + !rustls + ) curl_ssl_gnutls? ( gnutls ) curl_ssl_mbedtls? ( mbedtls ) curl_ssl_openssl? ( openssl ) curl_ssl_rustls? ( rustls ) - nghttp3? ( - !openssl - alt-svc ) + http3? ( alt-svc quic ) " # cURL's docs and CI/CD are great resources for confirming supported versions @@ -60,20 +81,21 @@ REQUIRED_USE=" # - https://github.com/curl/curl/blob/master/.github/workflows/quiche-linux.yml (CI/CD for TCP/2) # However 'supported' vs 'works' are two entirely different things; be sane but # don't be afraid to require a later version. - +# ngtcp2 = https://bugs.gentoo.org/912029 - can only build with one tls backend at a time. RDEPEND=" >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}] adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] ) brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) - http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] ) - idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + http2? ( >=net-libs/nghttp2-1.15.0:=[${MULTILIB_USEDEP}] ) + http3? ( >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] ) + idn? ( >=net-dns/libidn2-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) - nghttp3? ( - >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] - >=net-libs/ngtcp2-1.2.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}] - ) psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] ) + quic? ( + curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] ) + curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}] ) + ) rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) ssh? ( >=net-libs/libssh2-1.0.0[${MULTILIB_USEDEP}] ) ssl? ( @@ -104,7 +126,7 @@ BDEPEND=" test? ( sys-apps/diffutils http2? ( >=net-libs/nghttp2-1.15.0:=[utils,${MULTILIB_USEDEP}] ) - nghttp3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) + http3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) ) verify-sig? ( sec-keys/openpgp-keys-danielstenberg ) " @@ -136,8 +158,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( PATCHES=( "${FILESDIR}"/${PN}-prefix-2.patch "${FILESDIR}"/${PN}-respect-cflags-3.patch - "${FILESDIR}"/${P}-install-manpage.patch - "${FILESDIR}"/${P}-mbedtls.patch + "${FILESDIR}"/${PN}-8.9.1-sigpipe.patch ) src_prepare() { @@ -264,8 +285,9 @@ multilib_src_configure() { --without-libgsasl $(use_with psl libpsl) --without-msh3 - $(use_with nghttp3) - $(use_with nghttp3 ngtcp2) + $(use_with http3 nghttp3) + $(use_with curl_quic_ngtcp2 ngtcp2) + $(use_with curl_quic_openssl openssl-quic) --without-quiche $(use_with rtmp librtmp) --without-schannel @@ -281,7 +303,13 @@ multilib_src_configure() { --with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions ) - if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); then + if use debug; then + myconf+=( + --enable-debug + ) + fi + + if use test && multilib_is_native_abi && ( use http2 || use http3 ); then myconf+=( --with-test-nghttpx="${BROOT}/usr/bin/nghttpx" ) @@ -301,30 +329,6 @@ multilib_src_configure() { sed -i -e '/SUBDIRS/s:scripts::' Makefile || die fi - # Fix up the pkg-config file to be more robust. - # https://github.com/curl/curl/issues/864 - local priv=() libs=() - # We always enable zlib. - libs+=( "-lz" ) - priv+=( "zlib" ) - if use http2; then - libs+=( "-lnghttp2" ) - priv+=( "libnghttp2" ) - fi - if use nghttp3; then - libs+=( "-lnghttp3" "-lngtcp2" ) - priv+=( "libnghttp3" "libngtcp2" ) - fi - if use ssl && use curl_ssl_openssl; then - libs+=( "-lssl" "-lcrypto" ) - priv+=( "openssl" ) - fi - grep -q Requires.private libcurl.pc && die "need to update ebuild" - libs=$(printf '|%s' "${libs[@]}") - sed -i -r \ - -e "/^Libs.private/s:(${libs#|})( |$)::g" \ - libcurl.pc || die - echo "Requires.private: ${priv[*]}" >> libcurl.pc || die } multilib_src_compile() { @@ -370,3 +374,11 @@ multilib_src_install_all() { find "${ED}" -type f -name '*.la' -delete || die rm -rf "${ED}"/etc/ || die } + +pkg_postinst() { + if use debug; then + ewarn "USE=debug has been selected, enabling debug codepaths and making cURL extra verbose." + ewarn "Use this _only_ for testing. Debug builds should _not_ be used in anger." + ewarn "hic sunt dracones; you have been warned." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.0.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1.ebuild similarity index 93% rename from sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.0.ebuild rename to sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1.ebuild index b42cca9c51..29fe1924e3 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.9.1.ebuild @@ -26,14 +26,16 @@ fi LICENSE="BSD curl ISC test? ( BSD-4 )" SLOT="0" -IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 http3 idn +imap kerberos ldap mbedtls +openssl +pop3" -IUSE+=" +psl +progress-meter quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" +IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3" +IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" # These select the default tls implementation / which quic impl to use -IUSE+=" curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" +IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" RESTRICT="!test? ( test )" # Only one default ssl / quic provider can be enabled # The default provider needs its USE satisfied +# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day. +# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e REQUIRED_USE=" quic? ( ^^ ( @@ -50,8 +52,20 @@ REQUIRED_USE=" curl_ssl_rustls ) ) - curl_quic_openssl? ( openssl ) - curl_quic_ngtcp2? ( gnutls ) + curl_quic_openssl? ( + curl_ssl_openssl + quic + !gnutls + !mbedtls + !rustls + ) + curl_quic_ngtcp2? ( + curl_ssl_gnutls + quic + !mbedtls + !openssl + !rustls + ) curl_ssl_gnutls? ( gnutls ) curl_ssl_mbedtls? ( mbedtls ) curl_ssl_openssl? ( openssl ) @@ -71,9 +85,9 @@ RDEPEND=" >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}] adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] ) brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) - http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] ) + http2? ( >=net-libs/nghttp2-1.15.0:=[${MULTILIB_USEDEP}] ) http3? ( >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] ) - idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + idn? ( >=net-dns/libidn2-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] ) diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-9999.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-9999.ebuild index b42cca9c51..94d88b0924 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/curl-9999.ebuild @@ -26,14 +26,16 @@ fi LICENSE="BSD curl ISC test? ( BSD-4 )" SLOT="0" -IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 http3 idn +imap kerberos ldap mbedtls +openssl +pop3" -IUSE+=" +psl +progress-meter quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd" +IUSE="+adns +alt-svc brotli debug +ftp gnutls gopher +hsts +http2 +http3 idn +imap kerberos ldap mbedtls +openssl +pop3" +IUSE+=" +psl +progress-meter +quic rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp +websockets zstd" # These select the default tls implementation / which quic impl to use -IUSE+=" curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" +IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls" RESTRICT="!test? ( test )" # Only one default ssl / quic provider can be enabled # The default provider needs its USE satisfied +# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day. +# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e REQUIRED_USE=" quic? ( ^^ ( @@ -41,6 +43,7 @@ REQUIRED_USE=" curl_quic_ngtcp2 ) http3 + ssl ) ssl? ( ^^ ( @@ -50,8 +53,20 @@ REQUIRED_USE=" curl_ssl_rustls ) ) - curl_quic_openssl? ( openssl ) - curl_quic_ngtcp2? ( gnutls ) + curl_quic_openssl? ( + curl_ssl_openssl + quic + !gnutls + !mbedtls + !rustls + ) + curl_quic_ngtcp2? ( + curl_ssl_gnutls + quic + !mbedtls + !openssl + !rustls + ) curl_ssl_gnutls? ( gnutls ) curl_ssl_mbedtls? ( mbedtls ) curl_ssl_openssl? ( openssl ) @@ -71,9 +86,9 @@ RDEPEND=" >=sys-libs/zlib-1.1.4[${MULTILIB_USEDEP}] adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] ) brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) - http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] ) + http2? ( >=net-libs/nghttp2-1.15.0:=[${MULTILIB_USEDEP}] ) http3? ( >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] ) - idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + idn? ( >=net-dns/libidn2-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] ) psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] ) @@ -116,7 +131,7 @@ BDEPEND=" verify-sig? ( sec-keys/openpgp-keys-danielstenberg ) " -DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} ) +DOCS=( README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} ) MULTILIB_WRAPPED_HEADERS=( /usr/include/curl/curlbuild.h @@ -330,7 +345,7 @@ multilib_src_test() { # See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721 # -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches) # -v: verbose - # -a: keep going on failure (so we see everything which breaks, not just 1st test) + # -a: keep going on failure (so we see everything that breaks, not just 1st test) # -k: keep test files after completion # -am: automake style TAP output # -p: print logs if test fails diff --git a/sdk_container/src/third_party/portage-stable/net-misc/curl/files/curl-8.9.1-sigpipe.patch b/sdk_container/src/third_party/portage-stable/net-misc/curl/files/curl-8.9.1-sigpipe.patch new file mode 100644 index 0000000000..d308fc4420 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/curl/files/curl-8.9.1-sigpipe.patch @@ -0,0 +1,26 @@ +https://github.com/curl/curl/commit/3eec5afbd0b6377eca893c392569b2faf094d970 +From: Daniel Stenberg +Date: Mon, 5 Aug 2024 00:17:17 +0200 +Subject: [PATCH] sigpipe: init the struct so that first apply ignores + +Initializes 'no_signal' to TRUE, so that a call to sigpipe_apply() after +init ignores the signal (unless CURLOPT_NOSIGNAL) is set. + +I have read the existing code multiple times now and I think it gets the +initial state reversed this missing to ignore. + +Regression from 17e6f06ea37136c36d27 + +Reported-by: Rasmus Thomsen +Fixes #14344 +Closes #14390 +--- a/lib/sigpipe.h ++++ b/lib/sigpipe.h +@@ -39,6 +39,7 @@ struct sigpipe_ignore { + static void sigpipe_init(struct sigpipe_ignore *ig) + { + memset(ig, 0, sizeof(*ig)); ++ ig->no_signal = TRUE; + } + + /* diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest index 6bfe5652d1..528fe7e69b 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest @@ -1,3 +1,4 @@ DIST iperf-2.0.13.tar.gz 326148 BLAKE2B 2a40aea9e2d7fdc935b91be5e4e586bf68dd27604375d2570570145e5db1ea5837469a4989f47586986932bef33cba05ed19ed3a9ce40c0a5531581c6d3ba982 SHA512 40fcfb8f4d27887f53a743ac07396511fb2a7ac59f4b300fe36896bd0241e191945fa253705990711772ee776d5e4227ed62760fc92abebdfebcedd11c27c0ea DIST iperf-3.15.tar.gz 649330 BLAKE2B f086d506d1de8e8b333a7ad46a94279aa5b42800ded7cc6724c3400e479a6523b336c74b5956d07117a178b5f89934553535824a05daafcdb2eb8d31754680e1 SHA512 988bc558f40a16c3d94df3956705712829c1c529efd577db16213783846c84bc3edbad19a4d7890b7aba08fbc4e1c6807105df29931e9b45981066b609d87aa2 DIST iperf-3.16.tar.gz 664751 BLAKE2B 4ca930b58c54d5ae5b0c8b14aca2556224ff2c7b943d32e65486dc2a7e1abd2d26b229e9f759358c326be8754e88a203e11a3ab0f029daa982375a880c3f1cbd SHA512 9ba97e03f17f3b939343b07ed3d508fbf57489e2b984b77a3dc3ada535f981350e56495154bdd108a83b3c507ccbed599b2b7b25de0d1778912d2c01b4ad4e7c +DIST iperf-3.17.1.tar.gz 670547 BLAKE2B 90afa47ba2de2f789b118ea42d7eabe3a7ec202116d51915b05350932231788a95ae142bdf2cff041f5504e67ae5ac1da2c66f408bc302c4e230ef4b7e496e15 SHA512 99c731e2e060d2b241d3137742bf92a975f2b7a94c6c723c9c1625f69c294fd7fe15b7dbf085a6120038fc1dd7628c83d2c7d16b059849fdbecbc88e48fb0974 diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.17.1-Unbundle-cJSON.patch b/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.17.1-Unbundle-cJSON.patch new file mode 100644 index 0000000000..856403ca6b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.17.1-Unbundle-cJSON.patch @@ -0,0 +1,110 @@ +Date: Tue, 30 Jul 2024 21:11:48 +0300 +Subject: [PATCH] Unbundle cJSON + +Signed-off-by: Arthur Zamarin +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,8 @@ AC_ARG_ENABLE([profiling], + AS_HELP_STRING([--enable-profiling], [Enable iperf3 profiling binary])) + AM_CONDITIONAL([ENABLE_PROFILING], [test x$enable_profiling = xyes]) + ++PKG_CHECK_MODULES([libcjson], [libcjson >= 1.7.15]) ++ + # Check for the math library (needed by cjson on some platforms) + AC_SEARCH_LIBS(floor, [m], [], [ + echo "floor()" +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -10,8 +10,6 @@ include_HEADERS = iperf_api.h # Define + + # Specify the source files and flags for the iperf library + libiperf_la_SOURCES = \ +- cjson.c \ +- cjson.h \ + flowlabel.h \ + iperf.h \ + iperf_api.c \ +@@ -46,10 +44,13 @@ libiperf_la_SOURCES = \ + units.c \ + units.h \ + version.h ++libiperf_la_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@ ++libiperf_la_LIBADD = @libcjson_LIBS@ + + # Specify the sources and various flags for the iperf binary + iperf3_SOURCES = main.c +-iperf3_LDADD = libiperf.la ++iperf3_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@ ++iperf3_LDADD = libiperf.la @libcjson_LIBS@ + + if ENABLE_PROFILING + # If the iperf-profiled-binary is enabled +--- a/src/iperf.h ++++ b/src/iperf.h +@@ -52,7 +52,7 @@ + + #include "timer.h" + #include "queue.h" +-#include "cjson.h" ++#include + #include "iperf_time.h" + #include "portable_endian.h" + +--- a/src/iperf_api.c ++++ b/src/iperf_api.c +@@ -79,7 +79,7 @@ + #endif /* HAVE_SCTP_H */ + #include "timer.h" + +-#include "cjson.h" ++#include + #include "units.h" + #include "iperf_util.h" + #include "iperf_locale.h" +--- a/src/iperf_tcp.c ++++ b/src/iperf_tcp.c +@@ -42,7 +42,7 @@ + #include "iperf_api.h" + #include "iperf_tcp.h" + #include "net.h" +-#include "cjson.h" ++#include + + #if defined(HAVE_FLOWLABEL) + #include "flowlabel.h" +--- a/src/iperf_udp.c ++++ b/src/iperf_udp.c +@@ -45,7 +45,7 @@ + #include "iperf_udp.h" + #include "timer.h" + #include "net.h" +-#include "cjson.h" ++#include + + /* iperf_udp_recv + * +--- a/src/iperf_util.c ++++ b/src/iperf_util.c +@@ -46,7 +46,7 @@ + #include + #include + +-#include "cjson.h" ++#include + #include "iperf.h" + #include "iperf_api.h" + +--- a/src/iperf_util.h ++++ b/src/iperf_util.h +@@ -28,7 +28,7 @@ + #define __IPERF_UTIL_H + + #include "iperf_config.h" +-#include "cjson.h" ++#include + #include + #include + +-- +2.45.2 + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.17.1.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.17.1.ebuild new file mode 100644 index 0000000000..999cff75ed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.17.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd + +DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool" +HOMEPAGE="https://github.com/esnet/iperf" +SRC_URI="https://github.com/esnet/iperf/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="sctp" + +DEPEND=" + >=dev-libs/cJSON-1.7.15 + dev-libs/openssl:= + sctp? ( net-misc/lksctp-tools ) +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( README.md RELNOTES.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.10.1-drop-forced-debugging-symbols.patch + "${FILESDIR}"/${PN}-3.17.1-Unbundle-cJSON.patch +) + +src_prepare() { + default + + # Drop bundled cjson + rm src/cjson.{c,h} || die + + eautoreconf +} + +src_configure() { + econf $(use_with sctp) +} + +src_install() { + default + + newconfd "${FILESDIR}"/iperf.confd iperf3 + newinitd "${FILESDIR}"/iperf3.initd iperf3 + systemd_dounit contrib/iperf3.service + + find "${ED}" -name '*.la' -type f -delete || die +} diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/alpha/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/alpha/package.use.mask index 588fd006d3..33ea15453d 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/alpha/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/alpha/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Arthur Zamarin (2024-08-10) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Leonardo Hernández Hernández (2024-07-07) # media-libs/quirc and media-sound/liblc3 are not keyworded here media-video/ffmpeg quirc liblc3 @@ -71,6 +75,7 @@ app-alternatives/ninja samurai # indicate a passing test suite, you must check the logs. # https://buildd.debian.org/status/logs.php?pkg=weston&arch=alpha gui-libs/gtk wayland +dev-libs/libportal wayland # matoro (2023-06-18) # sci-physics/bullet not keyworded here (#908240) diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.mask index 332e381217..acb4eca725 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.mask @@ -130,7 +130,7 @@ net-libs/ngtcp2 -ssl # Matt Jolly (2023-08-10) # nghttp3 has been tested to work on amd64 -net-misc/curl -nghttp3 -http3 -quic +net-misc/curl -nghttp3 -http3 -quic -curl_quic_openssl # Sam James (2023-07-18) # dev-cpp/cppdap is not keyworded in most places diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.stable.mask index be06ceb658..f9fa5971a9 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/package.use.stable.mask @@ -29,10 +29,6 @@ sys-kernel/installkernel ugrd # Experimental, virt-firmware is keyworded only unstable sys-kernel/installkernel efistub -# Ionen Wolkens (2024-01-27) -# dev-python/pyside6 is not stable here yet -dev-python/QtPy pyside6 - # Ionen Wolkens (2024-01-16) # cuda (and thus cudnn) are not available in stable media-libs/opencv cudnn @@ -50,10 +46,6 @@ sys-kernel/gentoo-kernel-bin generic-uki # librttopo has not been stabalized on this arch yet dev-db/spatialite rttopo -# Andrew Ammerlaan (2023-08-21) -# Mask testing on stable until we have stable qt6 -dev-python/pytest-qt test - # Matt Jolly (2023-08-10) # net-libs/ngtcp2 is not marked stable net-misc/curl nghttp3 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/use.stable.mask index c7159b8792..237e247f29 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/amd64/use.stable.mask @@ -8,10 +8,6 @@ # ROCm/HIP is not suitable for stabilization. hip -# Jimi Huotari (2023-03-03) -# Mask until stable. -pyside6 - # Andreas Sturmlechner (2020-06-06) # sci-libs/mkl is not stable, needs online registration to even run pkg_setup mkl diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/package.use.mask index 1244b0353f..5934da3c8f 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/package.use.mask @@ -1,13 +1,17 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Michał Górny (2024-07-24) # Full testing requires www-client/firefox. dev-python/selenium test-rust # Matt Jolly (2023-08-10) # nghttp3 has been tested to work on amd64 -net-misc/curl -http3 -quic curl_quic_ngtcp2 +net-misc/curl -http3 -quic -curl_quic_openssl curl_quic_ngtcp2 # orbea (2024-07-19) # Unmask the dynarec flag which has arm asm. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/package.use.mask index d2412f8063..697d59d5c5 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # orbea (2024-07-19) # Unmask the dynarec flag which has arm64 asm. games-emulation/rmg -dynarec diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/base/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/base/package.use.mask index 9498b47f34..1e2640f184 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/base/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/base/package.use.mask @@ -297,7 +297,7 @@ app-emulation/aranym jit # Craig Andrews (2019-10-08) # net-libs/nghttp3 net-libs/ngtcp2[ssl] are not available on all arches -net-misc/curl nghttp3 http3 quic +net-misc/curl nghttp3 http3 quic curl_quic_openssl # Luke Dashjr (2019-09-21) # Moved from arch/powerpc/ppc64 as it applies to most architectures. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.mask index 1c52bcaee7..1fa92e6e97 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.mask @@ -4,6 +4,10 @@ # NOTE: When masking a USE flag due to missing keywords, please file a keyword # request bug for the hppa arch. +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Leonardo Hernández Hernández (2024-07-07) # media-libs/quirc and media-sound/liblc3 are not keyworded here media-video/ffmpeg quirc liblc3 @@ -71,10 +75,6 @@ sys-apps/openrc-navi s6 # Qt not keyworded here. app-text/doxygen gui -# Sam James (2023-09-22) -# Qt 6 not keyworded here. -dev-build/cmake gui - # Sam James (2023-09-18) # x11-libs/gtksourceview:4 not keyworded here media-gfx/inkscape sourceview diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.stable.mask index 0c4f80d3fb..f807a89399 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.use.stable.mask @@ -17,6 +17,10 @@ #--- END OF EXAMPLES --- +# Sam James (2024-07-31) +# Qt 6 not stable here. +dev-build/cmake gui + # Andrew Ammerlaan (2024-07-25) # Moved to stable.mask, issue is fixed in unstable v40 # Sam James (2024-06-19) diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/ia64/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/ia64/package.use.mask index 8963aeb70e..70ecba5776 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/ia64/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/ia64/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Leonardo Hernández Hernández (2024-07-07) # media-libs/quirc and media-sound/liblc3 are not keyworded here media-video/ffmpeg quirc liblc3 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.use.mask index d4e6ebe6b2..84563bd6de 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.use.mask @@ -1,6 +1,10 @@ # Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Michał Górny (2024-07-24) # Full testing requires www-client/firefox. dev-python/selenium test-rust diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/package.use.mask index c734289ee9..1a4bd8be7b 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Thomas Bettler (2024-06-10) # requires dev-libs/apache-arrow which is net yet keyworded sci-libs/gdal parquet diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc32/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc32/package.use.mask index b065d2533d..b64562e1a3 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc32/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc32/package.use.mask @@ -48,10 +48,6 @@ dev-python/nbconvert test # dev-db/mysql not keyworded/stable here dev-perl/DBD-mysql mysql -# Sam James (2023-09-22) -# Qt 6 not keyworded here. -dev-build/cmake gui - # Sam James (2023-09-22) # sys-apps/flatpak is not keyworded here sys-apps/xdg-desktop-portal flatpak diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/eapi b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/make.defaults deleted file mode 100644 index 116e08896a..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/make.defaults +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# All extra USE/etc should be specified in sub-profiles. -# DO NOT POLLUTE USE ON THIS PROFILE. - -ARCH="ppc" -CHOST="powerpc-unknown-linux-gnu" -ABI="ppc" -MULTILIB_ABIS="ppc" -DEFAULT_ABI="ppc" -ACCEPT_KEYWORDS="${ARCH} -ppc64" - -# Michał Górny (2014-06-27) -# Make the ABI flag implicit for compatibility with native ebuilds. -IUSE_IMPLICIT="abi_ppc_32 -abi_ppc_64" diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.mask deleted file mode 100644 index 48fd10c7ba..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.mask +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Sam James (2022-01-18) -# No bootstrap binary available on big endian PPC64 right now -# But there is one for PPC (big endian). --dev-lisp/sbcl diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.use.mask deleted file mode 100644 index 5e473bff5f..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/package.use.mask +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Lars Wendler (2022-04-22) -# gnome-base/librsvg missing keywords -media-libs/freetype svg - -# Andreas Sturmlechner (2021-01-19) -# dev-java/openjdk:11 is not keyworded ->=app-office/libreoffice-7 java - -# Robin H. Johnson (2019-12-06) -# PPS should work on all arches, but only keyworded on some arches ->=net-misc/ntp-4.2.6_p3-r1 -parse-clocks - -# Andreas Sturmlechner (2019-02-16) -# app-text/libwpd and app-text/libwpg are not keyworded -media-gfx/inkscape cdr visio wpg diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/packages b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/packages deleted file mode 100644 index 66d529b246..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/packages +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2012-2012 Gentoo Foundation. -# Distributed under the terms of the GNU General Public License v2 - -# This is no longer needed for ppc64-32ul builds --*sys-devel/kgcc64 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/parent b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/parent deleted file mode 100644 index 0cd1f96e31..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/parent +++ /dev/null @@ -1,3 +0,0 @@ -../../../../features/multilib -.. -../../ppc32 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.force b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.force deleted file mode 100644 index c74bf34602..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.force +++ /dev/null @@ -1,5 +0,0 @@ -# Force the flag which corresponds to ARCH. -ppc - -# Unforce the flag which corresponds to the 64-bit ARCH. --ppc64 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.mask deleted file mode 100644 index 7d18300e0f..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/32ul/use.mask +++ /dev/null @@ -1,12 +0,0 @@ -# Unmask the flag which corresponds to ARCH. --ppc - -# Mask the flag which corresponds to the 64-bit ARCH. -ppc64 - -# We mask this since we're not really a multilib profile -multilib - -# matoro (2023-06-17) -# media-libs/libheif is not keyworded here -heif diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.mask index d850925242..09567a0a34 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Andreas Sturmlechner (2024-08-09) +# KDE PIM 6 is not being keyworded here +kde-apps/libkgapi:5 kf6compat + # Andreas Sturmlechner (2024-07-01) # USE="kf6compat,kaccounts" depends on kde-frameworks/purpose:6[webengine] # which is package.use.mask'ed on these arches. We cannot mask the @@ -8,19 +12,10 @@ # additional dev-qt/qtwebengine revdeps. kde-frameworks/purpose:5 kaccounts -# Sam James (2024-06-13) -# Needs as-yet-unkeyworded KF6 (bug #934215) -app-crypt/pinentry qt6 -app-office/libreoffice qt6 - # Sam James (2024-05-19) # media-libs/jasper not yet keyworded here: https://bugs.gentoo.org/921559 media-gfx/graphicsmagick jpeg2k -# José de Paula R. N. Assis (2024-03-25) -# No PyQt6 (which is needed by USE=qt6 for qscintilla-python) on ppc64. ->=dev-python/qscintilla-python-2.14.1-r1 qt6 - # Sam James (2024-03-23) # dev-qt/qtwebengine not available here dev-python/QtPy webengine test @@ -33,10 +28,6 @@ app-emulation/libvirt -virtiofsd # media-libs/shaderc is keyworded here. media-libs/libplacebo -shaderc -# Sam James (2023-09-22) -# Qt 6 not keyworded here. -dev-build/cmake gui - # Alexey Sokolov (2023-08-14) # OpenMW is only playtested with LuaJIT, and in fact unit tests fail with Lua-5. # Therefore apply mask/force to override the profile's defaults, and invert on diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.mask index 460ba125e9..df505e9a7a 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.mask @@ -3,10 +3,6 @@ ### THIS FILE IS ONLY FOR PACKAGES MASKED ON BOTH 64-BIT AND 32-BIT USERLAND!!! -# Sam James (2024-06-13) -# Needs as-yet-unkeyworded KF6 (bug #934215) -kf6compat - # Paul Zander (2024-03-29) # not available here (see openexr, opencolorio, opencv) openvdb diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/riscv/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/riscv/package.use.mask index 289258c837..a194f032c5 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/riscv/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/riscv/package.use.mask @@ -1,6 +1,10 @@ # Copyright 2019-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + # Andreas Sturmlechner (2024-07-06) # KDE PIM is not keyworded here kde-apps/libkgapi:5 kf6compat diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.mask index 7cbf72b519..e7032ba9fa 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.mask @@ -1,6 +1,14 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Ulrich Müller (2024-08-03) +# Needs dev-libs/openspecfun which is not yet keyworded +sci-visualization/gnuplot amos + +# Joonas Niilola (2024-07-29) +# Dependency not keyworded on sparc. +dev-libs/re2 benchmark + # Michał Górny (2024-07-24) # Full testing requires www-client/firefox. dev-python/selenium test-rust @@ -116,10 +124,6 @@ dev-qt/qtgui vulkan sys-apps/openrc s6 sys-apps/openrc-navi s6 -# Sam James (2023-09-22) -# Qt 6 not keyworded here. -dev-build/cmake gui - # Sam James (2023-07-21) # Requires app-emulation/qemu. sys-kernel/gentoo-kernel test diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.stable.mask index 2c3aef317e..3a1db38459 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/package.use.stable.mask @@ -1,6 +1,10 @@ # Copyright 2019-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Sam James (2024-07-31) +# Qt 6 not stable here. +dev-build/cmake gui + # Eli Schwartz (2024-02-05) # app-text/mupdf is not stable. bug #923811 net-print/cups-filters pdf diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.mask index ed4627a768..9191ad71d9 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.mask @@ -3,7 +3,7 @@ # Matt Jolly (2023-08-10) # http3 is avilable via openssl[quic] on this arch. -net-misc/curl -http3 -quic curl_quic_ngtcp2 +net-misc/curl -http3 -quic -curl_quic_openssl curl_quic_ngtcp2 # orbea (2024-07-19) # Unmask the dynarec flag which has x86 asm. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.stable.mask index 4689d96039..1947aa4df1 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/package.use.stable.mask @@ -18,7 +18,7 @@ #--- END OF EXAMPLES --- # Andreas Sturmlechner (2024-07-21) -# Need as-yet-unkeyworded KF6-based counterparts (bug #934361) +# Need not as yet stable KF6-based counterparts (bug #934361) kde-apps/libkcddb kf6compat kde-apps/libkcompactdisc kf6compat kde-apps/libksane kf6compat diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.force b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.force index 1f124de03f..f33c69713d 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.force +++ b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.force @@ -230,7 +230,6 @@ sys-firmware/seabios binary net-analyzer/snort libtirpc net-fs/autofs libtirpc net-misc/netkit-bootparamd libtirpc -sci-astronomy/esomidas libtirpc sys-cluster/glusterfs libtirpc # Maciej Mrozowski (2016-09-01) diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/deprecated deleted file mode 100644 index 4b91a95b37..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/deprecated +++ /dev/null @@ -1,104 +0,0 @@ -default/linux/ppc/23.0/split-usr - -A profile upgrade to version 23.0 is available for your architecture. -The new 23.0 profiles enable some toolchain hardening features and -performance enhancements by default, and standardize settings. -You can find the list of changes on the wiki tracking page [1]. - -Upgrade instructions - -Note 1: If you have manually changed your CHOST to a value different from -what the stages and profiles set, you may have to do that in the future too. -In that case you should know what you are doing, hopefully; please read the -instructions with a critical eye then. - -Note 2: In case you are already familiar with binary packages, you should be -able to add "--getbinpkg" to the emerge calls to speed things up. -The use of binary packages is completely optional though, and also not -as much tested as the source-based upgrade path yet. - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - glibc older than 2.36 and musl older than 1.2.4 is not supported anymore. - -2. If you are still using one of the long-deprecated amd64 17.0 profiles - (other than x32 or musl), then first complete the migration to the - corresponding 17.1 profile. Instructions can be found at [3]. - -3. If you are currently using systemd in a split-usr configuration, then first - complete the migration to the corresponding merged-usr profile of the - same profile version. Details on how to do this can be found in the news - item [4]. - If you are currently using openrc, migrate to 23.0 first, keeping your disk - layout. If you want to move from split-usr to merged-usr, do that afterwards. - -4. Run "emerge --info" and note down the value of the CHOST variable. - -5. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable, - remove it. Also delete all lines defining CHOST_... variables. - -6. Select the 23.0 profile corresponding to your current profile, either using - "eselect profile" or by manually setting the profile symlink. - Note that old profiles are by default split-usr and the 23.0 profiles by - default merged-usr. Do NOT change directory scheme now, since this will - mess up your system! - Instead, make sure that the new profile has the same property: for example, - OLD default/linux/amd64/17.1 - ==> NEW default/linux/amd64/23.0/split-usr - (added "split-usr") - OLD default/linux/amd64/17.1/systemd/merged-usr - ==> NEW default/linux/amd64/23.0/systemd - (removed "merged-usr") - A detailed table of the upgrade paths can be found at [5]. Please consult it. - In some cases (hppa, x86) the table will tell you to pick between two choices. - What you need should be obvious from your *old* CHOST value (from step 4). - -7. Delete the contents of your binary package cache at ${PKGDIR} - rm -r /var/cache/binpkgs/* - -8. In the file or directory /etc/portage/binrepos.conf (if existing), update - the URI in all configuration such that they point to 23.0 profile binhost - directories. The exact paths can be found in the table at [5], too. - -9. Rebuild or reinstall from binary (if available) the following packages in - this order, with the same version as already active: - emerge --ask --oneshot sys-devel/binutils - (you may have to run binutils-config and re-select your binutils now) - emerge --ask --oneshot sys-devel/gcc - (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do - that; instead, abort and try again with --nodeps added to the command line.) - (you may have to run gcc-config and re-select your gcc now) - and the C library, i.e. for glibc-based systems - emerge --ask --oneshot sys-libs/glibc - or for musl-based systems - emerge --ask --oneshot sys-libs/musl - -10. Re-run "emerge --info" and check if CHOST has changed compared to step 4. - -If the CHOST has NOT changed, skip to step 13 (env-update). Otherwise, - -11. Recheck with binutils-config and gcc-config that valid installed versions - of binutils and gcc are selected. - -12. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that - refer to the *OLD* CHOST value, and remove them. - Examples how to do this can be found in the similar procedure at [6]. - -13. Run env-update && source /etc/profile - -14. Re-emerge libtool: - emerge --ask --oneshot libtool - -15. Just for safety, delete the contents of your binary package cache at - ${PKGDIR} again: - rm -r /var/cache/binpkgs/* - -16. Rebuild world: - emerge --ask --emptytree @world - -[1] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition -[2] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_timeline -[3] https://www.gentoo.org/support/news-items/2019-06-05-amd64-17-1-profiles-are-now-stable.html -[4] https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html -[5] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table -[6] https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable#Verifying_things_work diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/deprecated deleted file mode 100644 index 0159d2926b..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/deprecated +++ /dev/null @@ -1,104 +0,0 @@ -default/linux/ppc/23.0/split-usr/desktop - -A profile upgrade to version 23.0 is available for your architecture. -The new 23.0 profiles enable some toolchain hardening features and -performance enhancements by default, and standardize settings. -You can find the list of changes on the wiki tracking page [1]. - -Upgrade instructions - -Note 1: If you have manually changed your CHOST to a value different from -what the stages and profiles set, you may have to do that in the future too. -In that case you should know what you are doing, hopefully; please read the -instructions with a critical eye then. - -Note 2: In case you are already familiar with binary packages, you should be -able to add "--getbinpkg" to the emerge calls to speed things up. -The use of binary packages is completely optional though, and also not -as much tested as the source-based upgrade path yet. - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - glibc older than 2.36 and musl older than 1.2.4 is not supported anymore. - -2. If you are still using one of the long-deprecated amd64 17.0 profiles - (other than x32 or musl), then first complete the migration to the - corresponding 17.1 profile. Instructions can be found at [3]. - -3. If you are currently using systemd in a split-usr configuration, then first - complete the migration to the corresponding merged-usr profile of the - same profile version. Details on how to do this can be found in the news - item [4]. - If you are currently using openrc, migrate to 23.0 first, keeping your disk - layout. If you want to move from split-usr to merged-usr, do that afterwards. - -4. Run "emerge --info" and note down the value of the CHOST variable. - -5. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable, - remove it. Also delete all lines defining CHOST_... variables. - -6. Select the 23.0 profile corresponding to your current profile, either using - "eselect profile" or by manually setting the profile symlink. - Note that old profiles are by default split-usr and the 23.0 profiles by - default merged-usr. Do NOT change directory scheme now, since this will - mess up your system! - Instead, make sure that the new profile has the same property: for example, - OLD default/linux/amd64/17.1 - ==> NEW default/linux/amd64/23.0/split-usr - (added "split-usr") - OLD default/linux/amd64/17.1/systemd/merged-usr - ==> NEW default/linux/amd64/23.0/systemd - (removed "merged-usr") - A detailed table of the upgrade paths can be found at [5]. Please consult it. - In some cases (hppa, x86) the table will tell you to pick between two choices. - What you need should be obvious from your *old* CHOST value (from step 4). - -7. Delete the contents of your binary package cache at ${PKGDIR} - rm -r /var/cache/binpkgs/* - -8. In the file or directory /etc/portage/binrepos.conf (if existing), update - the URI in all configuration such that they point to 23.0 profile binhost - directories. The exact paths can be found in the table at [5], too. - -9. Rebuild or reinstall from binary (if available) the following packages in - this order, with the same version as already active: - emerge --ask --oneshot sys-devel/binutils - (you may have to run binutils-config and re-select your binutils now) - emerge --ask --oneshot sys-devel/gcc - (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do - that; instead, abort and try again with --nodeps added to the command line.) - (you may have to run gcc-config and re-select your gcc now) - and the C library, i.e. for glibc-based systems - emerge --ask --oneshot sys-libs/glibc - or for musl-based systems - emerge --ask --oneshot sys-libs/musl - -10. Re-run "emerge --info" and check if CHOST has changed compared to step 4. - -If the CHOST has NOT changed, skip to step 13 (env-update). Otherwise, - -11. Recheck with binutils-config and gcc-config that valid installed versions - of binutils and gcc are selected. - -12. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that - refer to the *OLD* CHOST value, and remove them. - Examples how to do this can be found in the similar procedure at [6]. - -13. Run env-update && source /etc/profile - -14. Re-emerge libtool: - emerge --ask --oneshot libtool - -15. Just for safety, delete the contents of your binary package cache at - ${PKGDIR} again: - rm -r /var/cache/binpkgs/* - -16. Rebuild world: - emerge --ask --emptytree @world - -[1] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition -[2] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_timeline -[3] https://www.gentoo.org/support/news-items/2019-06-05-amd64-17-1-profiles-are-now-stable.html -[4] https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html -[5] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table -[6] https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable#Verifying_things_work diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/deprecated deleted file mode 100644 index 0c3059bbec..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/deprecated +++ /dev/null @@ -1,104 +0,0 @@ -default/linux/ppc/23.0/split-usr/desktop/gnome - -A profile upgrade to version 23.0 is available for your architecture. -The new 23.0 profiles enable some toolchain hardening features and -performance enhancements by default, and standardize settings. -You can find the list of changes on the wiki tracking page [1]. - -Upgrade instructions - -Note 1: If you have manually changed your CHOST to a value different from -what the stages and profiles set, you may have to do that in the future too. -In that case you should know what you are doing, hopefully; please read the -instructions with a critical eye then. - -Note 2: In case you are already familiar with binary packages, you should be -able to add "--getbinpkg" to the emerge calls to speed things up. -The use of binary packages is completely optional though, and also not -as much tested as the source-based upgrade path yet. - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - glibc older than 2.36 and musl older than 1.2.4 is not supported anymore. - -2. If you are still using one of the long-deprecated amd64 17.0 profiles - (other than x32 or musl), then first complete the migration to the - corresponding 17.1 profile. Instructions can be found at [3]. - -3. If you are currently using systemd in a split-usr configuration, then first - complete the migration to the corresponding merged-usr profile of the - same profile version. Details on how to do this can be found in the news - item [4]. - If you are currently using openrc, migrate to 23.0 first, keeping your disk - layout. If you want to move from split-usr to merged-usr, do that afterwards. - -4. Run "emerge --info" and note down the value of the CHOST variable. - -5. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable, - remove it. Also delete all lines defining CHOST_... variables. - -6. Select the 23.0 profile corresponding to your current profile, either using - "eselect profile" or by manually setting the profile symlink. - Note that old profiles are by default split-usr and the 23.0 profiles by - default merged-usr. Do NOT change directory scheme now, since this will - mess up your system! - Instead, make sure that the new profile has the same property: for example, - OLD default/linux/amd64/17.1 - ==> NEW default/linux/amd64/23.0/split-usr - (added "split-usr") - OLD default/linux/amd64/17.1/systemd/merged-usr - ==> NEW default/linux/amd64/23.0/systemd - (removed "merged-usr") - A detailed table of the upgrade paths can be found at [5]. Please consult it. - In some cases (hppa, x86) the table will tell you to pick between two choices. - What you need should be obvious from your *old* CHOST value (from step 4). - -7. Delete the contents of your binary package cache at ${PKGDIR} - rm -r /var/cache/binpkgs/* - -8. In the file or directory /etc/portage/binrepos.conf (if existing), update - the URI in all configuration such that they point to 23.0 profile binhost - directories. The exact paths can be found in the table at [5], too. - -9. Rebuild or reinstall from binary (if available) the following packages in - this order, with the same version as already active: - emerge --ask --oneshot sys-devel/binutils - (you may have to run binutils-config and re-select your binutils now) - emerge --ask --oneshot sys-devel/gcc - (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do - that; instead, abort and try again with --nodeps added to the command line.) - (you may have to run gcc-config and re-select your gcc now) - and the C library, i.e. for glibc-based systems - emerge --ask --oneshot sys-libs/glibc - or for musl-based systems - emerge --ask --oneshot sys-libs/musl - -10. Re-run "emerge --info" and check if CHOST has changed compared to step 4. - -If the CHOST has NOT changed, skip to step 13 (env-update). Otherwise, - -11. Recheck with binutils-config and gcc-config that valid installed versions - of binutils and gcc are selected. - -12. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that - refer to the *OLD* CHOST value, and remove them. - Examples how to do this can be found in the similar procedure at [6]. - -13. Run env-update && source /etc/profile - -14. Re-emerge libtool: - emerge --ask --oneshot libtool - -15. Just for safety, delete the contents of your binary package cache at - ${PKGDIR} again: - rm -r /var/cache/binpkgs/* - -16. Rebuild world: - emerge --ask --emptytree @world - -[1] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition -[2] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_timeline -[3] https://www.gentoo.org/support/news-items/2019-06-05-amd64-17-1-profiles-are-now-stable.html -[4] https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html -[5] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table -[6] https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable#Verifying_things_work diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/parent deleted file mode 100644 index d5a56a13f6..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../../../targets/desktop/gnome diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/deprecated deleted file mode 100644 index 36bae5bdb2..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/deprecated +++ /dev/null @@ -1,33 +0,0 @@ -default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr - -As warned about previously in a news item, systemd-255 has dropped -support for split-usr systems. All Gentoo systems running systemd will -need to be migrated to merged-usr. - -Migrating to merged-usr will move all data from /bin, /sbin, and /lib -into the /usr/bin and /usr/lib directories. The directories in / are -replaced with symlinks. - -To facilitate this, a new set of sub-profiles has been created, and a -script is available to perform the actual migration. - -To migrate a system to merged-usr, follow this procedure: - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - -2. Install sys-apps/merge-usr. - -3. Run "merge-usr --dryrun" as root to check for conflicts. These will - appear with the word ERROR at the start of the line. - -4. Resolve any conflicts. This may involve deleting duplicate files. If - in doubt, seek support in a Gentoo support channel. - -5. Run the merge-usr script from a root shell. Avoid running it via sudo - directly to avoid locking yourself out if an unexpected error occurs. - -6. Switch to a merged-usr profile. - -7. Run emerge with the --newuse or --changed-use option to rebuild - any packages that have a "split-usr" USE flag. diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/deprecated deleted file mode 100644 index 78c0773972..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/deprecated +++ /dev/null @@ -1,104 +0,0 @@ -default/linux/ppc/23.0/desktop/gnome - -A profile upgrade to version 23.0 is available for your architecture. -The new 23.0 profiles enable some toolchain hardening features and -performance enhancements by default, and standardize settings. -You can find the list of changes on the wiki tracking page [1]. - -Upgrade instructions - -Note 1: If you have manually changed your CHOST to a value different from -what the stages and profiles set, you may have to do that in the future too. -In that case you should know what you are doing, hopefully; please read the -instructions with a critical eye then. - -Note 2: In case you are already familiar with binary packages, you should be -able to add "--getbinpkg" to the emerge calls to speed things up. -The use of binary packages is completely optional though, and also not -as much tested as the source-based upgrade path yet. - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - glibc older than 2.36 and musl older than 1.2.4 is not supported anymore. - -2. If you are still using one of the long-deprecated amd64 17.0 profiles - (other than x32 or musl), then first complete the migration to the - corresponding 17.1 profile. Instructions can be found at [3]. - -3. If you are currently using systemd in a split-usr configuration, then first - complete the migration to the corresponding merged-usr profile of the - same profile version. Details on how to do this can be found in the news - item [4]. - If you are currently using openrc, migrate to 23.0 first, keeping your disk - layout. If you want to move from split-usr to merged-usr, do that afterwards. - -4. Run "emerge --info" and note down the value of the CHOST variable. - -5. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable, - remove it. Also delete all lines defining CHOST_... variables. - -6. Select the 23.0 profile corresponding to your current profile, either using - "eselect profile" or by manually setting the profile symlink. - Note that old profiles are by default split-usr and the 23.0 profiles by - default merged-usr. Do NOT change directory scheme now, since this will - mess up your system! - Instead, make sure that the new profile has the same property: for example, - OLD default/linux/amd64/17.1 - ==> NEW default/linux/amd64/23.0/split-usr - (added "split-usr") - OLD default/linux/amd64/17.1/systemd/merged-usr - ==> NEW default/linux/amd64/23.0/systemd - (removed "merged-usr") - A detailed table of the upgrade paths can be found at [5]. Please consult it. - In some cases (hppa, x86) the table will tell you to pick between two choices. - What you need should be obvious from your *old* CHOST value (from step 4). - -7. Delete the contents of your binary package cache at ${PKGDIR} - rm -r /var/cache/binpkgs/* - -8. In the file or directory /etc/portage/binrepos.conf (if existing), update - the URI in all configuration such that they point to 23.0 profile binhost - directories. The exact paths can be found in the table at [5], too. - -9. Rebuild or reinstall from binary (if available) the following packages in - this order, with the same version as already active: - emerge --ask --oneshot sys-devel/binutils - (you may have to run binutils-config and re-select your binutils now) - emerge --ask --oneshot sys-devel/gcc - (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do - that; instead, abort and try again with --nodeps added to the command line.) - (you may have to run gcc-config and re-select your gcc now) - and the C library, i.e. for glibc-based systems - emerge --ask --oneshot sys-libs/glibc - or for musl-based systems - emerge --ask --oneshot sys-libs/musl - -10. Re-run "emerge --info" and check if CHOST has changed compared to step 4. - -If the CHOST has NOT changed, skip to step 13 (env-update). Otherwise, - -11. Recheck with binutils-config and gcc-config that valid installed versions - of binutils and gcc are selected. - -12. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that - refer to the *OLD* CHOST value, and remove them. - Examples how to do this can be found in the similar procedure at [6]. - -13. Run env-update && source /etc/profile - -14. Re-emerge libtool: - emerge --ask --oneshot libtool - -15. Just for safety, delete the contents of your binary package cache at - ${PKGDIR} again: - rm -r /var/cache/binpkgs/* - -16. Rebuild world: - emerge --ask --emptytree @world - -[1] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition -[2] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_timeline -[3] https://www.gentoo.org/support/news-items/2019-06-05-amd64-17-1-profiles-are-now-stable.html -[4] https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html -[5] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table -[6] https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable#Verifying_things_work diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/parent deleted file mode 100644 index 05b6f4918b..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/merged-usr/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../../../../../features/merged-usr diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/parent deleted file mode 100644 index 288aeccdce..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../../../../targets/desktop/gnome/systemd diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/parent deleted file mode 100644 index fae96e8d36..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../../targets/desktop diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/deprecated b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/deprecated deleted file mode 100644 index 4b91a95b37..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/deprecated +++ /dev/null @@ -1,104 +0,0 @@ -default/linux/ppc/23.0/split-usr - -A profile upgrade to version 23.0 is available for your architecture. -The new 23.0 profiles enable some toolchain hardening features and -performance enhancements by default, and standardize settings. -You can find the list of changes on the wiki tracking page [1]. - -Upgrade instructions - -Note 1: If you have manually changed your CHOST to a value different from -what the stages and profiles set, you may have to do that in the future too. -In that case you should know what you are doing, hopefully; please read the -instructions with a critical eye then. - -Note 2: In case you are already familiar with binary packages, you should be -able to add "--getbinpkg" to the emerge calls to speed things up. -The use of binary packages is completely optional though, and also not -as much tested as the source-based upgrade path yet. - -1. Ensure your system backups are up to date. Please also update - your system fully and depclean before proceeding. - glibc older than 2.36 and musl older than 1.2.4 is not supported anymore. - -2. If you are still using one of the long-deprecated amd64 17.0 profiles - (other than x32 or musl), then first complete the migration to the - corresponding 17.1 profile. Instructions can be found at [3]. - -3. If you are currently using systemd in a split-usr configuration, then first - complete the migration to the corresponding merged-usr profile of the - same profile version. Details on how to do this can be found in the news - item [4]. - If you are currently using openrc, migrate to 23.0 first, keeping your disk - layout. If you want to move from split-usr to merged-usr, do that afterwards. - -4. Run "emerge --info" and note down the value of the CHOST variable. - -5. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable, - remove it. Also delete all lines defining CHOST_... variables. - -6. Select the 23.0 profile corresponding to your current profile, either using - "eselect profile" or by manually setting the profile symlink. - Note that old profiles are by default split-usr and the 23.0 profiles by - default merged-usr. Do NOT change directory scheme now, since this will - mess up your system! - Instead, make sure that the new profile has the same property: for example, - OLD default/linux/amd64/17.1 - ==> NEW default/linux/amd64/23.0/split-usr - (added "split-usr") - OLD default/linux/amd64/17.1/systemd/merged-usr - ==> NEW default/linux/amd64/23.0/systemd - (removed "merged-usr") - A detailed table of the upgrade paths can be found at [5]. Please consult it. - In some cases (hppa, x86) the table will tell you to pick between two choices. - What you need should be obvious from your *old* CHOST value (from step 4). - -7. Delete the contents of your binary package cache at ${PKGDIR} - rm -r /var/cache/binpkgs/* - -8. In the file or directory /etc/portage/binrepos.conf (if existing), update - the URI in all configuration such that they point to 23.0 profile binhost - directories. The exact paths can be found in the table at [5], too. - -9. Rebuild or reinstall from binary (if available) the following packages in - this order, with the same version as already active: - emerge --ask --oneshot sys-devel/binutils - (you may have to run binutils-config and re-select your binutils now) - emerge --ask --oneshot sys-devel/gcc - (IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do - that; instead, abort and try again with --nodeps added to the command line.) - (you may have to run gcc-config and re-select your gcc now) - and the C library, i.e. for glibc-based systems - emerge --ask --oneshot sys-libs/glibc - or for musl-based systems - emerge --ask --oneshot sys-libs/musl - -10. Re-run "emerge --info" and check if CHOST has changed compared to step 4. - -If the CHOST has NOT changed, skip to step 13 (env-update). Otherwise, - -11. Recheck with binutils-config and gcc-config that valid installed versions - of binutils and gcc are selected. - -12. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that - refer to the *OLD* CHOST value, and remove them. - Examples how to do this can be found in the similar procedure at [6]. - -13. Run env-update && source /etc/profile - -14. Re-emerge libtool: - emerge --ask --oneshot libtool - -15. Just for safety, delete the contents of your binary package cache at - ${PKGDIR} again: - rm -r /var/cache/binpkgs/* - -16. Rebuild world: - emerge --ask --emptytree @world - -[1] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_transition -[2] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_profile_timeline -[3] https://www.gentoo.org/support/news-items/2019-06-05-amd64-17-1-profiles-are-now-stable.html -[4] https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html -[5] https://wiki.gentoo.org/wiki/Project:Toolchain/23.0_update_table -[6] https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable#Verifying_things_work diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/parent deleted file mode 100644 index 4bb06e4092..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/developer/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../../targets/developer diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/eapi b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/eapi deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/eapi +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/parent b/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/parent deleted file mode 100644 index 898d55cbce..0000000000 --- a/sdk_container/src/third_party/portage-stable/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/parent +++ /dev/null @@ -1,2 +0,0 @@ -.. -../../../../../../arch/powerpc/ppc64/32ul diff --git a/sdk_container/src/third_party/portage-stable/profiles/features/big-endian/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/features/big-endian/package.use.mask index 7190612223..bbde951452 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/features/big-endian/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/features/big-endian/package.use.mask @@ -45,6 +45,7 @@ gui-libs/gtk wayland gnome-base/gnome-control-center wayland sys-apps/xdg-desktop-portal-gnome wayland net-libs/webkit-gtk:6 wayland +dev-libs/libportal wayland # matoro (2023-04-10) # media-libs/libldac casualties (#80238) diff --git a/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.mask b/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.mask index f0b525fb70..9ddabd6758 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.mask @@ -159,6 +159,7 @@ gnome-base/gdm >=gnome-base/gnome-shell-3.38 >=gnome-base/librsvg-2.41 gnome-extra/gnome-browser-connector +>=gnome-extra/gnome-system-monitor-46 gnome-extra/gnome-tweaks gnome-extra/sushi >=media-gfx/libimagequant-4 diff --git a/sdk_container/src/third_party/portage-stable/profiles/package.mask b/sdk_container/src/third_party/portage-stable/profiles/package.mask index a07e0d3b8b..fc311e15f5 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/package.mask @@ -33,6 +33,99 @@ #--- END OF EXAMPLES --- +# Ionen Wolkens (2024-08-11) +# >=1.1.14 enables usage of explicit sync (with >=nvidia-drivers-560 +# and compositors that supports like kwin-6), which currently seems +# to be causing too many problems ranging from application crashes +# and potential VRAM leaking (even with the fixes in 1.1.15) and may +# be better left masked for the time being. It can hwoever solve +# flicking/stutter issues on some setups so users may want to unmask +# if heavily affected (bug #937773). +>=gui-libs/egl-wayland-1.1.14 + +# Arthur Zamarin (2024-08-11) +# HOMEPAGE and SRC_URI return 404, Gentoo is last distribution. +# Removal on 2024-09-10. Bugs #937775, #675028. +media-sound/SmarTagger + +# Andreas Sturmlechner (2024-08-10) +# Mask KF6-based version for now until actual KF6-based consumers +# also move to ::gentoo. +~dev-util/kdevelop-pg-qt-2.3.0 + +# Pacho Ramos (2024-08-09) +# Mask until we find out a way to deal better with the upstream +# introduced circular dep, bug #937616 +>=dev-libs/glib-2.80 +>=dev-util/glib-utils-2.80 +>=dev-util/gdbus-codegen-2.80 +>=gnome-base/gnome-shell-46 +>=gnome-extra/gnome-shell-extensions-46 +>=gnome-base/nautilus-46 +>=dev-libs/gobject-introspection-1.80 +>=dev-libs/gobject-introspection-common-1.80 +>=x11-terms/ptyxis-46 + +# Bernard Cafarelli (2024-08-08) +# Last release in 2004, website disappeared a long time ago. +# Bad code quality, not packaged in other distros or dockapps.net +# Many alternatives for audio recording available +# Removal on 2024-09-08, bug #931764 +x11-plugins/wmrecord + +# Eli Schwartz (2024-05-26) +# Unmaintained, website gone. Last released in 2010. Fails to build +# with GCC 14, detects and builds against nonexisting dependencies. +# Fails to authenticate users anyway. Obsoleted and replaced by +# nss-pam-ldapd which actually works. Bug #908579. +# Removal on 2024-09-07. +sys-auth/pam_ldap + +# Joonas Niilola (2024-08-07) +# Upstream doesn't recommend updating from 115 just yet. New +# installs are fine. Downgrading from 128 to 115 may be impossible +# so have backups ready if you attempt an upgrade. +>=mail-client/thunderbird-128.1.0 +>=mail-client/thunderbird-bin-128.1.0 + +# Michał Górny (2024-08-06) +# Superseded by dev-libs/libayatana-*. No revdeps left. +# Removal on 2024-09-05. Bug #936881. +dev-libs/libappindicator +dev-libs/libindicator + +# Michael Orlitzky (2024-08-03) +# Unmaintained package. Upstream is not quite _dead_, but the project +# domain (where tarballs and documentation were hosted) was hijacked in +# 2022 and nothing has been done about it. As a result, the version in +# Gentoo is far out of date. Four open bugs, no interest. Removal on +# or after 2024-09-03. +acct-group/monkeyd +acct-user/monkeyd +www-servers/monkeyd + +# Sam James (2024-08-02) +# Unreliable software, unmaintained in Gentoo. Having it in the main +# repositories may give users an impression of it being a safe tool. +# Removal on 2024-09-01. +app-backup/mkstage4 + +# James Le Cuirot (2024-07-29) +# Superseded by media-libs/libv4l[utils]. +# Removal on 2024-08-29. Bug #936674. +media-tv/v4l-utils + +# Volkmar W. Pogatzki (2024-07-29) +# Lacks maintainer capacity for update version plus java dependencies. +# A pull request for the version bump could be provided on request. +# Removal on 2024-08-28. Bug #736076. +media-video/bdsup2sub + +# Eli Schwartz (2024-07-29) +# Bad version can result in failing builds. Please upgrade to 72.1.0. +=dev-python/ensurepip-setuptools-72.0.0 +=dev-python/setuptools-72.0.0 + # Volkmar W. Pogatzki (2024-07-27) # Stable version stuck on EAPI=6. # Lacks maintainer capacity for dev-lang/scala. @@ -99,7 +192,6 @@ games-mud/crystal games-mud/gmudix games-mud/kildclient games-puzzle/color-lines -games-puzzle/einstein games-puzzle/hangman games-puzzle/magiccube4d games-puzzle/scramble @@ -107,24 +199,6 @@ games-puzzle/zaz games-simulation/cannonsmash games-strategy/crimson -# Ionen Wolkens (2024-07-18) -# Explicit sync currently causes firefox to crash[1][2][3] (should be -# improved in >=firefox-130 or so) among others like obs-studio[3], -# and is still to be considered experimental. So keeping masked for -# the time being while issues are ironed out. -# -# Feel free to unmask if not affected as it should improve the -# experience esp. with Plasma 6 + wayland + nvidia, but please try -# 1.1.13 before reporting crashes, freezes, or visual issues (and -# bugs should go upstream). -# -# [1] https://github.com/NVIDIA/egl-wayland/issues/110 -# [2] https://github.com/NVIDIA/egl-wayland/issues/117 -# [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1898476 -# [4] https://github.com/NVIDIA/egl-wayland/issues/118 -# and: https://bugzilla.mozilla.org/show_bug.cgi?id=1908825 -~gui-libs/egl-wayland-1.1.14 - # Hans de Graaff (2024-07-17) # Obsolete slot. Please use a newer slot instead. No reverse # dependencies left. Removal on 2024-08-17. @@ -160,43 +234,10 @@ gui-wm/hikari # Removal on 2024-08-12. dev-ruby/rspectacular -# Michał Górny (2024-07-12) -# Obsoleted by dev-python/pytest-freezer (usually a drop-in replacement). -# No reverse dependencies left. -# Removal on 2024-08-11. Bug #934604. -dev-python/pytest-freezegun - -# Jaco Kroon (2024-07-11) -# Superseded by xl2tpd, this no longer has any operational advantage over -# xl2tpd. If you need help you're welcome to contact me (jkroon on -# libera.chat). -# Removal on 2024-08-11. bugs: #414901, #768075, #919269 -net-dialup/openl2tp - # Leonardo Hernández Hernández (2024-07-07) # New major ffmpeg version. Tracker bug #928905. >=media-video/ffmpeg-7.0 -# Michał Górny (2024-07-06) -# Leftover backport for Python 3.9. No revdeps. -# Removal on 2024-08-05. Bug #935676. -dev-python/pathlib2 - -# Arthur Zamarin (2024-07-05) -# EAPI=6, no reverse dependencies, various issues with modern C. -# Removal on 2024-08-04. Bugs #935553, #875746, #875245, #731094. -media-video/luvcview - -# Arthur Zamarin (2024-07-05) -# EAPI=6, no reverse dependencies, fails tests. -# Removal on 2024-08-04. Bugs #935549, #873463, #741508. -sci-libs/minuit - -# Arthur Zamarin (2024-07-05) -# EAPI=6, many compilation and configure issues, more QA issues. -# Removal on 2024-08-04. Bug #935545. -sci-astronomy/esomidas - # Joonas Niilola (2024-07-04) # libxml2-2.13.1 removed "deprecated" symbols that other (older) # packages depend upon. It can be mitigated with a --with-legacy @@ -206,21 +247,6 @@ sci-astronomy/esomidas =dev-libs/libxml2-2.13.1 =dev-libs/libxslt-1.1.41 -# James Le Cuirot (2024-07-01) -# Ancient, dead upstream, generally awful. -# Removal on 2024-08-01. Bugs #935307, #935308, #935309. -games-arcade/spacerider -games-arcade/tuxdash -games-arcade/xsfcave - -# NHOrus (2024-06-28) -# games-puzzle/seatris: last rites -# Twenty-year-old tetris clone with upstream that wasn't touched since, -# broken code and broken autoconf. -# Removed after 2024-08-01 -# Bug: https://bugs.gentoo.org/935057 -games-puzzle/seatris - # Sam James (2024-06-25) # Subvolume printing is broken: https://github.com/kdave/btrfs-progs/issues/829 =sys-fs/btrfs-progs-6.9.1 @@ -229,11 +255,6 @@ games-puzzle/seatris # The symbol versioning "fix" breaks anything built with 3.0.0. =dev-libs/libassuan-3.0.1 -# Hans de Graaff (2024-06-21) -# Obsolete slot. Please use a newer slot instead. -# Masked for removal on 2024-07-21. -dev-ruby/public_suffix:4 - # Cédric Krier (2023-06-15) # critical regression with potential data loss: # https://lists.mercurial-scm.org/pipermail/mercurial-devel/2024-June/297954.html @@ -243,14 +264,6 @@ dev-ruby/public_suffix:4 ~dev-vcs/mercurial-6.7.2 ~dev-vcs/mercurial-6.7.3 -# Viorel Munteanu (2024-06-11) -# dev-php/pear, dev-php/PEAR-* and their reverse dependencies: mask for removal -# in 30 days. -# They are all unmaintained, most of the ebuilds are still EAPI 6, and together -# they have around 40 bugs. -# Removal: 2024-08-11. Bug #933998. -dev-php/PEAR-Mail_mimeDecode - # Alfredo Tupone (2024-06-09) # Not ready for testing >=dev-lang/ocaml-5 @@ -386,11 +399,6 @@ sec-keys/openpgp-keys-jiatan # Mask experimental software =mail-mta/postfix-3.10* -# Ulrich Müller (2024-02-08) -# Masked for testing. -# Test failure in watchpoints.dem, undefined function FresnelC. -~sci-visualization/gnuplot-6.0.0 - # Sam James (2023-12-14) # Gentoo's kernel maintainers have decided to discontinue gentoo-sources and # gentoo-kernel for old kernel LTS branches because of the resources to require diff --git a/sdk_container/src/third_party/portage-stable/profiles/prefix/package.mask b/sdk_container/src/third_party/portage-stable/profiles/prefix/package.mask index 321dccb561..4cc8f353b9 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/prefix/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/prefix/package.mask @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # # When you add an entry to the top of this file, add your name, the date, and diff --git a/sdk_container/src/third_party/portage-stable/profiles/prefix/sunos/solaris/package.mask b/sdk_container/src/third_party/portage-stable/profiles/prefix/sunos/solaris/package.mask index 1971a00902..d9757c8bbe 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/prefix/sunos/solaris/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/prefix/sunos/solaris/package.mask @@ -1,12 +1,6 @@ # Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Fabian Groffen (2024-05-19) -# Fails to compile due to undefined INT_MAX -# https://github.com/libarchive/libarchive/issues/2162 -# https://github.com/libarchive/libarchive/commit/6ff1cd1e487ddf545337b88da3f1f5ca69a2f958 -=app-arch/libarchive-3.7.4 - # Fabian Groffen (2023-06-23) # Fails to link due to missing libintl, already fixed upstream: # https://git.savannah.gnu.org/cgit/tar.git/commit/?id=8632df398b2f548465ebe68b8f494c0d6f8d913d diff --git a/sdk_container/src/third_party/portage-stable/profiles/profiles.desc b/sdk_container/src/third_party/portage-stable/profiles/profiles.desc index ac4aea804a..3b95670e23 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/profiles.desc +++ b/sdk_container/src/third_party/portage-stable/profiles/profiles.desc @@ -17,14 +17,14 @@ alpha default/linux/alpha/17.0/desktop exp alpha default/linux/alpha/17.0/desktop/gnome exp alpha default/linux/alpha/17.0/desktop/gnome/systemd/merged-usr exp alpha default/linux/alpha/17.0/developer exp -alpha default/linux/alpha/23.0 exp -alpha default/linux/alpha/23.0/systemd exp -alpha default/linux/alpha/23.0/desktop exp -alpha default/linux/alpha/23.0/desktop/gnome exp -alpha default/linux/alpha/23.0/desktop/gnome/systemd exp -alpha default/linux/alpha/23.0/split-usr exp -alpha default/linux/alpha/23.0/split-usr/desktop exp -alpha default/linux/alpha/23.0/split-usr/desktop/gnome exp +alpha default/linux/alpha/23.0 stable +alpha default/linux/alpha/23.0/systemd stable +alpha default/linux/alpha/23.0/desktop stable +alpha default/linux/alpha/23.0/desktop/gnome stable +alpha default/linux/alpha/23.0/desktop/gnome/systemd stable +alpha default/linux/alpha/23.0/split-usr stable +alpha default/linux/alpha/23.0/split-usr/desktop stable +alpha default/linux/alpha/23.0/split-usr/desktop/gnome stable # AMD64 Profiles @@ -396,15 +396,6 @@ mips default/linux/mips/23.0/split-usr/multilib/n32 exp mips default/linux/mips/23.0/split-usr/multilib/n64 exp -# Deprecated PPC64 Profiles -# @MAINTAINER: ppc64@gentoo.org -ppc default/linux/powerpc/ppc64/17.0/32bit-userland exp -ppc default/linux/powerpc/ppc64/17.0/32bit-userland/desktop exp -ppc default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome exp -ppc default/linux/powerpc/ppc64/17.0/32bit-userland/desktop/gnome/systemd exp -ppc default/linux/powerpc/ppc64/17.0/32bit-userland/developer exp - - # PPC profiles # @MAINTAINER: gyakovlev@gentoo.org, ppc@gentoo.org, musl@gentoo.org ppc default/linux/ppc/17.0 exp diff --git a/sdk_container/src/third_party/portage-stable/profiles/thirdpartymirrors b/sdk_container/src/third_party/portage-stable/profiles/thirdpartymirrors index dadd208df8..cd90a50f23 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/thirdpartymirrors +++ b/sdk_container/src/third_party/portage-stable/profiles/thirdpartymirrors @@ -16,7 +16,7 @@ mariadb https://archive.mariadb.org/ http://ftp.bme.hu/pub/mirrors/mariadb/ htt mplayer https://www1.mplayerhq.hu/MPlayer http://www2.mplayerhq.hu/MPlayer http://www7.mplayerhq.hu/MPlayer http://www8.mplayerhq.hu/MPlayer ftp://ftp1.mplayerhq.hu/MPlayer/ ftp://ftp6.mplayerhq.hu/MPlayer/ ftp://ftp7.mplayerhq.hu/MPlayer/ ftp://ftp8.mplayerhq.hu/MPlayer/ nongnu https://download.savannah.nongnu.org/releases/ https://ftp.cc.uoc.gr/mirrors/nongnu.org/ http://ftp.twaren.net/Unix/NonGNU/ https://mirror.csclub.uwaterloo.ca/nongnu/ ftp://mirror.csclub.uwaterloo.ca/nongnu/ https://mirrors.fe.up.pt/pub/nongnu/ ftp://mirrors.fe.up.pt/pub/nongnu/ https://nongnu.askapache.com/ https://nongnu.uib.no/ ftp://nongnu.uib.no/pub/nongnu/ http://savannah.c3sl.ufpr.br/ ftp://ftp.twaren.net/Unix/NonGNU/ openbsd https://cdn.openbsd.org/pub/OpenBSD https://fastly.cdn.openbsd.org/pub/OpenBSD -openssl https://www.openssl.org/ https://artfiles.org/openssl.org/ https://www.mirrorservice.org/sites/ftp.openssl.org/ ftp://ftp.openssl.org +openssl https://www.openssl.org/ https://artfiles.org/openssl.org/ https://www.mirrorservice.org/sites/ftp.openssl.org/ sourceforge.jp http://iij.dl.sourceforge.jp https://osdn.dl.sourceforge.jp https://jaist.dl.sourceforge.jp ubuntu http://mirror.internode.on.net/pub/ubuntu/ubuntu/ http://ubuntu.uni-klu.ac.at/ubuntu/ http://mirror.dhakacom.com/ubuntu-archive/ http://ubuntu.c3sl.ufpr.br/ubuntu/ http://hr.archive.ubuntu.com/ubuntu/ http://cz.archive.ubuntu.com/ubuntu/ https://mirror.dkm.cz/ubuntu http://ftp.cvut.cz/ubuntu/ http://ftp.stw-bonn.de/ubuntu/ https://ftp-stud.hs-esslingen.de/ubuntu/ https://mirror.netcologne.de/ubuntu/ https://mirror.unej.ac.id/ubuntu/ http://kr.archive.ubuntu.com/ubuntu/ https://mirror.nforce.com/pub/linux/ubuntu/ http://nl3.archive.ubuntu.com/ubuntu/ https://mirror.timeweb.ru/ubuntu/ http://ubuntu.mirror.su.se/ubuntu/ https://ubuntu.volia.net/ubuntu-archive/ https://mirror.pnl.gov/ubuntu/ https://mirrors.namecheap.com/ubuntu/ vdr-developerorg http://projects.vdr-developer.org/attachments/download diff --git a/sdk_container/src/third_party/portage-stable/profiles/updates/3Q-2024 b/sdk_container/src/third_party/portage-stable/profiles/updates/3Q-2024 index a439af1564..109dd8d735 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/updates/3Q-2024 +++ b/sdk_container/src/third_party/portage-stable/profiles/updates/3Q-2024 @@ -1,3 +1,4 @@ move sci-libs/rtree dev-python/rtree move dev-python/mapbox_earcut dev-python/mapbox-earcut move dev-qt/kdsingleapplication dev-libs/kdsingleapplication +slotmove dev-util/kdevelop-pg-qt 5 0 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/Manifest index 43cda60169..379cbce485 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/Manifest @@ -1 +1,2 @@ DIST bubblewrap-0.8.0.tar.xz 149088 BLAKE2B 5853cf42a7ab653540ec5134866c6f2459aa101e9eea724a4f283405cbcae2beb3551b7c1a7aa93d82016d4eb0d12f9c97c47df53a6d9b589db40483696253de SHA512 1cbc33f3c834ff83f4c1808d3ec2555921277d495f903ad152cbd5065a6e100c5420b4b5c62386bb2d303eb1734e074b09625013e55e3bd8631cfb3582d70e1c +DIST bubblewrap-0.9.0.tar.xz 118984 BLAKE2B 52a4e87e502da44a25031b6d6044da7712dccb2c58a2debad9a8562fd1e48805d783bec571adc0df8880a63595825a4204ceaaa4f3df2672252c631f7fe5b0c7 SHA512 3a3af355e4fdb19a91c40020d68fd83f7c74ebef92d989c932933293758bc0175fa41220c47fe829b84ba29457a12f0e225c19afe674ecbf983b0826dbc1c878 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/bubblewrap-0.9.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/bubblewrap-0.9.0.ebuild new file mode 100644 index 0000000000..f52fb2cc49 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/bubblewrap/bubblewrap-0.9.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info meson + +DESCRIPTION="Unprivileged sandboxing tool, namespaces-powered chroot-like solution" +HOMEPAGE="https://github.com/containers/bubblewrap/" +SRC_URI="https://github.com/containers/${PN}/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="LGPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +IUSE="selinux suid" + +RDEPEND=" + sys-libs/libseccomp + sys-libs/libcap + selinux? ( >=sys-libs/libselinux-2.1.9 ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-text/docbook-xml-dtd:4.3 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig +" + +# tests require root privileges +RESTRICT="test" + +pkg_setup() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + CONFIG_CHECK="~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS" + linux-info_pkg_setup + fi +} + +src_configure() { + local emesonargs=( + -Dbash_completion=enabled + -Dman=enabled + -Dtests=false + -Dzsh_completion=enabled + $(meson_feature selinux) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + if use suid; then + chmod u+s "${ED}"/usr/bin/bwrap + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/Manifest index de87eb345e..8507bbc18d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/Manifest @@ -1,3 +1,2 @@ -DIST checkpolicy-3.5.tar.gz 69904 BLAKE2B e02ccad07534568a1bbb612330018bbe486800ea40df20ed6f9dc38c88aff7f8858782a28ba7915a58c3bb384f180eb8da7a8fe97a92bcb9baa61eec18da6cbc SHA512 fcd490d865af3b4350c32c5dd9916f8406219841e1e255d8945c6dcc958535247aa27af5597a6988e19f11faea7beeabcb46e8ba2431112bb4aa5c7697bca529 DIST checkpolicy-3.6.tar.gz 70684 BLAKE2B d32a8b86897bd4a08caf61a096a691c8d049fa7b5b4561f4847e0dfbb62a82fc6c3ddb5be163c7cd6163491c50513aec14e4c67842f256f48688b26178c2887a SHA512 0d48fb385b4d1e66d562e40b6e794406f46d8803cc504705b26547130cb13b65fab5fdb4fc032b1c95d4f91862ff134a89fffde854c5ce466c2dd2657e416070 DIST checkpolicy-3.7.tar.gz 74992 BLAKE2B 78f419fa89981ad16364b3d6406e313fda5230588063c9a9dbb70535f0421c5b402b9c86d2f63d4ab7b8119c38044b6dc556fb2dd40240428c914cb25a2facbe SHA512 f428edcbe17bd5b5f22dd827cf21c89c2cf645bae6c0342c6663743cafd9f8a8d7c8b5a1b48c04569fdb0cce11ffcb6c0b6d7fa76075a1a274948ba418bcc5b4 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/checkpolicy-3.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/checkpolicy-3.5.ebuild deleted file mode 100644 index 938ef02c35..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/checkpolicy/checkpolicy-3.5.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit toolchain-funcs - -MY_PV="${PV//_/-}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="SELinux policy compiler" -HOMEPAGE="http://userspace.selinuxproject.org" - -if [[ ${PV} == 9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" - S="${WORKDIR}/${P}/${PN}" -else - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="amd64 arm arm64 ~mips ~riscv x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="debug" - -RDEPEND=">=sys-libs/libsepol-${PV}:=[static-libs(+)]" -DEPEND="${RDEPEND}" -BDEPEND="sys-devel/flex - sys-devel/bison" - -src_compile() { - emake \ - CC="$(tc-getCC)" \ - YACC="bison -y" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" -} - -src_install() { - default - - if use debug; then - dobin "${S}/test/dismod" - dobin "${S}/test/dispol" - fi -} - -pkg_postinst() { - if ! tc-is-cross-compiler; then - einfo "This checkpolicy can compile version `checkpolicy -V | cut -f 1 -d ' '` policy." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest index e6428d450a..4feb7b8ff9 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest @@ -1,3 +1,3 @@ DIST gentoo-functions-0.19.tar.bz2 12079 BLAKE2B be0a3a54d4dee1755866047b670a69cd6fec368239123c3f0c08180b79a33c20147bca0e35e568faef6877513551e731bdf0c181aeb0460f6574d2d708219373 SHA512 2674d3fe5724cc6d685ae58bf0ee33f4a1bdba2c5e5809cfb193fd0a710d4678c2d9392c2c62d2321cf455f524950266dc1629ab684fe46632d179e539d5a39e -DIST gentoo-functions-1.5.tar.bz2 15808 BLAKE2B 99c330eb4c7f1d7af67b6f93dba565f9ea37c15e82d0b97157067279671dc3918668bf8120f7c410f018d67761cee41320efaec4df43639765d023b23a3a9a7f SHA512 f7add7770f40e110864f16978e968bfd937c1a5099e336cc04f6861483bae36ff7932f502994df1ddfa347beef8736bd39bd276bafbe04190c9915446457ce15 DIST gentoo-functions-1.6.tar.bz2 16795 BLAKE2B c901cdb8f2fcb507b5397e9ce674a12641f2129b9be05776bb272e09b9db3a6d205e6a00ef51f71b3203eac4e333b297cfe5ae5d61f9dd43074073a749ca171e SHA512 922b801c79f12d15bcabdb6cd52246cc60a4b512dfcc10bb3933f07d2ec03e01fe5be72502ae34c87374c8a7e880ce268e7dc8d1afcbd28b65efb51b9e467306 +DIST gentoo-functions-1.7.2.tar.bz2 29059 BLAKE2B 2b3d13e6f5b553fd0fa7a0880677bd61c82c8815d3801a2d80e7632a97c36f81b41075109856f6248ad0eb2453b511066e63a110c97984e6427135ad19cdc234 SHA512 3839b04784576cc5c5824b24f967862ea421be051983d1ac587de7e21b0fbc4f403e0d4f707ee5cbcf466ec4a12d188da9413a81ca71993c957328ff225cb9af diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-add-warn-function.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-add-warn-function.patch new file mode 100644 index 0000000000..8fcce19a8f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-add-warn-function.patch @@ -0,0 +1,34 @@ +From 755177bbfcf4c46ad1ac31ad9501a6c8725b1a68 Mon Sep 17 00:00:00 2001 +From: Kerin Millar +Date: Sun, 2 Jun 2024 04:36:27 +0100 +Subject: Add the warn() function + +This will be used internally by a forthcoming commit. + +Signed-off-by: Kerin Millar +--- + functions.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/functions.sh b/functions.sh +index 9736747..a97dde7 100644 +--- a/functions.sh ++++ b/functions.sh +@@ -473,6 +473,14 @@ vewend() + fi + } + ++# ++# Prints a diagnostic message prefixed with the basename of the running script. ++# ++warn() ++{ ++ printf '%s: %s\n' "${0##*/}" "$*" >&2 ++} ++ + # + # Determines whether the first parameter is truthy. The values taken to be true + # are "yes", "true", "on" and "1", whereas their opposites are taken to be +-- +cgit v1.2.3-65-gdbad + diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-relax-parameter-validation.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-relax-parameter-validation.patch new file mode 100644 index 0000000000..4f89c9f4ac --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/files/gentoo-functions-1.6-relax-parameter-validation.patch @@ -0,0 +1,233 @@ +From 3f2519288f1074a7ef5e8378f4bdf37809b262e5 Mon Sep 17 00:00:00 2001 +From: Kerin Millar +Date: Sun, 2 Jun 2024 04:36:37 +0100 +Subject: Relax parameter validation for various functions + +Following some deliberation over the matter, I have concluded that +calling die() for the handling of invalid parameters ought not to be +considered as a matter of course. As such, this commit retains the +existing diagnostics for the functions listed below, while modifying +them so as to no longer attempt to exit the shell. + +- eend +- eqatag +- esyslog +- ewend +- is_older than +- veend +- vewend +- yesno + +Signed-off-by: Kerin Millar +--- + functions.sh | 69 ++++++++++++++++++++++++++++++++++------------------------ + test-functions | 13 ++--------- + 2 files changed, 42 insertions(+), 40 deletions(-) + +diff --git a/functions.sh b/functions.sh +index 48b4c5a..ec1f339 100644 +--- a/functions.sh ++++ b/functions.sh +@@ -63,7 +63,7 @@ if ! command -v die >/dev/null; then + *) + genfun_status=$? + esac +- printf '%s: %s\n' "${0##*/}" "$*" >&2 ++ warn "$@" + exit "${genfun_status}" + } + fi +@@ -209,7 +209,8 @@ eqatag() + shift + fi + if [ "$#" -eq 0 ]; then +- die "eqatag: no tag specified" ++ warn "eqatag: no tag specified" ++ return 1 + fi + positional=0 + tag=$1 +@@ -222,7 +223,8 @@ eqatag() + case ${arg} in + [!=/]*=?*) + if [ "${positional}" -eq 1 ]; then +- _throw_invalid_args eqatag "${arg}" ++ _warn_for_args eqatag "${arg}" ++ return 1 + fi + set -- "$@" --arg "${arg%%=*}" "${arg#*=}" + ;; +@@ -234,7 +236,8 @@ eqatag() + set -- "$@" "${arg}" + ;; + *) +- _throw_invalid_args eqatag "${arg}" ++ _warn_for_args eqatag "${arg}" ++ return 1 + esac + done + json=$( +@@ -269,7 +272,8 @@ esyslog() + local pri tag msg + + if [ "$#" -lt 2 ]; then +- die "esyslog: too few arguments (got $#, expected at least 2)" ++ warn "esyslog: too few arguments (got $#, expected at least 2)" ++ return 1 + elif yesno "${EINFO_LOG}" && hash logger 2>/dev/null; then + pri=$1 + tag=$2 +@@ -380,8 +384,9 @@ is_older_than() + { + local ref has_gfind + +- if [ "$#" -lt 2 ]; then +- die "is_older_than: too few arguments (got $#, expected at least 2)" ++ if [ "$#" -eq 0 ]; then ++ warn "is_older_than: too few arguments (got $#, expected at least 1)" ++ return 1 + elif [ -e "$1" ]; then + ref=$1 + else +@@ -431,7 +436,8 @@ veend() + if yesno "${EINFO_VERBOSE}"; then + GENFUN_CALLER=veend eend "$@" + elif [ "$#" -gt 0 ] && { ! is_int "$1" || [ "$1" -lt 0 ]; }; then +- _throw_invalid_args veend "$1" ++ _warn_for_args veend "$1" ++ false + else + return "$1" + fi +@@ -442,7 +448,8 @@ vewend() + if yesno "${EINFO_VERBOSE}"; then + GENFUN_CALLER=vewend ewend "$@" + elif [ "$#" -gt 0 ] && { ! is_int "$1" || [ "$1" -lt 0 ]; }; then +- _throw_invalid_args vewend "$1" ++ _warn_for_args vewend "$1" ++ false + else + return "$1" + fi +@@ -459,7 +466,8 @@ yesno() + local arg + + if [ "$#" -eq 0 ]; then +- die "yesno: too few arguments (got $#, expected 1)" ++ warn "yesno: too few arguments (got $#, expected 1)" ++ return 1 + fi + arg=$1 + for _ in 1 2; do +@@ -471,14 +479,15 @@ yesno() + return 0 + esac + if [ "$_" -ne 1 ] || ! is_identifier "$1"; then +- ! break ++ break + else + # The value appears to be a legal variable name. Treat + # it as a name reference and try again, once only. + eval "arg=\$$1" + fi +- done || _throw_invalid_args yesno "$1" +- return 1 ++ done ++ _warn_for_args yesno "$@" ++ false + } + + # +@@ -494,7 +503,9 @@ _eend() + if [ "$#" -eq 0 ]; then + retval=0 + elif ! is_int "$1" || [ "$1" -lt 0 ]; then +- _throw_invalid_args "${GENFUN_CALLER}" "$1" ++ _warn_for_args "${GENFUN_CALLER}" "$1" ++ retval=1 ++ msg= + else + retval=$1 + shift +@@ -662,21 +673,6 @@ _print_args() + EOF + } + +-# +-# Prints a diganostic message concerning invalid function arguments then exits. +-# The first argument shall be taken as a function identifier. The remaining +-# arguments shall be safely rendered as a part of the diagnostic. +-# +-_throw_invalid_args() +-{ +- local ident plural +- +- ident=$1 +- shift +- [ "$#" -gt 1 ] && plural=s || plural= +- die "${ident}: invalid argument${plural}: $(_print_args "$@")" +-} +- + # + # Determines whether the terminal on STDIN is able to report its dimensions. + # Upon success, the number of columns shall be stored in genfun_cols. +@@ -718,6 +714,21 @@ _update_tty_level() + fi + } + ++# ++# Prints a diganostic message concerning invalid function arguments. The first ++# argument shall be taken as a function identifier. The remaining arguments ++# shall be safely rendered as a part of the diagnostic. ++# ++_warn_for_args() ++{ ++ local ident plural ++ ++ ident=$1 ++ shift ++ [ "$#" -gt 1 ] && plural=s || plural= ++ warn "${ident}: invalid argument${plural}: $(_print_args "$@")" ++} ++ + # All function declarations end here! Initialisation code only from hereon. + # shellcheck disable=2034 + RC_GOT_FUNCTIONS=yes +diff --git a/test-functions b/test-functions +index d65a3a2..4a6e7dd 100755 +--- a/test-functions ++++ b/test-functions +@@ -196,11 +196,7 @@ test_is_older_than() { + callback() { + shift + test_description="is_older_than $(_print_args "$@")" +- if [ "$#" -lt 2 ]; then +- ( is_older_than "$@" ) +- else +- is_older_than "$@" +- fi ++ is_older_than "$@" + } + + iterate_tests 4 "$@" +@@ -392,16 +388,11 @@ test_yesno() { + + # shellcheck disable=2034 + truthful_nameref=yes +- row=0 + + callback() { + shift + test_description="yesno $(_print_args "$@")" +- if [ "$(( row += 1 ))" -ge 22 ]; then +- ( yesno "$@" ) +- else +- yesno "$@" +- fi ++ yesno "$@" + } + + iterate_tests 3 "$@" +-- +cgit v1.2.3-65-gdbad + diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6-r2.ebuild similarity index 88% rename from sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.5.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6-r2.ebuild index 8df3a1e88b..d4867ab362 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.5.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6-r2.ebuild @@ -16,7 +16,7 @@ inherit meson DESCRIPTION="Base functions required by all Gentoo systems" HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git" -LICENSE="GPL-2 public-domain" +LICENSE="GPL-2" SLOT="0" IUSE="test" RESTRICT="!test? ( test )" @@ -24,6 +24,11 @@ RESTRICT="!test? ( test )" # Specifically needs GNU find, as well. RDEPEND=">=sys-apps/findutils-4.9" +PATCHES=( + "${FILESDIR}/${P}-relax-parameter-validation.patch" + "${FILESDIR}/${P}-add-warn-function.patch" +) + src_configure() { local emesonargs=( # Deliberately avoid /usr as consumers assume we're at /lib/gentoo. diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.7.2.ebuild similarity index 69% rename from sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.7.2.ebuild index 8df3a1e88b..512195ceb8 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.6.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-1.7.2.ebuild @@ -3,6 +3,11 @@ EAPI=8 +inherit meson + +DESCRIPTION="Base functions required by all Gentoo systems" +HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git" + if [[ ${PV} == 9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git" @@ -11,19 +16,11 @@ else KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi -inherit meson - -DESCRIPTION="Base functions required by all Gentoo systems" -HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git" - -LICENSE="GPL-2 public-domain" +LICENSE="GPL-2" SLOT="0" IUSE="test" RESTRICT="!test? ( test )" -# Specifically needs GNU find, as well. -RDEPEND=">=sys-apps/findutils-4.9" - src_configure() { local emesonargs=( # Deliberately avoid /usr as consumers assume we're at /lib/gentoo. @@ -34,3 +31,19 @@ src_configure() { meson_src_configure } + +src_install() { + meson_src_install + + if [[ ${EPREFIX} ]]; then + while read -r; do + if [[ ${REPLY} == $'\t'genfun_prefix= ]]; then + printf '\tgenfun_prefix=%q\n' "${EPREFIX}" + else + printf '%s\n' "${REPLY}" + fi || ! break + done < "${ED}/lib/gentoo/functions.sh" > "${T}/functions.sh" \ + && mv -- "${T}/functions.sh" "${ED}/lib/gentoo/functions.sh" \ + || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild index 864663a977..512195ceb8 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild @@ -16,14 +16,11 @@ else KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi -LICENSE="GPL-2 public-domain" +LICENSE="GPL-2" SLOT="0" IUSE="test" RESTRICT="!test? ( test )" -# Specifically needs GNU find, as well. -RDEPEND=">=sys-apps/findutils-4.9" - src_configure() { local emesonargs=( # Deliberately avoid /usr as consumers assume we're at /lib/gentoo. @@ -41,7 +38,7 @@ src_install() { if [[ ${EPREFIX} ]]; then while read -r; do if [[ ${REPLY} == $'\t'genfun_prefix= ]]; then - printf 'genfun_prefix=%q\n' "${EPREFIX}" + printf '\tgenfun_prefix=%q\n' "${EPREFIX}" else printf '%s\n' "${REPLY}" fi || ! break diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch new file mode 100644 index 0000000000..c1b7788deb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-1.patch @@ -0,0 +1,41 @@ +From fbbe03cbc4fa8c801967aac2e2c444e93b2ca96a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= +Date: Sun, 4 Aug 2024 16:22:07 +0200 +Subject: [PATCH 1/2] libnetlink.h: Include explicitly for musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The code added in "f_flower: implement pfcp opts" uses h2be64, +defined in endian.h. While this is pulled in around some corners +for glibc (see below), that's not the case for musl and an +explicit include is required there. + +. /usr/include/libmnl/libmnl.h +.. /usr/include/sys/socket.h +... /usr/include/bits/socket.h +.... /usr/include/sys/types.h +..... /usr/include/endian.h + +Fixes: 976dca372 ("f_flower: implement pfcp opts") +Bug: https://bugs.gentoo.org/936234 +Signed-off-by: Andreas K. Hüttel +--- + include/libnetlink.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/libnetlink.h b/include/libnetlink.h +index 30f0c2d2..7074e913 100644 +--- a/include/libnetlink.h ++++ b/include/libnetlink.h +@@ -4,6 +4,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +2.44.2 + diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch new file mode 100644 index 0000000000..11764be096 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/files/iproute2-6.10.0-musl-2.patch @@ -0,0 +1,43 @@ +From 40a430cf13876120416d82d581745033d273576c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= +Date: Sun, 4 Aug 2024 17:47:35 +0200 +Subject: [PATCH 2/2] rdma.c: Add include for basename on musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This include file is required on musl for availability of basename. + +Note that for glibc adding the include can have the side effect of +switching from the GNU implementation of basename (which does not touch +its argument) to the POSIX implementation (which under certain +circumstances modifies the string passed to it, e.g. removing trailing +slashes). + +This is safe however since the C99 and C11 standard says: +> The parameters argc and argv and the strings pointed to by the argv +> array shall be modifiable by the program, and retain their last-stored +> values between program startup and program termination. +(multiple google results, unfortunately no official reference link) + +Bug: https://bugs.gentoo.org/926341 +Signed-off-by: Andreas K. Hüttel +--- + rdma/rdma.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rdma/rdma.c b/rdma/rdma.c +index 131c6b2a..f835bf3f 100644 +--- a/rdma/rdma.c ++++ b/rdma/rdma.c +@@ -4,6 +4,7 @@ + * Authors: Leon Romanovsky + */ + ++#include + #include "rdma.h" + #include "version.h" + #include "color.h" +-- +2.44.2 + diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.10.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.10.0.ebuild index 3d0c9ec799..0b232fbeec 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.10.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.10.0.ebuild @@ -48,6 +48,8 @@ BDEPEND=" " PATCHES=( + "${FILESDIR}"/${PN}-6.10.0-musl-1.patch # bug #936234 + "${FILESDIR}"/${PN}-6.10.0-musl-2.patch # bug #926341 "${FILESDIR}"/${PN}-6.9.0-mtu.patch # bug #291907 "${FILESDIR}"/${PN}-6.8.0-configure-nomagic-nolibbsd.patch # bug #643722 & #911727 "${FILESDIR}"/${PN}-6.8.0-disable-libbsd-fallback.patch # bug #911727 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec-auto-load b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec-auto-load new file mode 100644 index 0000000000..62c828fd1c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec-auto-load @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +# Defaults +LAYOUT=compat +BOOTPART=/boot +KNAME=kernel +INITRD=initramfs.img + +instkern_state=/var/lib/misc/installkernel +if [[ -s ${instkern_state} ]]; then + # If we have a log file, set defaults from there. + IFS=$'\t' read -r -a LastKernArray <<< "$(tail -n1 ${instkern_state})" + LAYOUT="${LastKernArray[4]}" + BOOTPART="${LastKernArray[7]}" + KNAME="${LastKernArray[8]}" + if [[ "${LastKernArray[9]}" != unknown && ${LAYOUT} != uki ]]; then + INITRD="${LastKernArray[9]}" + else + INITRD= + fi +fi + +if [[ ${LAYOUT} == uki ]]; then + echo "WARNING: kexec currently does not support UKIs" + KPARAM= +else + if [[ -f /etc/kernel/cmdline ]]; then + KPARAM="$(tr -s "${IFS}" ' ' , # or bzImage, vmlinuz (without suffix), # then it's automaticaly detected. # Setting it to "-" will disable kexec. -#KNAME="vmlinuz-3.9.0" +#KNAME="kernel" # Initrd # Same automatic detection restriction as for KNAME apply. @@ -31,4 +31,4 @@ #KPARAM="splash=silent,theme:emergence" # Do not try to mount /boot -# DONT_MOUNT_BOOT="yes" +#DONT_MOUNT_BOOT="yes" diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec.service-r1 b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec.service-r1 new file mode 100644 index 0000000000..ce9adf0e5d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/files/kexec.service-r1 @@ -0,0 +1,16 @@ +[Unit] +Description=Gracefully restart the box +Documentation=man:kexec(8) +After=boot.mount +Before=shutdown.target umount.target final.target +ConditionPathExists=!/nokexec + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/etc/kexec.conf +ExecStart=/usr/sbin/kexec-auto-load +ExecStop=/usr/sbin/kexec-auto-load + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29-r1.ebuild similarity index 84% rename from sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29-r1.ebuild index bedde55d96..c8af4693cf 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.29-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit libtool linux-info optfeature systemd +inherit libtool linux-info systemd if [[ ${PV} == "9999" ]] ; then inherit git-r3 autotools @@ -92,24 +92,16 @@ src_install() { dodoc "${FILESDIR}"/README.Gentoo newinitd "${FILESDIR}"/kexec-r2.init kexec - newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec insinto /etc doins "${FILESDIR}"/kexec.conf + dosym ../kexec.conf /etc/conf.d/kexec - insinto /etc/kernel/postinst.d - doins "${FILESDIR}"/90_kexec - - systemd_dounit "${FILESDIR}"/kexec.service + dosbin "${FILESDIR}"/kexec-auto-load + systemd_newunit "${FILESDIR}"/kexec.service-r1 kexec.service } pkg_postinst() { - if systemd_is_booted || has_version sys-apps/systemd; then - elog "For systemd support the new config file is" - elog " /etc/kexec.conf" - elog "Please adopt it to your needs as there is no autoconfig anymore" - fi - local n_root_args=$(grep -o -- '\/dev/null | wc -l) local has_rootpart_set=no if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then @@ -125,7 +117,4 @@ pkg_postinst() { ewarn "in case running system and initramfs do not agree on detected" ewarn "root device name!" fi - - optfeature "automatically updating /etc/kexec.conf on each kernel installation" \ - "sys-kernel/installkernel[-systemd]" } diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-9999.ebuild index bedde55d96..c8af4693cf 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit libtool linux-info optfeature systemd +inherit libtool linux-info systemd if [[ ${PV} == "9999" ]] ; then inherit git-r3 autotools @@ -92,24 +92,16 @@ src_install() { dodoc "${FILESDIR}"/README.Gentoo newinitd "${FILESDIR}"/kexec-r2.init kexec - newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec insinto /etc doins "${FILESDIR}"/kexec.conf + dosym ../kexec.conf /etc/conf.d/kexec - insinto /etc/kernel/postinst.d - doins "${FILESDIR}"/90_kexec - - systemd_dounit "${FILESDIR}"/kexec.service + dosbin "${FILESDIR}"/kexec-auto-load + systemd_newunit "${FILESDIR}"/kexec.service-r1 kexec.service } pkg_postinst() { - if systemd_is_booted || has_version sys-apps/systemd; then - elog "For systemd support the new config file is" - elog " /etc/kexec.conf" - elog "Please adopt it to your needs as there is no autoconfig anymore" - fi - local n_root_args=$(grep -o -- '\/dev/null | wc -l) local has_rootpart_set=no if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then @@ -125,7 +117,4 @@ pkg_postinst() { ewarn "in case running system and initramfs do not agree on detected" ewarn "root device name!" fi - - optfeature "automatically updating /etc/kexec.conf on each kernel installation" \ - "sys-kernel/installkernel[-systemd]" } diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/Manifest index a1a82b0664..7ddcbbb265 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/Manifest @@ -1,3 +1,4 @@ +DIST nvme-cli-2.10.2.gh.tar.gz 990461 BLAKE2B d674f2c752eee9178cf3f1f871d1bc345632f4cbf7f354b1e345830a3bf88b505eddb835d774d6ebadbee50a79614f49dd1eef58d1374a075fd59eb551c251c8 SHA512 98ecb2488cdf21c83004204f4cb7e7d9327fef5a33e5a37d977c659d76be3cef861473676fa7fbd1d40f38742b365b98431e17d9b0318ddb4cc407953acdde87 DIST nvme-cli-2.7.1.gh.tar.gz 902081 BLAKE2B 7d14838f7f0fd6d1ab1cb30041f862fe2db6f40fe72c13cb4ce227831cac6e141ff5cec2924c846f30629188754b0ce0630ad9009d2a490c193da20e8b8a45d1 SHA512 6a9f3574dfd4375e6f7a76ed95f698efb26da5b72a490579caeba9d46c4811ae31650844e0a0e1047dc627158d5ffbdc020112a5059d3195e7eadff902b70b19 DIST nvme-cli-2.8.gh.tar.gz 910994 BLAKE2B c231fc087219622736bdc400c83d2a320670f247f77b53f0cad20c8117e620703badba7cd9a6f267ba79223be9c0d6710c2be968683f77fe72e45957e0c8b899 SHA512 1be0bed4e1bf8a25229f301c2b00b78d2de4eaf8ff2b815fa75e44dd35ddd7787604152bdf00696130df3281206a734c5f408c3f2127440e05c2e4b1cdbb79d4 DIST nvme-cli-2.9.1.gh.tar.gz 932210 BLAKE2B 865808c17f2098f8d0be8ba928869801023f77f0ffd44b5d2424b9f75e01180f8d1990684e3e4a79363e650a44e58abe213b5ab55328f0bde9ed699eba9a215c SHA512 c9c86e7567c2d4c59aff1eb9d18f4775923db3c81a89c628b819121c32150d4bc2d65d0dacac764c64594369890b380d0fd06bc7c1f83f4a7f3e71a51a6fee24 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/metadata.xml index 727194bfa4..051426c642 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/metadata.xml @@ -10,5 +10,6 @@ Support JSON output via dev-libs/json-c + Set default Persistent Discovery Controllers behavior diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/nvme-cli-2.10.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/nvme-cli-2.10.2.ebuild new file mode 100644 index 0000000000..22d82a1551 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/nvme-cli/nvme-cli-2.10.2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson systemd udev + +DESCRIPTION="NVM-Express user space tooling for Linux" +HOMEPAGE="https://github.com/linux-nvme/nvme-cli" +SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc ~x86" +IUSE="+json pdc" + +RDEPEND=" + >=sys-libs/libnvme-1.10:=[json?] + json? ( dev-libs/json-c:= ) + sys-libs/zlib:= +" +DEPEND=" + ${RDEPEND} + virtual/os-headers +" +BDEPEND=" + virtual/pkgconfig +" + +src_configure() { + local emesonargs=( + -Dversion-tag="${PV}" + -Ddocs=all + -Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html" + -Dsystemddir="$(systemd_get_systemunitdir)" + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + $(meson_feature json json-c) + $(meson_use pdc pdc-enabled) + ) + meson_src_configure +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/Manifest index 8e4644e36f..72580447cb 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/Manifest @@ -1,3 +1,2 @@ -DIST semodule-utils-3.5.tar.gz 14383 BLAKE2B a1bb432013bca1023d99b32f43b2c972b6b807a4677f9d8c9fb9aff10225232506f3ecca86fc231b4c63d04582a91a1c4218f87ce5532a4d35a26a09665c6f10 SHA512 7c32f425ae71745040d1c6a6585149a1efb319913aa9d4c8bf185b0a4216dc66378fa38595b171614ee3ae4ade997d3ae56a060346e334faec55c419a87d71dd DIST semodule-utils-3.6.tar.gz 12844 BLAKE2B e5e7501c412649f471e89cc89569d6c51421e0b46f172f243ce778bbe3a2c658ef9a92e3f3e1e07fb3358e25f63e004b6bd4b56619472fbcae8cb5b916d54170 SHA512 16b58bbafcaef9a2e8e34a20d0e1e4024a9044024de8fa3137c5ba1b9af600afac51c15ccb648dd6bff77747c047f4c9feafeea07c19b1eb14955acc92697a48 DIST semodule-utils-3.7.tar.gz 12896 BLAKE2B 7487c74585e281f6c44e9977efb85e89bf01d93285c6cc6593dd876e948cc385ec9f11b52f3fc182b2bac3621bcc89c53fc217c41b1a01d586274139b0a40fa6 SHA512 133f76ddff0cc4121e59560f4167e15288cc7f6172a39b49ea631803f6e3365fef95166a55498fa2e036de85466e37bb6ec164ef60855eef8c888c9b384b0120 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/semodule-utils-3.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/semodule-utils-3.5.ebuild deleted file mode 100644 index b67d886e7b..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/semodule-utils/semodule-utils-3.5.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit toolchain-funcs - -MY_PV="${PV//_/-}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="SELinux policy module utilities" -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" - -if [[ ${PV} == *9999 ]] ; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" - S="${WORKDIR}/${P}/${PN}" -else - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="amd64 arm arm64 ~mips x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="" - -DEPEND=">=sys-libs/libsepol-${PV}:=" -RDEPEND="${DEPEND}" - -src_prepare() { - default - - sed -i 's/-Werror//g' "${S}"/*/Makefile || die "Failed to remove Werror" -} - -src_compile() { - emake CC="$(tc-getCC)" -} - -src_install() { - emake DESTDIR="${D}" install -} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest index a394d716f4..776e8cf74b 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest @@ -21,3 +21,5 @@ DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 +DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734 +DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.9999.ebuild new file mode 100644 index 0000000000..c05f1529d8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.9999.ebuild @@ -0,0 +1,557 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" + +LICENSE="GPL-3+" +IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# Variables that can be set here (ignored for live ebuilds) +# PATCH_VER - the patchset version +# Default: empty, no patching +# PATCH_BINUTILS_VER - the binutils version in the patchset name +# - Default: PV +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... +# for the patchsets + +PATCH_VER=1 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + SLOT=${PV} +elif [[ ${PV} == *9999 ]]; then + inherit git-r3 + SLOT=$(ver_cut 1-2) +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" + [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + SLOT=$(ver_cut 1-2) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# +# The cross-compile logic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +# +# The dependencies +# +RDEPEND=" + >=sys-devel/binutils-config-3 + sys-libs/zlib + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + pgo? ( + dev-util/dejagnu + app-alternatives/bc + ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/yacc +" + +RESTRICT="!test? ( test )" + +MY_BUILDDIR=${WORKDIR}/build + +src_unpack() { + if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + if [[ ${PV} != 9999 ]] ; then + EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch + fi + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-hppa64/}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + + # _p patch versions are Gentoo specific tarballs ... + local dir=${P%_p?} + dir=${dir/-hppa64/} + + S=${WORKDIR}/${dir} + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die +} + +src_prepare() { + local patchsetname + if [[ ${PV} == 9999 ]] ; then + patchsetname="from git master" + elif [[ ${PV} == *9999 ]] ; then + patchsetname="from git branch ${EGIT_BRANCH}" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi + + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.41-linker-prefix.patch + fi + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + use cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + # enable gold (installed as ld.gold) and ld's plugin architecture + if use gold ; then + myconf+=( --enable-gold ) + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim} + # Strip out broken static link flags: https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) + + if use pgo ; then + # We let configure handle it for us because it has to run + # the testsuite later on for profiling, and LTO isn't compatible + # with the testsuite. + filter-lto + + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # Prevent makeinfo from running if doc is unset. + if ! use doc ; then + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die + fi +} + +src_compile() { + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake info + fi + + # we nuke the manpages when we're left with junk + # (like when we bootstrap, no perl -> no manpages) + find . -name '*.1' -a -size 0 -delete +} + +src_test() { + cd "${MY_BUILDDIR}" || die + + ( + # Tests don't expect LTO + filter-lto + + # lto-wrapper warnings which confuse tests + filter-flags '-Wa,*' + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" + ) +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + rm -rf "${ED}"/${LIBPATH}/bin || die + use static-libs || find "${ED}" -name '*.la' -delete + + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die + for d in ../* ; do + [[ ${d} == ../${PV} ]] && continue + mv ${d}/* . || die + rmdir ${d} || die + done + + # Now we collect everything intp the proper SLOT-ed dirs + # When something is built to cross-compile, it installs into + # /usr/$CHOST/ by default ... we have to 'fix' that :) + if is_cross ; then + cd "${ED}"/${BINPATH} || die + for x in * ; do + mv ${x} ${x/${CTARGET}-} || die + done + + if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/usr/${CHOST}/{include,lib} + fi + fi + + insinto ${INCPATH} + local libiberty_headers=( + # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. + demangle.h + dyn-string.h + fibheap.h + hashtab.h + libiberty.h + objalloc.h + splay-tree.h + ) + doins "${libiberty_headers[@]/#/${S}/include/}" + if [[ -d ${ED}/${LIBPATH}/lib ]] ; then + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + fi + + # Generate an env.d entry for this binutils + insinto /etc/env.d/binutils + cat <<-EOF > "${T}"/env.d + TARGET="${CTARGET}" + VER="${PV}" + LIBPATH="${EPREFIX}${LIBPATH}" + EOF + newins "${T}"/env.d ${CTARGET}-${PV} + + # Handle documentation + if ! is_cross ; then + cd "${S}" || die + dodoc README + + docinto bfd + dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/README + + docinto opcodes + dodoc opcodes/ChangeLog* + fi + + # Remove shared info pages + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + + docompress "${DATAPATH}"/{info,man} + + # Trim all empty dirs + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null +} + +pkg_postinst() { + # Make sure this ${CTARGET} has a binutils version selected + [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error +} + +pkg_postrm() { + local current_profile=$(binutils-config -c ${CTARGET}) + + # If no other versions exist, then uninstall for this + # target ... otherwise, switch to the newest version + # Note: only do this if this version is unmerged. We + # rerun binutils-config if this is a remerge, as + # we want the mtimes on the symlinks updated (if + # it is the same as the current selected profile) + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then + local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') + choice=${choice//$'\n'/ } + choice=${choice/* } + if [[ -z ${choice} ]] ; then + binutils-config -u ${CTARGET} || eerror binutils-config returned an error + else + binutils-config ${choice} || eerror binutils-config returned an error + fi + elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error + fi +} + +# Note [slotting support] +# ----------------------- +# Gentoo's layout for binutils files is non-standard as Gentoo +# supports slotted installation for binutils. Many tools +# still expect binutils to reside in known locations. +# binutils-config package restores symlinks into known locations, +# like: +# /usr/bin/${CTARGET}- +# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips +# /usr/include/ +# +# Note [tooldir hack for ldscripts] +# --------------------------------- +# Build system does not allow ./configure to tweak every location +# we need for slotting binutils hence all the shuffling in +# src_install(). This note is about SCRIPTDIR define handling. +# +# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value +# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' +# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. +# Thus we can't just move files around after compilation finished. +# +# Our goal is the following: +# - at build-time set scriptdir to point to symlinked location: +# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) +# - at install-time set scriptdir to point to slotted location: +# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.ebuild new file mode 100644 index 0000000000..9407ec3c37 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.43.ebuild @@ -0,0 +1,557 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs + +DESCRIPTION="Tools necessary to build programs" +HOMEPAGE="https://sourceware.org/binutils/" + +LICENSE="GPL-3+" +IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd" + +# Variables that can be set here (ignored for live ebuilds) +# PATCH_VER - the patchset version +# Default: empty, no patching +# PATCH_BINUTILS_VER - the binutils version in the patchset name +# - Default: PV +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... +# for the patchsets + +PATCH_VER=1 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + SLOT=${PV} +elif [[ ${PV} == *9999 ]]; then + inherit git-r3 + SLOT=$(ver_cut 1-2) +else + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} + PATCH_DEV=${PATCH_DEV:-dilfridge} + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz" + [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + SLOT=$(ver_cut 1-2) + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +# +# The cross-compile logic +# +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +# +# The dependencies +# +RDEPEND=" + >=sys-devel/binutils-config-3 + sys-libs/zlib + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( sys-apps/texinfo ) + pgo? ( + dev-util/dejagnu + app-alternatives/bc + ) + test? ( + dev-util/dejagnu + app-alternatives/bc + ) + nls? ( sys-devel/gettext ) + zstd? ( virtual/pkgconfig ) + app-alternatives/lex + app-alternatives/yacc +" + +RESTRICT="!test? ( test )" + +MY_BUILDDIR=${WORKDIR}/build + +src_unpack() { + if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patch || die + + if [[ ${PV} != 9999 ]] ; then + EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch + fi + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" + S=${WORKDIR}/binutils + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P/-hppa64/}.tar.xz + + cd "${WORKDIR}" || die + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz + + # _p patch versions are Gentoo specific tarballs ... + local dir=${P%_p?} + dir=${dir/-hppa64/} + + S=${WORKDIR}/${dir} + fi + + cd "${WORKDIR}" || die + mkdir -p "${MY_BUILDDIR}" || die +} + +src_prepare() { + local patchsetname + if [[ ${PV} == 9999 ]] ; then + patchsetname="from git master" + elif [[ ${PV} == *9999 ]] ; then + patchsetname="from git branch ${EGIT_BRANCH}" + else + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" + fi + + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then + if ! use vanilla; then + einfo "Applying binutils patchset ${patchsetname}" + eapply "${WORKDIR}/patch" + einfo "Done." + + # This is applied conditionally for now just out of caution. + # It should be okay on non-prefix systems though. See bug #892549. + if is_cross || use prefix; then + eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.43-linker-prefix.patch + fi + fi + fi + + # Make sure our explicit libdir paths don't get clobbered, bug #562460 + sed -i \ + -e 's:@bfdlibdir@:@libdir@:g' \ + -e 's:@bfdincludedir@:@includedir@:g' \ + {bfd,opcodes}/Makefile.in || die + + # Apply things from PATCHES and user dirs + default + + # Run misc portage update scripts + gnuconfig_update + elibtoolize --portage --no-uclibc +} + +toolchain-binutils_bugurl() { + printf "https://bugs.gentoo.org/" +} +toolchain-binutils_pkgversion() { + printf "Gentoo ${PV}" + [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" +} + +src_configure() { + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + # Setup some paths + LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} + INCPATH=${LIBPATH}/include + DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} + if is_cross ; then + TOOLPATH=/usr/${CHOST}/${CTARGET} + else + TOOLPATH=/usr/${CTARGET} + fi + BINPATH=${TOOLPATH}/binutils-bin/${PV} + + # Make sure we filter $LINGUAS so that only ones that + # actually work make it through, bug #42033 + strip-linguas -u */po + + # Keep things sane + strip-flags + use cet && filter-flags -mindirect-branch -mindirect-branch=* + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 + + local x + echo + for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do + einfo "$(printf '%10s' ${x}:) ${!x}" + done + echo + + cd "${MY_BUILDDIR}" || die + local myconf=() + + if use plugins ; then + myconf+=( --enable-plugins ) + fi + # enable gold (installed as ld.gold) and ld's plugin architecture + if use gold ; then + myconf+=( --enable-gold ) + fi + + if use nls ; then + myconf+=( --without-included-gettext ) + else + myconf+=( --disable-nls ) + fi + + myconf+=( --with-system-zlib ) + + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 + case $(tc-arch) in + ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; + esac + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) + + is_cross && myconf+=( + --with-sysroot="${EPREFIX}"/usr/${CTARGET} + --enable-poison-system-directories + ) + + myconf+=( --enable-secureplt ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + myconf+=( + --prefix="${EPREFIX}"/usr + --host=${CHOST} + --target=${CTARGET} + --datadir="${EPREFIX}"${DATAPATH} + --datarootdir="${EPREFIX}"${DATAPATH} + --infodir="${EPREFIX}"${DATAPATH}/info + --mandir="${EPREFIX}"${DATAPATH}/man + --bindir="${EPREFIX}"${BINPATH} + --libdir="${EPREFIX}"${LIBPATH} + --libexecdir="${EPREFIX}"${LIBPATH} + --includedir="${EPREFIX}"${INCPATH} + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + --enable-relro + --enable-install-libiberty + --enable-textrel-check=$(usex hardened error warning) + # Things to think about + #--enable-deterministic-archives + --enable-new-dtags + --disable-jansson + --disable-werror + --with-bugurl="$(toolchain-binutils_bugurl)" + --with-pkgversion="$(toolchain-binutils_pkgversion)" + $(use_enable static-libs static) + $(use_with zstd) + + # Disable modules that are in a combined binutils/gdb tree, bug #490566 + --disable-{gdb,gdbserver,libbacktrace,libdecnumber,readline,sim} + # Strip out broken static link flags: https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # Change SONAME to avoid conflict across {native,cross}/binutils, binutils-libs. bug #666100 + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) + + $(use_with debuginfod) + + # Avoid automagic dev-libs/msgpack dep, bug #865875 + --without-msgpack + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + + # We can enable this by default in future, but it's brand new + # in 2.39 with several bugs: + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477) + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521) + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479) + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113) + $(use_enable gprofng) + ) + + case ${CTARGET} in + x86_64-*|aarch64*|arm64*|i[3456]*) + # These hardening options are available from 2.39+ but + # they unconditionally enable the behaviour even on arches + # where e.g. execstacks can't be avoided. + # See https://sourceware.org/bugzilla/show_bug.cgi?id=29592. + # + # TODO: Get the logic for this fixed upstream so it doesn't + # create impossible broken combinations on some arches, like mips. + # + # TODO: Get the logic for this fixed upstream so --disable-* works + # as expected. + myconf+=( + --enable-warn-execstack=yes + --enable-warn-rwx-segments=yes + ) + + if use hardened ; then + myconf+=( + # TOOD: breaks glibc test suite + #--enable-error-execstack=yes + #--enable-error-rwx-segments=yes + --enable-default-execstack=no + ) + fi + ;; + *) + ;; + esac + + if use elibc_musl ; then + # Override our earlier setting for musl, as textrels don't + # work there at all. See bug #707660. + myconf+=( + --enable-textrel-check=error + ) + fi + + if use test || { use pgo && tc-is-lto ; } ; then + # -Wa,* needs to be consistent everywhere or lto-wrapper will complain + filter-flags '-Wa,*' + fi + + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) ) + + if use pgo ; then + # We let configure handle it for us because it has to run + # the testsuite later on for profiling, and LTO isn't compatible + # with the testsuite. + filter-lto + + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # Prevent makeinfo from running if doc is unset. + if ! use doc ; then + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die + fi +} + +src_compile() { + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + # see linker prefix patch + emake \ + tooldir="${EPREFIX}${TOOLPATH}" \ + gentoo_prefix=$(usex prefix-guest "${EPREFIX}"/usr /usr) \ + all + + # only build info pages if the user wants them + if use doc ; then + emake info + fi + + # we nuke the manpages when we're left with junk + # (like when we bootstrap, no perl -> no manpages) + find . -name '*.1' -a -size 0 -delete +} + +src_test() { + cd "${MY_BUILDDIR}" || die + + ( + # Tests don't expect LTO + filter-lto + + # lto-wrapper warnings which confuse tests + filter-flags '-Wa,*' + + # bug #637066 + filter-flags -Wall -Wreturn-type + + emake -k check \ + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" + ) +} + +src_install() { + local x d + + cd "${MY_BUILDDIR}" || die + + # see Note [tooldir hack for ldscripts] + emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install + rm -rf "${ED}"/${LIBPATH}/bin || die + use static-libs || find "${ED}" -name '*.la' -delete + + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die + for d in ../* ; do + [[ ${d} == ../${PV} ]] && continue + mv ${d}/* . || die + rmdir ${d} || die + done + + # Now we collect everything intp the proper SLOT-ed dirs + # When something is built to cross-compile, it installs into + # /usr/$CHOST/ by default ... we have to 'fix' that :) + if is_cross ; then + cd "${ED}"/${BINPATH} || die + for x in * ; do + mv ${x} ${x/${CTARGET}-} || die + done + + if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ + rm -r "${ED}"/usr/${CHOST}/{include,lib} + fi + fi + + insinto ${INCPATH} + local libiberty_headers=( + # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. + demangle.h + dyn-string.h + fibheap.h + hashtab.h + libiberty.h + objalloc.h + splay-tree.h + ) + doins "${libiberty_headers[@]/#/${S}/include/}" + if [[ -d ${ED}/${LIBPATH}/lib ]] ; then + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die + fi + + # Generate an env.d entry for this binutils + insinto /etc/env.d/binutils + cat <<-EOF > "${T}"/env.d + TARGET="${CTARGET}" + VER="${PV}" + LIBPATH="${EPREFIX}${LIBPATH}" + EOF + newins "${T}"/env.d ${CTARGET}-${PV} + + # Handle documentation + if ! is_cross ; then + cd "${S}" || die + dodoc README + + docinto bfd + dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/README + + docinto opcodes + dodoc opcodes/ChangeLog* + fi + + # Remove shared info pages + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + + docompress "${DATAPATH}"/{info,man} + + # Trim all empty dirs + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null +} + +pkg_postinst() { + # Make sure this ${CTARGET} has a binutils version selected + [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error +} + +pkg_postrm() { + local current_profile=$(binutils-config -c ${CTARGET}) + + # If no other versions exist, then uninstall for this + # target ... otherwise, switch to the newest version + # Note: only do this if this version is unmerged. We + # rerun binutils-config if this is a remerge, as + # we want the mtimes on the symlinks updated (if + # it is the same as the current selected profile) + if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then + local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') + choice=${choice//$'\n'/ } + choice=${choice/* } + if [[ -z ${choice} ]] ; then + binutils-config -u ${CTARGET} || eerror binutils-config returned an error + else + binutils-config ${choice} || eerror binutils-config returned an error + fi + elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then + binutils-config ${CTARGET}-${PV} || eerror binutils-config returned an error + fi +} + +# Note [slotting support] +# ----------------------- +# Gentoo's layout for binutils files is non-standard as Gentoo +# supports slotted installation for binutils. Many tools +# still expect binutils to reside in known locations. +# binutils-config package restores symlinks into known locations, +# like: +# /usr/bin/${CTARGET}- +# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips +# /usr/include/ +# +# Note [tooldir hack for ldscripts] +# --------------------------------- +# Build system does not allow ./configure to tweak every location +# we need for slotting binutils hence all the shuffling in +# src_install(). This note is about SCRIPTDIR define handling. +# +# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value +# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' +# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. +# Thus we can't just move files around after compilation finished. +# +# Our goal is the following: +# - at build-time set scriptdir to point to symlinked location: +# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) +# - at install-time set scriptdir to point to slotted location: +# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild index ccf31a1014..44bb4c8c3e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild @@ -22,9 +22,12 @@ IUSE="cet debuginfod doc gold gprofng hardened multitarget +nls pgo +plugins sta PATCH_VER=1 PATCH_DEV=dilfridge -if [[ ${PV} == 9999* ]]; then +if [[ ${PV} == 9999 ]]; then inherit git-r3 SLOT=${PV} +elif [[ ${PV} == *9999 ]]; then + inherit git-r3 + SLOT=$(ver_cut 1-2) else PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} PATCH_DEV=${PATCH_DEV:-dilfridge} @@ -79,12 +82,15 @@ RESTRICT="!test? ( test )" MY_BUILDDIR=${WORKDIR}/build src_unpack() { - if [[ ${PV} == 9999* ]] ; then + if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git" EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git git-r3_src_unpack mv patches-git/9999 patch || die + if [[ ${PV} != 9999 ]] ; then + EGIT_BRANCH=binutils-$(ver_cut 1)_$(ver_cut 2)-branch + fi EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" S=${WORKDIR}/binutils EGIT_CHECKOUT_DIR=${S} @@ -108,13 +114,15 @@ src_unpack() { src_prepare() { local patchsetname - if [[ ${PV} == 9999* ]] ; then + if [[ ${PV} == 9999 ]] ; then patchsetname="from git master" + elif [[ ${PV} == *9999 ]] ; then + patchsetname="from git branch ${EGIT_BRANCH}" else patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}" fi - if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == *9999 ]] ; then if ! use vanilla; then einfo "Applying binutils patchset ${patchsetname}" eapply "${WORKDIR}/patch" @@ -123,8 +131,8 @@ src_prepare() { # This is applied conditionally for now just out of caution. # It should be okay on non-prefix systems though. See bug #892549. if is_cross || use prefix; then - eapply "${FILESDIR}"/binutils-2.40-linker-search-path.patch \ - "${FILESDIR}"/binutils-2.41-linker-prefix.patch + eapply "${FILESDIR}"/binutils-2.43-linker-search-path.patch \ + "${FILESDIR}"/binutils-2.43-linker-prefix.patch fi fi fi diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-prefix.patch b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-prefix.patch new file mode 100644 index 0000000000..79b3065701 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-prefix.patch @@ -0,0 +1,53 @@ +https://bugs.gentoo.org/892549 +https://github.com/gentoo/binutils-gdb/pull/5 + +From 302271b0baa52204fab58bd0b74e3919c0789f87 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 23 Dec 2023 13:48:10 +0000 +Subject: [PATCH] ld: Allow a Gentoo-specific prefix to override the prefix + used by ld.bfd + +This prefix is only used to locate $prefix/etc/ld.so.conf, with $prefix +usually being /usr. This file is important on Gentoo Prefix systems, +where the /usr prefix is within another directory. The problem is that +Gentoo already passes the same directory as the sysroot, and ld.bfd +therefore looks for /myprefix/myprefix/usr/etc/ld.so.conf. + +The sysroot is dynamic, while the prefix is hardcoded. A hardcoded +prefix that isn't just /usr is unhelpful, not just because of the +doubled prefix issue above, but also because it prevents ld.bfd from +working effectively outside its native environment. We will therefore +hardcode it to just /usr. + +This change does not simply do that though and sets up a $gentoo_prefix +variable instead, with $prefix as a fallback. This is necessary because +Gentoo prefix-guest systems, which use the host's libc, do not apply a +sysroot like RAP prefix systems do. In that case, we must preserve the +existing behaviour. The binutils ebuild will be responsible for setting +this variable appropriately. +--- + ld/emultempl/elf.em | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em +index 863657e12f5..cf0204e9c76 100644 +--- a/ld/emultempl/elf.em ++++ b/ld/emultempl/elf.em +@@ -142,7 +142,7 @@ gld${EMULATION_NAME}_before_plugin_all_symbols_read (void) + ldelf_before_plugin_all_symbols_read ($IS_LIBPATH, $IS_NATIVE, + $IS_LINUX_TARGET, + $IS_FREEBSD_TARGET, +- $ELFSIZE, "$prefix"); ++ $ELFSIZE, "${gentoo_prefix-${prefix}}"); + } + + /* This is called after all the input files have been opened. */ +@@ -151,7 +151,7 @@ static void + gld${EMULATION_NAME}_after_open (void) + { + ldelf_after_open ($IS_LIBPATH, $IS_NATIVE, +- $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "$prefix"); ++ $IS_LINUX_TARGET, $IS_FREEBSD_TARGET, $ELFSIZE, "${gentoo_prefix-${prefix}}"); + } + + EOF diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-search-path.patch b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-search-path.patch new file mode 100644 index 0000000000..1dcb5e6870 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/binutils-2.43-linker-search-path.patch @@ -0,0 +1,43 @@ +https://bugs.gentoo.org/892549 +https://github.com/gentoo/binutils-gdb/pull/5 + +From 470487917306e169fc3ca983c2edf2370b211861 Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Sat, 11 Feb 2023 15:15:20 +0000 +Subject: [PATCH] ldelf.c: Always consider -L arguments when handling DT_NEEDED + +This is for consistency with other linkers, including gold. Without +this, we typically rely on ld.so.conf to find libraries such as +libstdc++.so.6, while other linkers do not use this file at all. +--- + ld/ldelf.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/ld/ldelf.c b/ld/ldelf.c +index 09691609fc0..11edff8c8ec 100644 +--- a/ld/ldelf.c ++++ b/ld/ldelf.c +@@ -1093,8 +1093,8 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + linker will search. That means that we want to use + rpath_link, rpath, then the environment variable + LD_LIBRARY_PATH (native only), then the DT_RPATH/DT_RUNPATH +- entries (native only), then the linker script LIB_SEARCH_DIRS. +- We do not search using the -L arguments. ++ entries (native only), then the linker script LIB_SEARCH_DIRS, ++ then the -L arguments. + + We search twice. The first time, we skip objects which may + introduce version mismatches. The second time, we force +@@ -1168,11 +1168,7 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, + len = strlen (l->name); + for (search = search_head; search != NULL; search = search->next) + { +- char *filename; +- +- if (search->source != search_dir_linker_script) +- continue; +- filename = (char *) xmalloc (strlen (search->name) + len + 2); ++ char *filename = (char *) xmalloc (strlen (search->name) + len + 2); + sprintf (filename, "%s/%s", search->name, l->name); + nn.name = filename; + if (ldelf_try_needed (&nn, force, is_linux)) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest index 6a3f720038..a0f6c208ae 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest @@ -8,6 +8,8 @@ DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e DIST gcc-12-20240209.tar.xz 79824868 BLAKE2B 1ae5a646da470f06648c4766c77475ceb287c5f6647d5102f1aef6590f973233d5e7f83b5e0241488d49dba59dd605c211938379e68a393a2dccb3834103ae4b SHA512 9f9a04f4477f41bb2a5662aedef2af75b039de50c2dc99310e504e6080cb7aae06a1255337ea2e563975cb108ddc6766adbbaf4e3d5d5712801d7ba9a5209dbd DIST gcc-12-20240711.tar.xz 79899144 BLAKE2B e1dad8f14ac0413c31ebb516551ef6891c43ffb2161efc6224a59a758cb5936a8b6a5db3ee0ea84c9a013dc3e7a3cca2abdec138cfb17b430d1ea926811f632a SHA512 e3a9b14edb7cf8f5a1d27652b60a4bd9b6aa553ffc5bfa6dc53113e327a4a1f2cfedd3ea5a3a1c074f47d7008cad89d721844a863d762343fad8b37d3ec55083 DIST gcc-12-20240725.tar.xz 79899056 BLAKE2B 299edcf3a8fa35f15bcc850a5fd3be12c2d0e464ea8d78454333a3462d182be61923e38fe1ead5ca0e8d647941e897e4c3e37f03cf80e9aeedc32370bdf12f25 SHA512 6169e54e6e4c7017d7b9138fef341387a1fc8e3634b974364daef7bdff5809d0156012e25bfb533e255b0f3198aae7c667321bc11ac9ad71302f06be5b31c6b2 +DIST gcc-12-20240801.tar.xz 79883084 BLAKE2B 9b50ef282b5d55b2c477e5edd83c70076e0fe81c533d15bb9e8a4ac2b53c855f2aac80774b6944e843c6433294fc1b6ff96d7f754c78f60623dc1068c5e0e844 SHA512 57699fe4749558e2116e38e6d3dd2427a790969789f7d510225a8306e601a5ef07ca0609ba948c79d540b52c51d29abadbb0195d66f709505d7b685fd11b3e1d +DIST gcc-12-20240808.tar.xz 79911312 BLAKE2B a4958a9980e043d295df7ac75d4f0ac594b012e756133f20cc99a510d288f0be1b253e10c6ee08da36c881cce1bb545ce028ca2d65ba2e180672c09c377a9553 SHA512 ad57e71315ac4061b528a0ef6217298d545f7b48d1e73c9b543a7594c48bddf61098227aa0ad889aafb80f2532ce26d4a74b24a84c4cfa52e075415c0a512508 DIST gcc-12.3.0-musl-patches-1.tar.xz 3572 BLAKE2B c7bf65f7c9ea8023ddaac821ee2b778622fa310ac72a72b2f7032494a8f304eac86217f9204622e6c21aaef9952bece0d09bc126facd4f42b602927909815ab5 SHA512 babc279fea2c1fd4c018815f2f5630214fd46015ce9f365c28af242681d51818eaca30ce298eddcab1eed5ac5f2759e2b47b2335afab9d722b4469a6d4fec326 DIST gcc-12.3.0-patches-3.tar.xz 14852 BLAKE2B 7a5f1f43063b15f424099afd72096212fbbbc5151ff01f2de15dfb6e7cf274981c8cfaedba9ef61576c9096fb172fc550a7deb5cd7d9366fd249fd5dd3951f76 SHA512 aa89e4c2ae02f4fb42229ad5167f2eaa3a8fae51118645bf07199fe2124b9c83948590662b053d08002ef709fa870ea88315fd4ccbe4441a74e9cb62edcb82fb DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 @@ -16,6 +18,8 @@ DIST gcc-13-20240614.tar.xz 84463660 BLAKE2B a1b551ff633c31d6972fed173f248ba5f66 DIST gcc-13-20240712.tar.xz 84486436 BLAKE2B 4e82fadcec0258471e8a1a055136a67565230d6bfef719ef07a01286bdbb7963878b05622a68627a8f5885c2ee994d879155002f07ad2e53872f082b3dfb5e18 SHA512 1544e71e28a9d93d485a5b74e5910211da68d39af4389f9216f246090d2edb23805648f3528659b02d9db0bc7ee625b8f6a34c3775f41e7aa8a3760b2988b273 DIST gcc-13-20240719.tar.xz 84474136 BLAKE2B 729596dec948360c2724fa46bcd18756c03606b093c4cd9f3841d6264a17d03b70db7722af805a564fa50144f71d1d88242de52cb257adf327cb2a4f97ea90d0 SHA512 eb63678540bded7798d475a5c8c7d10fd13571bade2e96c6c04e464b80c58d15e78a391e79e7643075e0ed43b7cc2ba2529fd82aa071cd55a57bbc259425d567 DIST gcc-13-20240726.tar.xz 84475052 BLAKE2B d4a9d0d8957f9e728769af4a2c151eed833542ce12ed154a556093d01021428876f76e653709dc4fe96a89b686dd9b9506d6296b9481484d245e8cbdaf82b5f0 SHA512 89d2333c353e72fb0f87d2c9f43cc7b9e22b87d452e82747a9870cd5feabca43f2b223d5e1a9416e040595a733484ff75244bb449f36d7ae62fe69531ae4113d +DIST gcc-13-20240802.tar.xz 84475340 BLAKE2B e4d5492126745d396194d3bce0b1d64a7cdc55a5930ca0305b1e0eb2e8f5a18b795e349bfb0f2c6023bd3c2d869ec98638aad1b72d1bc728c8871f59d29cdc72 SHA512 6632b596c28c80cc7887c5821ed073d2bfa03eeef1ef59c31c5f187ceba9d8f40469350bfe754ec5834a89baf9721fb4f0e4b73c75262c00e5b888ca56c19f5a +DIST gcc-13-20240809.tar.xz 84479208 BLAKE2B f551960e9ac11e4769fec2e5dfbb4b0a37c2bbaaa7310231e86d2e8f24548bc3bdbfb9977ff77b03b896b06bcf92b56a4f8f516f4dc7ef8fb6400b44e8dace8d SHA512 648719e9cf4908665164f2a8854371933f09d31def1d32ce58f77c51f64955bfcb8a1232ecf0edbdf7eeaaf5c079bf2b4234c6c3d94c7e741d6945590f4db944 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 DIST gcc-13.2.0-patches-14.tar.xz 46928 BLAKE2B fce23bc5315f35b04a4976550c4b44578944a1b17e40c7553351eeb8a1ef0f3a2538da5a5e1ae6f37b784ff11bbd8a44b8f6eec542be63e34d984dee69e1cd81 SHA512 d7d52bb2915fd89c06b0134bede8db939cadbb1f2dcddf923bee2c3f9f577ff9e5e986b60420d892539edf82867a0d1bd635807814bc618b06a2b37cdaca893a DIST gcc-13.2.0-patches-16.tar.xz 44792 BLAKE2B 0b6b584d68e69685638695596b780249ca0119ad362747a82d886fd10f77ceb05d02e033e906a090c67f44b1977f40df6a95206d81a32dd15e2f5413c6c92496 SHA512 324d9e63d16c35d55edde20de049162c01b0d487b4548d06c49f0da04a761ec255bc5e020cc2e7f60d12f5d129768afdcf7c86a59126f71f388ab375c34be6de @@ -27,18 +31,26 @@ DIST gcc-14-20240622.tar.xz 87978376 BLAKE2B 8fb56057e6a84f941822c58aaee8c7c562a DIST gcc-14-20240713.tar.xz 88005804 BLAKE2B eca74526c29a1080e6801a7db720752fc48c6dbbc5f904b7be7f74070b34a727ddae38ebfb7cb419d3a1717e93e3b9c425f251668473427548ba4eb31cca72b2 SHA512 6ea6b4a20e69a309cdd112001622cfe582d94986636f2084dbddc77cdb2b7e19ace45da0beb09b52d06ba2e0e09369b4db5a24aae6fd2deaeb6bdceb4d467198 DIST gcc-14-20240720.tar.xz 88005248 BLAKE2B 9d0d3b8806e81660e66982fbda4efc3ea0611cede296f421c7a2769ba4c555ab08730320046f7b84f0d094ceb214c8c22610bd7389c7d93a226c47ea29f32ddf SHA512 b436057f3e17f86c0562000780271e1b848dfcf2b540d7ec0a12b235ea3327c1a577fc22c279808e55ad1a57fa1e6361f73374f71c451973123b87efd991bfe4 DIST gcc-14-20240727.tar.xz 88051096 BLAKE2B bb447e728275539688ba19d1f50c4f4936ffc162a3670718f9b0ce0bc906c6d32cc950dc6277cc559459838dec0f98bb09a1274e4aa28733eb2bb0353a6a9d64 SHA512 dafc1ebce15d37a8bcadbf05b09d74114e85223be29ccbe8fb3c37bdad2a9e17a7150cf18110cd201c1a02203da51eba4cfc55ddb3d7ff4131b7dd4f90c9a375 +DIST gcc-14-20240803.tar.xz 88016412 BLAKE2B 60301ac6acec9cea3001fda41e0dd10f6698cf0897e84750b28421c6425d28a2acfde8978a285052e44b54fc2244a181ed4430510df5920b8a94319727a5f19b SHA512 e9013bbbef39f67fcc63c9394513be43038f2fc5eebd098be3e5b90eb43bf8f2baf3ce72df1fe72ef2c327dffa103a4e1588c3c137944f7d602fb09498851328 +DIST gcc-14-20240810.tar.xz 88012840 BLAKE2B 85f6513f4f4a001894fc22df6c53ce20d6af547191478d429da152f163406c6b320599445a58bef1e79bcacaae56b6bebab9bc9762a75c82bf65dd502e4e7048 SHA512 2b1fde696c9e97a15e9b3550145c74d031d6ad667ac62b51c11bc9e111caf229c6fc4530a18d876d31ab7554fc51263944b8c0182533b1e9275132ec6ce87887 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.1.0-patches-3.tar.xz 11868 BLAKE2B 06d079766bfbaddd066cd70f2d3f5e9ef17f3617fe90de4cb0a9562e6c3b2dc46d94dce03649f2e530c21e3fa0e0e6e5aae3c7b768bd08717c4f29ff29b00a04 SHA512 636a2853b5bf057fef262d54bcb250f3ebf63c600bc184cfea499783d254c462f6c0ecf5f0c5dac6634110ba0d11193fbfb96850ac27fc5a318f1d810f2231cc DIST gcc-14.1.0-patches-4.tar.xz 11620 BLAKE2B c819fbdea1f3bf10c8d4214d4c33cf28c1410171d2833b6f8c1225eeefe749ddb815067b3fdb750e5839761aee8d39ffc51ffb492f88e630076818a61b18362b SHA512 0d6e1b04591607dfc8022124b186ce499467c32db7667ee1a640fe2e07706597edc0e4ad5c7ebcb75c8f5fc6e45e9b9ef715402c71ff9ab21fe380007fe5d84f DIST gcc-14.2.0-RC-20240723.tar.xz 92320472 BLAKE2B 1003e19e65b9b3093193b5eb9997236ce445cca65c701111268b5c14b8cdde5b22f74556eb30698ae8646114558539874934ff0794d73f4083425c2867989dd9 SHA512 b3ead9ea661f07606225cc0053054f9f8a1267b0b476a86168a3524ea36c623b87c4ebefdbb95a01172b267cdf387cf909f8a9fa7dfaa1e754ca3dba1267c859 +DIST gcc-14.2.0-RC-20240729.tar.xz 92329476 BLAKE2B 3e12182547927360af0791147422b9b1176e7bfcbd82ba0958b426e3c355876a78ef2b8ead2ff08aa399a1d8c4f8123d11ea21bde2a1a0ef30332b8b5837a7b0 SHA512 9a94325087a6b6c584011853150aea1a8ac775ccb6c77eb55239bd92cfbcbfb5b9e873387f0d31a1fcdbfd80530febdea5caeaae676780b97539aeaef5dbeb26 +DIST gcc-14.2.0.tar.xz 92306460 BLAKE2B 87baf2a06dfa75d8fb6cd62c747ef1f57d3b9bbbe33a360d9ed3de4b4dbeaa8d920504c67e409bd9863414202c14fd854b46108e984418171205119216d03d3b SHA512 932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396 DIST gcc-15-20240714.tar.xz 88493908 BLAKE2B d11436fcbdf3c106e3de706514d4a48a33255ab1ac03d1ae25531415dc418007f391d92a502e12ab6ed31f573431cafdbbc97d153d7481b7455e380582f4518b SHA512 e2b9f3765002b670a1cc3be88e0e99ce710fe9cc1fa06d43026bbb2e2795c9955b0283a1a18d32311e82dc28efe6c67a93c1fd7ad5ffeef18f260c6aa69cab6a DIST gcc-15-20240721.tar.xz 88534600 BLAKE2B c057709e193fafa22cc753805e48cf092e0e3c29b656265b1f51e1e84d3d1b5bc07e0633b87e952199d3a885ce981bbecf07a9f00355c43aaad71c6f62250f54 SHA512 c689893f16ec88643854b53e3cc6e8ff49d44d7a4840f95b31aa5f82567c70a080651cc9e5cbaa19b7b099ea52687cfbd88fc1771e52f3c3cd1fe84048060955 DIST gcc-15-20240728.tar.xz 88642832 BLAKE2B 388c921b90ff71c0aa3313479bef9c39e53ba4a4b772ef21975c60451fe9beb7d49cb8ff9c3b14aace2976b528bf70e98c6af71c1cd9f6d6c8c8a4820159a6de SHA512 a8ae49eb8a831e0e3fd01b6933318a7c44002cc3cf8b3b157b39ea9a3db933b5feed183ead02181425540294c08d5e36a7bf1e012011fe1b9289f3cb03e75811 +DIST gcc-15-20240804.tar.xz 89247584 BLAKE2B b49c828234a0b4cb35b0dcb7c2bfdc8d7c3d311f86f3db0acaefa81e57c3537d1ba9d32cd7fe2c7c53e2a019644fe2893aa9f69fa34c8c7af9053ba5c675ac26 SHA512 3db9bedd42fab2022532490acb7f3931976e500b7c4a3e93c226b68b7df0228d8489b80268273c9216c4bda12991bb07339c646982499761a39ba3fa54b45f29 +DIST gcc-15-20240811.tar.xz 89363444 BLAKE2B eaa29844fe0fb62f3772904a5e2598541dcc78959006400f7fca5663f0ee3b6452e4aa77d46e627182b827da0a4e0e57b659db7a2a23f63219cf75785b73b3c9 SHA512 a8e169ba90168a481ea865f340b6f165dc538022b0ac814f43b80fca33eb7772001f6dd22fcb8a3f056cfacd023a21581bec5da71626860fcbc858ad573d5c39 DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de DIST gcc-15.0.0-patches-4.tar.xz 11440 BLAKE2B 8b7379f91ac14dd1e496de744d221cb0ba1802c14ce32cb90e6311ca7a60cbaf488a57060673e2e9d407eed6d3c5b092c1ba6da27036d35e0c78a7ac8a5f5ec4 SHA512 92e8895ec1c6054b46581867f3e49bd2d574043ae82ca441e2b48d9ed0e2dd5c58baa53ba605ce59a5c1d59473ac0d79c0287e5b47d06f0a661c655a19a4a5df DIST gcc-15.0.0-patches-5.tar.xz 11840 BLAKE2B 9af335f7e1795e600eae742ac32f5ff737f157aaa35902227ba29b28013c95bcf5b2b1345a21c433bc10f4cfbfc267a595b6ca90ec2723f7f24fccac3f7c0355 SHA512 8cc8ec574640470780711bb5f6163f382c23999152c229d86e1143e03275a3147bd1fc0cd9bf3642a2402333ec565d30b90a6e367284b78ccc580c6721aeac23 DIST gcc-15.0.0-patches-6.tar.xz 11588 BLAKE2B 7846d77859b297a892a23b995c9aa06410c484a8f6e11fa9c9692de0f1b0a03aa1f35c4b88f164623a600bf2012fff25567075203c57fdbcb26bbc95f94d1cf9 SHA512 837ed8b5f6901715862951726e85eea043aec192f854db23201326fd6bedb7552c95527d253736c0164153b75ec487b4644fd269f9f6815b4489416602ebfe78 DIST gcc-15.0.0-patches-7.tar.xz 12928 BLAKE2B 4f46a2c2fbdd714bebfce85bad8e80fa7d3939f83ddbc279f20f448bfe17c33c6fe94a21a82a5c9efae619ceaf50dc5ac339850373e05c6556cc65c72cef812c SHA512 c3e756cefd205c818856cb4c17d15194267c566d4758f2f4a2bf3ccb1cf00151286c10a7b2c36bede7a5f27d5a482f9489545078bcf45d55d28e3e67a694f6d6 +DIST gcc-15.0.0-patches-8.tar.xz 12816 BLAKE2B 65ff806b649efd50f679a921fe3d71ae9a4cabf73a997e50a4923edd7305e1f89b5951e7a34452778697e7e12274e044640684bab45533ec5b6fe0d44057da4a SHA512 240a6cf1852ec24f3cc2281a467448d0a72dd497ee9f636f36d00b264be53f616efb3e9786aff201d38551f0b05e9abd8198fccb3b0a8af31de6743c96b2d9a8 +DIST gcc-15.0.0-patches-9.tar.xz 11976 BLAKE2B 736ceeaf473d9004087bfd686588744af1cee40fdadf89358f2ff7caff623de7bfc5c95863af9dd23d2e2bb80e94f9f4a8cbc389f954e1d63e9cac0e747a59bd SHA512 64d528c5d1c5dc45ba8ecb7f9ed5e8a0a7f8344535de11489402ee766595b2e9f4b7192bb0f96ce4c9318635893101d4f5699351fca4121c65708626bfa0867b DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6 DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8 DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240801.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240801.ebuild new file mode 100644 index 0000000000..e645c4d53b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240801.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240808.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240808.ebuild new file mode 100644 index 0000000000..e645c4d53b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20240808.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="12.3.0" +PATCH_VER="3" +MUSL_VER="1" +MUSL_GCC_VER="12.3.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240802.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240802.ebuild new file mode 100644 index 0000000000..bb142a8fd1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240802.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +MUSL_GCC_VER="13.2.0" +PATCH_VER="18" +MUSL_VER="2" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240809.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240809.ebuild new file mode 100644 index 0000000000..bb142a8fd1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20240809.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="13.2.0" +MUSL_GCC_VER="13.2.0" +PATCH_VER="18" +MUSL_VER="2" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ ${PV} == *.9999 ]] ; then + MY_PV_2=$(ver_cut 2) + MY_PV_3=1 + if [[ ${MY_PV_2} == 0 ]] ; then + MY_PV_2=0 + MY_PV_3=0 + else + MY_PV_2=$((${MY_PV_2} - 1)) + fi + + # e.g. 12.2.9999 -> 12.1.1 + TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3} +elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.1.1_p20240729.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.1.1_p20240729.ebuild new file mode 100644 index 0000000000..5dbd6fa364 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.1.1_p20240729.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +TOOLCHAIN_GCC_RC=1 +PATCH_GCC_VER="14.1.0" +PATCH_VER="4" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.0.ebuild new file mode 100644 index 0000000000..6e09c541c2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.1.0" +PATCH_VER="4" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240803.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240803.ebuild new file mode 100644 index 0000000000..a4285b216d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240803.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.1.0" +PATCH_VER="4" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240810.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240810.ebuild new file mode 100644 index 0000000000..a4285b216d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20240810.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="14.1.0" +PATCH_VER="4" +MUSL_VER="1" +MUSL_GCC_VER="14.1.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=releases/gcc-$(ver_cut 1) +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # m68k doesnt build (ICE, bug 932733) + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.1.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.3.9999.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.1.9999.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.3.9999.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240804.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240804.ebuild new file mode 100644 index 0000000000..67cdb93cf2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240804.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="15.0.0" +PATCH_VER="8" +MUSL_VER="2" +MUSL_GCC_VER="15.0.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240811.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240811.ebuild new file mode 100644 index 0000000000..42d11e2113 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20240811.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TOOLCHAIN_PATCH_DEV="sam" +PATCH_GCC_VER="15.0.0" +PATCH_VER="9" +MUSL_VER="2" +MUSL_GCC_VER="15.0.0" +PYTHON_COMPAT=( python3_{10..12} ) + +if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then + # Cheesy hack for RCs + MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5) + MY_P=${PN}-${MY_PV} + GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz" + TOOLCHAIN_SET_S=no + S="${WORKDIR}"/${MY_P} +fi + +inherit toolchain + +if tc_is_live ; then + # Needs to be after inherit (for now?), bug #830908 + EGIT_BRANCH=master +elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then + # Don't keyword live ebuilds + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + :; +fi + +if [[ ${CATEGORY} != cross-* ]] ; then + # Technically only if USE=hardened *too* right now, but no point in complicating it further. + # If GCC is enabling CET by default, we need glibc to be built with support for it. + # bug #830454 + RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )" + DEPEND="${RDEPEND}" +fi + +src_prepare() { + local p upstreamed_patches=( + # add them here + ) + for p in "${upstreamed_patches[@]}"; do + rm -v "${WORKDIR}/patch/${p}" || die + done + + toolchain_src_prepare + + eapply_user +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild index 0fe0ac94b9..432b2b58e3 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild @@ -35,7 +35,7 @@ HOMEPAGE="https://btrfs.readthedocs.io/en/latest/" LICENSE="GPL-2" SLOT="0/0" # libbtrfs soname -IUSE="+convert +man reiserfs static static-libs udev +zstd" +IUSE="+convert +man experimental reiserfs static static-libs udev +zstd" # Could support it with just !systemd => eudev, see mdadm, but let's # see if someone asks for it first. REQUIRED_USE="static? ( !udev )" @@ -131,7 +131,7 @@ src_configure() { --bindir="${EPREFIX}"/sbin --enable-lzo - --disable-experimental + $(use_enable experimental) --disable-python $(use_enable convert) $(use_enable man documentation) @@ -171,6 +171,11 @@ src_install() { emake V=1 DESTDIR="${D}" install "${makeargs[@]}" + if use experimental; then + exeinto /sbin + doexe btrfs-corrupt-block + fi + newbashcomp btrfs-completion btrfs } diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/metadata.xml index e0d9388ce7..9bd0c43c58 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/metadata.xml @@ -7,6 +7,7 @@ Build ext2 conversion utility (btrfs-convert) + Enable unstable and experimental features and install btrfs-corrupt-block, as needed by xfstests Enable reiserfs support in btrfs-convert tool. Build static binaries in addition to the dynamic ones diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch b/sdk_container/src/third_party/portage-stable/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch new file mode 100644 index 0000000000..5c8e0fdbb4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/quota/files/quota-4.09-fix-building-on-musl.patch @@ -0,0 +1,187 @@ +https://sourceforge.net/p/linuxquota/code/ci/e73c5b48e12c3f02e532864a1107cdc8a4feafc3/ +From: Brahmajit Das +Date: Sun, 14 Jul 2024 07:58:50 +0000 +Subject: [PATCH 1/1] Fix building on musl + +basename(3) is defined in libgen.h in MUSL. Include libgen.h where +basename(3) is used. + +Signed-off-by: Brahmajit Das +Signed-off-by: Jan Kara +--- a/convertquota.c ++++ b/convertquota.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #include + +--- a/edquota.c ++++ b/edquota.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "pot.h" + #include "quotaops.h" +@@ -38,7 +39,7 @@ char *progname; + static int flags, quotatype; + static int fmt = -1; + static char *protoname; +-static char *dirname; ++static char *dir_name; + + static void usage(void) + { +@@ -138,7 +139,7 @@ static int parse_options(int argc, char **argv) + exit(1); + break; + case 'f': +- dirname = optarg; ++ dir_name = optarg; + break; + case 256: + flags |= FL_NUMNAMES; +@@ -176,7 +177,7 @@ static void copy_prototype(int argc, char **argv, struct quota_handle **handles) + protoprivs = getprivs(protoid, handles, 0); + while (argc-- > 0) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s\n"), *argv); + argv++; +@@ -223,7 +224,7 @@ int main(int argc, char **argv) + argv += ret; + + init_kernel_interface(); +- handles = create_handle_list(dirname ? 1 : 0, dirname ? &dirname : NULL, quotatype, fmt, ++ handles = create_handle_list(dir_name ? 1 : 0, dir_name ? &dir_name : NULL, quotatype, fmt, + (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS, + (flags & FL_REMOTE) ? 0 : MS_LOCALONLY); + if (!handles[0]) { +@@ -296,7 +297,7 @@ int main(int argc, char **argv) + else { + for (; argc > 0; argc--, argv++) { + id = name2id(*argv, quotatype, !!(flags & FL_NUMNAMES), NULL); +- curprivs = getprivs(id, handles, !dirname); ++ curprivs = getprivs(id, handles, !dir_name); + if (!curprivs) + die(1, _("Cannot get quota information for user %s.\n"), *argv); + if (flags & FL_EDIT_TIMES) { +--- a/quota.c ++++ b/quota.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #ifdef RPC + #include + #include "rquota.h" +--- a/quota_nld.c ++++ b/quota_nld.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + +--- a/quotacheck.c ++++ b/quotacheck.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #include + #include +--- a/quotaon.c ++++ b/quotaon.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "quotaon.h" + #include "quota.h" +--- a/quotastats.c ++++ b/quotastats.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "pot.h" + #include "common.h" +--- a/quotasync.c ++++ b/quotasync.c +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include "pot.h" + #include "common.h" +--- a/repquota.c ++++ b/repquota.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "pot.h" + #include "common.h" +--- a/rquota_svc.c ++++ b/rquota_svc.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #ifdef HOSTS_ACCESS + #include + #include +--- a/setquota.c ++++ b/setquota.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #if defined(RPC) + #include "rquota.h" +--- a/warnquota.c ++++ b/warnquota.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_NL_LANGINFO + #include + #endif +--- a/xqmstats.c ++++ b/xqmstats.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include "common.h" + #include "pot.h" + +-- +2.45.2 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/quota/quota-4.09-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/quota/quota-4.09-r1.ebuild new file mode 100644 index 0000000000..10e3bf5b8c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/quota/quota-4.09-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Linux quota tools" +HOMEPAGE="https://sourceforge.net/projects/linuxquota/" +SRC_URI="https://downloads.sourceforge.net/linuxquota/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="ldap netlink nls rpc selinux tcpd" + +RDEPEND=" + sys-fs/e2fsprogs + ldap? ( >=net-nds/openldap-2.3.35:= ) + netlink? ( + sys-apps/dbus + dev-libs/libnl:3 + ) + rpc? ( + elibc_glibc? ( sys-libs/glibc[-rpc(-)] ) + net-libs/libtirpc:= + net-libs/rpcsvc-proto + ) + tcpd? ( sys-apps/tcp-wrappers ) +" +DEPEND="${RDEPEND}" +BDEPEND="nls? ( sys-devel/gettext )" +PDEPEND="rpc? ( net-nds/rpcbind )" +RDEPEND+=" selinux? ( sec-policy/selinux-quota )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.09-configure-bashism.patch + "${FILESDIR}"/${PN}-4.09-gettext-version.patch + "${FILESDIR}"/${PN}-4.09-fix-building-on-musl.patch +) + +src_prepare() { + default + + # Only needed for bashism patch and stale macros patch + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-ext2direct + $(use_enable nls) + $(use_enable ldap ldapmail) + $(use_enable netlink) + $(use_enable rpc) + $(use_enable rpc rpcsetquota) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc doc/* README.* Changelog + + insinto /etc + insopts -m0644 + doins warnquota.conf quotatab + + newinitd "${FILESDIR}"/quota.rc7 quota + newconfd "${FILESDIR}"/quota.confd quota + + if use rpc ; then + newinitd "${FILESDIR}"/rpc.rquotad.initd rpc.rquotad + fi + + if use ldap ; then + insinto /etc/openldap/schema + insopts -m0644 + doins "${FILESDIR}"/ldap-scripts/quota.schema + + exeinto /usr/share/quota/ldap-scripts + doexe "${FILESDIR}"/ldap-scripts/*.pl + doexe "${FILESDIR}"/ldap-scripts/edquota_editor + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/Manifest index 6e4c6cbd42..99794d263e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/Manifest @@ -8,3 +8,5 @@ DIST zfs-2.2.3.tar.gz 33854765 BLAKE2B f83439aa929609191a048dd326b2a15e0f57c72d2 DIST zfs-2.2.3.tar.gz.asc 836 BLAKE2B 86e1adc393d1f4643a6fd8c188b555e9dc0fdf7e25690f37ff0a04ff8826eb4fe3c125b54f0c5b9ab33f1daff43c4b44373ee9a4df506f6714f98d77782e6c3c SHA512 fe23ddb9bde78416776411d66a56aa662fa051c8544b4be01ba238b8c1a85ccde1c55329f228fe8ab2681b54a4e4cb08d4e927c597c117242f0b536a40921dc9 DIST zfs-2.2.4.tar.gz 33882933 BLAKE2B f0026a12b7c1252bf8941e39f23d3e165750034707dfddf034d8aac942a749cb7f0108478797ca978704a22743d9928240b29cf78fe89eda9f873f40102413f0 SHA512 1d17e30573d594fb5c9ea77cde104616dca362fed7530296816d1b55173594f66170fcfb23ab57c27074f85b79d3eb557b4ee9a1c420e507b2434a7902d8dcc1 DIST zfs-2.2.4.tar.gz.asc 836 BLAKE2B 7fde4232c25056eac2fae76abec4d6749c91d285d79ae6dce4ae4880fa90a26c9fb370dfa4daaf8a849f30fcc1b63eeb215444bfca724f6750bf7e4344f35fa7 SHA512 0cb3caf01b9e4d1f0c35d9f7933a4b11560b9bbf6c05494d8a1775b0a52ac1d642aebd77ef1c7b23a0a06f92e2b1ab3d8afacce41017eb07745d148af7f76a17 +DIST zfs-2.2.5.tar.gz 33896824 BLAKE2B ec73c866bf931e4af63a35b3e61e1254d681d21aadba304ea95c147a3911c3d92db686591147036848ceae1683f31f6f81e04a24df6cb11a91a8abaed179567f SHA512 8e288620ce78fb235fa0c9929fc97150987a64091a8a5209209f1e0975d4d6213b8b307e32b3c89d934e83dc8468a1998b797fcdff5bbbbd023f07674877b0c6 +DIST zfs-2.2.5.tar.gz.asc 836 BLAKE2B ae6e47ce82ffda8834047e03f361ca096448f98ea811a09c0c68b202996c613e6524501cda49873acc4bca9f60c298635f89e5d7fe8f00ffa05b192fc98e16ef SHA512 0a397471c3f1ee9675eb9fcd589409c5085f8692930275ea15d92042fadaf1d3772666a3cca5adb1730c953464e0ec00f501cc5333a303d322c636020c2a7060 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.2.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.2.5.ebuild new file mode 100644 index 0000000000..bf0cdfe58b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.2.5.ebuild @@ -0,0 +1,207 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_INITRAMFS_IUSE=+initramfs +inherit autotools flag-o-matic linux-mod-r1 multiprocessing + +DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs" +HOMEPAGE="https://github.com/openzfs/zfs" + +MODULES_KERNEL_MAX=6.9 +MODULES_KERNEL_MIN=3.10 + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openzfs/zfs.git" + inherit git-r3 + unset MODULES_KERNEL_MAX +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc + inherit verify-sig + + MY_PV=${PV/_rc/-rc} + SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz" + SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )" + S="${WORKDIR}/zfs-${MY_PV}" + + ZFS_KERNEL_COMPAT="${MODULES_KERNEL_MAX}" + # Increments minor eg 5.14 -> 5.15, and still supports override. + ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}" + ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))" + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc" + fi +fi + +LICENSE="CDDL MIT debug? ( GPL-2+ )" +SLOT="0/${PVR}" +IUSE="custom-cflags debug +rootfs" +RESTRICT="test" + +BDEPEND=" + app-alternatives/awk + dev-lang/perl +" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" + + IUSE+=" +dist-kernel-cap" + RDEPEND=" + dist-kernel-cap? ( dist-kernel? ( + " + eerror " Block devices --->" + eerror " [X] Loopback device support" + fi + fi + fi + fi +} + +libsoversion_check() { + local bugurl libzfs_sover + bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages" + + libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \ + | grep -Eo '[0-9]+:[0-9]+:[0-9]+')" + libzfs_sover="${libzfs_sover%%:*}" + + if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then + echo + eerror "BUG BUG BUG BUG BUG BUG BUG BUG" + eerror "ebuild subslot does not match libzfs soversion!" + eerror "libzfs soversion: ${libzfs_sover}" + eerror "ebuild value: $(ver_cut 2 ${SLOT})" + eerror "This is a bug in the ebuild, please use the following URL to report it" + eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot" + echo + # we want to abort for releases, but just print a warning for live ebuild + # to keep package installable + [[ ${PV} == "9999" ]] || die + fi +} + +src_prepare() { + default + libsoversion_check + + # Run unconditionally (bug #792627) + eautoreconf + + if [[ ${PV} != "9999" ]]; then + # Set revision number + sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release" + fi + + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_prepare + popd >/dev/null || die + fi + + # Tries to use /etc/conf.d which we reserve for OpenRC + sed -i -e '/EnvironmentFile/d' etc/systemd/system/zfs*.in || die + + # prevent errors showing up on zfs-mount stop, #647688 + # openrc will unmount all filesystems anyway. + sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" "etc/default/zfs.in" || die +} + +src_configure() { + use custom-cflags || strip-flags + use minimal || python_setup + + local myconf=( + --bindir="${EPREFIX}/bin" + --enable-shared + --enable-sysvinit + --localstatedir="${EPREFIX}/var" + --sbindir="${EPREFIX}/sbin" + --with-config=user + --with-dracutdir="${EPREFIX}/usr/lib/dracut" + --with-linux="${KV_DIR}" + --with-linux-obj="${KV_OUT_DIR}" + --with-udevdir="$(get_udevdir)" + --with-pamconfigsdir="${EPREFIX}/unwanted_files" + --with-pammoduledir="$(getpam_mod_dir)" + --with-systemdunitdir="$(systemd_get_systemunitdir)" + --with-systemdpresetdir="$(systemd_get_systempresetdir)" + --with-vendor=gentoo + # Building zfs-mount-generator.c on musl breaks as strndupa + # isn't available. But systemd doesn't support musl anyway, so + # just disable building it. + # UPDATE: it has been fixed since, + # https://github.com/openzfs/zfs/commit/1f19826c9ac85835cbde61a7439d9d1fefe43a4a + # but we still leave it as this for now. + $(use_enable !elibc_musl systemd) + $(use_enable debug) + $(use_enable nls) + $(use_enable pam) + $(use_enable python pyzfs) + $(use_with unwind libunwind) + --disable-static + $(usex minimal --without-python --with-python="${EPYTHON}") + ) + + econf "${myconf[@]}" +} + +src_compile() { + default + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_compile + popd >/dev/null || die + fi +} + +src_install() { + default + + gen_usr_ldscript -a nvpair uutil zfsbootenv zfs zfs_core zpool + + use pam && { rm -rv "${ED}/unwanted_files" || die ; } + + use test-suite || { rm -r "${ED}"/usr/share/zfs/{test-runner,zfs-tests,runfiles,*sh} || die ; } + + find "${ED}" -name '*.la' -delete || die + + dobashcomp contrib/bash_completion.d/zfs + bashcomp_alias zfs zpool + + # strip executable bit from conf.d file + fperms 0644 /etc/conf.d/zfs + + if use python; then + pushd contrib/pyzfs >/dev/null || die + distutils-r1_src_install + popd >/dev/null || die + fi + + # enforce best available python implementation + use minimal || python_fix_shebang "${ED}/bin" +} + +pkg_postinst() { + udev_reload + + # we always need userspace utils in sync with zfs-kmod + # so force initrd update for userspace as well, to avoid + # situation when zfs-kmod trigger initrd rebuild before + # userspace component is rebuilt + # KV_* variables are provided by linux-info.eclass + if [[ -z ${ROOT} ]] && use dist-kernel; then + dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}" + fi + + if use rootfs; then + if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then + elog "Root on zfs requires an initramfs to boot" + elog "The following packages provide one and are tested on a regular basis:" + elog " sys-kernel/dracut ( preferred, module maintained by zfs developers )" + elog " sys-kernel/genkernel" + fi + fi + + if systemd_is_booted || has_version sys-apps/systemd; then + einfo "Please refer to ${EROOT}/$(systemd_get_systempresetdir)/50-zfs.preset" + einfo "for default zfs systemd service configuration" + else + [[ -e "${EROOT}/etc/runlevels/boot/zfs-import" ]] || \ + einfo "You should add zfs-import to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/boot/zfs-load-key" ]] || \ + einfo "You should add zfs-load-key to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ]]|| \ + einfo "You should add zfs-mount to the boot runlevel." + [[ -e "${EROOT}/etc/runlevels/default/zfs-share" ]] || \ + einfo "You should add zfs-share to the default runlevel." + [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \ + einfo "You should add zfs-zed to the default runlevel." + fi +} + +pkg_postrm() { + udev_reload +} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-9999.ebuild index 7b38a676be..d54b8ffe39 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-9999.ebuild @@ -34,7 +34,7 @@ LICENSE="BSD-2 CDDL MIT" # possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. # see libsoversion_check() below as well SLOT="0/5" -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs selinux test-suite" +IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs selinux test-suite unwind" DEPEND=" dev-libs/openssl:= @@ -47,6 +47,7 @@ DEPEND=" python? ( $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') ) + unwind? ( sys-libs/libunwind:= ) " BDEPEND=" @@ -220,6 +221,7 @@ src_configure() { $(use_enable nls) $(use_enable pam) $(use_enable python pyzfs) + $(use_with unwind libunwind) --disable-static $(usex minimal --without-python --with-python="${EPYTHON}") ) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest index 9de4b9a846..369104ad39 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest @@ -17,3 +17,5 @@ DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba DIST binutils-2.42-patches-3.tar.xz 34768 BLAKE2B e4bfaf3b42147408a8a3dcb00f50378a6b49aef8e939731a92598680cfbf42dfdf842c3f5bf3458867f79c534eb92385bc64f34f7b1d6462ec4182b5f424fbe5 SHA512 3d75e0684bbfa2cc3fc6dfcb5488ac571db58f1a5833fcc754f231664137001ccb0f2ec750947b8021fa12daf614eb2cd21b598bd962d71a34bb8ea38805850d DIST binutils-2.42-patches-6.tar.xz 50664 BLAKE2B f13b65a761cfba80caf2e4740c6383b40305558365b950fba22aca95a104e799e8bd476082f36fb9288de4f224b09f317792c1444e549c40d15a4b64cdf61989 SHA512 1203eca0a9e622411eac377509de8fd0db3ffcb282ac38ab7a0369b166cc1091197daad85b51b145b34a4832f1a1a4d573c8254e8d67aeb22f35adb1ab3ece1f DIST binutils-2.42.tar.xz 27567160 BLAKE2B e67a5c028fba70e70088fd11b38ec8c9c4ed5a019badefda25abeb6275997b16f0891e7ff3424c4b82bbfae92e8992669826920dd53df61cd48469d8f7cd5bd1 SHA512 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6 +DIST binutils-2.43-patches-1.tar.xz 11644 BLAKE2B 578ee67c3c5e67f9191a31a5c83ffcc781f757f8aaee3eea14d052db427cdd2bc769977dba16e9a8c653dcc4a94f11c149898683945d5035d0beeac128045b1a SHA512 e6db4eaf4fbea366e607a7e9a56e20851fcc34664532fd6aa1f0818271c3e2687eada3daca482e211a2b3e36be85e7e0b23158caaa0fdf9785d13a9156e8c734 +DIST binutils-2.43.tar.xz 28175768 BLAKE2B 28b0a04a28273b76eab2d00e00160be889f155f77f5a9d8759ef8dce505c97e97641bf7ec70b92b731b520570a02b06e04e8215b068fcb1bb2573e9ef24732d9 SHA512 93e063163e54d6a6ee2bd48dc754270bf757a3635b49a702ed6b310e929e94063958512d191e66beaf44275f7ea60865dbde138b624626739679fcc306b133bb diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.43.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.43.ebuild new file mode 100644 index 0000000000..5a95c53b9f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.43.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCH_VER=1 +PATCH_DEV=dilfridge + +inherit flag-o-matic libtool toolchain-funcs multilib-minimal + +MY_PN="binutils" +MY_P="${MY_PN}-${PV}" +PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} +PATCH_DEV=${PATCH_DEV:-dilfridge} + +DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages" +HOMEPAGE="https://sourceware.org/binutils/" +SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + +LICENSE="|| ( GPL-3 LGPL-3 )" + +SLOT="0/${PV%_p?}.0" + +IUSE="64-bit-bfd cet multitarget nls static-libs test" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +RESTRICT="!test? ( test )" + +BDEPEND=" + nls? ( sys-devel/gettext ) + test? ( dev-util/dejagnu ) +" +DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]" +# Need a newer binutils-config that'll reset include/lib symlinks for us. +RDEPEND="${DEPEND} + >=sys-devel/binutils-config-5 +" + +S="${WORKDIR}/${MY_P%_p?}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/bfd.h +) + +src_prepare() { + if [[ -n ${PATCH_VER} ]] ; then + einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" + eapply "${WORKDIR}/patch"/*.patch + fi + + # Fix cross-compile relinking issue, bug #626402 + elibtoolize + + if [[ ${CHOST} == *-darwin* ]] ; then + # somehow libtool/configure is messed up and (custom patch at + # upstream?) and misdetects (basically assumes) nm can be called + # with -B arg -- can't run eautoreconf (fails), so patch up + # manually, this would break any target that needs -B to nm + sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \ + libctf/configure || die + fi + + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html + # Avoid really confusing logs from subconfigure spam, makes logs far + # more legible. + export MAKEOPTS="--output-sync=line ${MAKEOPTS}" + + default +} + +pkgversion() { + printf "Gentoo ${PVR}" + [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}" +} + +multilib_src_configure() { + filter-lto + + # Workaround for lld-17 (bug #914640) + # Should be able to drop this w/ >=binutils-2.43 + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + local myconf=( + # portage's econf() does not detect presence of --d-d-t + # because it greps only top-level ./configure. But not + # libiberty's or bfd's configure. + --disable-dependency-tracking + --disable-silent-rules + --enable-obsolete + --enable-shared + --enable-threads + # Newer versions (>=2.24) make this an explicit option. #497268 + --enable-install-libiberty + --disable-werror + --with-bugurl="https://bugs.gentoo.org/" + --with-pkgversion="$(pkgversion)" + $(use_enable static-libs static) + # The binutils eclass enables this flag for all bi-arch builds, + # but other tools often don't care about that support. Put it + # beyond a flag if people really want it, but otherwise leave + # it disabled as it can slow things down on 32bit arches. #438522 + $(use_enable 64-bit-bfd) + # This only disables building in the zlib subdir. + # For binutils itself, it'll use the system version. #591516 + --without-zlib + --with-system-zlib + # We only care about the libs, so disable programs. #528088 + --disable-{binutils,etc,ld,gas,gold,gprof,gprofng} + # Disable modules that are in a combined binutils/gdb tree. #490566 + --disable-{gdb,libdecnumber,readline,sim} + # Strip out broken static link flags. + # https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # We pull in all USE-flags that change ABI in an incompatible + # way. #666100 + # USE=multitarget change size of global arrays + # USE=64-bit-bfd changes data structures of exported API + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def) + + # avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + # Revisit if it's useful, we do have binutils[zstd] though + --without-zstd + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + use nls \ + && myconf+=( --without-included-gettext ) \ + || myconf+=( --disable-nls ) + + if [[ ${CHOST} == *-darwin* ]] && use nls ; then + # fix underlinking in opcodes + sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \ + "${S}"/opcodes/Makefile.in || die + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" + + # Prevent makeinfo from running as we don't build docs here. + # bug #622652 + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + # Provided by dev-debug/gdb instead + rm "${ED}"/usr/share/info/sframe-spec.info || die + + # Provide libiberty.h directly. + dosym libiberty/libiberty.h /usr/include/libiberty.h +} + +multilib_src_install_all() { + use static-libs || find "${ED}"/usr -name '*.la' -delete +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/Manifest index 70de2f8e53..afd23f75ab 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/Manifest @@ -1 +1,2 @@ DIST efivar-38.tar.bz2 320221 BLAKE2B 0b96f3d71ddc2246e6a11a5cd32af3d007823c4a283186a428c3f145cd74425a31bd22c4671ad1ab252a3c572991bb1698381cb8bdf51efcbebd62befdc6c070 SHA512 c2f17297c863ece134a9dd758d237fd2df8c8d072f87af1d0bf2bcf9acfc7a53c25597f03fd4fb8cc664b205743d4ffa0ef1b068d0f73c58fa573d40993f3155 +DIST efivar-39.tar.gz 463349 BLAKE2B 73ea4b3293cd708923bcd4332a8c7a5a8bbf539d81300c502a764a2ac205ba7cdf1e30b3432c42a101f56c0b6e31af2907a6a38ada69ace3b0d60e90515094cd SHA512 04493c30efbfc2773abac9a3dd93aa13403c05e29e3bfc72877d2054930811fae99119aadcb1729b6ca85abf5a24db786ea0c27c16d5458ef1b19e74696f5ff7 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39.ebuild new file mode 100644 index 0000000000..a88ff714f2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39.ebuild @@ -0,0 +1,70 @@ +# Copyright 2014-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Tools and library to manipulate EFI variables" +HOMEPAGE="https://github.com/rhboot/efivar" +SRC_URI="https://github.com/rhboot/efivar/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc64 ~riscv ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + app-text/mandoc + test? ( sys-boot/grub:2 ) +" +RDEPEND=" + dev-libs/popt +" +DEPEND="${RDEPEND} + >=sys-kernel/linux-headers-3.18 + virtual/pkgconfig +" + +src_prepare() { + local PATCHES=( + # Rejected upstream, keep this for ia64 support + "${FILESDIR}"/efivar-38-ia64-relro.patch + ) + default +} + +src_configure() { + unset CROSS_COMPILE + export COMPILER=$(tc-getCC) + export HOSTCC=$(tc-getBUILD_CC) + + tc-ld-disable-gold + + export libdir="/usr/$(get_libdir)" + + # https://bugs.gentoo.org/562004 + unset LIBS + + # Avoid -Werror + export ERRORS= + + if [[ -n ${GCC_SPECS} ]]; then + # The environment overrides the command line. + GCC_SPECS+=":${S}/src/include/gcc.specs" + fi + + # Used by tests/Makefile + export GRUB_PREFIX=grub +} + +src_compile() { + # HOST_MARCH: https://bugs.gentoo.org/831334 + emake HOST_MARCH= +} + +src_test() { + # https://bugs.gentoo.org/924370 + emake -j1 test +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/metadata.xml index 0a27d363fe..09743f0f89 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/metadata.xml @@ -6,6 +6,6 @@ Mike Gilbert - rhinstaller/efivar + rhboot/efivar diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/Manifest index 568eb32cfd..0058d30532 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/Manifest @@ -1,3 +1,4 @@ +DIST libnvme-1.10.gh.tar.gz 720737 BLAKE2B eb5941cbdec1ccf5782c3e438b55dd09ddd2c3b9ac1079d5642896d0d80d75ece3149ebe9d965c2783a5ae2ddfad64ae0051f9c63822a739108d53eb44a583db SHA512 44e8a407c9fda8c296163832c14ba167caab53eab315bd2dee94275458532429f12a35e0adef1356420d83127e658a354ce65ac946acaa53bef2d46a8189054c DIST libnvme-1.7.1.tar.gz 604220 BLAKE2B b02bf0914be73f5877f418bebdbed31dfb019484fb9f6e169c3474d90306706b8e787003a472f13bedb72e90eff39a30ba35df252a3cdf4ea08a362c3f9e221b SHA512 aea986ae35eafa17482e07015228d5a7d529d41148f4cee9e4619adc2460abb5460d60cd91177462cbcaf2e94e5870026ff9e45548f91d9f90b65a6268eb3abb DIST libnvme-1.8.tar.gz 629032 BLAKE2B cba5215983fa14e485156cf68613a7acca07b7e0fdac41663ebf2246c9f6fd6d1bfcebc7c1457ab4217705769ebea382e85726eb302fd9af6f6b85cec7b2e14d SHA512 ba0cec72fd6c9bb29b29c4342be7b25aec1f31157a094ad387a1105cbd1961ab600e1448a2462d8be2af91d5251b2970d6d06d4871ce96604c5be204d6096bcb DIST libnvme-1.9.tar.gz 657952 BLAKE2B e9d655709770f7c1d9c916cc9539b8ea096b0d5bf6b12079c2db494f070c98b6c388e2a79ed27a4932994a00d44da93fa3119ee224c48d40347a483548397349 SHA512 39a3346805143f93a17d00cfcb6fb75f82154658db6079134c09dfa989995ac5de79b1ce1ac091b4e997523d3216829ce9eac44110c9f59f9fd21636529c8b25 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/libnvme-1.10.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/libnvme-1.10.ebuild new file mode 100644 index 0000000000..1120def010 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libnvme/libnvme-1.10.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit python-r1 meson + +DESCRIPTION="C Library for NVM Express on Linux" +HOMEPAGE="https://github.com/linux-nvme/libnvme" +SRC_URI="https://github.com/linux-nvme/libnvme/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="dbus +json keyutils python ssl test +uuid" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) +" + +DEPEND=" + json? ( dev-libs/json-c:= ) + keyutils? ( sys-apps/keyutils:= ) + dbus? ( sys-apps/dbus:= ) + python? ( ${PYTHON_DEPS} ) + ssl? ( >=dev-libs/openssl-1.1:= ) + uuid? ( sys-apps/util-linux:= ) +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + dev-lang/swig +" + +src_configure() { + local emesonargs=( + -Dpython=disabled + $(meson_use test tests) + $(meson_feature json json-c) + $(meson_feature dbus libdbus) + $(meson_feature keyutils) + $(meson_feature ssl openssl) + ) + meson_src_configure +} + +python_compile() { + local emesonargs=( + -Dpython=enabled + ) + meson_src_configure --reconfigure + meson_src_compile +} + +src_compile() { + meson_src_compile + + if use python; then + python_copy_sources + python_foreach_impl python_compile + fi +} + +python_install() { + meson_src_install + use python && python_optimize +} + +src_install() { + use python && python_foreach_impl python_install + + meson_src_install +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/Manifest index 7eadd0d8cb..21b7f934ee 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/Manifest @@ -1,3 +1,2 @@ -DIST libselinux-3.5.tar.gz 211453 BLAKE2B f7f3067c4bb0448e18bd7085135f11d94ae99728949480a655c0f660486817beb5829d8a43dff7bce286ccd50705b0c657bde85970f01c794e01fb707f469d8b SHA512 4e13261a5821018a5f3cdce676f180bb62e5bc225981ca8a498ece0d1c88d9ba8eaa0ce4099dd0849309a8a7c5a9a0953df841a9922f2c284e5a109e5d937ba7 DIST libselinux-3.6.tar.gz 194210 BLAKE2B 615198d47ecfb4b6274810cbe32cce5953dd44d1d04e8ce244213dc4ddbd61cde3515f4650046b805cf98f341aba718af8d7a9e1d66773172031ac19599f6032 SHA512 182dcdf3510083ff4b9376a4a6d6a7b33905ac3c5e974c188bf3965686c54b663162c543ecf15eab75102f3c91a2502d33d0f1104dec01dd9b14737ef3f2b544 DIST libselinux-3.7.tar.gz 194834 BLAKE2B 07d87c37608b480d17355334459ecb006573d61a7d3fbf622033838559397abcf343e6399f3a49b6cf24e106d03fd997397d061491d2129c15a378960dacc350 SHA512 e949c20b606c50ad521b9592ce55ad6658e8c4b24d9838028f5aba0a4fc762b6d0d0d0d207f5bef7a2e41485e12d91382fa6090df27152dbb40071b273419352 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/libselinux-3.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/libselinux-3.5-r1.ebuild deleted file mode 100644 index dd4272b053..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libselinux/libselinux-3.5-r1.ebuild +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" -PYTHON_COMPAT=( python3_{10..12} ) -USE_RUBY="ruby30 ruby31 ruby32" - -# No, I am not calling ruby-ng -inherit flag-o-matic python-r1 toolchain-funcs multilib-minimal - -MY_PV="${PV//_/-}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="SELinux userland library" -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" - S="${WORKDIR}/${P}/${PN}" -else - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="amd64 arm arm64 ~mips ~riscv x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="public-domain" -SLOT="0" -IUSE="python ruby static-libs ruby_targets_ruby30 ruby_targets_ruby31 ruby_targets_ruby32" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="dev-libs/libpcre2:=[static-libs?,${MULTILIB_USEDEP}] - >=sys-libs/libsepol-${PV}:=[${MULTILIB_USEDEP},static-libs(+)] - python? ( ${PYTHON_DEPS} ) - ruby? ( - ruby_targets_ruby30? ( dev-lang/ruby:3.0 ) - ruby_targets_ruby31? ( dev-lang/ruby:3.1 ) - ruby_targets_ruby32? ( dev-lang/ruby:3.2 ) - ) - elibc_musl? ( sys-libs/fts-standalone )" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig - python? ( - >=dev-lang/swig-2.0.9 - dev-python/pip[${PYTHON_USEDEP}] - ) - ruby? ( >=dev-lang/swig-2.0.9 )" - -src_prepare() { - eapply_user - - multilib_copy_sources -} - -multilib_src_compile() { - tc-export AR CC PKG_CONFIG RANLIB - - # bug 905711 - use elibc_musl && append-cppflags -D_LARGEFILE64_SOURCE - - local -x CFLAGS="${CFLAGS} -fno-semantic-interposition" - - emake \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - LDFLAGS="-fPIC ${LDFLAGS} -pthread" \ - USE_PCRE2=y \ - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \ - all - - if multilib_is_native_abi && use python; then - building() { - emake \ - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - USE_PCRE2=y \ - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \ - pywrap - } - python_foreach_impl building - fi - - if multilib_is_native_abi && use ruby; then - building() { - einfo "Calling rubywrap for ${1}" - # Clean up .lo file to force rebuild - rm -f src/selinuxswig_ruby_wrap.lo || die - emake \ - RUBY=${1} \ - LDFLAGS="-fPIC ${LDFLAGS} -lpthread" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - USE_PCRE2=y \ - FTS_LDLIBS="$(usex elibc_musl '-lfts' '')" \ - rubywrap - } - for RUBYTARGET in ${USE_RUBY}; do - use ruby_targets_${RUBYTARGET} || continue - - building ${RUBYTARGET} - done - fi -} - -multilib_src_install() { - emake DESTDIR="${D}" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - USE_PCRE2=y \ - install - - if multilib_is_native_abi && use python; then - installation() { - emake DESTDIR="${D}" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - USE_PCRE2=y \ - install-pywrap - python_optimize # bug 531638 - } - python_foreach_impl installation - fi - - if multilib_is_native_abi && use ruby; then - installation() { - einfo "Calling install-rubywrap for ${1}" - # Forcing (re)build here as otherwise the resulting SO file is used for all ruby versions - rm src/selinuxswig_ruby_wrap.lo - emake DESTDIR="${D}" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - RUBY=${1} \ - USE_PCRE2=y \ - install-rubywrap - } - for RUBYTARGET in ${USE_RUBY}; do - use ruby_targets_${RUBYTARGET} || continue - - installation ${RUBYTARGET} - done - fi - - use static-libs || rm "${D}"/usr/lib*/*.a || die -} - -pkg_postinst() { - # Fix bug 473502 - for POLTYPE in ${POLICY_TYPES}; - do - mkdir -p "${ROOT}/etc/selinux/${POLTYPE}/contexts/files" || die - touch "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/file_contexts.local" || die - # Fix bug 516608 - for EXPRFILE in file_contexts file_contexts.homedirs file_contexts.local ; do - if [[ -f "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" ]]; then - sefcontext_compile "${ROOT}/etc/selinux/${POLTYPE}/contexts/files/${EXPRFILE}" \ - || die "Failed to recompile contexts" - fi - done - done -} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/Manifest index 959bbca8e5..bced87d076 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/Manifest @@ -1,3 +1,2 @@ -DIST libsepol-3.5.tar.gz 497522 BLAKE2B dad2d346605be53fe41aef69e2e4bd4f1ce68a15f0b9307deb6b66bbe7bf06a9ee6be580e60d2f19aebbc8ee5041ac8a7b831b51342ba7c7089e1f1a447e7691 SHA512 66f45a9f4951589855961955db686b006b4c0cddead6ac49ad238a0e4a34775905bd10fb8cf0c0ff2ab64f9b7d8366b97fcd5b19c382dec39971a2835cc765c8 DIST libsepol-3.6.tar.gz 509100 BLAKE2B c073c9437004df0c723125971ed26354dc6b8a78b069c593977062527342061303bcc48917fcd9623d17998748254f63408b233173f3c62e92ee0ea2f3c4a430 SHA512 35a42d2749fc4f71bc6b7488380714f56975564007128566f1c73e5c50bf81c17535b2cfda4583aacb4870aa2cd5885321c01523e415bda8b3326bfefb13d58e DIST libsepol-3.7.tar.gz 511487 BLAKE2B 8e4a0b2b3731f49d8bc8ea03bd5269672428119578046bc7f38230e3c77459e6b9d4ab39285ea33c89d8e807499ef89faa606e4b4e1ecfac2c3d445454b16420 SHA512 85d12d0ba5a7a3225f08d041a18fd59641608db5e0a78a1e9649754e45be54a807cd422d4889b88da6e806b4af546336c7a0913448f08ac33dc6ffb983890ef8 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/libsepol-3.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/libsepol-3.5.ebuild deleted file mode 100644 index 16ea268dc5..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libsepol/libsepol-3.5.ebuild +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit toolchain-funcs multilib-minimal - -MY_PV="${PV//_/-}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="SELinux binary policy representation library" -HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git" - S="${WORKDIR}/${P}/${PN}" -else - SRC_URI="https://github.com/SELinuxProject/selinux/releases/download/${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="amd64 arm arm64 ~mips ~riscv x86" - S="${WORKDIR}/${MY_P}" -fi - -LICENSE="GPL-2" -SLOT="0/2" - -# tests are not meant to be run outside of the full SELinux userland repo -RESTRICT="test" - -src_prepare() { - eapply_user - multilib_copy_sources -} - -multilib_src_compile() { - tc-export CC AR RANLIB - - local -x CFLAGS="${CFLAGS} -fno-semantic-interposition" - - emake \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" -} - -multilib_src_install() { - emake DESTDIR="${D}" \ - LIBDIR="\$(PREFIX)/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - install -} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/readline/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/readline/Manifest index f58de6b403..ec662f09bd 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/readline/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/readline/Manifest @@ -29,3 +29,9 @@ DIST readline82-009 2270 BLAKE2B ecfa4f3f445b0c90d4ba1cf4116c9a773a3e5ee737966d9 DIST readline82-009.sig 95 BLAKE2B 5484f3df25e550a717915ecf70e8410f747ff6d192a873e5449a4fb664bd3557d21a3cf40c5c9e0097dfaf2cee205243cd1cf6af34200f89e79f9d73626c49c1 SHA512 383cc954f8324588c699968d7cdf9a4f3c0e461917c8a16f5599cd0ffb59ff9539207478195a7d77c1842c11bd912cc17d3b3b56e6a9463db1991fb5c24d5409 DIST readline82-010 2653 BLAKE2B 44ebbf93b6449d848b2dda49716b494596d207bef08cdea0d01808b5291d68714e01ef914e97652bb73e81808a91fff829c8035a097db5b3649be1e0735e3eab SHA512 b611b42e31601ea5fcd7de59e6c1cdd3fece7cc8287e0e495ddfc4d5e8f765b3c6567b728fe0a317d6cb00240b772fa4c26f374c8bf361355a9d262bc5133874 DIST readline82-010.sig 95 BLAKE2B a5a6ccaace88a79c4e28f3c9d3a9ffad186ab772ada7668653b729190d5a598cbe46c769861a72acd08b5fb36f84537bd2018a98fbd0602565660411810447f7 SHA512 0c781417f0cf63daa8532f54b71c9fda69bb2206ca41f7f75fceb7f44781ec949f932881d82fd55d69038208aed45692e30a1e6013d698c7d13f8c9984e331bc +DIST readline82-011 1865 BLAKE2B c0c083021ef8d3b482013846719ddbbee8e0d0dcdb694e138d193937ec1ccbf26b10cf55c84646db1b63c1ba9f6e7e47b815ab11a49a2466fa1907389e61ba4f SHA512 13694129f388364bea8009e1d2156c2a27e4b63bf780be2bc18129134e9f0454cad82106b6aeed03fab5ffe1f1fa630b80b77d1bc8b824a3d2280a71bf5d2ea6 +DIST readline82-011.sig 95 BLAKE2B f391e3f83b8f574a6ccb28e1064e5b2451e4342b8b64d09f19e61ec6b380fc2d6a1ae7d384ef43c4291c1cd4cbe370de30f436abaedd0437c997fa2bbbb77ce6 SHA512 5c013a02edca92963bd2bc08b8b897cdf92c4e27d763bc3702f0f405d8409bb30a1d096a84e61c35c3bd1a7678a34f815939a0fd12d30103996ac544d8a325a4 +DIST readline82-012 2824 BLAKE2B 02f5351cdeaf818d809a3d40596ef7c7d83ab397e28486aa3ec1f25b1efe8c6ca1569d0c7e7a85170d38a37a5681cf53eb8a3b435b7c010e70ebd3d346bc25ca SHA512 8921328ed899702a4e0f5c924efee7955d70909cc6ccd2722c87127891e0639376ef5a642ca4b27f92e0ee06d4fad7297fe5f2d2db425e1b6a9b1eaf5c1e4b63 +DIST readline82-012.sig 95 BLAKE2B c9d69070ebff6b1996cfb5d1559dfdaa56d2e34770f142f9771cf8b99a68dfd55933cbcbadf589f490db4c7bdc57e43cd657d43ce72c185a46b802e61175470e SHA512 d9c0cedd012fe5a1e2236f072aefca3b1c9c66c6eedef1842f22d80c860d1e48a4f0a10711f52316e6c57d221ee32e00172002f53a3931574a03891873c0ed1e +DIST readline82-013 5757 BLAKE2B 5af309dc331cdc2fc9c47f8a53c78731885cf70ba22c135929a30c3ab0c6c0a786d1a58b607a7aca9a6522e70aa0e9dc182ad21854d87299e48bf207ee9b02e2 SHA512 9a768946c91e4af31e872fb856b017662cdd5a12ed432d84ba13013fbac327673b655a034dbcfab52da2ff9e45eb1fdb562c3e26c224a5f4e86bff23df25175e +DIST readline82-013.sig 95 BLAKE2B 388b707e863c6047fdc92bb29e2c172292b497f53926f6e2534016e5cdb621fd7feb9418c6edd4a693869ea61c16cb64815bf2159d6af0bb3eec5d5dc666e525 SHA512 85bd30dc816d62a2e339c95bf9f243a60a960264e14bc396b34f586afdded2cc43ecc307a7f1a2c03c7eba2d11d2f3a0028107a59c4b2bc8d6dbe77fe9fb81cd diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.2_p13.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.2_p13.ebuild new file mode 100644 index 0000000000..8445ab394a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/readline/readline-8.2_p13.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# There's no standard way of versioning the point releases upstream +# make anyway, so while this was added for RC versions, it's fine +# in general. +QA_PKGCONFIG_VERSION=$(ver_cut 1-2) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc +inherit flag-o-matic multilib multilib-minimal preserve-libs toolchain-funcs verify-sig + +# Official patches +# See ftp://ftp.cwru.edu/pub/bash/readline-8.1-patches/ +PLEVEL="${PV##*_p}" +MY_PV="${PV/_p*}" +MY_PV="${MY_PV/_/-}" +MY_P="${PN}-${MY_PV}" +MY_PATCHES=() + +is_release() { + case ${PV} in + 9999|*_alpha*|*_beta*|*_rc*) + return 1 + ;; + *) + return 0 + ;; + esac +} + +[[ ${PV} != *_p* ]] && PLEVEL=0 + +DESCRIPTION="Another cute console display library" +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html https://git.savannah.gnu.org/cgit/readline.git" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/readline.git" + EGIT_BRANCH=devel + inherit git-r3 +elif is_release ; then + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz" + SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/readline-8.1-rlfe-c99.patch.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig )" + + if [[ ${PLEVEL} -gt 0 ]] ; then + # bash-5.1 -> bash51 + my_p=${PN}$(ver_rs 1-2 '' $(ver_cut 1-2)) + + patch_url= + my_patch_index= + + upstream_url_base="mirror://gnu/readline" + mirror_url_base="ftp://ftp.cwru.edu/pub/readline" + + for ((my_patch_index=1; my_patch_index <= ${PLEVEL} ; my_patch_index++)) ; do + printf -v mangled_patch_ver ${my_p}-%03d ${my_patch_index} + patch_url="${upstream_url_base}/${MY_P}-patches/${mangled_patch_ver}" + + SRC_URI+=" ${patch_url}" + SRC_URI+=" verify-sig? ( ${patch_url}.sig )" + + # Add in the mirror URL too. + SRC_URI+=" ${patch_url/${upstream_url_base}/${mirror_url_base}}" + SRC_URI+=" verify-sig? ( ${patch_url/${upstream_url_base}/${mirror_url_base}}.sig )" + + MY_PATCHES+=( "${DISTDIR}"/${mangled_patch_ver} ) + done + + unset my_p patch_url my_patch_index upstream_url_base mirror_url_base + fi +else + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.gz.sig ftp://ftp.cwru.edu/pub/readline/${MY_P}.tar.gz.sig )" +fi + +S="${WORKDIR}/${MY_P}" + +if ! is_release ; then + inherit autotools +fi + +LICENSE="GPL-3+" +SLOT="0/8" # subslot matches SONAME major +if is_release ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="static-libs +unicode utils" + +RDEPEND=">=sys-libs/ncurses-5.9-r3:=[static-libs?,unicode(+)?,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-chetramey )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.0-no_rpath.patch + "${FILESDIR}"/${PN}-7.0-headers.patch + "${FILESDIR}"/${PN}-8.0-headers.patch + "${WORKDIR}"/${PN}-8.1-rlfe-c99.patch + + # TODO: rebase + #"${FILESDIR}"/${PN}-8.0-darwin-shlib-versioning.patch +) + +src_unpack() { + local patch + + if [[ ${PV} == 9999 ]]; then + git-r3_src_unpack + else + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig} + + for patch in "${MY_PATCHES[@]}"; do + verify-sig_verify_detached "${patch}"{,.sig} + done + fi + + unpack "${MY_P}.tar.gz" + unpack readline-8.1-rlfe-c99.patch.xz + + #if [[ ${GENTOO_PATCH_VER} ]]; then + # unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz" + #fi + fi +} + +src_prepare() { + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 "${MY_PATCHES[@]}" + + default + + is_release || eautoreconf + + if use prefix && [[ ! -x "${BROOT}"/usr/bin/pkg-config ]] ; then + # If we're bootstrapping, make a guess. We don't have pkg-config + # around yet. bug #818103. + # Incorrectly populating this leads to underlinked libreadline. + local ncurses_libs + local ncurses_libs_suffix=$(usex unicode w '') + + ncurses_libs="-lncurses${ncurses_libs_suffix}" + + if has_version "sys-libs/ncurses[tinfo(+)]" ; then + ncurses_libs+=" -ltinfo${ncurses_libs_suffix}" + fi + else + # Force ncurses linking, bug #71420. + # Use pkg-config to get the right values, bug #457558. + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) + fi + + sed -i \ + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ + support/shobj-conf || die + sed -i \ + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ + examples/rlfe/configure || die + + # Fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated + # objformat for years, so we don't want to rely on that. + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die + + # For local readline headers + ln -s ../.. examples/rlfe/readline || die +} + +src_configure() { + # Fix implicit decls with widechar funcs + append-cppflags -D_GNU_SOURCE + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free + + # Make sure configure picks a better ar than `ar`, bug #484866 + export ac_cv_prog_AR="$(tc-getAR)" + + # Force the test since we used sed above to force it. + export bash_cv_termcap_lib=ncurses + + # Control cross-compiling cases when we know the right answer. + # In cases where the C library doesn't support wide characters, readline + # itself won't work correctly, so forcing the answer below should be OK. + if tc-is-cross-compiler ; then + export bash_cv_func_sigsetjmp="present" + export bash_cv_func_ctype_nonascii="yes" + # bug #503312 + export bash_cv_wcwidth_broken="no" + fi + + # This is for rlfe, but we need to make sure LDFLAGS doesn't change + # so we can re-use the config cache file between the two. + append-ldflags -L. + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myeconfargs=( + --cache-file="${BUILD_DIR}"/config.cache + --with-curses + $(use_enable static-libs static) + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # Code is full of AC_TRY_RUN() + mkdir -p examples/rlfe || die + cd examples/rlfe || die + + ECONF_SOURCE="${S}"/examples/rlfe econf --cache-file="${BUILD_DIR}"/config.cache + fi +} + +multilib_src_compile() { + emake + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # Code is full of AC_TRY_RUN() + cd examples/rlfe || die + local l + for l in readline history ; do + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die + ln -s ../../lib${l}.a lib${l}.a || die + done + emake + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi ; then + if use utils && ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi + fi +} + +multilib_src_install_all() { + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs + + dodoc USAGE + docinto ps + dodoc doc/*.ps +} +pkg_preinst() { + # bug #29865 + # Reappeared in bug #595324 with paludis so keeping this for now... + preserve_old_lib \ + /$(get_libdir)/lib{history,readline}$(get_libname 4) \ + /$(get_libdir)/lib{history,readline}$(get_libname 5) \ + /$(get_libdir)/lib{history,readline}$(get_libname 6) \ + /$(get_libdir)/lib{history,readline}$(get_libname 7) +} + +pkg_postinst() { + preserve_old_lib_notify \ + /$(get_libdir)/lib{history,readline}$(get_libname 4) \ + /$(get_libdir)/lib{history,readline}$(get_libname 5) \ + /$(get_libdir)/lib{history,readline}$(get_libname 6) \ + /$(get_libdir)/lib{history,readline}$(get_libname 7) +}