From 5eb943cb898c6ce5a6d123c4ae3e4f71f5860f3f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:29 +0000 Subject: [PATCH 001/145] app-arch/ncompress: Sync with Gentoo It's from Gentoo commit 60cee2d56801f6df58f13309ed08991b22f4074b. --- .../portage-stable/app-arch/ncompress/ncompress-5.0-r2.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r2.ebuild index 060af586e0c..d257d90209c 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/ncompress/ncompress-5.0-r2.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://github.com/vapier/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="public-domain" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" PATCHES=( "${FILESDIR}"/${PN}-5.0-c23.patch From c19e716d105abc2eb8e4d8e9e136c60c202c6b77 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:32 +0000 Subject: [PATCH 002/145] app-arch/sharutils: Sync with Gentoo It's from Gentoo commit 319c1a011cc04637dc556b3a80d5173a6a01abb0. --- .../files/sharutils-4.15.2-C23.patch | 50 +++++++++++++++++++ .../files/sharutils-4.15.2-dewhich.patch | 32 ++++++++++++ ...2-r2.ebuild => sharutils-4.15.2-r3.ebuild} | 22 +++++--- 3 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-C23.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-dewhich.patch rename sdk_container/src/third_party/portage-stable/app-arch/sharutils/{sharutils-4.15.2-r2.ebuild => sharutils-4.15.2-r3.ebuild} (68%) diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-C23.patch b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-C23.patch new file mode 100644 index 00000000000..e27ce8ab9b8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-C23.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/900248 +https://bugs.gentoo.org/894322 +missing include for textdomain and bindtextdomain +This is only one place we can put include, else weird +macro dance messes with it or we use gettext before we +mark it for assembly operations. +--- a/src/shar-opts.h ++++ b/src/shar-opts.h +@@ -373,6 +373,8 @@ + # include + # endif + ++#include "gettext.h" ++ + # ifndef ATTRIBUTE_FORMAT_ARG + # define ATTRIBUTE_FORMAT_ARG(_a) + # endif +--- a/src/unshar-opts.h ++++ b/src/unshar-opts.h +@@ -210,6 +210,8 @@ + # include + # endif + ++#include "gettext.h" ++ + # ifndef ATTRIBUTE_FORMAT_ARG + # define ATTRIBUTE_FORMAT_ARG(_a) + # endif +--- a/src/uudecode-opts.h ++++ b/src/uudecode-opts.h +@@ -188,6 +188,8 @@ + # include + # endif + ++#include "gettext.h" ++ + # ifndef ATTRIBUTE_FORMAT_ARG + # define ATTRIBUTE_FORMAT_ARG(_a) + # endif +--- a/src/uuencode-opts.h ++++ b/src/uuencode-opts.h +@@ -184,6 +184,8 @@ + # include + # endif + ++#include "gettext.h" ++ + # ifndef ATTRIBUTE_FORMAT_ARG + # define ATTRIBUTE_FORMAT_ARG(_a) + # endif diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-dewhich.patch b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-dewhich.patch new file mode 100644 index 00000000000..a2531ad6912 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/files/sharutils-4.15.2-dewhich.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/941724 +which-hunt +diff '--color=auto' -ru sharutils-4.15.2.old/libopts/m4/libopts.m4 sharutils-4.15.2/libopts/m4/libopts.m4 +--- sharutils-4.15.2.old/libopts/m4/libopts.m4 2025-01-22 13:17:52.302369061 +0000 ++++ sharutils-4.15.2/libopts/m4/libopts.m4 2025-01-22 13:19:46.096362975 +0000 +@@ -114,9 +114,9 @@ + AC_PROG_SED + [while : + do +- POSIX_SHELL=`which bash` ++ POSIX_SHELL=`command -v bash` + test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`which dash` ++ POSIX_SHELL=`command -v dash` + test -x "$POSIX_SHELL" && break + POSIX_SHELL=/usr/xpg4/bin/sh + test -x "$POSIX_SHELL" && break +diff '--color=auto' -ru sharutils-4.15.2.old/m4/libopts.m4 sharutils-4.15.2/m4/libopts.m4 +--- sharutils-4.15.2.old/m4/libopts.m4 2025-01-22 13:17:52.365018511 +0000 ++++ sharutils-4.15.2/m4/libopts.m4 2025-01-22 13:19:17.856525747 +0000 +@@ -114,9 +114,9 @@ + AC_PROG_SED + [while : + do +- POSIX_SHELL=`which bash` ++ POSIX_SHELL=`command -v bash` + test -x "$POSIX_SHELL" && break +- POSIX_SHELL=`which dash` ++ POSIX_SHELL=`command -v dash` + test -x "$POSIX_SHELL" && break + POSIX_SHELL=/usr/xpg4/bin/sh + test -x "$POSIX_SHELL" && break diff --git a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r3.ebuild similarity index 68% rename from sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild rename to sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r3.ebuild index c39766d65c9..5507562f71f 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/sharutils/sharutils-4.15.2-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=8 -inherit flag-o-matic strip-linguas +inherit flag-o-matic strip-linguas autotools MY_P="${P/_/-}" DESCRIPTION="Tools to deal with shar archives" @@ -21,9 +21,15 @@ DEPEND="app-arch/xz-utils nls? ( >=sys-devel/gettext-0.10.35 )" PATCHES=( - "${FILESDIR}"/${PN}-4.15.2-glibc228.patch - "${FILESDIR}"/${PN}-4.15.2-CVE-2018-1000097.patch - "${FILESDIR}"/${PN}-4.15.2-gcc-10.patch + "${FILESDIR}"/${P}-glibc228.patch + "${FILESDIR}"/${P}-CVE-2018-1000097.patch + "${FILESDIR}"/${P}-gcc-10.patch + "${FILESDIR}"/${P}-dewhich.patch + "${FILESDIR}"/${P}-C23.patch +) + +QA_CONFIG_IMPL_DECL_SKIP=( + pathfind ) src_prepare() { @@ -35,6 +41,10 @@ src_prepare() { # bug #943901 append-cflags -std=gnu17 + + # bug https://bugs.gentoo.org/941724 + # regenerate config after which removal + eautoreconf } src_configure() { From 9d523acae12c2b6cc9d69d6dd7da9a5afe60b361 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:33 +0000 Subject: [PATCH 003/145] app-arch/xz-utils: Sync with Gentoo It's from Gentoo commit 5545709a6cfa0b7358ff18525dba078c6d1cf3a5. --- .../portage-stable/app-arch/xz-utils/Manifest | 4 + .../app-arch/xz-utils/xz-utils-5.6.3.ebuild | 4 +- .../app-arch/xz-utils/xz-utils-5.6.4.ebuild | 203 ++++++++++++++++++ .../xz-utils/xz-utils-5.7.1_alpha.ebuild | 203 ++++++++++++++++++ 4 files changed, 412 insertions(+), 2 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.4.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.7.1_alpha.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest index d52f3613354..1a4437e1b96 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/Manifest @@ -4,3 +4,7 @@ DIST xz-5.6.2.tar.gz 2355785 BLAKE2B d2d5f9772714b5b5993ec26c313bd27dc10d88928d9 DIST xz-5.6.2.tar.gz.sig 566 BLAKE2B 9b1f19d0449de18057eb5bd3cceaa073fc245e9a05fb19fabdac98b1d2e708b39c8070130c522b78ff75df724e207f978d8da65e2ccb1c6fa295aa892eda0d23 SHA512 f3d1055a2a6e96eec2fd5c0b733f2ab5e150bac9645f1fe9a7558ed6f34a241b4f57e17fd4504f311be26cf1e2b9b797f2e78b1b9d2db02e9cd0c1548cb6160b DIST xz-5.6.3.tar.gz 2279396 BLAKE2B 9f09926f1ec7d72e6564f5816101512717bcb37610b551616117818d4e6a3b6c00b4ac74bf13a06cd299ff199a0561f2c05a3884a6f6b7e94951de2c1c2e6dc3 SHA512 b07b45e18615d1946e9d12157af99b54700d757832a638fccab70549574dcd7f28e69e71cc4c0b9c808959f818e79b668a5ccf108429ea0f40b6125bfd55d274 DIST xz-5.6.3.tar.gz.sig 566 BLAKE2B b59899d9ddc3325bd0de084dac420440ccdeb5f57f3656300f235fdae997a8943c2dc44edc3b83150b78717a7bf761152f09b41035d245fa536c45b8c06dd00d SHA512 65a0eb674b804309417d736b3ec9edb9c9bf39485593d81f352ee847662f5a95b3d5084fab21451e3510d74e4e2ee8f9cf4e8615d1128b6e16d5c211481481db +DIST xz-5.6.4.tar.gz 2280985 BLAKE2B 3d27c143f4856589d501bc47ff5c86c1c49b1d0b8c8fd2143bcbfe86b860ca93f6a103f628e06ce5c2839ce1941cecc7552d91b1aac5c11def40fd9182d93eee SHA512 b966950eb9206e31f284c9dc3bb0a79f2fabbaf515e88c89da53d3da41ddfeebd2fc6d3d3f8fcd150c70caaaefa43dec0bce84aa183e08bf339d1aebbe041751 +DIST xz-5.6.4.tar.gz.sig 566 BLAKE2B 475b576431f573b9ce390ae2c43fc4f307f00ef523a741ec6795f182f5ff2c30f2049b1b4d2a3a7e61769bb7dc568de0f5af89661cb09341a58bbcdcdda3c877 SHA512 1ece59b7a540f6d215206ced14759aa971f192433705f8803b6ad8db0857e246145300c853cb571d8750b8152483d13736c478a7c0abb40d7ed25305d80a841c +DIST xz-5.7.1alpha.tar.gz 2334409 BLAKE2B 98e98ebde9175fe8b135fa59f8e8acff1b8c6278f75a3ea997ebbe9aac25cb1a6a1f1bde163af4788ca0532bc270fe5baaf6cd89ba4c81ed3e3f7a6f08e741eb SHA512 40349652f3903e1d37e1cdc0b0b6f5479db0bc5bcbdc371f34b7cf7de730b1781748e1a6cad3dcc9e721243a0bd6f1c062a5ae54e966d23ff80ae0f0c9371246 +DIST xz-5.7.1alpha.tar.gz.sig 566 BLAKE2B 33c23b3aace6856f67b927d2f5b46f60f1e96eedde6a7e2cf5085e44b96da6503a8c38d5977a1dd7b068d9cb9ae652d457e9344eb40b482979d810afeb38f888 SHA512 f3fce937be1753b94110f2cf8ea1da52905133f8a62f9b2f91f6b5c91d2400ae63e000b392a0b992cd16495227077c0f26f1e36349b048e84a6bb8d3e618fd28 diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.3.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.3.ebuild index eaceaea0ff5..cd83095c3e8 100644 --- a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Remember: we cannot leverage autotools in this ebuild in order @@ -35,7 +35,7 @@ else " if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi S="${WORKDIR}/${MY_P}" diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.4.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.4.ebuild new file mode 100644 index 00000000000..c27c74e7eee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.6.4.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=8 + +inherit libtool multilib multilib-minimal preserve-libs toolchain-funcs + +if [[ ${PV} == 9999 ]] ; then + # Per tukaani.org, git.tukaani.org is a mirror of github and + # may be behind. + EGIT_REPO_URI=" + https://github.com/tukaani-project/xz + https://git.tukaani.org/xz.git + " + inherit git-r3 autotools + + # bug #272880 and bug #286068 + BDEPEND="sys-devel/gettext >=dev-build/libtool-2" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/lassecollin.asc + inherit verify-sig + + MY_P="${PN/-utils}-${PV/_}" + SRC_URI=" + https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz + https://downloads.sourceforge.net/lzmautils/${MY_P}.tar.gz + https://tukaani.org/xz/${MY_P}.tar.gz + verify-sig? ( + https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz.sig + https://tukaani.org/xz/${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="0BSD LGPL-2.1+ GPL-2+ doc? ( CC-BY-SA-4.0 )" +SLOT="0" +IUSE="cpu_flags_arm_crc32 doc +extra-filters pgo nls static-libs" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-lassecollin-20240529 )" +fi + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautopoint + eautoreconf + else + # Allow building shared libs on Solaris/x64 + elibtoolize + fi +} + +multilib_src_configure() { + # Workaround for bug #934370 (libtool-2.5.0), drop when dist tarball + # uses newer libtool with the fix. + export ac_cv_prog_ac_ct_FILECMD='file' FILECMD='file' + + local myconf=( + --enable-threads + $(multilib_native_use_enable doc) + $(use_enable nls) + $(use_enable static-libs static) + $(use_enable cpu_flags_arm_crc32 arm64-crc32) + ) + + if ! multilib_is_native_abi ; then + myconf+=( + --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} + ) + fi + + if ! use extra-filters ; then + myconf+=( + # LZMA1 + LZMA2 for standard .lzma & .xz files + --enable-encoders=lzma1,lzma2 + --enable-decoders=lzma1,lzma2 + + # those are used by default, depending on preset + --enable-match-finders=hc3,hc4,bt4 + + # CRC64 is used by default, though 7-Zip uses CRC32 by default. + # Also, XZ Embedded in Linux doesn't support CRC64, so + # kernel modules and friends are CRC32. + --enable-checks=crc32,crc64 + ) + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + export gl_cv_posix_shell="${EPREFIX}"/bin/sh + + # Undo Solaris-based defaults pointing to /usr/xpg4/bin + myconf+=( --disable-path-for-script ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_compile() { + local pgo_generate_flags=$(usev pgo "-fprofile-update=atomic -fprofile-dir=${T}/${ABI}-pgo -fprofile-generate=${T}/${ABI}-pgo") + local pgo_use_flags=$(usev pgo "-fprofile-use=${T}/${ABI}-pgo -fprofile-dir=${T}/${ABI}-pgo") + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" + + if use pgo ; then + emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check + + local tar_pgo_args=() + + if has_version -b "app-alternatives/tar[gnu]" ; then + tar_pgo_args+=( + --mtime=@2718281828 + --sort=name + ) + fi + + if multilib_is_native_abi ; then + ( + shopt -s globstar + + tar \ + "${tar_pgo_args[@]}" \ + -cf xz-pgo-test-01.tar \ + {"${S}","${BUILD_DIR}"}/**/*.[cho] \ + {"${S}","${BUILD_DIR}"}/**/.libs/* \ + {"${S}","${BUILD_DIR}"}/**/**.txt \ + {"${S}","${BUILD_DIR}"}/tests/files + + stat --printf="xz-pgo-test-01.tar.tar size: %s\n" xz-pgo-test-01.tar || die + md5sum xz-pgo-test-01.tar || die + ) + + local test_variants=( + # Borrowed from ALT Linux + # https://packages.altlinux.org/en/sisyphus/srpms/xz/specfiles/#line-80 + '-0 -C none' + '-2 -C crc32' + "$(usev extra-filters '-6 --arm --lzma2 -C crc64')" + "$(usev extra-filters '-6 --x86 --lzma2=lc=4 -C sha256')" + '-7e --format=lzma' + + # Our own variants + '' + '-e' + "$(usev extra-filters '--x86 --lzma2=preset=6e')" + ) + local test_variant + for test_variant in "${test_variants[@]}" ; do + einfo "Testing '${test_variant}' variant" + "${BUILD_DIR}"/src/xz/xz -c ${test_variant} xz-pgo-test-01.tar | "${BUILD_DIR}"/src/xz/xz -c -d - > /dev/null + assert "Testing '${test_variant}' variant failed" + done + fi + + if tc-is-clang; then + llvm-profdata merge "${T}"/${ABI}-pgo --output="${T}"/${ABI}-pgo/default.profdata || die + fi + + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags}" + fi +} + +multilib_src_install() { + default + + # bug #934370 and bug #450436 (and bug #934515) + if ! tc-is-static-only && [[ ! -f "${ED}/usr/$(get_libdir)/liblzma$(get_libname)" ]] ; then + eerror "Sanity check for liblzma$(get_libname) failed." + eerror "Shared library wasn't built, possible libtool bug" + [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && die "liblzma$(get_libname) not found in build, aborting" + fi +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + + if use doc ; then + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die + fi +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0) +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0) +} diff --git a/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.7.1_alpha.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.7.1_alpha.ebuild new file mode 100644 index 00000000000..c27c74e7eee --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-arch/xz-utils/xz-utils-5.7.1_alpha.ebuild @@ -0,0 +1,203 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=8 + +inherit libtool multilib multilib-minimal preserve-libs toolchain-funcs + +if [[ ${PV} == 9999 ]] ; then + # Per tukaani.org, git.tukaani.org is a mirror of github and + # may be behind. + EGIT_REPO_URI=" + https://github.com/tukaani-project/xz + https://git.tukaani.org/xz.git + " + inherit git-r3 autotools + + # bug #272880 and bug #286068 + BDEPEND="sys-devel/gettext >=dev-build/libtool-2" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/lassecollin.asc + inherit verify-sig + + MY_P="${PN/-utils}-${PV/_}" + SRC_URI=" + https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz + https://downloads.sourceforge.net/lzmautils/${MY_P}.tar.gz + https://tukaani.org/xz/${MY_P}.tar.gz + verify-sig? ( + https://github.com/tukaani-project/xz/releases/download/v${PV/_}/${MY_P}.tar.gz.sig + https://tukaani.org/xz/${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="0BSD LGPL-2.1+ GPL-2+ doc? ( CC-BY-SA-4.0 )" +SLOT="0" +IUSE="cpu_flags_arm_crc32 doc +extra-filters pgo nls static-libs" + +if [[ ${PV} != 9999 ]] ; then + BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-lassecollin-20240529 )" +fi + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautopoint + eautoreconf + else + # Allow building shared libs on Solaris/x64 + elibtoolize + fi +} + +multilib_src_configure() { + # Workaround for bug #934370 (libtool-2.5.0), drop when dist tarball + # uses newer libtool with the fix. + export ac_cv_prog_ac_ct_FILECMD='file' FILECMD='file' + + local myconf=( + --enable-threads + $(multilib_native_use_enable doc) + $(use_enable nls) + $(use_enable static-libs static) + $(use_enable cpu_flags_arm_crc32 arm64-crc32) + ) + + if ! multilib_is_native_abi ; then + myconf+=( + --disable-{xz,xzdec,lzmadec,lzmainfo,lzma-links,scripts} + ) + fi + + if ! use extra-filters ; then + myconf+=( + # LZMA1 + LZMA2 for standard .lzma & .xz files + --enable-encoders=lzma1,lzma2 + --enable-decoders=lzma1,lzma2 + + # those are used by default, depending on preset + --enable-match-finders=hc3,hc4,bt4 + + # CRC64 is used by default, though 7-Zip uses CRC32 by default. + # Also, XZ Embedded in Linux doesn't support CRC64, so + # kernel modules and friends are CRC32. + --enable-checks=crc32,crc64 + ) + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + export gl_cv_posix_shell="${EPREFIX}"/bin/sh + + # Undo Solaris-based defaults pointing to /usr/xpg4/bin + myconf+=( --disable-path-for-script ) + fi + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +multilib_src_compile() { + local pgo_generate_flags=$(usev pgo "-fprofile-update=atomic -fprofile-dir=${T}/${ABI}-pgo -fprofile-generate=${T}/${ABI}-pgo") + local pgo_use_flags=$(usev pgo "-fprofile-use=${T}/${ABI}-pgo -fprofile-dir=${T}/${ABI}-pgo") + + emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" + + if use pgo ; then + emake CFLAGS="${CFLAGS} ${pgo_generate_flags}" -k check + + local tar_pgo_args=() + + if has_version -b "app-alternatives/tar[gnu]" ; then + tar_pgo_args+=( + --mtime=@2718281828 + --sort=name + ) + fi + + if multilib_is_native_abi ; then + ( + shopt -s globstar + + tar \ + "${tar_pgo_args[@]}" \ + -cf xz-pgo-test-01.tar \ + {"${S}","${BUILD_DIR}"}/**/*.[cho] \ + {"${S}","${BUILD_DIR}"}/**/.libs/* \ + {"${S}","${BUILD_DIR}"}/**/**.txt \ + {"${S}","${BUILD_DIR}"}/tests/files + + stat --printf="xz-pgo-test-01.tar.tar size: %s\n" xz-pgo-test-01.tar || die + md5sum xz-pgo-test-01.tar || die + ) + + local test_variants=( + # Borrowed from ALT Linux + # https://packages.altlinux.org/en/sisyphus/srpms/xz/specfiles/#line-80 + '-0 -C none' + '-2 -C crc32' + "$(usev extra-filters '-6 --arm --lzma2 -C crc64')" + "$(usev extra-filters '-6 --x86 --lzma2=lc=4 -C sha256')" + '-7e --format=lzma' + + # Our own variants + '' + '-e' + "$(usev extra-filters '--x86 --lzma2=preset=6e')" + ) + local test_variant + for test_variant in "${test_variants[@]}" ; do + einfo "Testing '${test_variant}' variant" + "${BUILD_DIR}"/src/xz/xz -c ${test_variant} xz-pgo-test-01.tar | "${BUILD_DIR}"/src/xz/xz -c -d - > /dev/null + assert "Testing '${test_variant}' variant failed" + done + fi + + if tc-is-clang; then + llvm-profdata merge "${T}"/${ABI}-pgo --output="${T}"/${ABI}-pgo/default.profdata || die + fi + + emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags}" + fi +} + +multilib_src_install() { + default + + # bug #934370 and bug #450436 (and bug #934515) + if ! tc-is-static-only && [[ ! -f "${ED}/usr/$(get_libdir)/liblzma$(get_libname)" ]] ; then + eerror "Sanity check for liblzma$(get_libname) failed." + eerror "Shared library wasn't built, possible libtool bug" + [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && die "liblzma$(get_libname) not found in build, aborting" + fi +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + + if use doc ; then + rm "${ED}"/usr/share/doc/${PF}/COPYING* || die + fi +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/liblzma$(get_libname 0) +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/liblzma$(get_libname 0) +} From 74dd1ad7e1a219c2d1f4b3d8da3099080c3fb07b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:37 +0000 Subject: [PATCH 004/145] app-containers/containers-image: Sync with Gentoo It's from Gentoo commit e13fe2f017b486723ca7718f8c29b0179723baaa. --- .../moving-policy-json-default-yaml.patch | 100 ------------------ .../prevent-downloading-mods-5.29.2.patch | 10 -- 2 files changed, 110 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/moving-policy-json-default-yaml.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/prevent-downloading-mods-5.29.2.patch diff --git a/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/moving-policy-json-default-yaml.patch b/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/moving-policy-json-default-yaml.patch deleted file mode 100644 index 1713839371a..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/moving-policy-json-default-yaml.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 45441676e34e6410ae8af6dbb46b6161c5c81a7c Mon Sep 17 00:00:00 2001 -From: Rahil Bhimjiani -Date: Thu, 7 Dec 2023 14:12:26 +0530 -Subject: [PATCH] Moving policy.json and default.yaml from containers/skopeo - -It makes more sense to keep these 2 files along with their man -pages...in c/image -https://github.com/containers/common/pull/1757 - -Signed-off-by: Rahil Bhimjiani ---- - Makefile | 11 +++++++++++ - default-policy.json | 14 ++++++++++++++ - default.yaml | 27 +++++++++++++++++++++++++++ - 3 files changed, 52 insertions(+) - create mode 100644 default-policy.json - create mode 100644 default.yaml - -diff --git a/Makefile b/Makefile -index f329ef083..5e9799b19 100644 ---- a/Makefile -+++ b/Makefile -@@ -24,6 +24,13 @@ GOMD2MAN ?= $(shell command -v go-md2man || echo '$(GOBIN)/go-md2man') - MANPAGES_MD = $(wildcard docs/*.5.md) - MANPAGES ?= $(MANPAGES_MD:%.md=%) - -+ifeq ($(shell uname -s),FreeBSD) -+CONTAINERSCONFDIR ?= /usr/local/etc/containers -+else -+CONTAINERSCONFDIR ?= /etc/containers -+endif -+REGISTRIESDDIR ?= ${CONTAINERSCONFDIR}/registries.d -+ - # N/B: This value is managed by Renovate, manual changes are - # possible, as long as they don't disturb the formatting - # (i.e. DO NOT ADD A 'v' prefix!) -@@ -46,6 +53,10 @@ install-docs: docs - install -m 644 docs/*.5 ${MANINSTALLDIR}/man5/ - - install: install-docs -+ install -d -m 755 ${DESTDIR}${CONTAINERSCONFDIR} -+ install -m 644 default-policy.json ${DESTDIR}${CONTAINERSCONFDIR}/policy.json -+ install -d -m 755 ${DESTDIR}${REGISTRIESDDIR} -+ install -m 644 default.yaml ${DESTDIR}${REGISTRIESDDIR}/default.yaml - - cross: - GOOS=windows $(MAKE) build BUILDTAGS="$(BUILDTAGS) $(BUILD_TAGS_WINDOWS_CROSS)" -diff --git a/default-policy.json b/default-policy.json -new file mode 100644 -index 000000000..dffc54a62 ---- /dev/null -+++ b/default-policy.json -@@ -0,0 +1,14 @@ -+{ -+ "default": [ -+ { -+ "type": "insecureAcceptAnything" -+ } -+ ], -+ "transports": -+ { -+ "docker-daemon": -+ { -+ "": [{"type":"insecureAcceptAnything"}] -+ } -+ } -+} -diff --git a/default.yaml b/default.yaml -new file mode 100644 -index 000000000..9e892d760 ---- /dev/null -+++ b/default.yaml -@@ -0,0 +1,27 @@ -+# This is a default registries.d configuration file. You may -+# add to this file or create additional files in registries.d/. -+# -+# lookaside: for reading/writing simple signing signatures -+# lookaside-staging: for writing simple signing signatures, preferred over lookaside -+# -+# lookaside and lookaside-staging take a value of the following: -+# lookaside: {schema}://location -+# -+# For reading signatures, schema may be http, https, or file. -+# For writing signatures, schema may only be file. -+ -+# The default locations are built-in, for both reading and writing: -+# /var/lib/containers/sigstore for root, or -+# ~/.local/share/containers/sigstore for non-root users. -+default-docker: -+# lookaside: https://… -+# lookaside-staging: file:///… -+ -+# The 'docker' indicator here is the start of the configuration -+# for docker registries. -+# -+# docker: -+# -+# privateregistry.com: -+# lookaside: https://privateregistry.com/sigstore/ -+# lookaside-staging: /mnt/nfs/privateregistry/sigstore diff --git a/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/prevent-downloading-mods-5.29.2.patch b/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/prevent-downloading-mods-5.29.2.patch deleted file mode 100644 index 8d70156bfb6..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/containers-image/files/prevent-downloading-mods-5.29.2.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -15,7 +15,6 @@ - BUILDTAGS = btrfs_noversion libdm_no_deferred_remove - BUILDFLAGS := -tags "$(BUILDTAGS)" - --PACKAGES := $(shell GO111MODULE=on go list $(BUILDFLAGS) ./...) - SOURCE_DIRS = $(shell echo $(PACKAGES) | awk 'BEGIN{FS="/"; RS=" "}{print $$4}' | uniq) - - PREFIX ?= ${DESTDIR}/usr From d80b2c71a6979976c3a437175092be562ef7b916 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:38 +0000 Subject: [PATCH 005/145] app-containers/cri-tools: Sync with Gentoo It's from Gentoo commit 760493569ad7f0d92ede74785350b0fd44bab450. --- .../app-containers/cri-tools/cri-tools-1.32.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/cri-tools/cri-tools-1.32.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/cri-tools/cri-tools-1.32.0.ebuild index 21381a7af4b..ef3ccb4859b 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/cri-tools/cri-tools-1.32.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/cri-tools/cri-tools-1.32.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2024 Gentoo Authors +# Copyright 2021-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/kubernetes-sigs/cri-tools/archive/v${PV}.tar.gz -> $ LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" SLOT="0" -KEYWORDS="~amd64 ~arm64" +KEYWORDS="amd64 ~arm64" RESTRICT="test" DOCS=( docs {README,RELEASE,CHANGELOG,CONTRIBUTING}.md ) From b51a1df47030f0011bbe607a833eba49f684c78d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:38 +0000 Subject: [PATCH 006/145] app-containers/crun: Sync with Gentoo It's from Gentoo commit e13097fab6cfcd97feece06d68f1e96ebac8d7c7. --- .../crun/files/crun-1.11.2-caps.patch | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/crun/files/crun-1.11.2-caps.patch diff --git a/sdk_container/src/third_party/portage-stable/app-containers/crun/files/crun-1.11.2-caps.patch b/sdk_container/src/third_party/portage-stable/app-containers/crun/files/crun-1.11.2-caps.patch deleted file mode 100644 index d32a4dd1a8f..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/crun/files/crun-1.11.2-caps.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 767ba88ef363115e80e077ce312f89f20488da01 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert=20G=C3=BCnzler?= -Date: Thu, 9 Nov 2023 14:16:08 +0100 -Subject: [PATCH] Fix build without libcap -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The work to support features introduced another point of dependency on -libcap that previously wasn't guarded by ifdefs - -Refs: https://github.com/containers/crun/pull/1237 -Signed-off-by: Robert Günzler ---- - src/libcrun/container.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/libcrun/container.c b/src/libcrun/container.c -index ed0fa29bb..7be1713ab 100644 ---- a/src/libcrun/container.c -+++ b/src/libcrun/container.c -@@ -3925,8 +3925,10 @@ libcrun_container_get_features (libcrun_context_t *context, struct features_info - // Populate namespaces - populate_array_field (&((*info)->linux.namespaces), namespaces, num_namspaces); - -+#ifdef HAVE_CAP - // Populate capabilities - populate_capabilities (*info, &capabilities, &num_capabilities); -+#endif - - // Hardcode the values for cgroup - (*info)->linux.cgroup.v1 = true; From f6869b77593bc5701edc7a441c88706709fcad2b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:38 +0000 Subject: [PATCH 007/145] app-containers/docker: Sync with Gentoo It's from Gentoo commit 98b70e5b78d00fb836b77e1c9c7b5535a02dcf52. --- .../app-containers/docker/Manifest | 5 +- .../docker/docker-26.1.0-r1.ebuild | 322 ----------------- .../docker/docker-27.2.0.ebuild | 323 ------------------ .../docker/docker-27.3.1.ebuild | 319 ----------------- .../docker/docker-27.4.0.ebuild | 319 ----------------- .../docker/docker-27.4.1-r1.ebuild | 4 +- ...ker-27.4.1.ebuild => docker-27.5.0.ebuild} | 10 +- ...nrc-Depend-on-containerd-init-script.patch | 28 -- .../docker-26.1.0-automagic-systemd.patch | 13 - .../app-containers/docker/metadata.xml | 4 - 10 files changed, 9 insertions(+), 1338 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/docker-26.1.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.2.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.3.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.0.ebuild rename sdk_container/src/third_party/portage-stable/app-containers/docker/{docker-27.4.1.ebuild => docker-27.5.0.ebuild} (96%) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker/files/docker-26.1.0-automagic-systemd.patch diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/Manifest b/sdk_container/src/third_party/portage-stable/app-containers/docker/Manifest index cfe2371f801..ce0f4353cab 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker/Manifest @@ -1,5 +1,2 @@ -DIST docker-26.1.0.tar.gz 16390376 BLAKE2B 6703e9b153c430bc28aed2e7de7bada0203353d61f0a2ce3d49ddbd017eab196a685dd1ab1e719a6b287813eb5fa4f2c612e2cf1ab95789d6e79ebe5dac7ace3 SHA512 47b6b9af9947016884614b6bc25977e1db281da95c9b8b34c753c21c664a737a893f9fa65d92cbb897735aae3893567e106e6bababb5507e069b1e0981e48d50 -DIST docker-27.2.0.tar.gz 16689537 BLAKE2B faf0bae9f7da127d5b65b9989acd82dc726bc3f09ace502df151b9f03a84b6f1ec2a946d905263aaa7d2e7d7a3cd4ad1a09291dcfc6691e73cc9a8738f150d55 SHA512 97abaf56d2249c1514beacf17fc9096848b960846e064f1a9bd800a59762a1f1888b32e83b3e8289e23656496ca0293fea65931210d68faaa8a713aab6e48b65 -DIST docker-27.3.1.tar.gz 16790553 BLAKE2B 64670eec5a957cb1a088047836fe5e906435f85a062178f52276bafa3df750207bfd02ebb8783e642a6817b2bfa9fb439e441d412e448eba0f3cf15869067d72 SHA512 0fddcc8314eed2e7b131af78f1fa01292cfc4fcb7fd0af94b79d5435349ab54a21b0a78cffbf29dd4c58747d8bcd1f47473cc5f5ab2596e133828b2e6540d172 -DIST docker-27.4.0.tar.gz 16836980 BLAKE2B 9bea16a6177cf8c4f05f015bb241b51f7c96ca8813167a07d3b951e418f38aff09277f83772342bf326a5acb05c7c3a0659120d92d6d57df2e9f9fbba3006c79 SHA512 f684d6e91bf0a00247605ea88ea6421cc13b9152239b8f51eb640a568b43b3898ea6bcd22ef64a0e263d6e795362160473db849490672dd1fd39d174ad6f45a0 DIST docker-27.4.1.tar.gz 16837429 BLAKE2B da2e915944a0260619b1e036b43d40f5cbff66f07182153c0ae238ecbcecdfe2066473887882fdaaffa5ef29e2328211f1d07ba3a5239381f9e82d34d9da43fe SHA512 3d77708f7373c1b58b1c46428c2cfc9e8985076e494e40ab86709f37a686cf92b9e2c9db5aa34293f728bb7ccd6a7e08e0cbb1c6d20acfd025c4c787d5908dc0 +DIST docker-27.5.0.tar.gz 17076981 BLAKE2B 20dfdb9fb3d594520f063352c28ccc7a936ec2dc0cd6d04737c2d8c78c54db024ac33fc986ddf06cbe4f496b27bd6e63cc3a2532f3c36b83cf8f9eca0dbae3a2 SHA512 89245805edebd7d43d5b47a38aba115239c20448fc10bce5a1605f99951a303ba360456a54815ffc5346cdd97ddd08657df1881c97f79066e9e2bd075af542da diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-26.1.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-26.1.0-r1.ebuild deleted file mode 100644 index 980c31950f3..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-26.1.0-r1.ebuild +++ /dev/null @@ -1,322 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGO_PN=github.com/docker/docker -MY_PV=${PV/_/-} -inherit golang-vcs-snapshot linux-info systemd udev -GIT_COMMIT=061aa95809be396a6b5542618d8a34b02a21ff77 - -DESCRIPTION="The core functions you need to create Docker images and run Docker containers" -HOMEPAGE="https://www.docker.com/" -SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86" -IUSE="apparmor btrfs +container-init overlay seccomp selinux systemd" - -DEPEND=" - acct-group/docker - >=dev-db/sqlite-3.7.9:3 - apparmor? ( sys-libs/libapparmor ) - btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) - seccomp? ( >=sys-libs/libseccomp-2.2.1 ) - systemd? ( sys-apps/systemd ) -" - -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies -RDEPEND=" - ${DEPEND} - >=net-firewall/iptables-1.4 - sys-process/procps - >=dev-vcs/git-1.7 - >=app-arch/xz-utils-4.9 - >=app-containers/containerd-1.7.15[apparmor?,btrfs?,seccomp?] - >=app-containers/runc-1.1.12[apparmor?,seccomp?] - !app-containers/docker-proxy - container-init? ( >=sys-process/tini-0.19.0[static] ) - selinux? ( sec-policy/selinux-docker ) -" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies -BDEPEND=" - >=dev-lang/go-1.16.12 - dev-go/go-md2man - virtual/pkgconfig -" -# tests require running dockerd as root and downloading containers -RESTRICT="installsources strip test" - -S="${WORKDIR}/${P}/src/${EGO_PN}" - -# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552 -PATCHES=( - "${FILESDIR}/0001-Openrc-Depend-on-containerd-init-script.patch" - "${FILESDIR}/docker-26.1.0-automagic-systemd.patch" -) - -pkg_setup() { - # this is based on "contrib/check-config.sh" from upstream's sources - # required features. - CONFIG_CHECK=" - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG - ~KEYS - ~VETH ~BRIDGE ~BRIDGE_NETFILTER - ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE - ~NETFILTER_XT_MATCH_ADDRTYPE - ~NETFILTER_XT_MATCH_CONNTRACK - ~NETFILTER_XT_MATCH_IPVS - ~NETFILTER_XT_MARK - ~IP_NF_NAT ~NF_NAT - ~POSIX_MQUEUE - " - WARNING_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: is required for bind-mounting /dev/mqueue into containers" - - if kernel_is lt 4 8; then - CONFIG_CHECK+=" - ~DEVPTS_MULTIPLE_INSTANCES - " - fi - - if kernel_is le 5 1; then - CONFIG_CHECK+=" - ~NF_NAT_IPV4 - " - fi - - if kernel_is le 5 2; then - CONFIG_CHECK+=" - ~NF_NAT_NEEDED - " - fi - - if kernel_is ge 4 15; then - CONFIG_CHECK+=" - ~CGROUP_BPF - " - fi - - # optional features - CONFIG_CHECK+=" - ~USER_NS - " - - if use seccomp; then - CONFIG_CHECK+=" - ~SECCOMP ~SECCOMP_FILTER - " - fi - - CONFIG_CHECK+=" - ~CGROUP_PIDS - " - - if kernel_is lt 6 1; then - CONFIG_CHECK+=" - ~MEMCG_SWAP - " - fi - - if kernel_is le 5 8; then - CONFIG_CHECK+=" - ~MEMCG_SWAP_ENABLED - " - fi - - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NATIVE - " - if kernel_is lt 5 19; then - CONFIG_CHECK+=" - ~LEGACY_VSYSCALL_EMULATE - " - fi - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NONE - " - WARNING_LEGACY_VSYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \ - Containers with <=glibc-2.13 will not work" - - if kernel_is le 4 5; then - CONFIG_CHECK+=" - ~MEMCG_KMEM - " - fi - - if kernel_is lt 5; then - CONFIG_CHECK+=" - ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED - " - fi - - CONFIG_CHECK+=" - ~BLK_CGROUP ~BLK_DEV_THROTTLING - ~CGROUP_PERF - ~CGROUP_HUGETLB - ~NET_CLS_CGROUP ~CGROUP_NET_PRIO - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED - ~IP_NF_TARGET_REDIRECT - ~IP_VS - ~IP_VS_NFCT - ~IP_VS_PROTO_TCP - ~IP_VS_PROTO_UDP - ~IP_VS_RR - " - - if use selinux; then - CONFIG_CHECK+=" - ~SECURITY_SELINUX - " - fi - - if use apparmor; then - CONFIG_CHECK+=" - ~SECURITY_APPARMOR - " - fi - - # if ! is_set EXT4_USE_FOR_EXT2; then - # check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY - # if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then - # echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)" - # fi - # fi - - CONFIG_CHECK+=" - ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - - # if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then - # if is_set EXT4_USE_FOR_EXT2; then - # echo " $(wrap_color 'enable these ext4 configs if you are using ext3 or ext4 as backing filesystem' bold black)" - # else - # echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)" - # fi - # fi - - # network drivers - CONFIG_CHECK+=" - ~VXLAN ~BRIDGE_VLAN_FILTERING - ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH - ~XFRM ~XFRM_USER ~XFRM_ALGO ~INET_ESP - " - if kernel_is le 5 3; then - CONFIG_CHECK+=" - ~INET_XFRM_MODE_TRANSPORT - " - fi - - CONFIG_CHECK+=" - ~IPVLAN - " - CONFIG_CHECK+=" - ~MACVLAN ~DUMMY - " - CONFIG_CHECK+=" - ~NF_NAT_FTP ~NF_CONNTRACK_FTP ~NF_NAT_TFTP ~NF_CONNTRACK_TFTP - " - - # storage drivers - if use btrfs; then - CONFIG_CHECK+=" - ~BTRFS_FS - ~BTRFS_FS_POSIX_ACL - " - fi - - CONFIG_CHECK+=" - ~OVERLAY_FS - " - - linux-info_pkg_setup -} - -src_compile() { - export DOCKER_GITCOMMIT="${GIT_COMMIT}" - export GOPATH="${WORKDIR}/${P}" - export VERSION=${PV} - tc-export PKG_CONFIG - - # setup CFLAGS and LDFLAGS for separate build target - # see https://github.com/tianon/docker-overlay/pull/10 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)" - - # let's set up some optional features :) - export DOCKER_BUILDTAGS='' - for gd in btrfs overlay; do - if ! use $gd; then - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" - fi - done - - for tag in apparmor seccomp; do - if use $tag; then - DOCKER_BUILDTAGS+=" $tag" - fi - done - - export SYSTEMD=$(usex systemd 1 0) - - # build binaries - ./hack/make.sh dynbinary || die 'dynbinary failed' -} - -src_install() { - dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim - dosym runc /usr/bin/docker-runc - use container-init && dosym tini /usr/bin/docker-init - dobin bundles/dynbinary-daemon/dockerd - dobin bundles/dynbinary-daemon/docker-proxy - - newinitd contrib/init/openrc/docker.initd docker - newconfd contrib/init/openrc/docker.confd docker - - systemd_dounit contrib/init/systemd/docker.{service,socket} - - udev_dorules contrib/udev/*.rules - - dodoc AUTHORS CONTRIBUTING.md NOTICE README.md - dodoc -r docs/* - - # note: intentionally not using "doins" so that we preserve +x bits - dodir /usr/share/${PN}/contrib - cp -R contrib/* "${ED}/usr/share/${PN}/contrib" -} - -pkg_postinst() { - udev_reload - - elog - elog "To use Docker, the Docker daemon must be running as root. To automatically" - elog "start the Docker daemon at boot:" - if systemd_is_booted || has_version sys-apps/systemd; then - elog " systemctl enable docker.service" - else - elog " rc-update add docker default" - fi - elog - elog "To use Docker as a non-root user, add yourself to the 'docker' group:" - elog ' usermod -aG docker ' - elog - - if use overlay; then - elog " Overlay storage driver/USEflag has been deprecated" - elog " in favor of overlay2 (enabled unconditionally)" - elog - fi - - if has_version sys-fs/zfs; then - elog " ZFS storage driver is available" - elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" - elog - fi -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.2.0.ebuild deleted file mode 100644 index 4f5f1df2aba..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.2.0.ebuild +++ /dev/null @@ -1,323 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGO_PN=github.com/docker/docker -MY_PV=${PV/_/-} -inherit golang-vcs-snapshot linux-info optfeature systemd udev -GIT_COMMIT=3ab5c7d0036ca8fc43141e83b167456ec79828aa - -DESCRIPTION="The core functions you need to create Docker images and run Docker containers" -HOMEPAGE="https://www.docker.com/" -SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs +container-init +overlay2 seccomp selinux systemd" - -DEPEND=" - acct-group/docker - >=dev-db/sqlite-3.7.9:3 - apparmor? ( sys-libs/libapparmor ) - btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) - seccomp? ( >=sys-libs/libseccomp-2.2.1 ) - systemd? ( sys-apps/systemd ) -" - -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies -RDEPEND=" - ${DEPEND} - >=net-firewall/iptables-1.4 - sys-process/procps - >=dev-vcs/git-1.7 - >=app-arch/xz-utils-4.9 - >=app-containers/containerd-1.7.21[apparmor?,btrfs?,seccomp?] - >=app-containers/runc-1.1.13[apparmor?,seccomp?] - !app-containers/docker-proxy - container-init? ( >=sys-process/tini-0.19.0[static] ) - selinux? ( sec-policy/selinux-docker ) -" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies -BDEPEND=" - >=dev-lang/go-1.16.12 - dev-go/go-md2man - virtual/pkgconfig -" -# tests require running dockerd as root and downloading containers -RESTRICT="installsources strip test" - -S="${WORKDIR}/${P}/src/${EGO_PN}" - -# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552 -PATCHES=( - "${FILESDIR}/0001-Openrc-Depend-on-containerd-init-script.patch" -) - -pkg_setup() { - # this is based on "contrib/check-config.sh" from upstream's sources - # required features. - CONFIG_CHECK=" - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG - ~KEYS - ~VETH ~BRIDGE ~BRIDGE_NETFILTER - ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE - ~NETFILTER_XT_MATCH_ADDRTYPE - ~NETFILTER_XT_MATCH_CONNTRACK - ~NETFILTER_XT_MATCH_IPVS - ~NETFILTER_XT_MARK - ~IP_NF_NAT ~NF_NAT - ~POSIX_MQUEUE - " - WARNING_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: is required for bind-mounting /dev/mqueue into containers" - - if kernel_is lt 4 8; then - CONFIG_CHECK+=" - ~DEVPTS_MULTIPLE_INSTANCES - " - fi - - if kernel_is le 5 1; then - CONFIG_CHECK+=" - ~NF_NAT_IPV4 - " - fi - - if kernel_is le 5 2; then - CONFIG_CHECK+=" - ~NF_NAT_NEEDED - " - fi - - if kernel_is ge 4 15; then - CONFIG_CHECK+=" - ~CGROUP_BPF - " - fi - - # optional features - CONFIG_CHECK+=" - ~USER_NS - " - - if use seccomp; then - CONFIG_CHECK+=" - ~SECCOMP ~SECCOMP_FILTER - " - fi - - CONFIG_CHECK+=" - ~CGROUP_PIDS - " - - if kernel_is lt 6 1; then - CONFIG_CHECK+=" - ~MEMCG_SWAP - " - fi - - if kernel_is le 5 8; then - CONFIG_CHECK+=" - ~MEMCG_SWAP_ENABLED - " - fi - - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NATIVE - " - if kernel_is lt 5 19; then - CONFIG_CHECK+=" - ~LEGACY_VSYSCALL_EMULATE - " - fi - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NONE - " - WARNING_LEGACY_VSYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \ - Containers with <=glibc-2.13 will not work" - - if kernel_is le 4 5; then - CONFIG_CHECK+=" - ~MEMCG_KMEM - " - fi - - if kernel_is lt 5; then - CONFIG_CHECK+=" - ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED - " - fi - - CONFIG_CHECK+=" - ~BLK_CGROUP ~BLK_DEV_THROTTLING - ~CGROUP_PERF - ~CGROUP_HUGETLB - ~NET_CLS_CGROUP ~CGROUP_NET_PRIO - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED - ~IP_NF_TARGET_REDIRECT - ~IP_VS - ~IP_VS_NFCT - ~IP_VS_PROTO_TCP - ~IP_VS_PROTO_UDP - ~IP_VS_RR - " - - if use selinux; then - CONFIG_CHECK+=" - ~SECURITY_SELINUX - " - fi - - if use apparmor; then - CONFIG_CHECK+=" - ~SECURITY_APPARMOR - " - fi - - # if ! is_set EXT4_USE_FOR_EXT2; then - # check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY - # if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then - # echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)" - # fi - # fi - - CONFIG_CHECK+=" - ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - - # if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then - # if is_set EXT4_USE_FOR_EXT2; then - # echo " $(wrap_color 'enable these ext4 configs if you are using ext3 or ext4 as backing filesystem' bold black)" - # else - # echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)" - # fi - # fi - - # network drivers - CONFIG_CHECK+=" - ~VXLAN ~BRIDGE_VLAN_FILTERING - ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH - ~XFRM ~XFRM_USER ~XFRM_ALGO ~INET_ESP - " - if kernel_is le 5 3; then - CONFIG_CHECK+=" - ~INET_XFRM_MODE_TRANSPORT - " - fi - - CONFIG_CHECK+=" - ~IPVLAN - " - CONFIG_CHECK+=" - ~MACVLAN ~DUMMY - " - CONFIG_CHECK+=" - ~NF_NAT_FTP ~NF_CONNTRACK_FTP ~NF_NAT_TFTP ~NF_CONNTRACK_TFTP - " - - # storage drivers - if use btrfs; then - CONFIG_CHECK+=" - ~BTRFS_FS - ~BTRFS_FS_POSIX_ACL - " - fi - - CONFIG_CHECK+=" - ~OVERLAY_FS - " - - linux-info_pkg_setup -} - -src_compile() { - export DOCKER_GITCOMMIT="${GIT_COMMIT}" - export GOPATH="${WORKDIR}/${P}" - export VERSION=${PV} - tc-export PKG_CONFIG - - # setup CFLAGS and LDFLAGS for separate build target - # see https://github.com/tianon/docker-overlay/pull/10 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)" - - # let's set up some optional features :) - export DOCKER_BUILDTAGS='' - for gd in btrfs overlay2; do - if ! use $gd; then - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" - fi - done - - for tag in apparmor seccomp; do - if use $tag; then - DOCKER_BUILDTAGS+=" $tag" - fi - done - - export EXCLUDE_AUTO_BUILDTAG_JOURNALD=$(usex systemd '' 'y') - - # build binaries - ./hack/make.sh dynbinary || die 'dynbinary failed' -} - -src_install() { - dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim - dosym runc /usr/bin/docker-runc - use container-init && dosym tini /usr/bin/docker-init - dobin bundles/dynbinary-daemon/dockerd - dobin bundles/dynbinary-daemon/docker-proxy - for f in dockerd-rootless-setuptool.sh dockerd-rootless.sh; do - dosym ../share/docker/contrib/${f} /usr/bin/${f} - done - - newinitd contrib/init/openrc/docker.initd docker - newconfd contrib/init/openrc/docker.confd docker - - systemd_dounit contrib/init/systemd/docker.{service,socket} - - udev_dorules contrib/udev/*.rules - - dodoc AUTHORS CONTRIBUTING.md NOTICE README.md - dodoc -r docs/* - - # note: intentionally not using "doins" so that we preserve +x bits - dodir /usr/share/${PN}/contrib - cp -R contrib/* "${ED}/usr/share/${PN}/contrib" -} - -pkg_postinst() { - udev_reload - - elog - elog "To use Docker, the Docker daemon must be running as root. To automatically" - elog "start the Docker daemon at boot:" - if systemd_is_booted || has_version sys-apps/systemd; then - elog " systemctl enable docker.service" - else - elog " rc-update add docker default" - fi - elog - elog "To use Docker as a non-root user, add yourself to the 'docker' group:" - elog ' usermod -aG docker ' - elog - - if has_version sys-fs/zfs; then - elog " ZFS storage driver is available" - elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" - elog - fi - - optfeature "rootless mode support" sys-apps/shadow - optfeature "rootless mode support" sys-apps/rootlesskit - optfeature_header "for rootless mode you also need a network stack" - optfeature "rootless mode network stack" app-containers/slirp4netns -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.3.1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.3.1.ebuild deleted file mode 100644 index 3fe81a9b43d..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.3.1.ebuild +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGO_PN=github.com/docker/docker -MY_PV=${PV/_/-} -inherit golang-vcs-snapshot linux-info optfeature systemd udev -GIT_COMMIT=41ca978a0a5400cc24b274137efa9f25517fcc0b - -DESCRIPTION="The core functions you need to create Docker images and run Docker containers" -HOMEPAGE="https://www.docker.com/" -SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs +container-init +overlay2 seccomp selinux systemd" - -DEPEND=" - acct-group/docker - >=dev-db/sqlite-3.7.9:3 - apparmor? ( sys-libs/libapparmor ) - btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) - seccomp? ( >=sys-libs/libseccomp-2.2.1 ) - systemd? ( sys-apps/systemd ) -" - -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies -RDEPEND=" - ${DEPEND} - >=net-firewall/iptables-1.4 - sys-process/procps - >=dev-vcs/git-1.7 - >=app-arch/xz-utils-4.9 - >=app-containers/containerd-1.7.22[apparmor?,btrfs?,seccomp?] - >=app-containers/runc-1.1.14[apparmor?,seccomp?] - !app-containers/docker-proxy - container-init? ( >=sys-process/tini-0.19.0[static] ) - selinux? ( sec-policy/selinux-docker ) -" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies -BDEPEND=" - >=dev-lang/go-1.16.12 - dev-go/go-md2man - virtual/pkgconfig -" -# tests require running dockerd as root and downloading containers -RESTRICT="installsources strip test" - -S="${WORKDIR}/${P}/src/${EGO_PN}" - -# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552 -pkg_setup() { - # this is based on "contrib/check-config.sh" from upstream's sources - # required features. - CONFIG_CHECK=" - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG - ~KEYS - ~VETH ~BRIDGE ~BRIDGE_NETFILTER - ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE - ~NETFILTER_XT_MATCH_ADDRTYPE - ~NETFILTER_XT_MATCH_CONNTRACK - ~NETFILTER_XT_MATCH_IPVS - ~NETFILTER_XT_MARK - ~IP_NF_NAT ~NF_NAT - ~POSIX_MQUEUE - " - WARNING_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: is required for bind-mounting /dev/mqueue into containers" - - if kernel_is lt 4 8; then - CONFIG_CHECK+=" - ~DEVPTS_MULTIPLE_INSTANCES - " - fi - - if kernel_is le 5 1; then - CONFIG_CHECK+=" - ~NF_NAT_IPV4 - " - fi - - if kernel_is le 5 2; then - CONFIG_CHECK+=" - ~NF_NAT_NEEDED - " - fi - - if kernel_is ge 4 15; then - CONFIG_CHECK+=" - ~CGROUP_BPF - " - fi - - # optional features - CONFIG_CHECK+=" - ~USER_NS - " - - if use seccomp; then - CONFIG_CHECK+=" - ~SECCOMP ~SECCOMP_FILTER - " - fi - - CONFIG_CHECK+=" - ~CGROUP_PIDS - " - - if kernel_is lt 6 1; then - CONFIG_CHECK+=" - ~MEMCG_SWAP - " - fi - - if kernel_is le 5 8; then - CONFIG_CHECK+=" - ~MEMCG_SWAP_ENABLED - " - fi - - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NATIVE - " - if kernel_is lt 5 19; then - CONFIG_CHECK+=" - ~LEGACY_VSYSCALL_EMULATE - " - fi - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NONE - " - WARNING_LEGACY_VSYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \ - Containers with <=glibc-2.13 will not work" - - if kernel_is le 4 5; then - CONFIG_CHECK+=" - ~MEMCG_KMEM - " - fi - - if kernel_is lt 5; then - CONFIG_CHECK+=" - ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED - " - fi - - CONFIG_CHECK+=" - ~BLK_CGROUP ~BLK_DEV_THROTTLING - ~CGROUP_PERF - ~CGROUP_HUGETLB - ~NET_CLS_CGROUP ~CGROUP_NET_PRIO - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED - ~IP_NF_TARGET_REDIRECT - ~IP_VS - ~IP_VS_NFCT - ~IP_VS_PROTO_TCP - ~IP_VS_PROTO_UDP - ~IP_VS_RR - " - - if use selinux; then - CONFIG_CHECK+=" - ~SECURITY_SELINUX - " - fi - - if use apparmor; then - CONFIG_CHECK+=" - ~SECURITY_APPARMOR - " - fi - - # if ! is_set EXT4_USE_FOR_EXT2; then - # check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY - # if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then - # echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)" - # fi - # fi - - CONFIG_CHECK+=" - ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - - # if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then - # if is_set EXT4_USE_FOR_EXT2; then - # echo " $(wrap_color 'enable these ext4 configs if you are using ext3 or ext4 as backing filesystem' bold black)" - # else - # echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)" - # fi - # fi - - # network drivers - CONFIG_CHECK+=" - ~VXLAN ~BRIDGE_VLAN_FILTERING - ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH - ~XFRM ~XFRM_USER ~XFRM_ALGO ~INET_ESP - " - if kernel_is le 5 3; then - CONFIG_CHECK+=" - ~INET_XFRM_MODE_TRANSPORT - " - fi - - CONFIG_CHECK+=" - ~IPVLAN - " - CONFIG_CHECK+=" - ~MACVLAN ~DUMMY - " - CONFIG_CHECK+=" - ~NF_NAT_FTP ~NF_CONNTRACK_FTP ~NF_NAT_TFTP ~NF_CONNTRACK_TFTP - " - - # storage drivers - if use btrfs; then - CONFIG_CHECK+=" - ~BTRFS_FS - ~BTRFS_FS_POSIX_ACL - " - fi - - CONFIG_CHECK+=" - ~OVERLAY_FS - " - - linux-info_pkg_setup -} - -src_compile() { - export DOCKER_GITCOMMIT="${GIT_COMMIT}" - export GOPATH="${WORKDIR}/${P}" - export VERSION=${PV} - tc-export PKG_CONFIG - - # setup CFLAGS and LDFLAGS for separate build target - # see https://github.com/tianon/docker-overlay/pull/10 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)" - - # let's set up some optional features :) - export DOCKER_BUILDTAGS='' - for gd in btrfs overlay2; do - if ! use $gd; then - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" - fi - done - - for tag in apparmor seccomp; do - if use $tag; then - DOCKER_BUILDTAGS+=" $tag" - fi - done - - export EXCLUDE_AUTO_BUILDTAG_JOURNALD=$(usex systemd '' 'y') - - # build binaries - ./hack/make.sh dynbinary || die 'dynbinary failed' -} - -src_install() { - dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim - dosym runc /usr/bin/docker-runc - use container-init && dosym tini /usr/bin/docker-init - dobin bundles/dynbinary-daemon/dockerd - dobin bundles/dynbinary-daemon/docker-proxy - for f in dockerd-rootless-setuptool.sh dockerd-rootless.sh; do - dosym ../share/docker/contrib/${f} /usr/bin/${f} - done - - newinitd contrib/init/openrc/docker.initd docker - newconfd contrib/init/openrc/docker.confd docker - - systemd_dounit contrib/init/systemd/docker.{service,socket} - - udev_dorules contrib/udev/*.rules - - dodoc AUTHORS CONTRIBUTING.md NOTICE README.md - dodoc -r docs/* - - # note: intentionally not using "doins" so that we preserve +x bits - dodir /usr/share/${PN}/contrib - cp -R contrib/* "${ED}/usr/share/${PN}/contrib" -} - -pkg_postinst() { - udev_reload - - elog - elog "To use Docker, the Docker daemon must be running as root. To automatically" - elog "start the Docker daemon at boot:" - if systemd_is_booted || has_version sys-apps/systemd; then - elog " systemctl enable docker.service" - else - elog " rc-update add docker default" - fi - elog - elog "To use Docker as a non-root user, add yourself to the 'docker' group:" - elog ' usermod -aG docker ' - elog - - if has_version sys-fs/zfs; then - elog " ZFS storage driver is available" - elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" - elog - fi - - optfeature "rootless mode support" sys-apps/shadow - optfeature "rootless mode support" sys-apps/rootlesskit - optfeature_header "for rootless mode you also need a network stack" - optfeature "rootless mode network stack" app-containers/slirp4netns -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.0.ebuild deleted file mode 100644 index 97c7ea5319e..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.0.ebuild +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -EGO_PN=github.com/docker/docker -MY_PV=${PV/_/-} -inherit golang-vcs-snapshot linux-info optfeature systemd udev -GIT_COMMIT=92a83937d0280dcbea92099b01e01aa4251c1777 - -DESCRIPTION="The core functions you need to create Docker images and run Docker containers" -HOMEPAGE="https://www.docker.com/" -SRC_URI="https://github.com/moby/moby/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs +container-init +overlay2 seccomp selinux systemd" - -DEPEND=" - acct-group/docker - >=dev-db/sqlite-3.7.9:3 - apparmor? ( sys-libs/libapparmor ) - btrfs? ( >=sys-fs/btrfs-progs-3.16.1 ) - seccomp? ( >=sys-libs/libseccomp-2.2.1 ) - systemd? ( sys-apps/systemd ) -" - -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#runtime-dependencies -# https://github.com/moby/moby/blob/master/project/PACKAGERS.md#optional-dependencies -RDEPEND=" - ${DEPEND} - >=net-firewall/iptables-1.4 - sys-process/procps - >=dev-vcs/git-1.7 - >=app-arch/xz-utils-4.9 - >=app-containers/containerd-1.7.24[apparmor?,btrfs?,seccomp?] - >=app-containers/runc-1.2.2[apparmor?,seccomp?] - !app-containers/docker-proxy - container-init? ( >=sys-process/tini-0.19.0[static] ) - selinux? ( sec-policy/selinux-docker ) -" - -# https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies -BDEPEND=" - >=dev-lang/go-1.16.12 - dev-go/go-md2man - virtual/pkgconfig -" -# tests require running dockerd as root and downloading containers -RESTRICT="installsources strip test" - -S="${WORKDIR}/${P}/src/${EGO_PN}" - -# https://bugs.gentoo.org/748984 https://github.com/etcd-io/etcd/pull/12552 -pkg_setup() { - # this is based on "contrib/check-config.sh" from upstream's sources - # required features. - CONFIG_CHECK=" - ~NAMESPACES ~NET_NS ~PID_NS ~IPC_NS ~UTS_NS - ~CGROUPS ~CGROUP_CPUACCT ~CGROUP_DEVICE ~CGROUP_FREEZER ~CGROUP_SCHED ~CPUSETS ~MEMCG - ~KEYS - ~VETH ~BRIDGE ~BRIDGE_NETFILTER - ~IP_NF_FILTER ~IP_NF_TARGET_MASQUERADE - ~NETFILTER_XT_MATCH_ADDRTYPE - ~NETFILTER_XT_MATCH_CONNTRACK - ~NETFILTER_XT_MATCH_IPVS - ~NETFILTER_XT_MARK - ~IP_NF_NAT ~NF_NAT - ~POSIX_MQUEUE - " - WARNING_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: is required for bind-mounting /dev/mqueue into containers" - - if kernel_is lt 4 8; then - CONFIG_CHECK+=" - ~DEVPTS_MULTIPLE_INSTANCES - " - fi - - if kernel_is le 5 1; then - CONFIG_CHECK+=" - ~NF_NAT_IPV4 - " - fi - - if kernel_is le 5 2; then - CONFIG_CHECK+=" - ~NF_NAT_NEEDED - " - fi - - if kernel_is ge 4 15; then - CONFIG_CHECK+=" - ~CGROUP_BPF - " - fi - - # optional features - CONFIG_CHECK+=" - ~USER_NS - " - - if use seccomp; then - CONFIG_CHECK+=" - ~SECCOMP ~SECCOMP_FILTER - " - fi - - CONFIG_CHECK+=" - ~CGROUP_PIDS - " - - if kernel_is lt 6 1; then - CONFIG_CHECK+=" - ~MEMCG_SWAP - " - fi - - if kernel_is le 5 8; then - CONFIG_CHECK+=" - ~MEMCG_SWAP_ENABLED - " - fi - - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NATIVE - " - if kernel_is lt 5 19; then - CONFIG_CHECK+=" - ~LEGACY_VSYSCALL_EMULATE - " - fi - CONFIG_CHECK+=" - ~!LEGACY_VSYSCALL_NONE - " - WARNING_LEGACY_VSYSCALL_NONE="CONFIG_LEGACY_VSYSCALL_NONE enabled: \ - Containers with <=glibc-2.13 will not work" - - if kernel_is le 4 5; then - CONFIG_CHECK+=" - ~MEMCG_KMEM - " - fi - - if kernel_is lt 5; then - CONFIG_CHECK+=" - ~IOSCHED_CFQ ~CFQ_GROUP_IOSCHED - " - fi - - CONFIG_CHECK+=" - ~BLK_CGROUP ~BLK_DEV_THROTTLING - ~CGROUP_PERF - ~CGROUP_HUGETLB - ~NET_CLS_CGROUP ~CGROUP_NET_PRIO - ~CFS_BANDWIDTH ~FAIR_GROUP_SCHED - ~IP_NF_TARGET_REDIRECT - ~IP_VS - ~IP_VS_NFCT - ~IP_VS_PROTO_TCP - ~IP_VS_PROTO_UDP - ~IP_VS_RR - " - - if use selinux; then - CONFIG_CHECK+=" - ~SECURITY_SELINUX - " - fi - - if use apparmor; then - CONFIG_CHECK+=" - ~SECURITY_APPARMOR - " - fi - - # if ! is_set EXT4_USE_FOR_EXT2; then - # check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY - # if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then - # echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)" - # fi - # fi - - CONFIG_CHECK+=" - ~EXT4_FS ~EXT4_FS_POSIX_ACL ~EXT4_FS_SECURITY - " - - # if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then - # if is_set EXT4_USE_FOR_EXT2; then - # echo " $(wrap_color 'enable these ext4 configs if you are using ext3 or ext4 as backing filesystem' bold black)" - # else - # echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)" - # fi - # fi - - # network drivers - CONFIG_CHECK+=" - ~VXLAN ~BRIDGE_VLAN_FILTERING - ~CRYPTO ~CRYPTO_AEAD ~CRYPTO_GCM ~CRYPTO_SEQIV ~CRYPTO_GHASH - ~XFRM ~XFRM_USER ~XFRM_ALGO ~INET_ESP - " - if kernel_is le 5 3; then - CONFIG_CHECK+=" - ~INET_XFRM_MODE_TRANSPORT - " - fi - - CONFIG_CHECK+=" - ~IPVLAN - " - CONFIG_CHECK+=" - ~MACVLAN ~DUMMY - " - CONFIG_CHECK+=" - ~NF_NAT_FTP ~NF_CONNTRACK_FTP ~NF_NAT_TFTP ~NF_CONNTRACK_TFTP - " - - # storage drivers - if use btrfs; then - CONFIG_CHECK+=" - ~BTRFS_FS - ~BTRFS_FS_POSIX_ACL - " - fi - - CONFIG_CHECK+=" - ~OVERLAY_FS - " - - linux-info_pkg_setup -} - -src_compile() { - export DOCKER_GITCOMMIT="${GIT_COMMIT}" - export GOPATH="${WORKDIR}/${P}" - export VERSION=${PV} - tc-export PKG_CONFIG - - # setup CFLAGS and LDFLAGS for separate build target - # see https://github.com/tianon/docker-overlay/pull/10 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" -L${ESYSROOT}/usr/$(get_libdir)" - - # let's set up some optional features :) - export DOCKER_BUILDTAGS='' - for gd in btrfs overlay2; do - if ! use $gd; then - DOCKER_BUILDTAGS+=" exclude_graphdriver_${gd//-/}" - fi - done - - for tag in apparmor seccomp; do - if use $tag; then - DOCKER_BUILDTAGS+=" $tag" - fi - done - - export EXCLUDE_AUTO_BUILDTAG_JOURNALD=$(usex systemd '' 'y') - - # build binaries - ./hack/make.sh dynbinary || die 'dynbinary failed' -} - -src_install() { - dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim - dosym runc /usr/bin/docker-runc - use container-init && dosym tini /usr/bin/docker-init - dobin bundles/dynbinary-daemon/dockerd - dobin bundles/dynbinary-daemon/docker-proxy - for f in dockerd-rootless-setuptool.sh dockerd-rootless.sh; do - dosym ../share/docker/contrib/${f} /usr/bin/${f} - done - - newinitd contrib/init/openrc/docker.initd docker - newconfd contrib/init/openrc/docker.confd docker - - systemd_dounit contrib/init/systemd/docker.{service,socket} - - udev_dorules contrib/udev/*.rules - - dodoc AUTHORS CONTRIBUTING.md NOTICE README.md - dodoc -r docs/* - - # note: intentionally not using "doins" so that we preserve +x bits - dodir /usr/share/${PN}/contrib - cp -R contrib/* "${ED}/usr/share/${PN}/contrib" -} - -pkg_postinst() { - udev_reload - - elog - elog "To use Docker, the Docker daemon must be running as root. To automatically" - elog "start the Docker daemon at boot:" - if systemd_is_booted || has_version sys-apps/systemd; then - elog " systemctl enable docker.service" - else - elog " rc-update add docker default" - fi - elog - elog "To use Docker as a non-root user, add yourself to the 'docker' group:" - elog ' usermod -aG docker ' - elog - - if has_version sys-fs/zfs; then - elog " ZFS storage driver is available" - elog " Check https://docs.docker.com/storage/storagedriver/zfs-driver for more info" - elog - fi - - optfeature "rootless mode support" sys-apps/shadow - optfeature "rootless mode support" sys-apps/rootlesskit - optfeature_header "for rootless mode you also need a network stack" - optfeature "rootless mode network stack" app-containers/slirp4netns -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1-r1.ebuild index baaae0de273..c3992cb0f31 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ S="${WORKDIR}/moby-${PV}" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86" IUSE="apparmor btrfs +container-init cuda +overlay2 seccomp selinux systemd" DEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.5.0.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1.ebuild rename to sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.5.0.ebuild index 846092ae8cf..852b70a8ce0 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.4.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker/docker-27.5.0.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 MY_PV=${PV/_/-} inherit go-module linux-info optfeature systemd toolchain-funcs udev -GIT_COMMIT=c710b88579fcb5e0d53f96dcae976d79323b9166 +GIT_COMMIT=38b84dce32c45732606fe09ffebef8b29a783644 DESCRIPTION="The core functions you need to create Docker images and run Docker containers" HOMEPAGE="https://www.docker.com/" @@ -14,7 +14,7 @@ S="${WORKDIR}/moby-${PV}" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs +container-init +overlay2 seccomp selinux systemd" +IUSE="apparmor btrfs +container-init cuda +overlay2 seccomp selinux systemd" DEPEND=" acct-group/docker @@ -36,7 +36,9 @@ RDEPEND=" >=app-containers/containerd-1.7.24[apparmor?,btrfs?,seccomp?] >=app-containers/runc-1.2.2[apparmor?,seccomp?] !app-containers/docker-proxy + !=sys-process/tini-0.19.0[static] ) + cuda? ( app-containers/nvidia-container-toolkit ) selinux? ( sec-policy/selinux-docker ) " @@ -271,7 +273,7 @@ src_compile() { src_install() { dosym containerd /usr/bin/docker-containerd - dosym containerd-shim /usr/bin/docker-containerd-shim + dosym containerd-shim-runc-v2 /usr/bin/docker-containerd-shim dosym runc /usr/bin/docker-runc use container-init && dosym tini /usr/bin/docker-init dobin bundles/dynbinary-daemon/dockerd diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch b/sdk_container/src/third_party/portage-stable/app-containers/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch deleted file mode 100644 index 22aa145f33b..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/files/0001-Openrc-Depend-on-containerd-init-script.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bb69104381805014eb7675682d204fe460a52388 Mon Sep 17 00:00:00 2001 -From: Jan Breig -Date: Mon, 16 May 2022 14:58:36 +0200 -Subject: [PATCH] Openrc: Depend on containerd init script - -Signed-off-by: Jan Breig ---- - contrib/init/openrc/docker.initd | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/contrib/init/openrc/docker.initd b/contrib/init/openrc/docker.initd -index 3229223bad..57defb8f57 100644 ---- a/contrib/init/openrc/docker.initd -+++ b/contrib/init/openrc/docker.initd -@@ -17,6 +17,10 @@ rc_ulimit="${DOCKER_ULIMIT:--c unlimited -n 1048576 -u unlimited}" - - retry="${DOCKER_RETRY:-TERM/60/KILL/10}" - -+depend() { -+ need containerd -+} -+ - start_pre() { - checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" - } --- -2.35.1 - diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/files/docker-26.1.0-automagic-systemd.patch b/sdk_container/src/third_party/portage-stable/app-containers/docker/files/docker-26.1.0-automagic-systemd.patch deleted file mode 100644 index 004dbb9ad3c..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/files/docker-26.1.0-automagic-systemd.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugs.gentoo.org/914076 -https://github.com/moby/moby/issues/47770 ---- a/hack/make.sh -+++ b/hack/make.sh -@@ -83,7 +83,7 @@ if [ ! "$GOPATH" ]; then - exit 1 - fi - --if ${PKG_CONFIG} 'libsystemd' 2> /dev/null; then -+if [[ -n "$SYSTEMD" ]] && [[ "$SYSTEMD" == 1 ]] && ${PKG_CONFIG} 'libsystemd' 2> /dev/null; then - DOCKER_BUILDTAGS+=" journald" - fi - diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker/metadata.xml b/sdk_container/src/third_party/portage-stable/app-containers/docker/metadata.xml index dfe55652750..29ae0a0b6db 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker/metadata.xml @@ -21,10 +21,6 @@ Makes the a staticly-linked init system tini available inside a container. - - Enables dependencies for the "overlay" graph driver, including - necessary kernel flags. - Enables dependencies for the "overlay2" graph driver, including necessary kernel flags. From 33d8e916d36bfd0ac48f4a4a210a985db9db001b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:39 +0000 Subject: [PATCH 008/145] app-containers/docker-buildx: Sync with Gentoo It's from Gentoo commit fb3694ed99e0fcec9bc7ff8ee87833ba00dbe9dd. --- .../app-containers/docker-buildx/docker-buildx-0.19.1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker-buildx/docker-buildx-0.19.1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker-buildx/docker-buildx-0.19.1.ebuild index d36ee06a545..197e965fc5e 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker-buildx/docker-buildx-0.19.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker-buildx/docker-buildx-0.19.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/docker/buildx.git" else SRC_URI="https://github.com/docker/buildx/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" + KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86" S="${WORKDIR}/${MY_PN}-${PV}" fi From 0d245fcb524cb7de2d13fa5b319c9d7ef24fef5b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:39 +0000 Subject: [PATCH 009/145] app-containers/docker-cli: Sync with Gentoo It's from Gentoo commit 3c00a6f2d424fe0bfd2756fd792ddc17d43aa407. --- .../app-containers/docker-cli/Manifest | 10 +-- .../docker-cli/docker-cli-26.1.0.ebuild | 72 ------------------- .../docker-cli/docker-cli-27.3.1.ebuild | 72 ------------------- .../docker-cli/docker-cli-27.4.0.ebuild | 72 ------------------- .../docker-cli/docker-cli-27.4.1.ebuild | 4 +- ...27.2.0.ebuild => docker-cli-27.5.0.ebuild} | 30 ++++---- 6 files changed, 17 insertions(+), 243 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-26.1.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-27.3.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-27.4.0.ebuild rename sdk_container/src/third_party/portage-stable/app-containers/docker-cli/{docker-cli-27.2.0.ebuild => docker-cli-27.5.0.ebuild} (76%) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/Manifest b/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/Manifest index 025c88ef0cf..e7cd7a7fda9 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/Manifest @@ -1,10 +1,4 @@ -DIST docker-cli-26.1.0-man.tar.xz 79004 BLAKE2B 36dcf969c6567680990420d6d177101bf457f7fc1c24dff195ce8b478268335419fba5ff51a7b77bb8c0a6e0e6077d83ddb50f2ecf08bf069be89fc4849afd6e SHA512 36297ee3cbf096112ec41db2cd1d06796ddd27a57c4323e71a727e17d3930102710f643a77df9e68cd9b3294a6bb0fdf5565379e9fae7331e25afcd147b0084f -DIST docker-cli-26.1.0.tar.gz 7213165 BLAKE2B 302236467f2b6f3f46b0f0c75e89c2cef0cd251d36e12f78a67c906cfb85b842b998fd3b07f4a2dfc0a04825a9b105d90f11d176055ded397f2d4e9145639d5d SHA512 1a1e9af1a836765ffa91f7f2e1b27911e2b6b373c308a7db332a7cd1825459ab1c04a93d03c9947b631bead0af21d9f03e06c3a60855cc56ca7039e50e38ba87 -DIST docker-cli-27.2.0-man.tar.xz 79052 BLAKE2B 019299b8cd0adbb1a3749f9aa37b1e38bf212b2c13eee81ae49f843bcc56ff3f41413e1021bebf5c88b4406d7928c2c40de026df861195aa2df79d9c724f8b87 SHA512 d61d6f9f9139f2d22268932d795a50e7b9b1ff993699ba87ca9353cb9908ac18c103a34ee9a486f3537988d6ba7317b05588cd84ff8327b86826ab7ed5023947 -DIST docker-cli-27.2.0.tar.gz 7236608 BLAKE2B 828f002d83de47efad370e28df2f5e50f75da7952bf4fcbe30d3d66c9bc281ee99fab820f7bca002c8eb13fa29b7518e951974b62008e213662c1d384a286c0d SHA512 5dce9e974a96b2518a73d50a9421d12feeb9cc792bb89000f26e04a91fdddade2648dea39aa721e48c9b07bfc18f7a6676fb7e286ae779556753886ec45e86c3 -DIST docker-cli-27.3.1-man.tar.xz 75056 BLAKE2B 791cd4fab7c36417cdfd3078bbbaff6a7e87a61908bbfd38fdfdb7fff6dfc6bac80ee351a54d5673f5c5e25180d4e0429b4b6d0a220cbea3880d568faa64dc96 SHA512 24a1f6aa923d8aa878c2007d49597e1384494b05bb0886f64b15e575fecf96941235f1f89c8731074e85f49dda5efec087d6759cb7622cb834461e76ebfb3fcd -DIST docker-cli-27.3.1.tar.gz 7225408 BLAKE2B 1c3d428b3e7d653b0a246ee51f9bea47eba5f2b80bbfb1915f31f57e420750a28e2615482058f4051c55c8b723d4935d2711dd4a4c423ec3a17932fd9363d13e SHA512 6e80e94a0e9e16aaf2b19bc97c99ead39184745f601aea94e47c066a19b6436850d5269962e0802e9f7fa9f7dcb357ec0756c9466afa2c0a6ae239d61ef15961 -DIST docker-cli-27.4.0-man.tar.xz 75096 BLAKE2B bc3a6edfa83d506ba2cd9407506d7e3e60c57fe7bd319e08b50d559bfbce289b83a44440b1cf948f163b3b348787ae7a9e5e5e897f6ae113b60bc33407870ab3 SHA512 e2701a76ab028bc325183f52d96a2129f425a14c5c038411e928507c8e103638e9b376eb3192be9c8a99996fadf453d0205d1b64d92661a61df5feea6609e58d -DIST docker-cli-27.4.0.tar.gz 7270507 BLAKE2B 18ddd86952016fbf6d423812c28ab7983e55517d832dec278e7a0cef4af0790cba54ed74ba7ca60036116ff6170a6578f7eec24ca8c852ee6b8cea321c9d0ae9 SHA512 432ebf450b03f2e4ca6e7230bbb2b37d5c8372bc62bf3c4c24469d1015974231f9f5cadf949a2340fa1e8d3ba82c88cadae604a029141a9e037ee1fd6ff89355 DIST docker-cli-27.4.1-man.tar.xz 70252 BLAKE2B 3fbefe359b39cfb7eda125830dc6c8e9e49685a833f7f46b111e9e7c0ed4d0009ab5a6ccdd27a97a1885453a7e43ae4f557c63f9201fc2604d0146f20f14763c SHA512 ddd7017fb0d5193e6f7b39e67f047edf3c98e86f299d0a7ab318efc3fb8b712a71ee5ac933ccf33945f846e2b20d2b1efc7fa9fcbd12f9a56b9d519bec4bcee1 DIST docker-cli-27.4.1.tar.gz 7273057 BLAKE2B 3ebebe0e0918dd54d45c058c2922107fc2e82170c6e00540fde2c884c8f88945ceb5428fd5917014af5d35a554a0d9e83306d173ceea9c7461508b902f0023f8 SHA512 5880053d44e169b93fe50f3d4b13fa2f8f60de32a96f8ee2923a3291385532c1903027f0654a65a8eab51f29caf7b805857b491c0bfeee2e1983f822e579851e +DIST docker-cli-27.5.0-man.tar.xz 70224 BLAKE2B 4c2a4025721fbfbb63c24e20bdbc68f3a8b2d355d57060a86190ea30ec4dc1e01eae1265a3de6077c3952e1c9d859c1c28c707caccf07260f6dabe8bf3ef5439 SHA512 4450669971503665ca644899a657c587e86edaf4462ef47bd49b09da961111e8bc27a61caf8a8dbf9a617427bb2ebf92ab8d7adb6c4f33001383e590b59cfff3 +DIST docker-cli-27.5.0.tar.gz 7462649 BLAKE2B 89ae65834c606d9ef4f8ebc9fee5052d3e12b8aa6d9f4df7c0415157b24a55e89d0758b4f5cf0e4f3f5b6ea2f9c46bfc010c604995cb5cf1d162c068ba679787 SHA512 3c7c709f38fffd4d4e134d2abd7e6dc606e1cba765d36924a53f9470d6077be2282983eb23995bd56d772da253a69a854fe3112fea1a7ed2c9a1b70d2cc45b57 diff --git a/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-26.1.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-26.1.0.ebuild deleted file mode 100644 index 12a42233ff2..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/docker-cli/docker-cli-26.1.0.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -GIT_COMMIT=9714adc6c797755f63053726c56bc1c17c0c9204 - -EGO_PN="github.com/docker/cli" -MY_PV=${PV/_/-} -inherit bash-completion-r1 golang-vcs-snapshot - -DESCRIPTION="the command line binary for docker" -HOMEPAGE="https://www.docker.com/" -SRC_URI="https://github.com/docker/cli/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-man.tar.xz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv ~x86" -IUSE="hardened selinux" - -RDEPEND="! Date: Mon, 27 Jan 2025 07:04:39 +0000 Subject: [PATCH 010/145] app-containers/netavark: Sync with Gentoo It's from Gentoo commit bc98becba58b33e3661a75335d002e872e28d3a7. --- .../app-containers/netavark/netavark-1.12.2-r1.ebuild | 2 +- .../app-containers/netavark/netavark-9999.ebuild | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild index c5c7836b91e..e0cf15c2ee1 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild @@ -24,7 +24,7 @@ LICENSE="Apache-2.0" LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB" SLOT="0" BDEPEND="dev-go/go-md2man - dev-libs/protobuf" + dev-libs/protobuf[protoc]" QA_FLAGS_IGNORED=" usr/libexec/podman/${PN}" diff --git a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild index 81168b09df4..689cd3e0189 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,7 +24,7 @@ LICENSE="Apache-2.0" LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB" SLOT="0" BDEPEND="dev-go/go-md2man - dev-libs/protobuf" + dev-libs/protobuf[protoc]" QA_FLAGS_IGNORED=" usr/libexec/podman/${PN}" From c1f092e3bac23decb9a3ae320b2d1b8558b18119 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:39 +0000 Subject: [PATCH 011/145] app-containers/podman: Sync with Gentoo It's from Gentoo commit 7617135b280082d0f36300d5fd38acccd14322e6. --- .../app-containers/podman/Manifest | 1 + .../app-containers/podman/podman-5.3.2.ebuild | 146 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/app-containers/podman/podman-5.3.2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-containers/podman/Manifest b/sdk_container/src/third_party/portage-stable/app-containers/podman/Manifest index b2d1a65fcab..1b12f95a50e 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/podman/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-containers/podman/Manifest @@ -1,2 +1,3 @@ DIST podman-5.2.5.tar.gz 23834863 BLAKE2B 2264c9b19e621a1269ae5baee6fee148e6f1b9cacbdd83fdbecf671f87855d0ae566e41e4e8cbffe57662b7e9a3d653d57a7d2acb8f30b869b8af1bd7473a617 SHA512 29f71c67a5700e8dffe45e6e91acab509d8c8924a5f3cf9b4eee95f665a9ed19333285df89da892699ee314cee27c0c8a4a62d29e4205198781f5d5f585135a9 DIST podman-5.3.0.tar.gz 24194165 BLAKE2B fb2da37e4f97d69997b9518425bb1ec74846e4e26855bf9ece0eeefb723f603051d4d4a1b3320cdba5c97595db12e1948f280776429819d10bfe83a57f349c78 SHA512 3f1ab7e792850e2e21823c59ca9e03d348e78267e3ec5344a04c38e51466159717944c318cf5e61ad9a785d9112b468b9fc37f3b60a40e8764d5cac9f58e7d16 +DIST podman-5.3.2.tar.gz 24207488 BLAKE2B 68f618b74be41bf489de97b009d335f3033634c5c065b1089cc9a6132e38e3a7f707b959d29d955ab0bd805721c14cda90c77fa60f6ba09327f38d4a8bc19112 SHA512 b7007278dd3f493bd0d0185ed4328570d5af527d4864c4435e7b330543d60ba87f04f36c94407d4e11e622a4af8b6467f66474e9b66cbeacb8eecb3088b4439e diff --git a/sdk_container/src/third_party/portage-stable/app-containers/podman/podman-5.3.2.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/podman/podman-5.3.2.ebuild new file mode 100644 index 00000000000..38cbb5a51f5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-containers/podman/podman-5.3.2.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..13} ) + +inherit go-module python-any-r1 tmpfiles toolchain-funcs linux-info + +DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI" +HOMEPAGE="https://github.com/containers/podman/ https://podman.io/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/containers/podman.git" +else + SRC_URI="https://github.com/containers/podman/archive/v${PV/_rc/-rc}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${P/_rc/-rc}" + [[ ${PV} != *rc* ]] && \ + KEYWORDS="~amd64 ~arm64 ~loong ~riscv" +fi + +# main pkg +LICENSE="Apache-2.0" +# deps +LICENSE+=" BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0" +SLOT="0" +IUSE="apparmor btrfs +seccomp selinux systemd wrapper" +RESTRICT="test" + +RDEPEND=" + app-containers/catatonit + >=app-containers/conmon-2.1.10 + >=app-containers/containers-common-0.58.0-r1 + app-crypt/gpgme:= + dev-libs/libassuan:= + dev-libs/libgpg-error:= + sys-apps/shadow:= + + apparmor? ( sys-libs/libapparmor ) + btrfs? ( sys-fs/btrfs-progs ) + wrapper? ( !app-containers/docker-cli ) + seccomp? ( sys-libs/libseccomp:= ) + selinux? ( sec-policy/selinux-podman sys-libs/libselinux:= ) + systemd? ( sys-apps/systemd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + dev-go/go-md2man +" + +PATCHES=( + "${T}"/togglable-seccomp.patch +) + +CONFIG_CHECK=" + ~USER_NS +" + +pkg_setup() { + use btrfs && CONFIG_CHECK+=" ~BTRFS_FS" + linux-info_pkg_setup + python-any-r1_pkg_setup +} + +src_prepare() { + cat <<'EOF' > "${T}"/togglable-seccomp.patch || die +--- a/Makefile ++++ b/Makefile +@@ -56,7 +56,6 @@ BUILDTAGS ?= \ + $(shell hack/systemd_tag.sh) \ + $(shell hack/libsubid_tag.sh) \ + exclude_graphdriver_devicemapper \ +- seccomp + # allow downstreams to easily add build tags while keeping our defaults + BUILDTAGS += ${EXTRA_BUILDTAGS} + # N/B: This value is managed by Renovate, manual changes are +EOF + + default + + # assure necessary files are present + local file + for file in apparmor_tag btrfs_installed_tag btrfs_tag systemd_tag; do + [[ -f hack/"${file}".sh ]] || die + done + + local feature + for feature in apparmor systemd; do + cat <<-EOF > hack/"${feature}"_tag.sh || die + #!/usr/bin/env bash + $(usex ${feature} "echo ${feature}" echo) + EOF + done + + echo -e "#!/usr/bin/env bash\n echo" > hack/btrfs_installed_tag.sh || die + cat <<-EOF > hack/btrfs_tag.sh || die + #!/usr/bin/env bash + $(usex btrfs echo 'echo exclude_graphdriver_btrfs btrfs_noversion') + EOF +} + +src_compile() { + export PREFIX="${EPREFIX}/usr" + + # For non-live versions, prevent git operations which causes sandbox violations + # https://github.com/gentoo/gentoo/pull/33531#issuecomment-1786107493 + [[ ${PV} != 9999* ]] && export COMMIT_NO="" GIT_COMMIT="" EPOCH_TEST_COMMIT="" + + # Use proper pkg-config to get gpgme cflags and ldflags when + # cross-compiling, bug 930982. + if tc-is-cross-compiler; then + tc-export PKG_CONFIG + fi + + emake BUILDFLAGS="-v -work -x" GOMD2MAN="go-md2man" EXTRA_BUILDTAGS="$(usev seccomp)" SELINUXOPT= \ + all $(usev wrapper docker-docs) +} + +src_install() { + emake DESTDIR="${D}" SELINUXOPT= install install.completions $(usev wrapper install.docker-full) + + if use !systemd; then + newconfd "${FILESDIR}"/podman-5.0.0_rc4.confd podman + newinitd "${FILESDIR}"/podman-5.0.0_rc4.initd podman + + newinitd "${FILESDIR}"/podman-restart-5.0.0_rc4.initd podman-restart + newconfd "${FILESDIR}"/podman-restart-5.0.0_rc4.confd podman-restart + + newinitd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.initd podman-clean-transient + newconfd "${FILESDIR}"/podman-clean-transient-5.0.0_rc6.confd podman-clean-transient + + exeinto /etc/cron.daily + newexe "${FILESDIR}"/podman-auto-update-5.0.0.cron podman-auto-update + + insinto /etc/logrotate.d + newins "${FILESDIR}/podman.logrotated" podman + fi + + keepdir /var/lib/containers +} + +pkg_postinst() { + tmpfiles_process podman.conf $(usev wrapper podman-docker.conf) +} From 153dbd93486e1e5130060cb40ba6b03f0b91fe93 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:39 +0000 Subject: [PATCH 012/145] app-containers/runc: Sync with Gentoo It's from Gentoo commit 2911d5ba5878e82ee45ae45bca1666d580b3a3b9. --- .../app-containers/runc/Manifest | 8 +- .../app-containers/runc/runc-1.1.12.ebuild | 78 ------------------- .../app-containers/runc/runc-1.1.13.ebuild | 77 ------------------ .../app-containers/runc/runc-1.1.14.ebuild | 77 ------------------ .../app-containers/runc/runc-1.2.0.ebuild | 75 ------------------ .../app-containers/runc/runc-1.2.1.ebuild | 75 ------------------ .../app-containers/runc/runc-1.2.2.ebuild | 75 ------------------ .../{runc-1.2.3.ebuild => runc-1.2.4.ebuild} | 7 +- 8 files changed, 2 insertions(+), 470 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.12.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.13.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.14.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.2.ebuild rename sdk_container/src/third_party/portage-stable/app-containers/runc/{runc-1.2.3.ebuild => runc-1.2.4.ebuild} (87%) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/Manifest b/sdk_container/src/third_party/portage-stable/app-containers/runc/Manifest index 2c7cd812dcf..34d4e0724d4 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-containers/runc/Manifest @@ -1,7 +1 @@ -DIST runc-1.1.12.tar.gz 2522196 BLAKE2B 14fe8d5f82d5b4d7f6b4bb9111c5d258e74f6a44aeb51fc87c69104e95b9bf24a3d503f4cc5dedb40d542fbd4b6e27273f456bda4fcf3bc298eb93ae292d9663 SHA512 92e8ac54a77d7ebcc76b5a9cc08d9a064211f12e9d26f064070cc203a5afb11c3af28d8f556f297513f797a2933d50bf10a8f22e307724041d66aa8c5ca1d9d3 -DIST runc-1.1.13.tar.gz 2532849 BLAKE2B f3d3171ffce2bb833bfb5cc21d0dc034fd7e38c47ee098cc1fc75c06fd4dfae21dfe25c2e69a1ca93b29d36e8799727ea41725eee8aca3a059c14dab6c8a435f SHA512 644bf9e6359bf49bbdec667c0f7c69ded78c7eacfc2d1b730d52fdcf7348571c6406b8e5790811fe3662a458c878e4225c3559885f0d95f8905273e7e40e55ad -DIST runc-1.1.14.tar.gz 2543890 BLAKE2B 3eede8cd7d04d2a3826cfc7caae032744551799e8262d28e989d3d5c66ca3969ce8dede064ebd37361a00eb276fa7c9961180dd9fc9b0d53535421ecc99acb39 SHA512 bdefbf34cf57485c6b961babc8294d0e6b2e003eb836b8e99c49ef4d00acf11f30a46ad0bcd399ee9346610419591daf1eecb3b6b127962357d629bf5f252e22 -DIST runc-1.2.0.tar.gz 2776027 BLAKE2B 743ea8641c0fabda5e32c1d3e044627241337bcdfd92b740bf8ef406e2ad4f37f7069975d93639954a1b20b2627b6456a66847eabfb544ee0eef44e59b2a7453 SHA512 30194521e9ff8e5586309bedbb29812f057220f765b68145d88f2e0008f7f9b5a22fa185d448247d7c71aeade3f48f76b48d4289c94a6c02a1e3384ae5674617 -DIST runc-1.2.1.tar.gz 2742512 BLAKE2B 06beda96edb4fa0796371d28f646b01760cd9b663104045407ae27f3ddd51e0318eddba8fc3dbe107629831a5f4051af0f50406418213485b7ee90cdf9a86085 SHA512 098ba9810d6a6704b11f97360cf403d0e5cccdf635a9b5c594b70e26c2c1554c328506265754f500e2faec1f08655839837036010c6a25265047a47c31f4defd -DIST runc-1.2.2.tar.gz 2743483 BLAKE2B d1e59aff284dcacdc50a17c4efab09b4bdda5d93ce13822542ea73ec696d3642d4dcc715d2adad308622100b04ef62365d3848be6418db5a325ac574b66e314c SHA512 87066ff0fe7ff6dc0eefd61ba2b194fa96433a091a34e9035350123b7da7dccf7fcec6f52b377c72be853820b4a57154b42bcd58c872263f8b7a16bfc480e5d7 -DIST runc-1.2.3.tar.gz 2757883 BLAKE2B adc3b23ddc487d674a406de8e9e17c2d41d2335e4e18ed2a8a1f5add0909ec235a01fc9483e91e74fb2869950c572d0a22882034b8b5f80c4719d20790e3b38c SHA512 e422e469dbcd60fbc3bf9ca348ba04f8b27b2a43bca8f3ee4c9407539f5dec71373d53d192b47d42eaefa1d7ca2ac9e64839cbe4b82bf930b5a496f3028e5212 +DIST runc-1.2.4.tar.gz 2759394 BLAKE2B 02b282c9fbe7f82ad1d4297b9d2576ee99db7f4db193aa6b08b595d1a18f4a0cb41c5fddb8184ca389e77726c71f4b64b686b2ee1b8e8df97179669362c17ff7 SHA512 2a14bfe7759e0cefcf88fac9d756eb2cbed8a9ebf7b6eacb96855467ea151c278ae0d58735d2a5a2d3335fc54eae4625dfcdb641065df58ba10fd1faafbd3119 diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.12.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.12.ebuild deleted file mode 100644 index ed23ef215d7..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.12.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for https://github.com/docker\ -# docker-ce/blob//components/engine/hack/dockerfile/install/runc.installer -RUNC_COMMIT=51d5e94601ceffbbd85688df1c928ecccbfa4685 -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="http://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -DEPEND="seccomp? ( sys-libs/libseccomp )" - -RDEPEND=" - ${DEPEND} - !app-emulation/docker-runc - apparmor? ( sys-libs/libapparmor ) - selinux? ( sec-policy/selinux-container ) -" - -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" ) -" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -S="${WORKDIR}/${PN}-${MY_PV}" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.13.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.13.ebuild deleted file mode 100644 index 821b7ad84de..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.13.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for commit ID on release tag. -# https://github.com/opencontainers/runc -RUNC_COMMIT=58aa9203c123022138b22cf96540c284876a7910 -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="https://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${MY_PV}" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -DEPEND="seccomp? ( sys-libs/libseccomp )" - -RDEPEND=" - ${DEPEND} - !app-emulation/docker-runc - apparmor? ( sys-libs/libapparmor ) - selinux? ( sec-policy/selinux-container ) -" - -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" ) -" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.14.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.14.ebuild deleted file mode 100644 index e9d447700b1..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.1.14.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for commit ID on release tag. -# https://github.com/opencontainers/runc -RUNC_COMMIT=2c9f5602f0ba3d9da1c2596322dfc4e156844890 -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="https://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${MY_PV}" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -DEPEND="seccomp? ( sys-libs/libseccomp )" - -RDEPEND=" - ${DEPEND} - !app-emulation/docker-runc - apparmor? ( sys-libs/libapparmor ) - selinux? ( sec-policy/selinux-container ) -" - -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" ) -" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.0.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.0.ebuild deleted file mode 100644 index 4ebe9d4e820..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.0.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for commit ID on release tag. -# https://github.com/opencontainers/runc -RUNC_COMMIT=0b9fa21be2bcba45f6d9d748b4bcf70cfbffbc19 - -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="https://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${MY_PV}" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -COMMON_DEPEND=" - apparmor? ( sys-libs/libapparmor ) - seccomp? ( sys-libs/libseccomp )" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND} - !app-emulation/docker-runc - selinux? ( sec-policy/selinux-container )" -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" )" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.1.ebuild deleted file mode 100644 index 56751cc62a3..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for commit ID on release tag. -# https://github.com/opencontainers/runc -RUNC_COMMIT=7cb363254b69e10320360b63fb73e0ffb5da7bf2 - -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="https://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${MY_PV}" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -COMMON_DEPEND=" - apparmor? ( sys-libs/libapparmor ) - seccomp? ( sys-libs/libseccomp )" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND} - !app-emulation/docker-runc - selinux? ( sec-policy/selinux-container )" -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" )" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.2.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.2.ebuild deleted file mode 100644 index 56751cc62a3..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.2.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module linux-info - -# update on bump, look for commit ID on release tag. -# https://github.com/opencontainers/runc -RUNC_COMMIT=7cb363254b69e10320360b63fb73e0ffb5da7bf2 - -CONFIG_CHECK="~USER_NS" - -DESCRIPTION="runc container cli tools" -HOMEPAGE="https://github.com/opencontainers/runc/" -MY_PV="${PV/_/-}" -SRC_URI="https://github.com/opencontainers/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${MY_PV}" - -LICENSE="Apache-2.0 BSD-2 BSD MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor hardened +kmem +seccomp selinux test" - -COMMON_DEPEND=" - apparmor? ( sys-libs/libapparmor ) - seccomp? ( sys-libs/libseccomp )" -DEPEND="${COMMON_DEPEND}" -RDEPEND="${COMMON_DEPEND} - !app-emulation/docker-runc - selinux? ( sec-policy/selinux-container )" -BDEPEND=" - dev-go/go-md2man - test? ( "${RDEPEND}" )" - -# tests need busybox binary, and portage namespace -# sandboxing disabled: mount-sandbox pid-sandbox ipc-sandbox -# majority of tests pass -RESTRICT+=" test" - -src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - - # build up optional flags - local options=( - $(usev apparmor) - $(usev seccomp) - $(usex kmem '' 'nokmem') - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - COMMIT="${RUNC_COMMIT}" - ) - - emake "${myemakeargs[@]}" runc man -} - -src_install() { - myemakeargs+=( - PREFIX="${ED}/usr" - BINDIR="${ED}/usr/bin" - MANDIR="${ED}/usr/share/man" - ) - emake "${myemakeargs[@]}" install install-man install-bash - - local DOCS=( README.md PRINCIPLES.md docs/. ) - einstalldocs -} - -src_test() { - emake "${myemakeargs[@]}" localunittest -} diff --git a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.3.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.4.ebuild similarity index 87% rename from sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.3.ebuild rename to sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.4.ebuild index e9a15e300e2..1ffae7fed82 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/runc/runc-1.2.4.ebuild @@ -6,7 +6,7 @@ inherit go-module linux-info # update on bump, look for commit ID on release tag. # https://github.com/opencontainers/runc -RUNC_COMMIT=0d37cfd4b557771e555a184d5a78d0ed4bdb79a5 +RUNC_COMMIT=6c52b3fc541fb26fe8c374d5f58112a0a5dbda66 CONFIG_CHECK="~USER_NS" @@ -38,11 +38,6 @@ BDEPEND=" RESTRICT+=" test" src_compile() { - # Taken from app-containers/docker-1.7.0-r1 - CGO_CFLAGS+=" -I${ESYSROOT}/usr/include" - CGO_LDFLAGS+=" $(usex hardened '-fno-PIC ' '') - -L${ESYSROOT}/usr/$(get_libdir)" - # build up optional flags local options=( $(usev apparmor) From 8f369168059c3ba318e329b3325a7182b8730fdd Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:42 +0000 Subject: [PATCH 013/145] app-crypt/gnupg: Sync with Gentoo It's from Gentoo commit 4edce3e2fe55d1f54143fc2596ffb589caab377d. --- .../portage-stable/app-crypt/gnupg/Manifest | 6 - ...upg-2.2.42-bug923248-insecure-backup.patch | 292 ------------------ .../files/gnupg-2.2.42-dirmngr-proxy.patch | 156 ---------- .../files/gnupg-2.2.42-gpgme-tests.patch | 39 --- .../app-crypt/gnupg/gnupg-2.2.42-r4.ebuild | 184 ----------- .../app-crypt/gnupg/gnupg-2.2.43-r1.ebuild | 181 ----------- .../app-crypt/gnupg/gnupg-2.4.5-r1.ebuild | 192 ------------ .../app-crypt/gnupg/gnupg-2.4.5-r2.ebuild | 197 ------------ .../app-crypt/gnupg/gnupg-2.4.6-r1.ebuild | 4 +- .../app-crypt/gnupg/gnupg-2.4.7.ebuild | 4 +- 10 files changed, 4 insertions(+), 1251 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-bug923248-insecure-backup.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-dirmngr-proxy.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-gpgme-tests.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.42-r4.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.43-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/Manifest index 9d9c5332567..17d33d43c17 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/Manifest @@ -1,11 +1,5 @@ -DIST gnupg-2.2.42.tar.bz2 7434291 BLAKE2B 5f7f01f31949e5258d638fbff81fa641e5c167e6eaf32c55eb187d4a31b31cd4fe6e51c622e74d8544c4f95c75484e15117f26a8cf26055ff6813d75e54f2b8a SHA512 9c59d034f428d42323b5520e1a8984acc1505ba1d96d90f00e17b24aa91660b2dc64e1a3ceb044c56f39b4c402a77c7e0b226c65218c23c094781b4ef51e2eb5 -DIST gnupg-2.2.42.tar.bz2.sig 238 BLAKE2B 251ad0a832042ceb93b0edfda8652104bfb463e291322f22f0ab0d9b35606c3589be7a6f3e9e2aac8f6ac368a7d11840ab83b29997587dc65685de9f2dec3fee SHA512 7073bfc920c571680a1de57b4e6cd83cde24ccb3b5f592602b0c32fd762eef497027b08745044c9f41130ca99bb7ec77222568c2d0a1099d3c1c15137e0221d7 -DIST gnupg-2.2.43.tar.bz2 7435426 BLAKE2B ddf5c89d317e6ce8d1a5348f0ef81ffa1c61c995ddb312b28410f04502b01eae307cd943bee7182d28d4efccac394c91053f8e33756b00166bf66b2bf4a791a7 SHA512 0d2e733b6659c116c043db5252de4de33d6a70c16172d1fe9b779ba413ba9fcb64bbfdcc4686d0e87904561fc62d1aa765144e0586957a500287c175ee37bd49 -DIST gnupg-2.2.43.tar.bz2.sig 119 BLAKE2B 38fd3790f5065d67d6b5323ef7abbb79facf00e5b9daba98e5078302fc3887423173ba434c7eff1e64faecef88d87aab9c057c570d6e96e8d0808f07f32d8fa1 SHA512 47c5354869b1825e56fa4276826fcde1ee41c70aab9b411686cf2733f4d1df9c006049e49e066b22e475bd37b337f9ffc97f8bbca0c62c0f32296909464a0643 DIST gnupg-2.2.45.tar.bz2 7447141 BLAKE2B 8fe2036325e31332166c0477ce9514152c8417a9f61b3edc43487340d5b52e6a4d4c2b104ca9fe7ce6893e6d2977e2cd9c9ccfb52c0b1ea18dae3304ec6ec7f3 SHA512 086bb2a96ff4a681451b357495c8b435229e6526e1121d8faee3cb2ecc9c14965c92c9b1ccbbf3a03f6c59c215cca85a5c4f740f2df7c008a9fa672b370bf33c DIST gnupg-2.2.45.tar.bz2.sig 119 BLAKE2B 6656747b2d640a95c4172a221952fa75f7d03c231b7c6d40ea57b43a5bcfbceb800023ca2f352ca09325aaf186a7bf31fcfe7104129c5d6628f0e1256994df76 SHA512 181195a76eede8113bd8f2a7f5bc20674226f6327cf8263389e3d178c205ed2d817b28f2d3b504dd9f852f22fc283d2c14e809ba1c05cfe88b66103845ff114c -DIST gnupg-2.4.5.tar.bz2 7889060 BLAKE2B a8b80cd4dfbb377066efb5c9f1b6cdc6d0cd1b18358c962781b5c06de1545117b13038a4655ae627c36bfd2e5fee127692df8729d6b23e1b31051ab6d897b733 SHA512 4d54744f09399c5899144d0cb5fdc2756e45b058db41b9ea9df3be03e80b914509e16ef35aa0248e7561185b80f7a5f9fd6afcab8ccff75ff82ed555448a38ff -DIST gnupg-2.4.5.tar.bz2.sig 238 BLAKE2B b236e7d62f49c8385f4fb81389bf10715d9c0a0cb5c0b4c20fb6ff1465d05a3c3657061284db23af988a1ca16c9fa393af3ce5cbd27934501eb41a4f448fff0a SHA512 5a06970e499d1eb5213b142a8a182e46f5f21b7cb32785a9e5069378797c124e151ce74727382003820042d60fd7a2f909143f44aa9ef282605875e1cab04aef DIST gnupg-2.4.6.tar.bz2 8011304 BLAKE2B 3b0deb3da1ec404e8f0aa50c424c7072727f933228de732d661a17ca15785b7430700e7b88afba69538f9794863cb218c90ae3d43469541fb9152fbabd3bc909 SHA512 192ae6cb18547e9c5fc4263dc968b548c1ce563ceb8cc2e651b264d4e5afa1cd99a2c1cdd80906faf5e0b0ca99cef76e003b1f7e73238f311a74a1de6c35b5cb DIST gnupg-2.4.6.tar.bz2.sig 119 BLAKE2B f22b9488a46e585eaa4ed6434c37603756de2a0136a6e8a44d974304d31299f64dee5065a0c1f8ed6aff24555e369ffa213558027698a7e7b2244cef7c9eff76 SHA512 699f99d5aedbb1adef0fc46fbfb4184996ebaeb08e3c5a4d64195cd14e628a17a234ff9d990ad63c32119cbab24bcba802590eaf69f030a0a0addf9928172221 DIST gnupg-2.4.7.tar.bz2 8010244 BLAKE2B 4cdc6be4330b0c8f150d9d1a9ce9c7d34232ecf9b980b15fbd20e96ff6fcd8665688456d66f1c862b816472034eaa0796444357b1f36e75e8520a603a0e6b298 SHA512 3e84f1679904bf0efb789df6466e468bd2be9149d52561f35e2380038133479bebf1c61ee7adf6d3564b370915f32111098c052be6e6acaf3083a807f9f36019 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-bug923248-insecure-backup.patch b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-bug923248-insecure-backup.patch deleted file mode 100644 index 76d6d94c40b..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-bug923248-insecure-backup.patch +++ /dev/null @@ -1,292 +0,0 @@ -https://bugs.gentoo.org/923248 -https://dev.gnupg.org/T6944 -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=3b69d8bf7146b8d10737d0cfea9c97affc60ad73 - -From 3b69d8bf7146b8d10737d0cfea9c97affc60ad73 Mon Sep 17 00:00:00 2001 -From: Werner Koch -Date: Wed, 24 Jan 2024 11:29:24 +0100 -Subject: [PATCH] gpg: Fix leftover unprotected card backup key. - -* agent/command.c (cmd_learn): Add option --reallyforce. -* agent/findkey.c (agent_write_private_key): Implement reallyforce. -Also add arg reallyforce and pass it along the call chain. - -* g10/call-agent.c (agent_scd_learn): Pass --reallyforce with a -special force value. -* g10/keygen.c (card_store_key_with_backup): Use that force value. --- - -This was a regression in 2.2.42. We took the easy path to fix it by -getting the behaviour back to what we did prior to 2.2.42. With GnuPG -2.4.4 we use an entire different and safer approach by introducing an -ephemeral private key store. - -GnuPG-bug-id: 6944 ---- a/agent/agent.h -+++ b/agent/agent.h -@@ -422,7 +422,8 @@ void start_command_handler_ssh (ctrl_t, gnupg_fd_t); - gpg_error_t agent_modify_description (const char *in, const char *comment, - const gcry_sexp_t key, char **result); - int agent_write_private_key (const unsigned char *grip, -- const void *buffer, size_t length, int force, -+ const void *buffer, size_t length, -+ int force, int reallyforce, - const char *serialno, const char *keyref, - const char *dispserialno, time_t timestamp); - gpg_error_t agent_key_from_file (ctrl_t ctrl, -@@ -548,6 +549,7 @@ gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo, - gpg_error_t agent_write_shadow_key (const unsigned char *grip, - const char *serialno, const char *keyid, - const unsigned char *pkbuf, int force, -+ int reallyforce, - const char *dispserialno); - - -@@ -628,7 +630,8 @@ void agent_card_killscd (void); - - - /*-- learncard.c --*/ --int agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context, int force); -+int agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context, -+ int force, int reallyforce); - - - /*-- cvt-openpgp.c --*/ ---- a/agent/command-ssh.c -+++ b/agent/command-ssh.c -@@ -2499,7 +2499,7 @@ card_key_available (ctrl_t ctrl, gcry_sexp_t *r_pk, char **cardsn) - - /* (Shadow)-key is not available in our key storage. */ - agent_card_getattr (ctrl, "$DISPSERIALNO", &dispserialno); -- err = agent_write_shadow_key (grip, serialno, authkeyid, pkbuf, 0, -+ err = agent_write_shadow_key (grip, serialno, authkeyid, pkbuf, 0, 0, - dispserialno); - xfree (dispserialno); - if (err) -@@ -3159,7 +3159,7 @@ ssh_identity_register (ctrl_t ctrl, ssh_key_type_spec_t *spec, - - /* Store this key to our key storage. We do not store a creation - * timestamp because we simply do not know. */ -- err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0, -+ err = agent_write_private_key (key_grip_raw, buffer, buffer_n, 0, 0, - NULL, NULL, NULL, 0); - if (err) - goto out; ---- a/agent/command.c -+++ b/agent/command.c -@@ -1042,7 +1042,7 @@ cmd_readkey (assuan_context_t ctx, char *line) - /* Shadow-key is or is not available in our key storage. In - * any case we need to check whether we need to update with - * a new display-s/n or whatever. */ -- rc = agent_write_shadow_key (grip, serialno, keyid, pkbuf, 0, -+ rc = agent_write_shadow_key (grip, serialno, keyid, pkbuf, 0, 0, - dispserialno); - if (rc) - goto leave; -@@ -1855,16 +1855,18 @@ cmd_learn (assuan_context_t ctx, char *line) - { - ctrl_t ctrl = assuan_get_pointer (ctx); - gpg_error_t err; -- int send, sendinfo, force; -+ int send, sendinfo, force, reallyforce; - - send = has_option (line, "--send"); - sendinfo = send? 1 : has_option (line, "--sendinfo"); - force = has_option (line, "--force"); -+ reallyforce = has_option (line, "--reallyforce"); - - if (ctrl->restricted) - return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); - -- err = agent_handle_learn (ctrl, send, sendinfo? ctx : NULL, force); -+ err = agent_handle_learn (ctrl, send, sendinfo? ctx : NULL, -+ force, reallyforce); - return leave_cmd (ctx, err); - } - -@@ -2427,11 +2429,11 @@ cmd_import_key (assuan_context_t ctx, char *line) - err = agent_protect (key, passphrase, &finalkey, &finalkeylen, - ctrl->s2k_count); - if (!err) -- err = agent_write_private_key (grip, finalkey, finalkeylen, force, -+ err = agent_write_private_key (grip, finalkey, finalkeylen, force, 0, - NULL, NULL, NULL, opt_timestamp); - } - else -- err = agent_write_private_key (grip, key, realkeylen, force, -+ err = agent_write_private_key (grip, key, realkeylen, force, 0, - NULL, NULL, NULL, opt_timestamp); - - leave: ---- a/agent/cvt-openpgp.c -+++ b/agent/cvt-openpgp.c -@@ -1070,7 +1070,7 @@ convert_from_openpgp_native (ctrl_t ctrl, - &protectedkey, &protectedkeylen, - ctrl->s2k_count)) - agent_write_private_key (grip, protectedkey, protectedkeylen, -- 1/*force*/, NULL, NULL, NULL, 0); -+ 1/*force*/, 0, NULL, NULL, NULL, 0); - xfree (protectedkey); - } - else -@@ -1079,7 +1079,7 @@ convert_from_openpgp_native (ctrl_t ctrl, - agent_write_private_key (grip, - *r_key, - gcry_sexp_canon_len (*r_key, 0, NULL,NULL), -- 1/*force*/, NULL, NULL, NULL, 0); -+ 1/*force*/, 0, NULL, NULL, NULL, 0); - } - } - ---- a/agent/findkey.c -+++ b/agent/findkey.c -@@ -82,7 +82,8 @@ fname_from_keygrip (const unsigned char *grip, int for_new) - * recorded as creation date. */ - int - agent_write_private_key (const unsigned char *grip, -- const void *buffer, size_t length, int force, -+ const void *buffer, size_t length, -+ int force, int reallyforce, - const char *serialno, const char *keyref, - const char *dispserialno, - time_t timestamp) -@@ -165,10 +166,13 @@ agent_write_private_key (const unsigned char *grip, - /* Check that we do not update a regular key with a shadow key. */ - if (is_regular && gpg_err_code (is_shadowed_key (key)) == GPG_ERR_TRUE) - { -- log_info ("updating regular key file '%s'" -- " by a shadow key inhibited\n", oldfname); -- err = 0; /* Simply ignore the error. */ -- goto leave; -+ if (!reallyforce) -+ { -+ log_info ("updating regular key file '%s'" -+ " by a shadow key inhibited\n", oldfname); -+ err = 0; /* Simply ignore the error. */ -+ goto leave; -+ } - } - /* Check that we update a regular key only in force mode. */ - if (is_regular && !force) -@@ -1704,12 +1708,13 @@ agent_delete_key (ctrl_t ctrl, const char *desc_text, - * Shadow key is created by an S-expression public key in PKBUF and - * card's SERIALNO and the IDSTRING. With FORCE passed as true an - * existing key with the given GRIP will get overwritten. If -- * DISPSERIALNO is not NULL the human readable s/n will also be -- * recorded in the key file. */ -+ * REALLYFORCE is also true, even a private key will be overwritten by -+ * a shadown key. If DISPSERIALNO is not NULL the human readable s/n -+ * will also be recorded in the key file. */ - gpg_error_t - agent_write_shadow_key (const unsigned char *grip, - const char *serialno, const char *keyid, -- const unsigned char *pkbuf, int force, -+ const unsigned char *pkbuf, int force, int reallyforce, - const char *dispserialno) - { - gpg_error_t err; -@@ -1737,7 +1742,7 @@ agent_write_shadow_key (const unsigned char *grip, - } - - len = gcry_sexp_canon_len (shdkey, 0, NULL, NULL); -- err = agent_write_private_key (grip, shdkey, len, force, -+ err = agent_write_private_key (grip, shdkey, len, force, reallyforce, - serialno, keyid, dispserialno, 0); - xfree (shdkey); - if (err) ---- a/agent/genkey.c -+++ b/agent/genkey.c -@@ -69,7 +69,7 @@ store_key (gcry_sexp_t private, const char *passphrase, int force, - buf = p; - } - -- rc = agent_write_private_key (grip, buf, len, force, -+ rc = agent_write_private_key (grip, buf, len, force, 0, - NULL, NULL, NULL, timestamp); - xfree (buf); - return rc; ---- a/agent/learncard.c -+++ b/agent/learncard.c -@@ -297,9 +297,12 @@ send_cert_back (ctrl_t ctrl, const char *id, void *assuan_context) - } - - /* Perform the learn operation. If ASSUAN_CONTEXT is not NULL and -- SEND is true all new certificates are send back via Assuan. */ -+ SEND is true all new certificates are send back via Assuan. If -+ REALLYFORCE is true a private key will be overwritten by a stub -+ key. */ - int --agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context, int force) -+agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context, -+ int force, int reallyforce) - { - int rc; - struct kpinfo_cb_parm_s parm; -@@ -414,7 +417,7 @@ agent_handle_learn (ctrl_t ctrl, int send, void *assuan_context, int force) - - agent_card_getattr (ctrl, "$DISPSERIALNO", &dispserialno); - rc = agent_write_shadow_key (grip, serialno, item->id, pubkey, -- force, dispserialno); -+ force, reallyforce, dispserialno); - xfree (dispserialno); - } - xfree (pubkey); ---- a/agent/protect-tool.c -+++ b/agent/protect-tool.c -@@ -807,13 +807,15 @@ agent_askpin (ctrl_t ctrl, - * to stdout. */ - int - agent_write_private_key (const unsigned char *grip, -- const void *buffer, size_t length, int force, -+ const void *buffer, size_t length, -+ int force, int reallyforce, - const char *serialno, const char *keyref, - const char *dispserialno, time_t timestamp) - { - char hexgrip[40+4+1]; - char *p; - -+ (void)reallyforce; - (void)force; - (void)timestamp; - (void)serialno; ---- a/g10/call-agent.c -+++ b/g10/call-agent.c -@@ -745,6 +745,11 @@ learn_status_cb (void *opaque, const char *line) - * card-util.c - * keyedit_menu - * card_store_key_with_backup (Woth force to remove secret key data) -+ * -+ * If force has the value 2 the --reallyforce option is also used. -+ * This is to make sure the sshadow key overwrites the private key. -+ * Note that this option is gnupg 2.2 specific because since 2.4.4 an -+ * ephemeral private key store is used instead. - */ - int - agent_scd_learn (struct agent_card_info_s *info, int force) -@@ -764,6 +769,7 @@ agent_scd_learn (struct agent_card_info_s *info, int force) - - parm.ctx = agent_ctx; - rc = assuan_transact (agent_ctx, -+ force == 2? "LEARN --sendinfo --force --reallyforce" : - force ? "LEARN --sendinfo --force" : "LEARN --sendinfo", - dummy_data_cb, NULL, default_inq_cb, &parm, - learn_status_cb, info); ---- a/g10/keygen.c -+++ b/g10/keygen.c -@@ -5201,8 +5201,11 @@ card_store_key_with_backup (ctrl_t ctrl, PKT_public_key *sub_psk, - if (err) - log_error ("writing card key to backup file: %s\n", gpg_strerror (err)); - else -- /* Remove secret key data in agent side. */ -- agent_scd_learn (NULL, 1); -+ { -+ /* Remove secret key data in agent side. We use force 2 here to -+ * allow overwriting of the temporary private key. */ -+ agent_scd_learn (NULL, 2); -+ } - - leave: - xfree (ecdh_param_str); --- -2.30.2 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-dirmngr-proxy.patch b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-dirmngr-proxy.patch deleted file mode 100644 index 21be675adef..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-dirmngr-proxy.patch +++ /dev/null @@ -1,156 +0,0 @@ -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=d6c428699db7aa20f8b6ca9fe83197a0314b7e91 -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=c33c4fdf10b7ed9e03f2afe988d93f3085b727aa -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=41c022072599bc3f12f659e962653548cd86fa3a - -From d6c428699db7aa20f8b6ca9fe83197a0314b7e91 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Thu, 15 Feb 2024 15:38:34 +0900 -Subject: [PATCH] dirmngr: Fix proxy with TLS. - -* dirmngr/http.c (proxy_get_token, run_proxy_connect): Always -available regardless of USE_TLS. -(send_request): Remove USE_TLS. - --- - -Since quite some time building w/o TLS won't work. - -GnuPG-bug-id: 6997 ---- a/dirmngr/http.c -+++ b/dirmngr/http.c -@@ -2498,9 +2498,7 @@ proxy_get_token (proxy_info_t proxy, const char *inputstring) - } - - -- - /* Use the CONNECT method to proxy our TLS stream. */ --#ifdef USE_TLS - static gpg_error_t - run_proxy_connect (http_t hd, proxy_info_t proxy, - const char *httphost, const char *server, -@@ -2709,7 +2707,6 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - xfree (tmpstr); - return err; - } --#endif /*USE_TLS*/ - - - /* Make a request string using a standard proxy. On success the -@@ -2866,7 +2863,6 @@ send_request (http_t hd, const char *httphost, const char *auth, - goto leave; - } - --#if USE_TLS - if (use_http_proxy && hd->uri->use_tls) - { - err = run_proxy_connect (hd, proxy, httphost, server, port); -@@ -2878,7 +2874,6 @@ send_request (http_t hd, const char *httphost, const char *auth, - * clear the flag to indicate this. */ - use_http_proxy = 0; - } --#endif /* USE_TLS */ - - #if HTTP_USE_NTBTLS - err = run_ntbtls_handshake (hd); --- -2.30.2 - -From c33c4fdf10b7ed9e03f2afe988d93f3085b727aa Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 16 Feb 2024 11:31:37 +0900 -Subject: [PATCH] dirmngr: Fix the regression of use of proxy for TLS - connection. - -* dirmngr/http.c (run_proxy_connect): Don't set keep_alive, since it -causes resource leak of FP_WRITE. -Don't try to read response body to fix the hang. - --- - -GnuPG-bug-id: 6997 -Signed-off-by: NIIBE Yutaka ---- a/dirmngr/http.c -+++ b/dirmngr/http.c -@@ -2520,6 +2520,7 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - * RFC-4559 - SPNEGO-based Kerberos and NTLM HTTP Authentication - */ - auth_basic = !!proxy->uri->auth; -+ hd->keep_alive = 0; - - /* For basic authentication we need to send just one request. */ - if (auth_basic -@@ -2541,13 +2542,12 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - httphost ? httphost : server, - port, - authhdr ? authhdr : "", -- auth_basic? "" : "Connection: keep-alive\r\n"); -+ hd->keep_alive? "Connection: keep-alive\r\n" : ""); - if (!request) - { - err = gpg_error_from_syserror (); - goto leave; - } -- hd->keep_alive = !auth_basic; /* We may need to send more requests. */ - - if (opt_debug || (hd->flags & HTTP_FLAG_LOG_RESP)) - log_debug_with_string (request, "http.c:proxy:request:"); -@@ -2574,16 +2574,6 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - if (err) - goto leave; - -- { -- unsigned long count = 0; -- -- while (es_getc (hd->fp_read) != EOF) -- count++; -- if (opt_debug) -- log_debug ("http.c:proxy_connect: skipped %lu bytes of response-body\n", -- count); -- } -- - /* Reset state. */ - es_clearerr (hd->fp_read); - ((cookie_t)(hd->read_cookie))->up_to_empty_line = 1; --- -2.30.2 - -From 41c022072599bc3f12f659e962653548cd86fa3a Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 16 Feb 2024 16:24:26 +0900 -Subject: [PATCH] dirmngr: Fix keep-alive flag handling. - -* dirmngr/http.c (run_proxy_connect): Set KEEP_ALIVE if not Basic -Authentication. Fix resource leak of FP_WRITE. - --- - -GnuPG-bug-id: 6997 -Signed-off-by: NIIBE Yutaka ---- a/dirmngr/http.c -+++ b/dirmngr/http.c -@@ -2520,7 +2520,7 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - * RFC-4559 - SPNEGO-based Kerberos and NTLM HTTP Authentication - */ - auth_basic = !!proxy->uri->auth; -- hd->keep_alive = 0; -+ hd->keep_alive = !auth_basic; /* We may need to send more requests. */ - - /* For basic authentication we need to send just one request. */ - if (auth_basic -@@ -2684,6 +2684,14 @@ run_proxy_connect (http_t hd, proxy_info_t proxy, - } - - leave: -+ if (hd->keep_alive) -+ { -+ es_fclose (hd->fp_write); -+ hd->fp_write = NULL; -+ /* The close has released the cookie and thus we better set it -+ * to NULL. */ -+ hd->write_cookie = NULL; -+ } - /* Restore flags, destroy stream, reset state. */ - hd->flags = saved_flags; - es_fclose (hd->fp_read); --- -2.30.2 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-gpgme-tests.patch b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-gpgme-tests.patch deleted file mode 100644 index f10154b303e..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/files/gnupg-2.2.42-gpgme-tests.patch +++ /dev/null @@ -1,39 +0,0 @@ -https://bugs.gentoo.org/924386 -https://dev.gnupg.org/T7003 -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=f50c543326c2eea6b40f548d61cf3a66a077bf54 - -From f50c543326c2eea6b40f548d61cf3a66a077bf54 Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka -Date: Fri, 1 Mar 2024 13:59:43 +0900 -Subject: [PATCH] agent: Allow simple KEYINFO command when restricted. - -* agent/command.c (cmd_keyinfo): Only forbid list command. - --- - -GnuPG-bug-id: 7003 -Signed-off-by: NIIBE Yutaka ---- a/agent/command.c -+++ b/agent/command.c -@@ -1282,9 +1282,6 @@ cmd_keyinfo (assuan_context_t ctx, char *line) - char hexgrip[41]; - int disabled, ttl, confirm, is_ssh; - -- if (ctrl->restricted) -- return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); -- - if (has_option (line, "--ssh-list")) - list_mode = 2; - else -@@ -1333,6 +1330,9 @@ cmd_keyinfo (assuan_context_t ctx, char *line) - char *dirname; - gnupg_dirent_t dir_entry; - -+ if (ctrl->restricted) -+ return leave_cmd (ctx, gpg_error (GPG_ERR_FORBIDDEN)); -+ - dirname = make_filename_try (gnupg_homedir (), - GNUPG_PRIVATE_KEYS_DIR, NULL); - if (!dirname) --- -2.30.2 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.42-r4.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.42-r4.ebuild deleted file mode 100644 index 06f010973e0..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.42-r4.ebuild +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig - -MY_P="${P/_/-}" - -DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation" -HOMEPAGE="https://gnupg.org/" -SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )" -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server" -RESTRICT="!test? ( test )" - -# Existence of executables is checked during configuration. -# Note: On each bump, update dep bounds on each version from configure.ac! -DEPEND=" - >=dev-libs/libassuan-2.5.0:= - >=dev-libs/libgcrypt-1.8.0:= - >=dev-libs/libgpg-error-1.38 - >=dev-libs/libksba-1.3.5 - >=dev-libs/npth-1.2 - >=net-misc/curl-7.10 - sys-libs/zlib - bzip2? ( app-arch/bzip2 ) - ldap? ( net-nds/openldap:= ) - readline? ( sys-libs/readline:= ) - smartcard? ( usb? ( virtual/libusb:1 ) ) - ssl? ( >=net-libs/gnutls-3.0:= ) - tofu? ( >=dev-db/sqlite-3.7 ) -" -RDEPEND=" - ${DEPEND} - nls? ( virtual/libintl ) - selinux? ( sec-policy/selinux-gpg ) - wks-server? ( virtual/mta ) -" -PDEPEND=" - app-crypt/pinentry -" -BDEPEND=" - virtual/pkgconfig - doc? ( sys-apps/texinfo ) - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -DOCS=( - ChangeLog NEWS README THANKS TODO VERSION - doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER -) - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch - "${FILESDIR}"/${P}-bug923248-insecure-backup.patch - "${FILESDIR}"/${P}-dirmngr-proxy.patch - "${FILESDIR}"/${P}-gpgme-tests.patch -) - -src_prepare() { - default - - # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode, - # idea borrowed from libdbus, see - # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6 - # - # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl', - # which in turn requires discovery in Autoconf, something that upstream deeply resents. - sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \ - -i doc/examples/systemd-user/gpg-agent-ssh.socket || die -} - -my_src_configure() { - # Upstream don't support LTO, bug #854222. - filter-lto - - local myconf=( - $(use_enable bzip2) - $(use_enable nls) - $(use_enable smartcard scdaemon) - $(use_enable ssl gnutls) - $(use_enable test all-tests) - $(use_enable test tests) - $(use_enable tofu) - $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') - $(use_enable wks-server wks-tools) - $(use_with ldap) - $(use_with readline) - - # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. - # As of GnuPG 2.3, the mailprog substitution is used for the binary called - # by wks-client & wks-server; and if it's autodetected but not not exist at - # build time, then then 'gpg-wks-client --send' functionality will not - # work. This has an unwanted side-effect in stage3 builds: there was a - # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating - # the build where the install guide previously make the user chose the - # logger & mta early in the install. - --with-mailprog=/usr/libexec/sendmail - - --disable-ntbtls - --enable-gpg - --enable-gpgsm - --enable-large-secmem - - CC_FOR_BUILD="$(tc-getBUILD_CC)" - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" - LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" - LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" - NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" - - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - - if use prefix && use usb; then - # bug #649598 - append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" - fi - - # bug #663142 - if use user-socket; then - myconf+=( --enable-run-gnupg-user-socket ) - fi - - # glib fails and picks up clang's internal stdint.h causing weird errors - tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h - - econf "${myconf[@]}" -} - -my_src_compile() { - default - - use doc && emake -C doc html -} - -my_src_test() { - export TESTFLAGS="--parallel=$(makeopts_jobs)" - - default -} - -my_src_install() { - emake DESTDIR="${D}" install - - use tools && dobin \ - tools/{gpg-zip,gpgconf,gpgsplit,gpg-check-pattern} \ - tools/make-dns-cert - - dosym gpg /usr/bin/gpg2 - dosym gpgv /usr/bin/gpgv2 - echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die - echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die - - dodir /etc/env.d - echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die - - use doc && dodoc doc/gnupg.html/* -} - -my_src_install_all() { - einstalldocs - - use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot} - - use doc && dodoc doc/*.png - - systemd_douserunit doc/examples/systemd-user/*.{service,socket} -} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.43-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.43-r1.ebuild deleted file mode 100644 index 9ccaeb24401..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.2.43-r1.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig - -MY_P="${P/_/-}" - -DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation" -HOMEPAGE="https://gnupg.org/" -SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )" -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server" -RESTRICT="!test? ( test )" - -# Existence of executables is checked during configuration. -# Note: On each bump, update dep bounds on each version from configure.ac! -DEPEND=" - >=dev-libs/libassuan-2.5.0:= - >=dev-libs/libgcrypt-1.8.0:= - >=dev-libs/libgpg-error-1.38 - >=dev-libs/libksba-1.4.0 - >=dev-libs/npth-1.2 - >=net-misc/curl-7.10 - sys-libs/zlib - bzip2? ( app-arch/bzip2 ) - ldap? ( net-nds/openldap:= ) - readline? ( sys-libs/readline:= ) - smartcard? ( usb? ( virtual/libusb:1 ) ) - ssl? ( >=net-libs/gnutls-3.0:= ) - tofu? ( >=dev-db/sqlite-3.7 ) -" -RDEPEND=" - ${DEPEND} - nls? ( virtual/libintl ) - selinux? ( sec-policy/selinux-gpg ) - wks-server? ( virtual/mta ) -" -PDEPEND=" - app-crypt/pinentry -" -BDEPEND=" - virtual/pkgconfig - doc? ( sys-apps/texinfo ) - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -DOCS=( - ChangeLog NEWS README THANKS TODO VERSION - doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER -) - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch -) - -src_prepare() { - default - - # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode, - # idea borrowed from libdbus, see - # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6 - # - # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl', - # which in turn requires discovery in Autoconf, something that upstream deeply resents. - sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \ - -i doc/examples/systemd-user/gpg-agent-ssh.socket || die -} - -my_src_configure() { - # Upstream don't support LTO, bug #854222. - filter-lto - - local myconf=( - $(use_enable bzip2) - $(use_enable nls) - $(use_enable smartcard scdaemon) - $(use_enable ssl gnutls) - $(use_enable test all-tests) - $(use_enable test tests) - $(use_enable tofu) - $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') - $(use_enable wks-server wks-tools) - $(use_with ldap) - $(use_with readline) - - # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. - # As of GnuPG 2.3, the mailprog substitution is used for the binary called - # by wks-client & wks-server; and if it's autodetected but not not exist at - # build time, then then 'gpg-wks-client --send' functionality will not - # work. This has an unwanted side-effect in stage3 builds: there was a - # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating - # the build where the install guide previously make the user chose the - # logger & mta early in the install. - --with-mailprog=/usr/libexec/sendmail - - --disable-ntbtls - --enable-gpg - --enable-gpgsm - --enable-large-secmem - - CC_FOR_BUILD="$(tc-getBUILD_CC)" - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" - LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" - LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" - NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" - - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - - if use prefix && use usb; then - # bug #649598 - append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" - fi - - # bug #663142 - if use user-socket; then - myconf+=( --enable-run-gnupg-user-socket ) - fi - - # glib fails and picks up clang's internal stdint.h causing weird errors - tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h - - econf "${myconf[@]}" -} - -my_src_compile() { - default - - use doc && emake -C doc html -} - -my_src_test() { - export TESTFLAGS="--parallel=$(makeopts_jobs)" - - default -} - -my_src_install() { - emake DESTDIR="${D}" install - - use tools && dobin \ - tools/{gpg-zip,gpgconf,gpgsplit,gpg-check-pattern} \ - tools/make-dns-cert - - dosym gpg /usr/bin/gpg2 - dosym gpgv /usr/bin/gpgv2 - echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die - echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die - - dodir /etc/env.d - echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die - - use doc && dodoc doc/gnupg.html/* -} - -my_src_install_all() { - einstalldocs - - use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot} - - use doc && dodoc doc/*.png - - systemd_douserunit doc/examples/systemd-user/*.{service,socket} -} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r1.ebuild deleted file mode 100644 index 9a5e81d91c5..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r1.ebuild +++ /dev/null @@ -1,192 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig - -MY_P="${P/_/-}" - -DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation" -HOMEPAGE="https://gnupg.org/" -SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )" -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server" -RESTRICT="!test? ( test )" -REQUIRED_USE="test? ( tofu )" - -# Existence of executables is checked during configuration. -# Note: On each bump, update dep bounds on each version from configure.ac! -DEPEND=" - >=dev-libs/libassuan-2.5.0:= - >=dev-libs/libgcrypt-1.9.1:= - >=dev-libs/libgpg-error-1.46 - >=dev-libs/libksba-1.6.3 - >=dev-libs/npth-1.2 - >=net-misc/curl-7.10 - sys-libs/zlib - bzip2? ( app-arch/bzip2 ) - ldap? ( net-nds/openldap:= ) - readline? ( sys-libs/readline:0= ) - smartcard? ( usb? ( virtual/libusb:1 ) ) - tofu? ( >=dev-db/sqlite-3.27 ) - tpm? ( >=app-crypt/tpm2-tss-2.4.0:= ) - ssl? ( >=net-libs/gnutls-3.2:0= ) -" -RDEPEND=" - ${DEPEND} - nls? ( virtual/libintl ) - selinux? ( sec-policy/selinux-gpg ) - wks-server? ( virtual/mta ) -" -PDEPEND=" - app-crypt/pinentry -" -BDEPEND=" - virtual/pkgconfig - doc? ( sys-apps/texinfo ) - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -DOCS=( - ChangeLog NEWS README THANKS TODO VERSION - doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER -) - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch -) - -src_prepare() { - default - - GNUPG_SYSTEMD_UNITS=( - dirmngr.service - dirmngr.socket - gpg-agent-browser.socket - gpg-agent-extra.socket - gpg-agent.service - gpg-agent.socket - gpg-agent-ssh.socket - ) - - cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die - - # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode, - # idea borrowed from libdbus, see - # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6 - # - # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl', - # which in turn requires discovery in Autoconf, something that upstream deeply resents. - sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \ - -i "${T}"/gpg-agent-ssh.socket || die -} - -my_src_configure() { - # Upstream don't support LTO, bug #854222. - filter-lto - - local myconf=( - $(use_enable bzip2) - $(use_enable nls) - $(use_enable smartcard scdaemon) - $(use_enable ssl gnutls) - $(use_enable test all-tests) - $(use_enable test tests) - $(use_enable tofu) - $(use_enable tofu keyboxd) - $(use_enable tofu sqlite) - $(usex tpm '--with-tss=intel' '--disable-tpm2d') - $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') - $(use_enable wks-server wks-tools) - $(use_with ldap) - $(use_with readline) - - # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. - # As of GnuPG 2.3, the mailprog substitution is used for the binary called - # by wks-client & wks-server; and if it's autodetected but not not exist at - # build time, then then 'gpg-wks-client --send' functionality will not - # work. This has an unwanted side-effect in stage3 builds: there was a - # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating - # the build where the install guide previously make the user chose the - # logger & mta early in the install. - --with-mailprog=/usr/libexec/sendmail - - --disable-ntbtls - --enable-gpgsm - --enable-large-secmem - - CC_FOR_BUILD="$(tc-getBUILD_CC)" - ac_cv_path_GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" - - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - - if use prefix && use usb; then - # bug #649598 - append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" - fi - - # bug #663142 - if use user-socket; then - myconf+=( --enable-run-gnupg-user-socket ) - fi - - # glib fails and picks up clang's internal stdint.h causing weird errors - tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h - - econf "${myconf[@]}" -} - -my_src_compile() { - default - - use doc && emake -C doc html -} - -my_src_test() { - export TESTFLAGS="--parallel=$(makeopts_jobs)" - - default -} - -my_src_install() { - emake DESTDIR="${D}" install - - use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert - - dosym gpg /usr/bin/gpg2 - dosym gpgv /usr/bin/gpgv2 - echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die - echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die - - dodir /etc/env.d - echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die - - use doc && dodoc doc/gnupg.html/* -} - -my_src_install_all() { - einstalldocs - - use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot} - use doc && dodoc doc/*.png - - # Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed. - dodoc "${FILESDIR}"/README-systemd - systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}" -} 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 deleted file mode 100644 index b39c186864a..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.5-r2.ebuild +++ /dev/null @@ -1,197 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit flag-o-matic out-of-source multiprocessing systemd toolchain-funcs verify-sig - -MY_P="${P/_/-}" - -DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation" -HOMEPAGE="https://gnupg.org/" -SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/gnupg/${P}.tar.bz2.sig )" -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server" -RESTRICT="!test? ( test )" -REQUIRED_USE="test? ( tofu )" - -# Existence of executables is checked during configuration. -# Note: On each bump, update dep bounds on each version from configure.ac! -DEPEND=" - >=dev-libs/libassuan-2.5.0:= - >=dev-libs/libgcrypt-1.9.1:= - >=dev-libs/libgpg-error-1.46 - >=dev-libs/libksba-1.6.3 - >=dev-libs/npth-1.2 - >=net-misc/curl-7.10 - sys-libs/zlib - bzip2? ( app-arch/bzip2 ) - ldap? ( net-nds/openldap:= ) - readline? ( sys-libs/readline:0= ) - smartcard? ( usb? ( virtual/libusb:1 ) ) - tofu? ( >=dev-db/sqlite-3.27 ) - tpm? ( >=app-crypt/tpm2-tss-2.4.0:= ) - ssl? ( >=net-libs/gnutls-3.2:0= ) -" -RDEPEND=" - ${DEPEND} - nls? ( virtual/libintl ) - selinux? ( sec-policy/selinux-gpg ) - wks-server? ( virtual/mta ) -" -PDEPEND=" - app-crypt/pinentry -" -BDEPEND=" - virtual/pkgconfig - doc? ( sys-apps/texinfo ) - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -DOCS=( - ChangeLog NEWS README THANKS TODO VERSION - doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER -) - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch - "${FILESDIR}"/${PN}-2.4.5-revert-rfc4880bis.patch # bug #926186 -) - -src_prepare() { - default - - GNUPG_SYSTEMD_UNITS=( - dirmngr.service - dirmngr.socket - gpg-agent-browser.socket - gpg-agent-extra.socket - gpg-agent.service - gpg-agent.socket - gpg-agent-ssh.socket - ) - - cp "${GNUPG_SYSTEMD_UNITS[@]/#/${FILESDIR}/}" "${T}" || die - - # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode, - # idea borrowed from libdbus, see - # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6 - # - # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl', - # which in turn requires discovery in Autoconf, something that upstream deeply resents. - sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \ - -i "${T}"/gpg-agent-ssh.socket || die - - # 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() { - # Upstream don't support LTO, bug #854222. - filter-lto - - local myconf=( - $(use_enable bzip2) - $(use_enable nls) - $(use_enable smartcard scdaemon) - $(use_enable ssl gnutls) - $(use_enable test all-tests) - $(use_enable test tests) - $(use_enable tofu) - $(use_enable tofu keyboxd) - $(use_enable tofu sqlite) - $(usex tpm '--with-tss=intel' '--disable-tpm2d') - $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') - $(use_enable wks-server wks-tools) - $(use_with ldap) - $(use_with readline) - - # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. - # As of GnuPG 2.3, the mailprog substitution is used for the binary called - # by wks-client & wks-server; and if it's autodetected but not not exist at - # build time, then then 'gpg-wks-client --send' functionality will not - # work. This has an unwanted side-effect in stage3 builds: there was a - # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating - # the build where the install guide previously make the user chose the - # logger & mta early in the install. - --with-mailprog=/usr/libexec/sendmail - - --disable-ntbtls - --enable-gpgsm - --enable-large-secmem - - CC_FOR_BUILD="$(tc-getBUILD_CC)" - GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" - - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - - if use prefix && use usb; then - # bug #649598 - append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" - fi - - # bug #663142 - if use user-socket; then - myconf+=( --enable-run-gnupg-user-socket ) - fi - - # glib fails and picks up clang's internal stdint.h causing weird errors - tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h - - econf "${myconf[@]}" -} - -my_src_compile() { - default - - use doc && emake -C doc html -} - -my_src_test() { - export TESTFLAGS="--parallel=$(makeopts_jobs)" - - default -} - -my_src_install() { - emake DESTDIR="${D}" install - - use tools && dobin tools/{gpgconf,gpgsplit,gpg-check-pattern} tools/make-dns-cert - - dosym gpg /usr/bin/gpg2 - dosym gpgv /usr/bin/gpgv2 - echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die - echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die - - dodir /etc/env.d - echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die - - use doc && dodoc doc/gnupg.html/* -} - -my_src_install_all() { - einstalldocs - - use tools && dobin tools/{convert-from-106,mail-signed-keys,lspgpot} - use doc && dodoc doc/*.png - - # Dropped upstream in https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff;h=eae28f1bd4a5632e8f8e85b7248d1c4d4a10a5ed. - dodoc "${FILESDIR}"/README-systemd - systemd_douserunit "${GNUPG_SYSTEMD_UNITS[@]/#/${T}/}" -} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.6-r1.ebuild index 343dc2c5f86..39e2c7f19ae 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.6-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.6-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server" RESTRICT="!test? ( test )" REQUIRED_USE="test? ( tofu )" diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.7.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.7.ebuild index 53572e307e0..1c146f45be4 100644 --- a/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.7.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-crypt/gnupg/gnupg-2.4.7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,7 +23,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test +tofu tpm tools usb user-socket wks-server" RESTRICT="!test? ( test )" REQUIRED_USE="test? ( tofu )" From 2f68dd4baa77d7fc4544acc338957eacd6db40e0 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:46 +0000 Subject: [PATCH 014/145] app-editors/nano: Sync with Gentoo It's from Gentoo commit 4a8dd58c068837168bb446928be8476ce020b14f. --- .../app-editors/nano/files/gentoo.nanorc-r1 | 11 +++++------ .../nano/{nano-8.2.ebuild => nano-8.2-r1.ebuild} | 0 .../nano/{nano-8.3.ebuild => nano-8.3-r1.ebuild} | 0 3 files changed, 5 insertions(+), 6 deletions(-) rename sdk_container/src/third_party/portage-stable/app-editors/nano/{nano-8.2.ebuild => nano-8.2-r1.ebuild} (100%) rename sdk_container/src/third_party/portage-stable/app-editors/nano/{nano-8.3.ebuild => nano-8.3-r1.ebuild} (100%) diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 b/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 index 100877dd16d..1a7a86c89da 100644 --- a/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 +++ b/sdk_container/src/third_party/portage-stable/app-editors/nano/files/gentoo.nanorc-r1 @@ -31,14 +31,13 @@ color red "\" ## Portage commands: color magenta "\<(use(_(with|enable|if_iuse)|x|v)?|in_iuse) [!a-zA-Z0-9_+ -]*" "inherit.*" -color brightblue "\" -color brightblue "\" "\" -color brightblue "\" "\" "\" "\" +color brightblue "\" +color brightblue "\" "\" +color brightblue "\" "\" "\" color brightblue "\" "\" color brightblue "\<(assert|die|hasv?|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x|v)?|in_iuse)\>" "\<(has|best)_version\>" -color brightblue "\<(do|new)(ins|s?bin|doc|header|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>" -color brightblue "\" "\" -color brightblue "\" "\" +color brightblue "\<(do|new)(ins|s?bin|doc|header|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" +color brightblue "\" "\" color brightblue "\<(doc|ins|exe)?into\>" "\" "\<(exe|ins|dir)opts\>" color brightblue "\" ### common eclasses diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.2.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.2-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.2.ebuild rename to sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.2-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.3.ebuild b/sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.3-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.3.ebuild rename to sdk_container/src/third_party/portage-stable/app-editors/nano/nano-8.3-r1.ebuild From 7c9b812d93abbc475d6bf4fd3a140c769c2e9fb7 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:47 +0000 Subject: [PATCH 015/145] app-emulation/qemu: Sync with Gentoo It's from Gentoo commit d8d6652b0f896caae6209dff7f95015fc2e0ad76. --- .../portage-stable/app-emulation/qemu/qemu-9.1.2.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9.1.2.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9.1.2.ebuild index 80d4d3ac6ea..df4b36f615e 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9.1.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/qemu/qemu-9.1.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -47,7 +47,7 @@ else fi S="${WORKDIR}/${MY_P}" - [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" + [[ "${PV}" != *_rc* ]] && KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ppc64 ~riscv x86" fi DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" From 13d70d0df107209a030d4438974323f7e9288a3a Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:48 +0000 Subject: [PATCH 016/145] app-emulation/virt-firmware: Sync with Gentoo It's from Gentoo commit 175e1bd7460ce179a3eb31b85fecc9524f102302. --- .../app-emulation/virt-firmware/Manifest | 1 - .../virt-firmware/virt-firmware-24.4.ebuild | 52 ------------------- .../virt-firmware/virt-firmware-24.7.ebuild | 2 +- 3 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/Manifest b/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/Manifest index 5835244615d..f7f1465d836 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/Manifest @@ -1,3 +1,2 @@ -DIST virt-firmware-24.4.tar.gz 111964 BLAKE2B 16005a6f911abf227988abaedd45237d44d403f367abd3c2d413f899a6c3e7db2a62edcd36b7408263f101a0f0a20bbea83bf51f7f798077311b478dfc6c9fc1 SHA512 3b13df25177fe5c20e460e2d82453e23ae96cb657f1228ff1c061db4c4197eba719a4d7f51a90fec60a4de2da9a0e9d3f056d53011bd4f61df7f40b706911a1d DIST virt_firmware-24.11.tar.gz 115385 BLAKE2B 2edfe718fd60dcd8a13b143f9fcf5f6beb604737ef4855cb0f16376e625f5bf2965bb08b7ddd037a6b8b6420c928abceefe1034135ab66763695fa8c359786b5 SHA512 0c6b4d34d518835b4489404c784b263cd6ac8348834ba654d27ae3741d3d229ea5f6036870399390fa4fa33e01c8113d64faba0c6068e4b2fb5bbdd9429bf72f DIST virt_firmware-24.7.tar.gz 114229 BLAKE2B a5b6bf39a72ce68622bbc4f75505633b92c322e4a02ab0384bb3b618abfbeeb19cfb057b5333ae53042732b131dcaa475c2c920922c920b0d0c21ef4185ad5b9 SHA512 1cd209b500e0ec1a5b8284b72b499bd16e998fd9489db6c8f8e3b49befb6186c5c09c95b2761254696b479daff1afaf2bdccb6ca7e115b11eb9a5df847f43628 diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.4.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.4.ebuild deleted file mode 100644 index 36b536044e1..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.4.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) -DISTUTILS_USE_PEP517=setuptools -PYPI_NO_NORMALIZE=1 - -inherit distutils-r1 optfeature pypi systemd - -DESCRIPTION="Tools for ovmf/armvirt firmware volumes" -HOMEPAGE=" - https://gitlab.com/kraxel/virt-firmware - https://pypi.org/project/virt-firmware/ -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~x86" - -# Currently requires files in /boot and read/write to efivars -RESTRICT="test" - -RDEPEND=" - dev-python/cryptography[${PYTHON_USEDEP}] - dev-python/pefile[${PYTHON_USEDEP}] -" - -distutils_enable_tests unittest - -python_test() { - eunittest tests -} - -python_install_all() { - distutils-r1_python_install_all - - doman man/*.1 - - doinitd "${FILESDIR}/kernel-bootcfg-boot-successful" - systemd_dounit systemd/kernel-bootcfg-boot-successful.service - - # Use our own provided by sys-kernel/installkernel[efistub,systemd] - #exeinto /usr/lib/kernel/install.d - #doexe systemd/99-uki-uefi-setup.install -} - -pkg_postinst() { - optfeature "automatically updating UEFI configuration on each kernel installation or removal" \ - "sys-kernel/installkernel[systemd,efistub]" -} diff --git a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.7.ebuild b/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.7.ebuild index baf10f7aaed..e50bf538bbb 100644 --- a/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.7.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-emulation/virt-firmware/virt-firmware-24.7.ebuild @@ -16,7 +16,7 @@ HOMEPAGE=" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 arm arm64 x86" +KEYWORDS="amd64 arm arm64 x86" RDEPEND=" dev-python/cryptography[${PYTHON_USEDEP}] From 5fe379da8828d003396d2d3a7e2a71e3e75ee63e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:55 +0000 Subject: [PATCH 017/145] app-portage/elt-patches: Sync with Gentoo It's from Gentoo commit d6282a603a64a0aacbb14b6ecb32ff0b0f9cf07a. --- .../app-portage/elt-patches/Manifest | 3 -- .../elt-patches/elt-patches-20240512.ebuild | 39 ------------------- .../elt-patches/elt-patches-20240721.ebuild | 39 ------------------- .../elt-patches/elt-patches-20240824.ebuild | 39 ------------------- .../elt-patches/elt-patches-20241121.ebuild | 2 +- 5 files changed, 1 insertion(+), 121 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240512.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240721.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240824.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest index 25f00971a1c..39f3c94d196 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/Manifest @@ -1,5 +1,2 @@ -DIST elt-patches-20240512.tar.xz 46176 BLAKE2B 8ca496aae63dd49e7148b7c06e687b3644a58211ec5cf7b82d8ccb7603df6390c7f9ba6f71b4b9b9db7263bf0c7005f9c6098091227c6b34729032f6a6101cd7 SHA512 c33321668b9191d2f8221fb4a1ea365ccce6d0b61bf8bb1b95fc6c2c67ada8b36c44d7423d994678e60e3197bf2721aca9e062e882d2cea05b465ad0d4e8a93c -DIST elt-patches-20240721.tar.xz 46392 BLAKE2B 87d2cefebcacbfa447e8981bf16eda3d21bcf4190e91c478280cd81089ab43440a86ff84a5c6b2cda7d772707dad645d4f481d9ec2543f9c14059fe084c2f54d SHA512 a8a8f55e5e1b0a2ea67895e86307a6fd5116593c25a2e3cc6fb2361f21eddc125a91c46ef84c0fd036c1bb25a682a4ff07c581c041a9b853d713d5c8f73d8d5b -DIST elt-patches-20240824.tar.xz 47256 BLAKE2B 3fc40af8eb219277a11051be3e8391bed08fba28a7d79b83ee3ab3cf6360d5d0c04ce2a2db7d627eaf76e029899cafb1ad22ac465634a17d3ba6b7b48d9a457d SHA512 0eb502b026003e918e8aa4045cb3556524d52c331c099a445b9638b3cdfdabf22538c08a0526332671c3623db77bf56d3b6f580402abbc5253d1dca9ec759476 DIST elt-patches-20240912.tar.xz 47436 BLAKE2B 589643e96f83a13fec4553c4ceb14af5993be43e3519678ecfcbd689d7a0016d2cd3c06f131548c90da19188a75cd2828accc5bd516373fa64401bdbad92bce2 SHA512 502347387c594df9ebb453c5258d0d8125694b6170da6136d9579d1535e6d944f9b4eda1a049cdadbb1df29665c00165c1b0f0804413ac4470a082c49272bebd DIST elt-patches-20241121.tar.xz 47760 BLAKE2B e0ac30748586dc5885539d79f29d5283f80cea51fdbd4af44640b7475f6a46d5c4bc30e4b452a495c3bde16d103f5e320667969c30f06cf55824b2fcdab1e45f SHA512 bce7fc40f10f8db568a3a7237daa3ce9e23dd9ea3c41f26e285cdc350c0b7afbd44eed996324ea9b091b7e69990822458e09c486f12deb70b1a5ee917aa43a80 diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240512.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240512.ebuild deleted file mode 100644 index f6d6d69d964..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240512.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI=" - https://anongit.gentoo.org/git/proj/elt-patches.git - https://github.com/gentoo/elt-patches - " - inherit git-r3 -else - SRC_URI=" - https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz - " - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-2" -SLOT="0" -# The 'check' target currently wants network access to fetch libtool tarballs. -RESTRICT="test" - -RDEPEND="sys-apps/gentoo-functions" -BDEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX}" install -} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240721.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240721.ebuild deleted file mode 100644 index c423ad46902..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240721.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI=" - https://anongit.gentoo.org/git/proj/elt-patches.git - https://github.com/gentoo/elt-patches - " - inherit git-r3 -else - SRC_URI=" - https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz - " - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-2" -SLOT="0" -# The 'check' target currently wants network access to fetch libtool tarballs. -RESTRICT="test" - -RDEPEND="sys-apps/gentoo-functions" -BDEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX}" install -} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240824.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240824.ebuild deleted file mode 100644 index f6d6d69d964..00000000000 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20240824.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Collection of patches for libtool.eclass" -HOMEPAGE="https://gitweb.gentoo.org/proj/elt-patches.git/" - -if [[ ${PV} == *9999* ]] ; then - EGIT_REPO_URI=" - https://anongit.gentoo.org/git/proj/elt-patches.git - https://github.com/gentoo/elt-patches - " - inherit git-r3 -else - SRC_URI=" - https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz - https://dev.gentoo.org/~vapier/dist/${P}.tar.xz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz - " - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-2" -SLOT="0" -# The 'check' target currently wants network access to fetch libtool tarballs. -RESTRICT="test" - -RDEPEND="sys-apps/gentoo-functions" -BDEPEND="app-arch/xz-utils" - -src_compile() { - emake rootprefix="${EPREFIX}" libdirname="$(get_libdir)" -} - -src_install() { - emake DESTDIR="${D}" rootprefix="${EPREFIX}" install -} diff --git a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20241121.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20241121.ebuild index 93f524f5c4a..c423ad46902 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20241121.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-portage/elt-patches/elt-patches-20241121.ebuild @@ -19,7 +19,7 @@ else https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz " - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-linux ~ppc64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="GPL-2" From 64ee38f566b1830a37ef735576860b9419197b34 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:56 +0000 Subject: [PATCH 018/145] app-portage/portage-utils: Sync with Gentoo It's from Gentoo commit 1bf826f5866cdbddd51ac67b0a61a8b5691f66cb. --- .../app-portage/portage-utils/portage-utils-0.97.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.97.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.97.ebuild index 494f66e8e8b..07750f673f2 100644 --- a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.97.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.97.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ if [[ ${PV} == *9999 ]]; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git" else SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="GPL-2" From bf8973aaf5e8d1d5363ac23325d8743ba92ead04 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:04:57 +0000 Subject: [PATCH 019/145] app-shells/bash: Sync with Gentoo It's from Gentoo commit 2d39bd247282509e88cece390cca7af987ddb903. --- .../third_party/portage-stable/app-shells/bash/Manifest | 2 +- ...eta_p20241230.ebuild => bash-5.3_beta_p20250124.ebuild} | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) rename sdk_container/src/third_party/portage-stable/app-shells/bash/{bash-5.3_beta_p20241230.ebuild => bash-5.3_beta_p20250124.ebuild} (97%) 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 bc7a83bc97b..460a6c7cbf9 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 @@ -24,8 +24,8 @@ DIST bash-5.2.tar.gz 10950833 BLAKE2B 51b196e710794ebad8eac28c31c93eb99ac1a7db30 DIST bash-5.2.tar.gz.sig 95 BLAKE2B 2991b7c46ef1cdca08062f419be47fca7551f4c5d9aad8a5c1da74974f5e7707d23914b4cecf9b6c9610471146b2c49b611bb62a5d974f1c37cceb77b719851c SHA512 a161664f124f906be32709f66702f8f780e6d52e558ea45e71ec60a959c9435ff68477ee65a0a9f6c0051d5592f5044fb3b410cf3cd3ae5a8a323789b01be258 DIST bash-5.3-beta.tar.gz 10667630 BLAKE2B d6d3a1efd5ed69b131e2831e35c4a620968132e7d9da079de155decb4d3c736cd6c9f1180523e85dd41aeecdb9b380e4768bc551afafaee478168c462ce90929 SHA512 f8f02b4a90312c8e7c589efd1a0a43a4db3bcb47d19cb95190961e4ae254b2d6d26472197ce216868d914fe1adf62741f927552239559a1c3b2c64dfcfaa8cb0 DIST bash-5.3-beta.tar.gz.sig 94 BLAKE2B a4b85d5755e200abddd5669c3d21b1ee6be8036b27934e25473c14b15ffc1bc7cbbd5a94f39a0dc6bf6050908590509f0ba39d28c33947154cc966e11d454c8c SHA512 72184ca2afe3d0c8c2165516499a61da2aecc0c8c83661cab0038c3d849623115729d2ade73c4b5973ea9b5e8169af4bc2aea51f0b70356af26342285adab2f5 -DIST bash-5.3_beta_p20241230-5114e17172276cf5a2f889f8037ae58c4cb05bb9.tar.gz 15703629 BLAKE2B 331a0c1ce3cc423d0e55500c4b04caa8086b195a49554a01f3db766773778ac58f5749cb167a298fc77d7841da79a3d007c2bf826f74c52d4659147c55cc3bd6 SHA512 2ea7ddceb243e2baa3a5b45a86882b2cd476fadeaaac943a108de61a57b13e65e2789bb72345850e8fb4e6adafa0b706a273fcc5bdbaf76fcf897501b67ddc23 DIST bash-5.3_beta_p20250109-2ea356081dbfbac2c791f9b8072ed4b824e3d9df.tar.gz 15708913 BLAKE2B 0fcfb544b4c167ddb6e6bebde283519d4dd0ea95d531c6d499b5bbbc073ec355955a6f0fcaf9efe6de57fc8395f72636ebb077c4bc2506e58b30c2c98429e528 SHA512 7200a9e2bedbcb2b6ffabf32f324df33e6d9f8a12155f9112a22588d313c197202e3ae96930a7ab2d454e45b7ef708afabb371bb7ba13c1ee0d1b9ad58b77cac +DIST bash-5.3_beta_p20250124-25e213a551dc808c7f29360075bad4806fb9fec5.tar.gz 15722261 BLAKE2B 6c948112e782bb1d633951ac6f93e9f3ebf3937624b2823dc5a4b304abd109eb307415ad915c55e96d78c2b0831702bcbff308a95830e4cd153e837746fdaeed SHA512 012c5830aa1f55ea7ad57ad23a518406208d32cff78f911f2c87257e3653bb7efd1638f875a1df66c7babbc2b0530b97af72d111917e336b9131086f4e3fdee9 DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071 DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883 DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399 diff --git a/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20241230.ebuild b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20250124.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20241230.ebuild rename to sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20250124.ebuild index 09125ca4f28..c4d191110df 100644 --- a/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20241230.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-shells/bash/bash-5.3_beta_p20250124.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -45,7 +45,7 @@ elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then # 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="5114e17172276cf5a2f889f8037ae58c4cb05bb9" + BASH_COMMIT="25e213a551dc808c7f29360075bad4806fb9fec5" SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz" S=${WORKDIR}/${PN}-${BASH_COMMIT} else @@ -268,6 +268,8 @@ src_compile() { fi fi + # builtins/evalstring.c needs y.tab.h but can't (easily) specify the dep on it from above + emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" y.tab.h emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others @@ -284,6 +286,7 @@ src_compile() { # Rebuild Bash using the profiling data we just generated. emake clean + emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" y.tab.h emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others fi From a1c1c2daea361ce9069db1579c4ce42d70bff585 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:08 +0000 Subject: [PATCH 020/145] dev-build/cmake: Sync with Gentoo It's from Gentoo commit 42fc8f609c99387f8d5715239f253b0a5ba4899b. --- .../portage-stable/dev-build/cmake/Manifest | 3 + .../dev-build/cmake/cmake-3.30.6.ebuild | 4 +- .../dev-build/cmake/cmake-3.31.5.ebuild | 313 ++++++++++++++++++ 3 files changed, 318 insertions(+), 2 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.31.5.ebuild 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 2c6be7db8d3..0160cc909da 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 @@ -16,3 +16,6 @@ DIST cmake-3.31.3.tar.gz 11708383 BLAKE2B ab2114133bb0821c236c5e742f5af6abce81b7 DIST cmake-3.31.4-SHA-256.txt 1646 BLAKE2B d9bcb6f0c0e47e9ae1e82082371fdc9d78c4207b0e85c465ff7c843fb6fd09072fbb36e0232d3bdae4238a33df6ef384c77077b7e5244dca15bdb4a8ad8c1d30 SHA512 cbaa3a5b48139d44c09e97f4c540e69988beab4fe0b9d70e0129e61ca9c42906a647fee48c703a0e066286b4afa99b98981922344250542b59c0510279b9a200 DIST cmake-3.31.4-SHA-256.txt.asc 833 BLAKE2B 934ed510e0c8e5b49d5ae57bae1bc32cda5425b0d9a4f516fd452b9550b2b9ba43d5ac0dc09ad4ca6752cbbc88843965c19e3f12c461f3d4d2f5700e7d80fd0c SHA512 6d7e3f520828cadeb8d458f78cf317f3ee0106e46102d02dc31bcaa4d45a974f7a6447826856f5e60ad8d60f8b453c6f923e5b99f2ca72125aa722c741f305c5 DIST cmake-3.31.4.tar.gz 11708192 BLAKE2B 7b51c138fdabec174de74319fa9cc5920973e96f46b8fa9859c95763180c3f29c8ba9401936afd23ccf72790bd0fa12c4236eff1c487e78898442c7dd0a295d6 SHA512 86fef54e3c60a2d050bad97968a76f9c2a663fbd0be433fe3ecbb3268e3ef8243dfcb52f0d7ba9d8b03341c142ee02b33d367dd56597e1af79f6efb553b9eb82 +DIST cmake-3.31.5-SHA-256.txt 1646 BLAKE2B 45b9e829febf185ba9f532c208e6b49bcf56e6ffbdf2fb46fb8e6bc6cc58bb890a4a27cb00eb7acfc12b595aa20dcd1343142ab9e1fd42baee12af941cb786de SHA512 1b5a6f405cdb1cfaf52a5666b67d76261121ee66e6c9b73338da72af5f6eb6a27f87b642f657ab9d64bc491b9d8526cae4699e8f053e44550b2e01c3a0f3aa1a +DIST cmake-3.31.5-SHA-256.txt.asc 833 BLAKE2B 0206a62c7816b4115e56e1f1519b6357610037f18949a3a5ce894bfd364de39918073fa267516ec4071eaf35fd641363cdaeeb0704de5918d2f6aace9e7bdfbe SHA512 016ec25b29b28845c1a2680e0b25f35b7ce89e466493caa99acaad4f8e32f9173a72afcecdddd90e89ea00ac10df3fa0dc37b3edc1de1923198e393f9f54e769 +DIST cmake-3.31.5.tar.gz 11706495 BLAKE2B 16375229d7344b10db40c76fe2fc8a3f90626683b3846a1d0ead22ae6312cc71c58ff4d4314216c0ea34f4c7c4bb8610c5923b875063d08bb247cc1c4ee1ceab SHA512 1981efafa8916371caf58b1fcbf9c9d73d365ec119279860ee2fa11f4ff72d87bb3a4570eb20a45fae95260bb8f565daf2f579a890b2dad588207b3fcc158e43 diff --git a/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.6.ebuild index 0f4b409229a..bd15542a54d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.6.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.30.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20230817 )" fi diff --git a/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.31.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.31.5.ebuild new file mode 100644 index 00000000000..ad9d99bf2b8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-build/cmake/cmake-3.31.5.ebuild @@ -0,0 +1,313 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-cmake-docs +# Set to 1 if prebuilt, 0 if not +# (the construct below is to allow overriding from env for script) +: ${CMAKE_DOCS_PREBUILT:=1} + +CMAKE_DOCS_PREBUILT_DEV=sam +CMAKE_DOCS_VERSION=$(ver_cut 1-2).0 +# Default to generating docs (inc. man pages) if no prebuilt; overridden later +# See bug #784815 +CMAKE_DOCS_USEFLAG="+doc" + +# TODO RunCMake.LinkWhatYouUse fails consistently w/ ninja +# ... but seems fine as of 3.22.3? +# TODO ... but bootstrap sometimes(?) fails with ninja now. bug #834759. +CMAKE_MAKEFILE_GENERATOR="emake" +CMAKE_REMOVE_MODULES_LIST=( none ) +inherit bash-completion-r1 cmake flag-o-matic multiprocessing \ + toolchain-funcs xdg-utils + +MY_P="${P/_/-}" + +DESCRIPTION="Cross platform Make" +HOMEPAGE="https://cmake.org/" +if [[ ${PV} == *9999* ]] ; then + CMAKE_DOCS_PREBUILT=0 + + EGIT_REPO_URI="https://gitlab.kitware.com/cmake/cmake.git" + inherit git-r3 +else + SRC_URI="https://cmake.org/files/v$(ver_cut 1-2)/${MY_P}.tar.gz" + + if [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then + SRC_URI+=" !doc? ( https://dev.gentoo.org/~${CMAKE_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${CMAKE_DOCS_VERSION}-docs.tar.xz )" + fi + + if [[ ${PV} != *_rc* ]] ; then + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/bradking.asc + inherit verify-sig + + SRC_URI+=" verify-sig? ( + https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt + https://github.com/Kitware/CMake/releases/download/v$(ver_cut 1-3)/${MY_P}-SHA-256.txt.asc + )" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-bradking-20240902 )" + fi +fi + +[[ ${CMAKE_DOCS_PREBUILT} == 1 ]] && CMAKE_DOCS_USEFLAG="doc" + +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD" +SLOT="0" +IUSE="${CMAKE_DOCS_USEFLAG} dap gui ncurses test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=app-arch/libarchive-3.3.3:= + app-crypt/rhash:0= + >=dev-libs/expat-2.0.1 + >=dev-libs/jsoncpp-1.9.2-r2:0= + >=dev-libs/libuv-1.10.0:= + >=net-misc/curl-7.21.5[ssl] + sys-libs/zlib + virtual/pkgconfig + dap? ( dev-cpp/cppdap ) + gui? ( dev-qt/qtbase:6[gui,widgets] ) + ncurses? ( sys-libs/ncurses:= ) +" +DEPEND="${RDEPEND}" +BDEPEND+=" + doc? ( + dev-python/requests + dev-python/sphinx + ) + test? ( app-arch/libarchive[zstd] ) +" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( + # Prefix + "${FILESDIR}"/${PN}-3.27.0_rc1-0001-Don-t-use-.so-for-modules-on-darwin-macos.-Use-.bund.patch + "${FILESDIR}"/${PN}-3.27.0_rc1-0002-Set-some-proper-paths-to-make-cmake-find-our-tools.patch + # Misc + "${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 + # Cuda + "${FILESDIR}/${PN}-3.30.3-cudahostld.patch" + + # Upstream fixes (can usually be removed with a version bump) +) + +cmake_src_bootstrap() { + # disable running of cmake in bootstrap command + sed -i \ + -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \ + bootstrap || die "sed failed" + + # execinfo.h on Solaris isn't quite what it is on Darwin + if [[ ${CHOST} == *-solaris* ]] ; then + sed -i -e 's/execinfo\.h/blablabla.h/' \ + Source/kwsys/CMakeLists.txt || die + fi + + # bootstrap script isn't exactly /bin/sh compatible + tc-env_build ${CONFIG_SHELL:-sh} ./bootstrap \ + --prefix="${T}/cmakestrap/" \ + --parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \ + || die "Bootstrap failed" +} + +pkg_pretend() { + if [[ -z ${EPREFIX} ]] ; then + local file + local errant_files=() + + # See bug #599684 and bug #753581 (at least) + for file in /etc/arch-release /etc/redhat-release /etc/debian_version ; do + if [[ -e ${file} ]]; then + errant_files+=( "${file}" ) + fi + done + + # If errant files exist + if [[ ${#errant_files[@]} -gt 0 ]]; then + eerror "Errant files found!" + eerror "The presence of these files is known to confuse CMake's" + eerror "library path logic. Please (re)move these files:" + + for file in "${errant_files[@]}"; do + eerror " mv ${file} ${file}.bak" + done + + die "Stray files found in /etc/, see above message" + fi + fi +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + elif [[ ${PV} == *_rc* ]] || ! use verify-sig ; then + default + else + cd "${DISTDIR}" || die + + # See https://mgorny.pl/articles/verify-sig-by-example.html#verifying-using-a-checksum-file-with-a-detached-signature + verify-sig_verify_detached ${MY_P}-SHA-256.txt{,.asc} + verify-sig_verify_unsigned_checksums ${MY_P}-SHA-256.txt sha256 ${MY_P}.tar.gz + + cd "${WORKDIR}" || die + + default + fi +} + +src_prepare() { + cmake_src_prepare + + if [[ ${CHOST} == *-darwin* ]] ; then + # Disable Xcode hooks, bug #652134 + sed -i -e 's/cm\(\|Global\|Local\)XCode[^.]\+\.\(cxx\|h\)//' \ + Source/CMakeLists.txt || die + 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 + sed -i -e '/cmake_gnu_set_sysroot_flag/d' \ + Modules/Platform/Apple-GNU-*.cmake || die + # Disable isysroot usage with clang as well + sed -i -e '/_SYSROOT_FLAG/d' \ + Modules/Platform/Apple-Clang.cmake || die + # Don't set a POSIX standard, system headers don't like that, #757426 + sed -i -e 's/^#if !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \ + Source/cmLoadCommandCommand.cxx \ + Source/cmStandardLexer.h \ + Source/cmSystemTools.cxx \ + Source/cmTimestamp.cxx + sed -i -e 's/^#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)/& \&\& !defined(__APPLE__)/' \ + Source/cmStandardLexer.h + fi + + # Add gcc libs to the default link paths + sed -i \ + -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ + -e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \ + -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ + Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" + + ## 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. + + # Fix linking on Solaris + [[ ${CHOST} == *-solaris* ]] && append-ldflags -lsocket -lnsl + + # ODR warnings, bug #858335 + # 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) + -DCMAKE_DOC_DIR=/share/doc/${PF} + -DCMAKE_MAN_DIR=/share/man + -DCMAKE_DATA_DIR=/share/${PN} + -DSPHINX_MAN=$(usex doc) + -DSPHINX_HTML=$(usex doc) + -DBUILD_CursesDialog="$(usex ncurses)" + -DBUILD_TESTING=$(usex test) + -DBUILD_QtDialog=$(usex gui) + ) + + use gui && mycmakeargs+=( -DCMake_QT_MAJOR_VERSION=6 ) + + cmake_src_configure +} + +src_test() { + # Fix OutDir and SelectLibraryConfigurations tests + # these are altered thanks to our eclass + sed -i -e 's:^#_cmake_modify_IGNORE ::g' \ + "${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: + # BootstrapTest: we actually bootstrap it every time so why test it? + # BundleUtilities: bundle creation broken + # CMakeOnly.AllFindModules: pthread issues + # CTest.updatecvs: which fails to commit as root + # Fortran: requires fortran + # RunCMake.CompilerLauncher: also requires fortran + # RunCMake.CPack_RPM: breaks if app-arch/rpm is installed because + # debugedit binary is not in the expected location + # RunCMake.CPack_DEB: breaks if app-arch/dpkg is installed because + # it can't find a deb package that owns libc + # TestUpload, which requires network access + # RunCMake.CMP0125, known failure reported upstream (bug #829414) + local myctestargs=( + --output-on-failure + -E "(BootstrapTest|BundleUtilities|CMakeOnly.AllFindModules|CompileOptions|CTest.UpdateCVS|Fortran|RunCMake.CompilerLauncher|RunCMake.CPack_(DEB|RPM)|TestUpload|RunCMake.CMP0125)" \ + ) + + local -x QT_QPA_PLATFORM=offscreen + + cmake_src_test +} + +src_install() { + cmake_src_install + + # If USE=doc, there'll be newly generated docs which we install instead. + if ! use doc && [[ ${CMAKE_DOCS_PREBUILT} == 1 ]] ; then + doman "${WORKDIR}"/${PN}-${CMAKE_DOCS_VERSION}-docs/man*/*.[0-8] + fi + + insinto /usr/share/vim/vimfiles/syntax + doins Auxiliary/vim/syntax/cmake.vim + + insinto /usr/share/vim/vimfiles/indent + doins Auxiliary/vim/indent/cmake.vim + + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/${PN}.vim" + + dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack} +} + +pkg_postinst() { + if use gui; then + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update + fi +} + +pkg_postrm() { + if use gui; then + xdg_icon_cache_update + xdg_desktop_database_update + xdg_mimeinfo_database_update + fi +} From cd8794c9b361f0ae6625bfba2bbd6b63cbbbc4fb Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:08 +0000 Subject: [PATCH 021/145] dev-build/gtk-doc-am: Sync with Gentoo It's from Gentoo commit 729f493c51c6ce66a7f131d28a2b96658bee0452. --- .../dev-build/gtk-doc-am/Manifest | 1 + .../gtk-doc-am/gtk-doc-am-1.34.0.ebuild | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/gtk-doc-am-1.34.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/Manifest b/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/Manifest index a2c2e5e9f33..0bd282af026 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/Manifest @@ -1 +1,2 @@ DIST gtk-doc-1.33.2.tar.xz 507852 BLAKE2B dea3030060ecec89433fe3783dfacc2f58373780c49560a48ab1a32bedfe888692183de8396c92414255e4c8f537358cbc373fd307638ab8e7dbfd9ae44de58f SHA512 f50f68ab6b4bc59f55e84b49c1481f05700171cbf79eca9ba8f3a142a30a4ba88fe096983ebb8d117a9ef8bcea40934674096683d956f5c54cae457d31f651ab +DIST gtk-doc-1.34.0.tar.xz 494116 BLAKE2B cb8550debed9f32b967de9d4ebdde8dbe83551eb8527221d2d788355431f34e62a4beedda3e7f5722516ae8e23794a56b97a4f761ede0f7f2c0ef288624b5f7a SHA512 d962fe31949b5f7c70122c7ebbd98f4d21725697804bf5dd75fd7a6662753a91c9350fd1e8bed22a58a957b173f35e200fcbb4c7c2ebc45ccbc0db2e916b27ea diff --git a/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/gtk-doc-am-1.34.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/gtk-doc-am-1.34.0.ebuild new file mode 100644 index 00000000000..71fcc524406 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-build/gtk-doc-am/gtk-doc-am-1.34.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +GNOME_ORG_MODULE="gtk-doc" + +inherit gnome.org + +DESCRIPTION="Automake files from gtk-doc" +HOMEPAGE="https://gitlab.gnome.org/GNOME/gtk-doc" + +LICENSE="GPL-2+ FDL-1.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND="! Date: Mon, 27 Jan 2025 07:05:08 +0000 Subject: [PATCH 022/145] dev-build/libtool: Sync with Gentoo It's from Gentoo commit 38eba5544c9ecb6c3f48a58209d4cd2ee1332374. --- .../portage-stable/dev-build/libtool/Manifest | 1 - .../dev-build/libtool/libtool-2.5.3.ebuild | 150 ------------------ .../dev-build/libtool/libtool-2.5.4.ebuild | 2 +- 3 files changed, 1 insertion(+), 152 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-build/libtool/Manifest b/sdk_container/src/third_party/portage-stable/dev-build/libtool/Manifest index 8d83e556484..b5e24ed5bf6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/libtool/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-build/libtool/Manifest @@ -1,3 +1,2 @@ DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da -DIST libtool-2.5.3.tar.xz 1050076 BLAKE2B e7bc3421d2273851f894583b879c897239bddaef00dc335176f00ce971d3c77e4d4304ae3b1d1b97d4b6b1b4fd9859ddc0eb5dcadac2e0de959b68cae973f726 SHA512 7a2b86716b2cbefcd45bda7f65af81fcb0aaa3dce96b09f417d6b94721a4dd9e72a9552862783d998ddf785e509315bb49f65c464dbc949d58e36f0960cf9b1b DIST libtool-2.5.4.tar.xz 1056924 BLAKE2B 47de3c49a690d44d7ddd5e3b5e4090c91dc5fbb9c40fc4a3963e150fb7329326ee3e21b8c149974726171c4b0380028e0efc7a369c4f04357eea46f69852e1cc SHA512 eed207094bcc444f4bfbb13710e395e062e3f1d312ca8b186ab0cbd22dc92ddef176a0b3ecd43e02676e37bd9e328791c59a38ef15846d4eae15da4f20315724 diff --git a/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.3.ebuild deleted file mode 100644 index 3924768b1ef..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.3.ebuild +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-libs/libltdl. - -# bug #225559 -LIBTOOLIZE="true" -WANT_LIBTOOL="none" -inherit autotools flag-o-matic prefix multiprocessing - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git" - inherit git-r3 -elif false && ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then - SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P}.tar.xz" -else - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -DESCRIPTION="A shared library tool for developers" -HOMEPAGE="https://www.gnu.org/software/libtool/" - -LICENSE="GPL-2" -SLOT="2" -IUSE="vanilla" - -RDEPEND=" - sys-devel/gnuconfig - >=dev-build/autoconf-2.69:* - >=dev-build/automake-1.13:* -" -DEPEND="${RDEPEND}" -[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man" - -# Note that we have more patches in https://gitweb.gentoo.org/proj/elt-patches.git/ -# for package builds. The patches here are just those which are definitely fine -# for the system-wide libtool installation as well. -PATCHES=( - # bug #109105 - "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch - # bug #581314 - "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch - - "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch - "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch -) - -src_prepare() { - if [[ ${PV} == *9999 ]] ; then - eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876 - ./bootstrap || die - else - PATCHES+=( - "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876 - ) - fi - - # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway - chmod +w build-aux/ltmain.sh || die - - if use vanilla ; then - eapply_user - return 0 - else - default - fi - - if use prefix ; then - # seems that libtool has to know about EPREFIX a little bit - # better, since it fails to find prefix paths to search libs - # from, resulting in some packages building static only, since - # libtool is fooled into thinking that libraries are unavailable - # (argh...). This could also be fixed by making the gcc wrapper - # return the correct result for -print-search-dirs (doesn't - # include prefix dirs ...). - eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch - eprefixify m4/libtool.m4 - fi - - pushd libltdl >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - popd >/dev/null || die - AT_NOELIBTOOLIZE=yes eautoreconf - - # Make sure timestamps don't trigger a rebuild of man pages. #556512 - if [[ ${PV} != *9999 ]] ; then - touch doc/*.1 || die - export HELP2MAN=true - fi -} - -src_configure() { - # the libtool script uses bash code in it and at configure time, tries - # to find a bash shell. if /bin/sh is bash, it uses that. this can - # cause problems for people who switch /bin/sh on the fly to other - # shells, so just force libtool to use /bin/bash all the time. - # Do not bother hardcoding the full path to sed. - # Just rely on $PATH. bug #574550 - export CONFIG_SHELL="${EPREFIX}"/bin/bash - export ac_cv_path_SED="sed" - export ac_cv_path_EGREP="grep -E" - export ac_cv_path_EGREP_TRADITIONAL="grep -E" - export ac_cv_path_FGREP="grep -F" - export ac_cv_path_GREP="grep" - export ac_cv_path_lt_DD="dd" - - local myeconfargs=( - # Split into dev-libs/libltdl - --disable-ltdl-install - - # Tests break otherwise (when porting to EAPI 8) - # https://lists.gnu.org/archive/html/bug-libtool/2014-10/msg00013.html - --enable-static - ) - - [[ ${CHOST} == *-darwin* ]] && myeconfargs+=( "--program-prefix=g" ) - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -src_test() { - ( - # The testsuite is sensitive to warnings, expects static - # archives to really be archives (not compiler IR), etc. - strip-flags - filter-flags -fno-semantic-interposition - filter-flags '-Wstrict-aliasing=*' '-Werror=*' - filter-lto - - emake -Onone check \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - FFLAGS="${FFLAGS}" \ - FCFLAGS="${FCFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)" - ) -} - -src_install() { - default - - local x - while read -d $'\0' -r x ; do - ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die - done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0) -} diff --git a/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.4.ebuild index b961823abd1..de3e61a54d2 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/libtool/libtool-2.5.4.ebuild @@ -17,7 +17,7 @@ elif false && ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P}.tar.xz" else SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi DESCRIPTION="A shared library tool for developers" From 22a0bf2cd3a4da034b056d97163a03fd595ac589 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:09 +0000 Subject: [PATCH 023/145] dev-build/meson: Sync with Gentoo It's from Gentoo commit b961c626169e83597d6c8f94b3f0c7d4a44bf202. --- .../portage-stable/dev-build/meson/Manifest | 6 +-- .../dev-build/meson/meson-1.5.2.ebuild | 4 +- .../dev-build/meson/meson-1.6.1.ebuild | 41 +++++++++++++++++-- ...on-1.7.0_rc1.ebuild => meson-1.7.0.ebuild} | 37 ++++++++++++++++- .../dev-build/meson/meson-9999.ebuild | 39 +++++++++++++++++- .../dev-build/meson/metadata.xml | 3 ++ 6 files changed, 119 insertions(+), 11 deletions(-) rename sdk_container/src/third_party/portage-stable/dev-build/meson/{meson-1.7.0_rc1.ebuild => meson-1.7.0.ebuild} (88%) diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/Manifest b/sdk_container/src/third_party/portage-stable/dev-build/meson/Manifest index 507be16d504..e716262fc42 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/Manifest @@ -14,11 +14,11 @@ DIST meson-1.6.0.tar.gz 2277602 BLAKE2B c1d8f143b17fab90c6128a721ac45b9ed6b85d67 DIST meson-1.6.0.tar.gz.asc 833 BLAKE2B 4cb8483a0b40330f71c86b9ede2dbccf2eb430138508983232924d70512100a36094974048783d814b9d83c11719f4be5a6541dc0eeaee3044048c38f28106c4 SHA512 4f1f47a5aafc8de8180a47303f2ea2d7dff1b792ee3e1dbf64bd96ea64b2a1696b664fb3ea4169b73c7a950f4371481c083f18ab11fdaf3bccf2b8671e40cd7d DIST meson-1.6.1.tar.gz 2276144 BLAKE2B 7ccdb3bf3f701fc787fabf91413db8301a8658b89e08c1d712711bd35845dc2468211e4b666cf46ad68ad9462e62b12b62d60c3767a2804f9b695b4390bb8235 SHA512 b4ca7a3b667db0ad370110abd8b20467b1c74ae7777a068db33f8974602c123881a7130b2340664abb52e36fe5195989a5cc8fa7de6212c37abf5b0900554425 DIST meson-1.6.1.tar.gz.asc 833 BLAKE2B 6666eca8e5506b8692fc29ba66dc3ee9d725a7d720a7b43db720098f7e00671e71993586606c187d8314e3919474f5733d64a8d052be6552cbcf013a872905ab SHA512 543cf396de0a58998c3587aa05580fa9a56734db40b74fc5fbb22cd56124531804a5360d6b9acb9baa71753ac04c343364da4d78a0d366d8e8bc760030ebf8d3 -DIST meson-1.7.0rc1.tar.gz 2294319 BLAKE2B eb17bc0bd1bf5ba48ab973c3d093184524f3d0afdb14ed403026dc9dfef956abf1b1a8a434071ad4db02b1bcc0f636ffb504aed68e61f95fad7e92496d337504 SHA512 a4a410718fdb98452539b6ce6e6a8c5c5e96d8eaf08ab658ff5697f7ec70f5892da833562355d3e0f9975cfc13bb53153a4e75ff1ff31077439b4d522fce7197 -DIST meson-1.7.0rc1.tar.gz.asc 833 BLAKE2B 70b268d247a5340a94259ab6ab85f2f763c4668d585f220249d248108db7322ff01920ef855e8684271b0e41696df5245d0060f722b7bfae938ed96bcccc2c25 SHA512 e4bc1139a4d3895fe0f5d89ab95ff08428a054cb7e40c9209c323bc4e4017e13888c4eb52b8dfc60db3ffd1f9512fab78443a2821d3c96f1b81a4da06e7798af +DIST meson-1.7.0.tar.gz 2293975 BLAKE2B 64465b33c2358fddc3594807ee5d251dc6bcc1030ed3559d2d5dc33b7092a512b8a3d3b75cc7152812dbc62631d3b9fba596cd105654ae3ff38f01be8ada5232 SHA512 a5d1f00b193ca37ae64f85c9dfc29a2661c167d82d9953b9acd1393b222b05fa5fc03ffdf00fd1ae7a2014da3a7366c35f70bf02e3204e929b74f7b00c17c840 +DIST meson-1.7.0.tar.gz.asc 833 BLAKE2B 34783968262e5ce54cca7f4878b09e7611670ede620b8588ac915bb55fed7f4051e151d789b10e9bd650241149dc9930c14b356c3ce436682d496eeabc805672 SHA512 85ec14f080d0d1492922c971909dc734ab1cd4914a567afbfeff5dc00d19a9a72e6e0668280fc045f270c49389ea03059b9eeb831788b2154fb39116b38f6e5e DIST meson-reference-1.4.2.3 339324 BLAKE2B 1a4fbd8c27a8cfba773777eabd2ebaa0f76ec0c61dcfe1c7b4483737b348ff9528d68f26e68d7d40b2e1875611eed5b9a31c1cf55fed8eabb42fc1e31d9ef14b SHA512 8b8ec43e812599203ec44c08805eb6818485805c45b9c69802261eaa35efc97846a96f6472c6b1ef5f6c703e7153fd957df7b805f173ca3400a2030dfbe002ca DIST meson-reference-1.5.1.3 341110 BLAKE2B 5267c2eea1b1281f87e63eb08aa928257dd98088b4d5c27c2785d2d8066c2c28536f7f56bf804ffe37d2f51552c91f31ff7e2729f3b2485d594a9e44a0df9ab1 SHA512 2d36e87e9bc2de0b958f4b20544b0bd9f2b0ffb646768e68fefcd5dfb8f09c24db40f27208b5f2d1f6ba02e7465f68a538ea72be118670c76e0959e090a42cf3 DIST meson-reference-1.5.2.3 341110 BLAKE2B 0d588b796f7f2da2dcb0e7822acde6a9a461930da4bfead3cf9148fa0fac18cd0ccbc6e891f555c973836f1c16b4eae299908a838a0b6843293de8815d30fc23 SHA512 64715ce2113e362e7d67179fe13566bc8f84ce7f4e6d795b836f42455a871173fee06e3e969e2996022d7e6c9b4b5379587a4c0c3d97b4bca527fb8902d3547f DIST meson-reference-1.6.0.3 343730 BLAKE2B 18704b557298da2ea1f3edb4ed6c421bff3f973a215e56b340de2e78b1330e13eb00830cf44c3a8d04fd685ec6f8e6d078a4b9f03cf5b9e5413cbbfce55a22dd SHA512 2752b51dfa404ebae107f6579acca4268140aba8b1a672762fa4fa66819dc4449560313c5eb6c17433cc2cf273ce57d3d04b846bddf74902825b530de777f4ea DIST meson-reference-1.6.1.3 343730 BLAKE2B 55df822192781a70e4bc44cfe14fb363e3f820406260ca9705d7fdb5fad1bf0117e3f1325d37e58e23477bc075ab6bd84056409355ec694f72eeaa5bf982ecc7 SHA512 553cdcd86a7a600cda05ac970cc285c4c50017d1e7d2925645d7f19a62b34c2f079673cafecf4111aa102afbe9d8e4d56f166d1d9940b740eeec0bb99d6cbc0d -DIST meson-reference-1.7.0rc1.3 344643 BLAKE2B a2615149175714f74d7ea1be426ce23475fa479d4f3ed4e9000b7bee46e15e7f1592d777334385d8858dedf3aa4256bcfaabf5f60150aa0854be6f67ad99ed59 SHA512 9834bbd7b35b1c3c2bfff7c46009f1e2dc6045c35ef07a3e105ad51c2fd48049f44cbbd48be6d68932cb66ee929a3ec6db7afec863720bd78da279b23ac457be +DIST meson-reference-1.7.0.3 344764 BLAKE2B 615c70325b6ca3b964bf2827f20f07845150943b6cd95a0599b0392299e2a9338921b52bbe3613fc03fa931c28fb2121801bdb74880f2bd4fecb051b7f1fcb4b SHA512 9d9a3862602251ca780acdf18cee4ab9cd14404481e216b557eafc88b23561ecf481836898b78cbc4ee3539869b5578c649a5c71f32b3074d8125b867ea4751d diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.5.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.5.2.ebuild index 9f62c49303a..7fa68e62147 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.5.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.5.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 2016-2024 Gentoo Authors +# Copyright 2016-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -33,7 +33,7 @@ else VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi fi diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.6.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.6.1.ebuild index 70a2f51176d..724b55bd99c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.6.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.6.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2016-2024 Gentoo Authors +# Copyright 2016-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -33,7 +33,7 @@ else VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi fi @@ -42,8 +42,9 @@ HOMEPAGE="https://mesonbuild.com/" LICENSE="Apache-2.0" SLOT="0" -IUSE="test" +IUSE="test test-full" RESTRICT="!test? ( test )" +REQUIRED_USE="test-full? ( test )" DEPEND=" test? ( @@ -53,6 +54,40 @@ DEPEND=" dev-vcs/git sys-libs/zlib[static-libs(+)] virtual/pkgconfig + dev-build/cmake + ) + test-full? ( + || ( dev-lang/rust dev-lang/rust-bin ) + dev-lang/nasm + dev-lang/vala + dev-python/cython + virtual/fortran + virtual/jdk + + app-text/doxygen + dev-cpp/gtest + dev-libs/protobuf + dev-util/bindgen + dev-util/gtk-doc + dev-util/itstool + media-libs/libsdl2 + media-libs/libwmf + net-libs/libpcap + sci-libs/hdf5 + sci-libs/netcdf + sys-cluster/openmpi + sys-devel/bison + sys-devel/flex + + dev-qt/linguist-tools:5 + dev-qt/qtwidgets:5 + dev-qt/qtbase:6[gui,widgets] + dev-qt/qttools:6 + dev-util/gdbus-codegen + x11-libs/gtk+:3 + + dev-libs/wayland + dev-util/wayland-scanner ) " RDEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0_rc1.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0.ebuild similarity index 88% rename from sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0_rc1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0.ebuild index 7c4c5f96b87..64be9d3d5fa 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0_rc1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-1.7.0.ebuild @@ -42,8 +42,9 @@ HOMEPAGE="https://mesonbuild.com/" LICENSE="Apache-2.0" SLOT="0" -IUSE="test" +IUSE="test test-full" RESTRICT="!test? ( test )" +REQUIRED_USE="test-full? ( test )" DEPEND=" test? ( @@ -53,6 +54,40 @@ DEPEND=" dev-vcs/git sys-libs/zlib[static-libs(+)] virtual/pkgconfig + dev-build/cmake + ) + test-full? ( + || ( dev-lang/rust dev-lang/rust-bin ) + dev-lang/nasm + dev-lang/vala + dev-python/cython + virtual/fortran + virtual/jdk + + app-text/doxygen + dev-cpp/gtest + dev-libs/protobuf + dev-util/bindgen + dev-util/gtk-doc + dev-util/itstool + media-libs/libsdl2 + media-libs/libwmf + net-libs/libpcap + sci-libs/hdf5 + sci-libs/netcdf + sys-cluster/openmpi + sys-devel/bison + sys-devel/flex + + dev-qt/linguist-tools:5 + dev-qt/qtwidgets:5 + dev-qt/qtbase:6[gui,widgets] + dev-qt/qttools:6 + dev-util/gdbus-codegen + x11-libs/gtk+:3 + + dev-libs/wayland + dev-util/wayland-scanner ) " RDEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-9999.ebuild index 70a2f51176d..64be9d3d5fa 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/meson-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2016-2024 Gentoo Authors +# Copyright 2016-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -42,8 +42,9 @@ HOMEPAGE="https://mesonbuild.com/" LICENSE="Apache-2.0" SLOT="0" -IUSE="test" +IUSE="test test-full" RESTRICT="!test? ( test )" +REQUIRED_USE="test-full? ( test )" DEPEND=" test? ( @@ -53,6 +54,40 @@ DEPEND=" dev-vcs/git sys-libs/zlib[static-libs(+)] virtual/pkgconfig + dev-build/cmake + ) + test-full? ( + || ( dev-lang/rust dev-lang/rust-bin ) + dev-lang/nasm + dev-lang/vala + dev-python/cython + virtual/fortran + virtual/jdk + + app-text/doxygen + dev-cpp/gtest + dev-libs/protobuf + dev-util/bindgen + dev-util/gtk-doc + dev-util/itstool + media-libs/libsdl2 + media-libs/libwmf + net-libs/libpcap + sci-libs/hdf5 + sci-libs/netcdf + sys-cluster/openmpi + sys-devel/bison + sys-devel/flex + + dev-qt/linguist-tools:5 + dev-qt/qtwidgets:5 + dev-qt/qtbase:6[gui,widgets] + dev-qt/qttools:6 + dev-util/gdbus-codegen + x11-libs/gtk+:3 + + dev-libs/wayland + dev-util/wayland-scanner ) " RDEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-build/meson/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-build/meson/metadata.xml index 0bea8119a5b..4cd5b8f68b1 100644 --- a/sdk_container/src/third_party/portage-stable/dev-build/meson/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-build/meson/metadata.xml @@ -12,4 +12,7 @@ mesonbuild/meson meson + + pull in dependencies to run all tests + From bd65b88e145e88aab7ffa7ddd4b46f264c0a9185 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:14 +0000 Subject: [PATCH 024/145] dev-db/sqlite: Sync with Gentoo It's from Gentoo commit 50d40e2d5e4a717ea3c15729353b4ae929383b01. --- .../portage-stable/dev-db/sqlite/Manifest | 2 + ...7.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch | 33 ++ ...-3.47.2.ebuild => sqlite-3.47.2-r1.ebuild} | 5 +- .../dev-db/sqlite/sqlite-3.48.0-r1.ebuild | 432 ++++++++++++++++++ .../dev-db/sqlite/sqlite-9999.ebuild | 6 +- 5 files changed, 475 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch rename sdk_container/src/third_party/portage-stable/dev-db/sqlite/{sqlite-3.47.2.ebuild => sqlite-3.47.2-r1.ebuild} (97%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.48.0-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest index d266c56e807..eba80916aa8 100644 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/Manifest @@ -1,4 +1,6 @@ DIST sqlite-doc-3460100.zip 10851427 BLAKE2B 7462e83ca84e3e9aac7236f575fd2bdddac7744ae700a63fe8fdc9d2df3157c59fd374d99a0526bd4d9f742005ee7a90f3d78057861d3c3fcba9f897630e48db SHA512 1ad7dfc938d182f69ea9367b4f5ead1d48b991626521249e8b58c9fb4c2553e348ce402de9cc81b0ad699d4c45c467de56a98ee39f9c3555c6fafff15fba41ce DIST sqlite-doc-3470200.zip 10957830 BLAKE2B cbc40dd440d1c5af4ad4333090a7306bd54ec43250a478b6900b8f74bd721035018ea7647f3a208d42cc0639827325be26a9412d17af7d390f4e584d4c6acf44 SHA512 48349d512b7cd9bc6f6a5da3a2b2285de159d4653667311adb0f5e6a970060db940a590c2d01b529afc1614065b22434d5b3ac4d8d0122d003d74926745ba56e +DIST sqlite-doc-3480000.zip 11391112 BLAKE2B d28531e5d3ac7802700636a669f165cb9fa2a6077422b1ba956b6b9e29db48941489b5a3bc1c4936723e59343e00c3edc9310db9724d914a30ac9aca775dc70d SHA512 d7cad0da8598a3abcacf0e05ba4e285ad1d790691e571e431f920abf1bf27c5a416408ff60ff051b01a65662c0e60bb63b9ba73872851fe63f379e834c5a0f04 DIST sqlite-src-3460100.zip 14276926 BLAKE2B df16ea944e317df8ed64fdfab289e3699ec71725ce55e2b30450adaeb41c061b4fba1eb8c41ba638b0edcd12b23264a1f9e413b69fd593c2b65fb1037d3fc8b2 SHA512 6d32a0db9f95d3cec34f02f3fd45b453bf7c422d4d4d9570790f641e7d190b8b31be8e8715afacc1b6e4417f15a4d15a0b28e608ae0b4b5f3054b075783b916e DIST sqlite-src-3470200.zip 14421983 BLAKE2B dcaea5be0099b2dad1b53403933f0037ace48b1f248040c1b5cc116ac2ad6c9b44c71b8efe3afd16bef01119b440d1a2ec9d553a22f855e0ba55793684f53d8d SHA512 a6280a02304bfae173d9e9ebf376b2d3624658f04af4d8e95d5a042e24cf0405a47c0a4023f4dbc2790716cd85e16b97fcc0a83c1534e6d554f4eb0bfb0a3ed3 +DIST sqlite-src-3480000.zip 14350897 BLAKE2B 1dafce5575cbf8eb4e7efb5c033322b887bcce38129756994da45b1d8e0cf136f337e6cb9fa3c4b5abcf1f68bff6763247bec1ad04975fc9de308e3b75fb4e54 SHA512 854832e9a5dc486a81934e36c1f1678ce50db55b8bd3c48ed2d569fb0bb7ce23d4b490c0a0f699274ff11ddf2000db4a620e064557084c54b217e7fdd836f4e1 diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch new file mode 100644 index 00000000000..499fe2d21bd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/files/sqlite-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch @@ -0,0 +1,33 @@ +https://sqlite.org/forum/forumpost/45f76411c1 + +From 0f2389e42ec65fd925e1bce608f382f3b35ee0f6 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 25 Jan 2025 12:10:24 +0000 +Subject: [PATCH] hwtime.h: Don't use rdtsc on i486 + +If -DSQLITE_ENABLE_STMT_SCANSTATUS is passed, rdtsc is used for profiling +purposes, but that's not available on i486 CPUs (e.g. Soekris 4501 / AMD Elan +in the linked bug). + +Just look for i586 instead of i386. For the i386/i486 case, it's fine if we +use the stub implementation. This feels cleaner than toggling functionality +in the ebuild, even if it's unlikely anyone on i486 is going to use that. + +Thanks to amonakov who found the problem quickly and the relevant part of SQLite. + +Bug: https://bugs.gentoo.org/948671 +Signed-off-by: Sam James +--- a/src/hwtime.h ++++ b/src/hwtime.h +@@ -24,7 +24,7 @@ + */ + #if !defined(__STRICT_ANSI__) && \ + (defined(__GNUC__) || defined(_MSC_VER)) && \ +- (defined(i386) || defined(__i386__) || defined(_M_IX86)) ++ (defined(i586) || defined(__i586__) || defined(_M_IX86)) + + #if defined(__GNUC__) + +-- +2.48.1 + diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2-r1.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild rename to sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2-r1.ebuild index a5d7c70c508..044a48ee68f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.47.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,7 +24,7 @@ else " S="${WORKDIR}/${PN}-src-${SRC_PV}" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="public-domain" @@ -53,6 +53,7 @@ fi PATCHES=( "${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch "${FILESDIR}"/${PN}-3.47.1-buildtclext.patch + "${FILESDIR}"/${PN}-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch ) _fossil_fetch() { diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.48.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.48.0-r1.ebuild new file mode 100644 index 00000000000..ffb79ecc5f1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-3.48.0-r1.ebuild @@ -0,0 +1,432 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="SQL database engine" +HOMEPAGE="https://sqlite.org/" + +# On version updates, make sure to read the forum (https://sqlite.org/forum/forum) +# for hints regarding test failures, backports, etc. +if [[ ${PV} == 9999 ]]; then + S="${WORKDIR}"/${PN} + PROPERTIES="live" +else + printf -v SRC_PV "%u%02u%02u%02u" $(ver_rs 1- " ") + DOC_PV="${SRC_PV}" + #printf -v DOC_PV "%u%02u%02u00" $(ver_rs 1-3 " ") + + SRC_URI=" + https://sqlite.org/2025/${PN}-src-${SRC_PV}.zip + doc? ( https://sqlite.org/2025/${PN}-doc-${DOC_PV}.zip ) + " + S="${WORKDIR}/${PN}-src-${SRC_PV}" + + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="public-domain" +SLOT="3" +IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] + icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] ) + readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] ) + tools? ( dev-lang/tcl:= ) +" +DEPEND=" + ${RDEPEND} + test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] ) +" +if [[ ${PV} == 9999 ]]; then + BDEPEND+=" dev-vcs/fossil" +else + BDEPEND+=" app-arch/unzip" +fi + +PATCHES=( + "${FILESDIR}"/${PN}-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch +) + +_fossil_fetch() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local repo_uri="${2}" + + local -x FOSSIL_HOME="${HOME}" + + mkdir -p "${T}/fossil/${repo_id}" || die + pushd "${T}/fossil/${repo_id}" > /dev/null || die + + if [[ -n "${EVCS_OFFLINE}" ]]; then + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + else + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" + fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die + echo + else + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die + einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" + fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die + echo + fi + + ( + addwrite "${distdir}" + mkdir -p "${distdir}/fossil-src/${repo_id}" || die + cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die + ) + fi + + popd > /dev/null || die +} + +_fossil_checkout() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local branch_or_commit="${2}" + local target_directory="${3}" + + local -x FOSSIL_HOME="${HOME}" + + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + + if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then + mkdir -p "${T}/fossil/${repo_id}" || die + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die + fi + + mkdir "${target_directory}" || die + pushd "${target_directory}" > /dev/null || die + + einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" + fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die + echo + + popd > /dev/null || die +} + +fossil_fetch() { + local repo_id="${1}" + local repo_uri="${2}" + local target_directory="${3}" + + local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}" + + _fossil_fetch "${repo_id}" "${repo_uri}" + _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}" + if use doc; then + fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc" + fi + else + default + fi +} + +src_prepare() { + + # Avoid stripping during the install phase + sed -i -e 's/$(INSTALL) -s /$(INSTALL) /' main.mk || die + default + + multilib_copy_sources +} + +multilib_src_configure() { + local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" + local options=() + + options+=( + --enable-load-extension + --enable-threadsafe + ) + + # Support detection of misuse of SQLite API. + # https://sqlite.org/compile.html#enable_api_armor + append-cppflags -DSQLITE_ENABLE_API_ARMOR + + # Support bytecode and tables_used virtual tables. + # https://sqlite.org/compile.html#enable_bytecode_vtab + # https://sqlite.org/bytecodevtab.html + append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB + + # Support column metadata functions. + # https://sqlite.org/compile.html#enable_column_metadata + # https://sqlite.org/c3ref/column_database_name.html + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA + + # Support sqlite_dbpage virtual table. + # https://sqlite.org/compile.html#enable_dbpage_vtab + # https://sqlite.org/dbpage.html + append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB + + # Support dbstat virtual table. + # https://sqlite.org/compile.html#enable_dbstat_vtab + # https://sqlite.org/dbstat.html + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB + + # Support sqlite3_serialize() and sqlite3_deserialize() functions. + # https://sqlite.org/compile.html#enable_deserialize + # https://sqlite.org/c3ref/serialize.html + # https://sqlite.org/c3ref/deserialize.html + append-cppflags -DSQLITE_ENABLE_DESERIALIZE + + # Support comments in output of EXPLAIN. + # https://sqlite.org/compile.html#enable_explain_comments + append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS + + # Support Full-Text Search versions 3, 4 and 5. + # https://sqlite.org/compile.html#enable_fts3 + # https://sqlite.org/compile.html#enable_fts3_parenthesis + # https://sqlite.org/compile.html#enable_fts4 + # https://sqlite.org/compile.html#enable_fts5 + # https://sqlite.org/fts3.html + # https://sqlite.org/fts5.html + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 + options+=( --enable-fts5 ) + + # Support hidden columns. + append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS + + # Support memsys5 memory allocator. + # https://sqlite.org/compile.html#enable_memsys5 + # https://sqlite.org/malloc.html#memsys5 + append-cppflags -DSQLITE_ENABLE_MEMSYS5 + + # Support sqlite3_normalized_sql() function. + # https://sqlite.org/c3ref/expanded_sql.html + append-cppflags -DSQLITE_ENABLE_NORMALIZE + + # Support sqlite_offset() function. + # https://sqlite.org/compile.html#enable_offset_sql_func + # https://sqlite.org/lang_corefunc.html#sqlite_offset + append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC + + # Support pre-update hook functions. + # https://sqlite.org/compile.html#enable_preupdate_hook + # https://sqlite.org/c3ref/preupdate_count.html + append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK + + # Support Resumable Bulk Update extension. + # https://sqlite.org/compile.html#enable_rbu + # https://sqlite.org/rbu.html + append-cppflags -DSQLITE_ENABLE_RBU + + # Support R*Trees. + # https://sqlite.org/compile.html#enable_rtree + # https://sqlite.org/compile.html#enable_geopoly + # https://sqlite.org/rtree.html + # https://sqlite.org/geopoly.html + append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY + + # Support Session extension. + # https://sqlite.org/compile.html#enable_session + # https://sqlite.org/sessionintro.html + append-cppflags -DSQLITE_ENABLE_SESSION + + # Support scan status functions. + # https://sqlite.org/compile.html#enable_stmt_scanstatus + # https://sqlite.org/c3ref/stmt_scanstatus.html + # https://sqlite.org/c3ref/stmt_scanstatus_reset.html + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS + + # Support sqlite_stmt virtual table. + # https://sqlite.org/compile.html#enable_stmtvtab + # https://sqlite.org/stmt.html + append-cppflags -DSQLITE_ENABLE_STMTVTAB + + # Support unknown() function. + # https://sqlite.org/compile.html#enable_unknown_sql_function + append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + + # Support unlock notification. + # https://sqlite.org/compile.html#enable_unlock_notify + # https://sqlite.org/c3ref/unlock_notify.html + # https://sqlite.org/unlock_notify.html + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY + + # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements. + # https://sqlite.org/compile.html#enable_update_delete_limit + # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses + # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses + append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT + + # Support soundex() function. + # https://sqlite.org/compile.html#soundex + # https://sqlite.org/lang_corefunc.html#soundex + append-cppflags -DSQLITE_SOUNDEX + + # Support URI filenames. + # https://sqlite.org/compile.html#use_uri + # https://sqlite.org/uri.html + append-cppflags -DSQLITE_USE_URI + + options+=( $(use_enable debug) ) + + if use icu; then + # Support ICU extension. + # https://sqlite.org/compile.html#enable_icu + append-cppflags -DSQLITE_ENABLE_ICU + sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + fi + + options+=( + --disable-editline + $(use_enable readline) + ) + + if use readline; then + options+=( --with-readline-inc="-I${ESYSROOT}/usr/include/readline" ) + fi + + if use secure-delete; then + # Enable secure_delete pragma by default. + # https://sqlite.org/compile.html#secure_delete + # https://sqlite.org/pragma.html#pragma_secure_delete + append-cppflags -DSQLITE_SECURE_DELETE + fi + + options+=( $(use_enable static-libs static) ) + + # tcl, test, tools USE flags. + if use tcl || use test || { use tools && multilib_is_native_abi; }; then + options+=( + --enable-tcl + --with-tcl="${ESYSROOT}/usr/$(get_libdir)" + ) + else + options+=( --disable-tcl ) + fi + + if [[ "${ABI}" == "x86" ]]; then + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then + append-cflags -mfpmath=sse + else + append-cflags -ffloat-store + fi + fi + + # set SONAME for the library + options+=( --soname=legacy ) + + # https://sqlite.org/forum/forumpost/4f4d06a9f6683bb9 + tc-export CC + CC_FOR_BUILD=${CC} econf "${options[@]}" +} + +multilib_src_compile() { + emake HAVE_TCL="$(usev tcl 1)" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" + + if use tools && multilib_is_native_abi; then + emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh + fi + + if [[ ${PV} == 9999 ]] && use doc && multilib_is_native_abi; then + emake tclsqlite3.c + + local build_directory="$(pwd)" + build_directory="${build_directory##*/}" + + mkdir "${WORKDIR}/${PN}-doc-build" || die + pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die + + emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc + rmdir doc/matrix{/*,} || die + + popd > /dev/null || die + fi +} + +multilib_src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions" + return + fi + + local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}" + + # e_uri.test tries to open files in /. + # bug #839798 + local SANDBOX_PREDICT=${SANDBOX_PREDICT} + addpredict "/test.db" + addpredict "/ÿ.db" + + emake -Onone $(usex debug 'fulltest' 'test') +} + +multilib_src_install() { + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + + if use tools && multilib_is_native_abi; then + install_tool() { + if [[ -f ".libs/${1}" ]]; then + newbin ".libs/${1}" "${2}" + else + newbin "${1}" "${2}" + fi + } + + install_tool changeset sqlite3-changeset + install_tool dbdump sqlite3-db-dump + install_tool dbhash sqlite3-db-hash + install_tool dbtotxt sqlite3-db-to-txt + install_tool index_usage sqlite3-index-usage + install_tool rbu sqlite3-rbu + install_tool scrub sqlite3-scrub + install_tool showdb sqlite3-show-db + install_tool showjournal sqlite3-show-journal + install_tool showshm sqlite3-show-shm + install_tool showstat4 sqlite3-show-stat4 + install_tool showwal sqlite3-show-wal + install_tool sqldiff sqlite3-diff + install_tool sqlite3_analyzer sqlite3-analyzer + install_tool sqlite3_checker sqlite3-checker + install_tool sqlite3_expert sqlite3-expert + install_tool sqltclsh sqlite3-tclsh + + unset -f install_tool + fi +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + doman sqlite3.1 + + if use doc; then + if [[ ${PV} == 9999 ]]; then + pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die + else + pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die + fi + + find "(" -name "*.db" -o -name "*.txt" ")" -delete || die + if [[ ${PV} != 9999 ]]; then + rm search search.d/admin || die + rmdir search.d || die + find -name "*~" -delete || die + fi + + ( + docinto html + dodoc -r * + ) + + popd > /dev/null || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-9999.ebuild index 53686a767f9..e0fe683ea62 100644 --- a/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-db/sqlite/sqlite-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -50,6 +50,10 @@ else BDEPEND+=" app-arch/unzip" fi +PATCHES=( + "${FILESDIR}"/${PN}-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch +) + _fossil_fetch() { local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" local repo_id="${1}" From 6d996675b547a684d5482676c14409422cb33593 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:14 +0000 Subject: [PATCH 025/145] dev-debug/gdb: Sync with Gentoo It's from Gentoo commit 9db17fadb485a7847416677e409cd4e73d308011. --- .../portage-stable/dev-debug/gdb/Manifest | 1 + .../dev-debug/gdb/gdb-16.1.ebuild | 354 ++++++++++++++++++ 2 files changed, 355 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-debug/gdb/gdb-16.1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-debug/gdb/Manifest b/sdk_container/src/third_party/portage-stable/dev-debug/gdb/Manifest index 061ea86e1af..b71c33b6be9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-debug/gdb/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-debug/gdb/Manifest @@ -1 +1,2 @@ DIST gdb-15.2.tar.xz 24332820 BLAKE2B 073668c21b41f12bf40160c6d3df808056453cc9df3b5b86374abe38e955d208f86467458b7e64b3c3e93d70b7f87425619778173fdb375256cd85be15419f14 SHA512 624007deceb5b15ba89c0725883d1a699fa46714ef30887f3d0165e17c5d65d634671740a135aa69e437d916218abb08cfa2a38ed309ff19d48f51da56b2a8ba +DIST gdb-16.1.tar.xz 24427088 BLAKE2B d1907a4abffda663e3d383959ee18e1ef91fe913c378cf9681bdf5810bf7e7f065236f722564fd77eebf15700751fed1cef58c25cd0c0c44d1d9a416809f6a66 SHA512 17b322fde0655a849506851c879aba9ad1f8bfee804b900efc718806091bec75511383bd4d632b8b32a32ef207233331581501157df18a8df528abe6ff667577 diff --git a/sdk_container/src/third_party/portage-stable/dev-debug/gdb/gdb-16.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-debug/gdb/gdb-16.1.ebuild new file mode 100644 index 00000000000..991cd5491c9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-debug/gdb/gdb-16.1.ebuild @@ -0,0 +1,354 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging +# tips & notes. + +GUILE_COMPAT=( 2-2 3-0 ) +PYTHON_COMPAT=( python3_{10..13} ) +inherit flag-o-matic guile-single linux-info python-single-r1 strip-linguas toolchain-funcs + +export CTARGET=${CTARGET:-${CHOST}} + +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +case ${PV} in + 9999*) + # live git tree + EGIT_REPO_URI=" + https://sourceware.org/git/binutils-gdb.git + https://git.sr.ht/~sourceware/binutils-gdb + https://gitlab.com/x86-binutils/binutils-gdb.git + " + inherit git-r3 + SRC_URI="" + ;; + *.*.50_p2???????|*.*.90_p2???????) + # Weekly snapshots + MY_PV="${PV/_p/.}" + SRC_URI=" + https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz + https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz + " + S="${WORKDIR}/${PN}-${MY_PV}" + + # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine + if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then + REGULAR_RELEASE=1 + fi + ;; + *.*.9?) + # Prereleases + MY_PV="${PV/_p/.}" + SRC_URI=" + https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz + " + S="${WORKDIR}/${PN}-${MY_PV}" + ;; + *) + # Normal upstream release + SRC_URI=" + mirror://gnu/gdb/${P}.tar.xz + https://sourceware.org/pub/gdb/releases/${P}.tar.xz + " + + REGULAR_RELEASE=1 +esac + +PATCH_DEV="" +PATCH_VER="" +DESCRIPTION="GNU debugger" +HOMEPAGE="https://sourceware.org/gdb/" +SRC_URI=" + ${SRC_URI} + ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz} + ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz} +" + +LICENSE="GPL-3+ LGPL-2.1+" +SLOT="0" +IUSE="cet debuginfod guile lzma multitarget nls +python rocm +server sim source-highlight test vanilla xml xxhash zstd" +if [[ -n ${REGULAR_RELEASE} ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" +fi +REQUIRED_USE=" + guile? ( ${GUILE_REQUIRED_USE} ) + python? ( ${PYTHON_REQUIRED_USE} ) + rocm? ( multitarget ) +" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/mpfr:= + dev-libs/gmp:= + >=sys-libs/ncurses-5.2-r2:= + >=sys-libs/readline-7:= + sys-libs/zlib + elibc_glibc? ( net-libs/libnsl:= ) + debuginfod? ( + dev-libs/elfutils[debuginfod(-)] + ) + lzma? ( app-arch/xz-utils ) + python? ( ${PYTHON_DEPS} ) + guile? ( ${GUILE_DEPS} ) + xml? ( dev-libs/expat ) + rocm? ( dev-libs/rocdbgapi ) + source-highlight? ( + dev-util/source-highlight + ) + xxhash? ( + dev-libs/xxhash + ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/xz-utils + sys-apps/texinfo + app-alternatives/yacc + nls? ( sys-devel/gettext ) + source-highlight? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu ) +" + +QA_CONFIG_IMPL_DECL_SKIP=( + MIN # gnulib FP (bug #898688) +) + +QA_PREBUILT="usr/share/gdb/guile/*" + +PATCHES=( + "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch +) + +pkg_setup() { + local CONFIG_CHECK + + if kernel_is -ge 6.11.3 ; then + # https://forums.gentoo.org/viewtopic-p-8846891.html + # + # Either CONFIG_PROC_MEM_ALWAYS_FORCE or CONFIG_PROC_MEM_FORCE_PTRACE + # should be okay, but not CONFIG_PROC_MEM_NO_FORCE. + CONFIG_CHECK+=" + ~!PROC_MEM_NO_FORCE + " + fi + + linux-info_pkg_setup + + use guile && guile-single_pkg_setup + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + use guile && guile_bump_sources + + strip-linguas -u bfd/po opcodes/po + + # Avoid using ancient termcap from host on Prefix systems + sed -i -e 's/termcap tinfow/tinfow/g' \ + gdb/configure{.ac,} || die + if [[ ${CHOST} == *-solaris* ]] ; then + # code relies on C++11, so make sure we get that selected + # due to Python 3.11 pymacro.h doing stuff to work around + # versioning mess based on the C version, while we're compiling + # C++ here, so we need to make it clear we're doing C++11/C11 + # because Solaris system headers act on these + sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die + fi +} + +gdb_branding() { + printf "Gentoo ${PV} " + + if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then + printf "p${PATCH_VER}" + else + printf "vanilla" + fi + + [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}" +} + +src_configure() { + strip-unsupported-flags + + # 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}" + + 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 gdb's configure. + --disable-dependency-tracking + --disable-silent-rules + + --with-pkgversion="$(gdb_branding)" + --with-bugurl='https://bugs.gentoo.org/' + --disable-werror + # Disable modules that are in a combined binutils/gdb tree. bug #490566 + --disable-{binutils,etc,gas,gold,gprof,gprofng,ld} + + $(use_with debuginfod) + + $(use_enable test unit-tests) + + # 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) + + # Helps when cross-compiling. Not to be confused with --with-sysroot. + --with-build-sysroot="${ESYSROOT}" + ) + + is_cross && myconf+=( + --with-sysroot="\${prefix}/${CTARGET}" + --includedir="\${prefix}/include/${CTARGET}" + --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" + ) + + # gdbserver only works for native targets (CHOST==CTARGET). + # it also doesn't support all targets, so rather than duplicate + # the target list (which changes between versions), use the + # "auto" value when things are turned on, which is triggered + # whenever no --enable or --disable is given + if is_cross || use !server ; then + myconf+=( --disable-gdbserver ) + fi + + myconf+=( + --enable-64-bit-bfd + --disable-install-libbfd + --disable-install-libiberty + --enable-obsolete + # This only disables building in the readline subdir. + # For gdb itself, it'll use the system version. + --disable-readline + --with-system-readline + # This only disables building in the zlib subdir. + # For gdb itself, it'll use the system version. + --without-zlib + --with-system-zlib + --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug + --with-amd-dbgapi=$(usex rocm) + $(use_with xml expat) + $(use_with lzma) + $(use_enable nls) + $(use_enable sim) + $(use_enable source-highlight) + $(use multitarget && echo --enable-targets=all) + $(use_with python python "${EPYTHON}") + $(use_with xxhash) + $(use_with guile) + $(use_with zstd) + + # Find libraries using the toolchain sysroot rather than the configured + # prefix. Needed when cross-compiling. + # + # Check which libraries to apply this to with: + # "${S}"/gdb/configure --help | grep without-lib | sort + --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix + ) + + # source-highlight is detected with pkg-config: bug #716558 + export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)" + + export CC_FOR_BUILD="$(tc-getBUILD_CC)" + + # ensure proper compiler is detected for Clang builds: bug #831202 + export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}" + + econf "${myconf[@]}" +} + +src_test() { + # Run the unittests (nabbed invocation from Fedora's spec file) at least + emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"' + + # Too many failures + # In fact, gdb's test suite needs some work to get passing. + # See e.g. https://sourceware.org/gdb/wiki/TestingGDB. + # As of 11.2, on amd64: "# of unexpected failures 8600" + # Also, ia64 kernel crashes when gdb testsuite is running. + #emake -k check +} + +src_install() { + emake DESTDIR="${D}" install + + find "${ED}"/usr -name libiberty.a -delete || die + + # Delete translations that conflict with binutils-libs. bug #528088 + # Note: Should figure out how to store these in an internal gdb dir. + if use nls ; then + find "${ED}" \ + -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \ + -delete || die + fi + + # Don't install docs when building a cross-gdb + if [[ ${CTARGET} != ${CHOST} ]] ; then + rm -rf "${ED}"/usr/share/{doc,info,locale} || die + local f + for f in "${ED}"/usr/share/man/*/* ; do + if [[ ${f##*/} != ${CTARGET}-* ]] ; then + mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die + fi + done + return 0 + fi + + # Install it by hand for now: + # https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html + # Only install if it exists due to the twisted behavior (see + # notes in src_configure above). + [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay + + docinto gdb + dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ + gdb/NEWS gdb/PROBLEMS + docinto sim + dodoc sim/{MAINTAINERS,README-HACKING} + + if use server ; then + docinto gdbserver + dodoc gdbserver/README + fi + + # Remove shared info pages + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info* + + use guile && guile_unstrip_ccache + + if use python ; then + python_optimize "${ED}"/usr/share/gdb/python/gdb + fi +} + +pkg_postinst() { + # Portage doesn't unmerge files in /etc + rm -vf "${EROOT}"/etc/skel/.gdbinit + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "gdb is unable to get a mach task port when installed by Prefix" + ewarn "Portage, unprivileged. To make gdb fully functional you'll" + ewarn "have to perform the following steps:" + ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" + ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" + fi +} From 9c2d6d3bb3f4002045f4c02d7cd2b27c800b916d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:15 +0000 Subject: [PATCH 026/145] dev-debug/strace: Sync with Gentoo It's from Gentoo commit a94bb8dcc4c03c4e2ec4f34b562535d8ccecfb5f. --- .../portage-stable/dev-debug/strace/strace-6.12.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-debug/strace/strace-6.12.ebuild b/sdk_container/src/third_party/portage-stable/dev-debug/strace/strace-6.12.ebuild index ad859afe0fb..75849b6af2f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-debug/strace/strace-6.12.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-debug/strace/strace-6.12.ebuild @@ -16,7 +16,7 @@ else https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz verify-sig? ( https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz.asc ) " - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" fi VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/strace.asc From 58a0763249677dc72ba0da3fa34f3d4f2e8b749b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:21 +0000 Subject: [PATCH 027/145] dev-lang/perl: Sync with Gentoo It's from Gentoo commit 0e86b15105aa0a9052d1f3ab0a3d5252b9d9aba2. --- .../portage-stable/dev-lang/perl/perl-5.40.0-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.40.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.40.0-r1.ebuild index c5ab653cceb..5cdfd028245 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.40.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.40.0-r1.ebuild @@ -55,7 +55,7 @@ LICENSE="|| ( Artistic GPL-1+ )" SLOT="0/${SUBSLOT}" if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi IUSE="berkdb perl_features_debug doc gdbm perl_features_ithreads minimal perl_features_quadmath" From f6e274a12aca932ccf53f86f2dd40ae6398075ff Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:21 +0000 Subject: [PATCH 028/145] dev-lang/python: Sync with Gentoo It's from Gentoo commit 5132d29ce21cee78f79a8bf32e9b4f9fb003f5f2. --- .../portage-stable/dev-lang/python/Manifest | 3 + .../dev-lang/python/python-3.12.8_p1.ebuild | 2 +- .../dev-lang/python/python-3.13.1_p1.ebuild | 2 +- .../python/python-3.14.0_alpha4-r100.ebuild | 635 ++++++++++++++++++ .../python/python-3.14.0_alpha4.ebuild | 630 +++++++++++++++++ 5 files changed, 1270 insertions(+), 2 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4-r100.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4.ebuild 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 a2d855837ae..076e86ad56c 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 @@ -12,6 +12,8 @@ DIST Python-3.13.1.tar.xz 22589692 BLAKE2B 161d5c0a7b4cacc4ce9983f9540a7e01662a7 DIST Python-3.13.1.tar.xz.asc 963 BLAKE2B 47cbfb6bceb92716181a0ed8f41742958568e62609fa4996d341e465bd6be0ebcab586ba1ebe275aa3a99108221be047fab66ec4b7e90af27d9db7524b6b4951 SHA512 1b56b7c2f547aa39c75c18978e174debb113444ce3f9da3829ba6842e3160051e0de70bd49d306b8014299aa8aa911d7c67efe71dd648c3528cf8d7535a01599 DIST Python-3.14.0a3.tar.xz 22749680 BLAKE2B 4a0457a98fe1a35c01a4607c11eefeb7ef4f4a3bc7bd8b04e129137c1f7f7ee8806fe5561e88dbf8866f461f2d7d3577618b7918fb85a0e99f7c225fd4593778 SHA512 e26c9736f00af680b5f1ff1ba0f06562c48550836088d79dd8b4c97016d52f9f76979de32fa8556e9d750a5dad488643e897807ab6cb0c1424882151fe5f3337 DIST Python-3.14.0a3.tar.xz.sigstore 4891 BLAKE2B c251bfc3e332174c5050c2d8524aea4865e28e73c39288ac151bea10e0039c3af545a26acc48b9ae8deed9befddb11e810103620be6a7934ea79e7b1f3182eb2 SHA512 dd7d6c543ba2ba8dc8d2a6c891adcf85de7eb857ceb3ffb33f5f06fbcf0a6bcd6517502cfd35acb86ec13d85d487313eb9a396d78c42d1c506d2261e1c4b861d +DIST Python-3.14.0a4.tar.xz 22798932 BLAKE2B 4dd8632503e142456deefa749aa8d7a93b98c988bdfe905ae650e8e72b2a22de9e88b6d7ba65ec277748b4c8b919a176ca22552e9482f4883b96bf9129dd15c2 SHA512 b70671ebbd9f777fdcb661405c538c733600470ac34992a5b3df99d2f5afecc22cd8325eeec50eeef043181e634da91e535c166b9b5ed421d4e6aa41b79da3ab +DIST Python-3.14.0a4.tar.xz.sigstore 4895 BLAKE2B 9a1c9ef623a0b8a7469d3fb56e0f73bf28947cb04ab797086962886d6e816e90c2df59e26af952e251c69e8e42c8888aa74bf866aebd7ff1a09526f3bd0d9472 SHA512 117dee2563607e4bc4190742d341f5b088e3feb205d59144b4a50bec1ec1c6df5f0118fbf88c8e78327f59d222ca7d98f31f1e5ff1d9488c0bbf01cd95df22ac DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61 DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed DIST Python-3.9.20.tar.xz 19648968 BLAKE2B 80a337ff406130599b8320068d11bc275d23473cedd7c85fcb9e40134f0f2d533be6e712139e788a6423cdc74cea938f306aa37c2a5099e3051f3e390159279c SHA512 c828f33edf1704e3149499d6d34e89264cb5cdb2b09ff05561641b359716d7996f0fe928629e09f006b1fd7850fdaf937275919c7fdd83f5efc32707c64d814b @@ -27,6 +29,7 @@ DIST python-gentoo-patches-3.13.0.tar.xz 8316 BLAKE2B 8fb8ba8f41f310140ad7066b61 DIST python-gentoo-patches-3.13.1.tar.xz 8320 BLAKE2B 2fef9c501df7ed7603eabb3e01a8c3bde5bcfae3a8ac9bbe772b458cb04ffa9598cf38f3a74f6dcbcda29e7bd294d664b8fb12f7ddd9e0e42ed6268300947bb0 SHA512 419e1f12daaf19ed2d2195699b5e8c2c604779562d84d6a68adb4016dcb13fc3e0383ccc4b01eb153930600e6c9cdcc518929ffce3d6343019226a6111e9d617 DIST python-gentoo-patches-3.13.1_p1.tar.xz 8672 BLAKE2B d35b8b47c6d549753d9a764fbc3538cb6517c809e69901f3221110ccbb0ea9eed10ba1f1637a5ffe4f90d8c3932f53815c7dcf844a7350ad89458763bf0aeea1 SHA512 0505bc1f7c8e264fdcad5459900e37d12ed9bea57e615ea42492fa211d3f0641e79c3e711a6970cd34a3a6275f36a22ed7ba64fd71c988bcdaebfcefc7b6a1d2 DIST python-gentoo-patches-3.14.0a3.tar.xz 6036 BLAKE2B bbcb3f31acb533b8291f4cedcb89c0501a7054bbf1f98ea000c43e5a99e3b8bd160c6fb81e28bad90c85dd0256d523f72b9e25f30c30b5b5e9d60a9055a612d1 SHA512 9f87b3f1f326f88c924c49e37f39f63314199cfc354d452fef860ab36e143145a2c1d832c1b7d4357ade1c1090de00086bc5d6a9d7981bad210a99ffcfa2a858 +DIST python-gentoo-patches-3.14.0a4.tar.xz 7452 BLAKE2B 5d3b0dc6f9c2f0ffeac50e4af1915a8d8ec29350c56203ec66d6580ae705a23316f4c85f28908000c50c58eb3400e63ff379ba26d219f48ca7f559633ba4c153 SHA512 0e571f6693e44f439c7ac499216f4cf70e487768116290c24ee66323c9113fc91d0b4b68c79d1d549d0a14fcee4f79ddc377dfd87932dfcf00c5c11d3784bedc DIST python-gentoo-patches-3.8.20_p6.tar.xz 50876 BLAKE2B df0df21c75972fb73e36f66f0c90d3f953b14d7a59bf97ce4214dce6e6d937ed52fbf3db8f3eaf42cde141bfe4d7a731b06e41723285517461c790912706be9e SHA512 48ef567f6972e7975cb61d34a876d8c0db42f1a3c0b832f9366091dd5f2ca854c02887808843d314816c8cf6d7b0738c40e7835fedbba7b84e57f2515dde45e2 DIST python-gentoo-patches-3.9.20_p2.tar.xz 36140 BLAKE2B af0a9e08f3bfd8eb631760d100ec8f54db968a6bd201820192c4ea63ec88e0f83ffe77c709fcf4da43ad8d44eeb239ca1984561c3e7846e3fe4edd757d2321a4 SHA512 d451b41401de631eed996c34f40f2146d4d2f11bfa04fffa762c9b654e690d0ef95be0f51224a964a7c33784bb9b21e58434f6fee17cf39c20b5af34200569d5 DIST python-gentoo-patches-3.9.21_p1.tar.xz 35404 BLAKE2B 7b5ac27e814b06791fa5f0566763711c1b65a7c82ba66f97e237eebc6076f0bfdad3d8269ece6c4d4c238b62cc75b01f68ea3a5d7c4fffc46e88f79b2ba3e7fc SHA512 92c8548b31100a921378c72cc94a81062c96fd795fa2cd001c57a71e4af39e91b21b99e9e84db12adb142d9c4bda809445519c5c8a35545bd10230926bd7eded diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.8_p1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.8_p1.ebuild index 34d02eeb616..67bd154d442 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.8_p1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.12.8_p1.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~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 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.1_p1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.1_p1.ebuild index 39406d1356b..77efc9e367d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.1_p1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.13.1_p1.ebuild @@ -32,7 +32,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="PSF-2" SLOT="${PYVER}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE=" bluetooth build debug +ensurepip examples gdbm jit libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4-r100.ebuild new file mode 100644 index 00000000000..2abe01749d3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4-r100.ebuild @@ -0,0 +1,635 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL=1 +VERIFY_SIG_METHOD=sigstore +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER="$(ver_cut 1-2)t" +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="Freethreading (no-GIL) version of Python programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + 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? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + 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 + +# https://www.python.org/downloads/metadata/sigstore/ +VERIFY_SIG_CERT_IDENTITY=hugo@python.org +VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + ewarn "Freethreading build is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python. Instead," + ewarn "please consider reporting freethreading problems upstream." +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + 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=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-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 + --disable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # 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= + local -x TMPDIR=/var/tmp + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + # Fix collision with GIL-enabled build. + rm "${ED}/usr/bin/python${PYVER%t}" || die + mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die + mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if use tk; then + # rename to avoid collision with dev-lang/python + mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die + else + rm -r "${ED}/usr/bin/idle${PYVER%t}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4.ebuild new file mode 100644 index 00000000000..f4da576cf95 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/python/python-3.14.0_alpha4.ebuild @@ -0,0 +1,630 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL=1 +VERIFY_SIG_METHOD=sigstore +WANT_LIBTOOL="none" + +inherit autotools check-reqs flag-o-matic linux-info llvm-r1 +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs +inherit verify-sig + +MY_PV=${PV/_alpha/a} +MY_P="Python-${MY_PV%_p*}" +PYVER=$(ver_cut 1-2) +PATCHSET="python-gentoo-patches-${MY_PV}" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE=" + https://www.python.org/ + https://github.com/python/cpython/ +" +SRC_URI=" + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz + verify-sig? ( + https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore + ) +" +S="${WORKDIR}/${MY_P}" + +LICENSE="PSF-2" +SLOT="${PYVER}" +IUSE=" + bluetooth build debug +ensurepip examples gdbm jit + libedit +ncurses pgo +readline +sqlite +ssl test tk valgrind +" +REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND=" + app-arch/bzip2:= + app-arch/xz-utils:= + >=dev-libs/expat-2.1:= + dev-libs/libffi:= + dev-libs/mpdecimal:= + dev-python/gentoo-common + >=sys-libs/zlib-1.1.3:= + 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? ( + dev-python/ensurepip-pip + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + ) + valgrind? ( dev-debug/valgrind ) +" +# autoconf-archive needed to eautoreconf +BDEPEND=" + dev-build/autoconf-archive + app-alternatives/awk + virtual/pkgconfig + jit? ( + $(llvm_gen_dep ' + llvm-core/clang:${LLVM_SLOT} + llvm-core/llvm:${LLVM_SLOT} + ') + ) + 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 + +# https://www.python.org/downloads/metadata/sigstore/ +VERIFY_SIG_CERT_IDENTITY=hugo@python.org +VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth + +# large file tests involve a 2.5G file being copied (duplicated) +CHECKREQS_DISK_BUILD=5500M + +QA_PKGCONFIG_VERSION=${PYVER%t} +# false positives -- functions specific to *BSD +QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags ) + +declare -rgA PYTHON_KERNEL_CHECKS=( + ["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589 + ["DNOTIFY"]="test_fcntl" # bug 938662 +) + +pkg_pretend() { + if use pgo || use test; then + check-reqs_pkg_pretend + fi + + if use jit; then + ewarn "USE=jit is considered experimental upstream. Using it" + ewarn "could lead to unexpected breakage, including race conditions" + ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless" + ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead," + ewarn "please consider reporting JIT problems upstream." + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]]; then + use jit && llvm-r1_pkg_setup + if use test || use pgo; then + check-reqs_pkg_setup + + local CONFIG_CHECK + for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do + CONFIG_CHECK+="~${f} " + done + linux-info_pkg_setup + fi + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore} + fi + default +} + +src_prepare() { + # Ensure that internal copies of expat and libffi are not used. + # TODO: Makefile has annoying deps on expat headers + #rm -r Modules/expat || die + + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default + + # force the correct number of jobs + # https://bugs.gentoo.org/737660 + sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die + + # breaks tests when using --with-wheel-pkg-dir + rm -r Lib/test/wheeldata || die + + eautoreconf +} + +build_cbuild_python() { + # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 + local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi) + + # pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get + # propagated to sysconfig for built extensions + # + # -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway) + local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto" + local -x LDFLAGS_NODIST=${BUILD_LDFLAGS} + local -x CFLAGS= LDFLAGS= + local -x BUILD_CFLAGS="${CFLAGS_NODIST}" + local -x BUILD_LDFLAGS=${LDFLAGS_NODIST} + + # We need to build our own Python on CBUILD first, and feed it in. + # bug #847910 + local myeconfargs_cbuild=( + "${myeconfargs[@]}" + + --prefix="${BROOT}"/usr + --libdir="${cbuild_libdir:2}" + + # Avoid needing to load the right libpython.so. + --disable-shared + + # As minimal as possible for the mini CBUILD Python + # we build just for cross to satisfy --with-build-python. + --without-lto + --without-readline + --disable-optimizations + ) + + mkdir "${WORKDIR}"/${P}-${CBUILD} || die + pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die + + # Avoid as many dependencies as possible for the cross build. + mkdir Modules || die + cat > Modules/Setup.local <<-EOF || die + *disabled* + nis + _dbm _gdbm + _sqlite3 + _hashlib _ssl + _curses _curses_panel + readline + _tkinter + pyexpat + zlib + # We disabled these for CBUILD because Python's setup.py can't handle locating + # libdir correctly for cross. This should be rechecked for the pure Makefile approach, + # and uncommented if needed. + #_ctypes + EOF + + ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}" + + # Unfortunately, we do have to build this immediately, and + # not in src_compile, because CHOST configure for Python + # will check the existence of the --with-build-python value + # immediately. + emake + popd &> /dev/null || die +} + +src_configure() { + # disable automagic bluetooth headers detection + if ! use bluetooth; then + local -x ac_cv_header_bluetooth_bluetooth_h=no + fi + + 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=( + # this is actually test_gdb.test_pretty_print + -x test_pretty_print + # https://bugs.gentoo.org/933840 + -x test_perf_profiler + ) + + # Arch-specific skips. See #931888 for a collection of these. + case ${CHOST} in + alpha*) + COMMON_TEST_SKIPS+=( + -x test_builtin + -x test_capi + -x test_cmath + -x test_float + # timeout + -x test_free_threading + -x test_math + -x test_numeric_tower + -x test_random + -x test_statistics + # bug 653850 + -x test_resource + -x test_strtod + ) + ;; + hppa*) + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + mips*) + COMMON_TEST_SKIPS+=( + -x test_ctypes + -x test_external_inspection + -x test_statistics + ) + ;; + powerpc64-*) # big endian + COMMON_TEST_SKIPS+=( + -x test_gdb + ) + ;; + riscv*) + COMMON_TEST_SKIPS+=( + -x test_urllib2 + ) + ;; + sparc*) + COMMON_TEST_SKIPS+=( + # bug 788022 + -x test_multiprocessing_fork + -x test_multiprocessing_forkserver + -x test_multiprocessing_spawn + + -x test_ctypes + -x test_gdb + # bug 931908 + -x test_exceptions + ) + ;; + esac + + # Kernel-config specific skips + for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do + if ! linux_config_exists || ! linux_chkconfig_present "${option}" + then + COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" ) + fi + done + + # musl-specific skips + use elibc_musl && COMMON_TEST_SKIPS+=( + # various musl locale deficiencies + -x test__locale + -x test_c_locale_coercion + -x test_locale + -x test_re + + # known issues with find_library on musl + # https://bugs.python.org/issue21622 + -x test_ctypes + + # fpathconf, ttyname errno values + -x test_os + ) + + if use pgo; then + local profile_task_flags=( + -m test + "-j$(makeopts_jobs)" + --pgo-extended + --verbose3 + -u-network + + # We use a timeout because of how often we've had hang issues + # here. It also matches the default upstream PROFILE_TASK. + --timeout 1200 + + "${COMMON_TEST_SKIPS[@]}" + + -x test_dtrace + + # All of these seem to occasionally hang for PGO inconsistently + # They'll even hang here but be fine in src_test sometimes. + # bug #828535 (and related: bug #788022) + -x test_asyncio + -x test_httpservers + -x test_logging + -x test_multiprocessing_fork + -x test_socket + -x test_xmlrpc + + # Hangs (actually runs indefinitely executing itself w/ many cpython builds) + # bug #900429 + -x test_tools + ) + + if has_version "app-arch/rpm" ; then + # Avoid sandbox failure (attempts to write to /var/lib/rpm) + profile_task_flags+=( + -x test_distutils + ) + fi + # PGO sometimes fails randomly + local -x PROFILE_TASK="${profile_task_flags[*]} || true" + fi + + local myeconfargs=( + # glibc-2.30 removes it; since we can't cleanly force-rebuild + # Python on glibc upgrade, remove it proactively to give + # a chance for users rebuilding python before glibc + ac_cv_header_stropts_h=no + + --enable-shared + --without-static-libpython + --enable-ipv6 + --infodir='${prefix}/share/info' + --mandir='${prefix}/share/man' + --with-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 + --enable-gil + + $(use_with debug assertions) + $(use_enable jit experimental-jit) + $(use_enable pgo optimizations) + $(use_with readline readline "$(usex libedit editline readline)") + $(use_with valgrind) + ) + + # 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= + local -x TMPDIR=/var/tmp + fi + + # also need to clear the flags explicitly here or they end up + # in _sysconfigdata* + emake CPPFLAGS= CFLAGS= LDFLAGS= + + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + + # Work around bug 329499. See also bug 413751 and 457194. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E python + else + pax-mark m python + fi +} + +src_test() { + # Tests will not work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # this just happens to skip test_support.test_freeze that is broken + # without bundled expat + # TODO: get a proper skip for it upstream + local -x LOGNAME=buildbot + + local test_opts=( + --verbose3 + -u-network + -j "$(makeopts_jobs)" + "${COMMON_TEST_SKIPS[@]}" + ) + + # bug 660358 + local -x COLUMNS=80 + local -x PYTHONDONTWRITEBYTECODE= + local -x TMPDIR=/var/tmp + + nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \ + CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty + local ret=${?} + + [[ ${ret} -eq 0 ]] || die "emake test failed" +} + +src_install() { + local libdir=${ED}/usr/lib/python${PYVER} + + # -j1 hack for now for bug #843458 + emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall + + # Fix collisions between different slots of Python. + rm "${ED}/usr/$(get_libdir)/libpython3.so" || die + + # Cheap hack to get version with ABIFLAGS + local abiver=$(cd "${ED}/usr/include"; echo python*) + if [[ ${abiver} != python${PYVER} ]]; then + # Replace python3.X with a symlink to python3.Xm + rm "${ED}/usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" + # Create python3.X-config symlink + dosym "${abiver}-config" "/usr/bin/python${PYVER}-config" + # Create python-3.5m.pc symlink + dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc" + fi + + # python seems to get rebuilt in src_install (bug 569908) + # Work around it for now. + if has_version dev-libs/libffi[pax-kernel]; then + pax-mark E "${ED}/usr/bin/${abiver}" + else + pax-mark m "${ED}/usr/bin/${abiver}" + fi + + rm -r "${libdir}"/ensurepip/_bundled || die + if ! use sqlite; then + rm -r "${libdir}/"sqlite3 || die + fi + if ! use tk; then + rm -r "${ED}/usr/bin/idle${PYVER}" || die + rm -r "${libdir}/"{idlelib,tkinter} || die + fi + + ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die + + dodoc Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + docinto examples + find Tools -name __pycache__ -exec rm -fr {} + || die + dodoc -r Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname=$( + printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | + emake --no-print-directory -s -f - 2>/dev/null + ) + newins Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}/etc/conf.d/pydoc-${PYVER}" \ + "${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed" + + # python-exec wrapping support + local pymajor=${PYVER%.*} + local EPYTHON=python${PYVER} + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + # python and pythonX + ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die + ln -s "python${pymajor}" "${scriptdir}/python" || die + # python-config and pythonX-config + # note: we need to create a wrapper rather than symlinking it due + # to some random dirname(argv[0]) magic performed by python-config + cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die + #!/bin/sh + exec "${abiver}-config" "\${@}" + EOF + chmod +x "${scriptdir}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die + # pydoc + ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die + fi +} From 757fba3abc8c66d8e8dde00c3335544b482eab1b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:23 +0000 Subject: [PATCH 029/145] dev-lang/rust: Sync with Gentoo It's from Gentoo commit dd9aab5ab8ca0c4e94e1854fa2be5bc2fdcd33e9. --- .../portage-stable/dev-lang/rust/Manifest | 4 - ...nore-broken-and-non-applicable-tests.patch | 75 --- .../1.49.0-gentoo-musl-target-specs.patch | 164 ----- .../rust/files/1.53.0-rustversion-1.0.5.patch | 234 -------- .../rust/files/1.54.0-parallel-miri.patch | 43 -- .../files/llvm/12/cstdint-signals-h.patch | 24 - .../portage-stable/dev-lang/rust/metadata.xml | 1 + .../dev-lang/rust/rust-1.54.0.ebuild | 559 ------------------ .../dev-lang/rust/rust-1.71.1-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.74.1-r100.ebuild | 336 ++++++++++- .../dev-lang/rust/rust-1.75.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.76.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.77.1-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.78.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.79.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.80.1-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.81.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.82.0-r100.ebuild | 12 +- .../dev-lang/rust/rust-1.82.0-r101.ebuild | 12 +- .../dev-lang/rust/rust-1.83.0-r1.ebuild | 16 +- 20 files changed, 438 insertions(+), 1138 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.54.0-parallel-miri.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.54.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest index 7c451592b01..74d396547e7 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/Manifest @@ -1,7 +1,3 @@ -DIST openssl-0.10.35.crate 204462 BLAKE2B fb58a3be883bac3d5aa3e971172a281a80e9e100c51585db3d2828ecfd89d0b3b19edfacba2039056fa3aefb79717e03cd2ecbf932afb1acac2e74e1c29d3551 SHA512 5ebe4626a894ccc6e5c159cef72357654aa1a20dcc863fdab495f10a574b49b0b9d4e85a069b8b9297544ea0d09fd88a976396c3a8e8faaee9d01d79d943126f -DIST openssl-sys-0.9.65.crate 54405 BLAKE2B f0e09accf076653f172199d36bfe0b7547a738f962e9ee8c15563c4d27587aade3e44830022a1787dfc932ae1f162336e3a110a34b1459656631c7ea50e58b75 SHA512 4c14ff5258a35b86e35d352c5702c90e1f70954c8f33d17160694b63305057b97da3ac6846d3e8f8e7293c40f15b76effd1e34fad4be613b8d815b90148406f7 -DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4ddcace9f6bc8f242c890327ca4074626f129514f8bcae5c5556015745f718990cce490658076f5cd3526623439540416b SHA512 5162f85b43ca2c5af93fdbfb2597d75df8a838f7fcc025a5298499ce1043db50f1ea2fbba753e47ce5daad3d80d4b612acf6527ef902c34117763e687fdbbcfa -DIST rustc-1.54.0-src.tar.xz.asc 801 BLAKE2B 5ee9166eaa00e4ffec10fb82b18946d403bc2030c6e04de6449311cbccc2ef1b017044f451a1c19be3a0a9640c4a9a9e4bd22d28e2115509f333ae38eb25e9d4 SHA512 5ad91f43515de14114964db0348cd28c08adc6dc935f110bf339053414b8eab8a40f1074ceffa44ed2df61254f8368d867479400618c44efaa0333642ab49d07 DIST rustc-1.71.1-src.tar.xz 151983068 BLAKE2B 3dfdbc246feb84a79ae94c2de978c5585ee06cf6b683d2245869b62e28f7c79f89cc589f5431537713bf088236a0b824acefc1b68e418e9eb72e1eea98054e3f SHA512 fd0e5a16bdbeb539184513583089e55f681cb772810df357b6b1464853f7022ac02edab3dd155b2262ed0047e2a25dea3808dd078dcdfce9d399384465009db4 DIST rustc-1.71.1-src.tar.xz.asc 801 BLAKE2B a88c073a70552d73e2d7695eceabdaa478f34501b7271fabf7f4a09f3efa545181f34353e45776b05918e6aeba88adb02f9731454f7085a7abf1602fc6589983 SHA512 9dd0406cf22f1daa7fcfd015fc1c6f8d36586aa99bf14c1491ee464c1f892ab759feb83e8b55b64713170fb777fdbe038fb5fd01a59c911b6599223baaba0677 DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3 SHA512 14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch b/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch deleted file mode 100644 index ff1707f4b8a..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 1879d1d1a284bf51c752e47db284ce22701ed5d0 Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Sun, 16 Sep 2018 16:38:48 +0000 -Subject: [PATCH 12/15] Ignore broken and non-applicable tests - -c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475 -env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox) -long-linker-command-lines: takes >10 minutes to run (but still passes) -simd-intrinsic-generic-bitmask.rs: broken on BE, #59356 -sparc-struct-abi: no sparc target -sysroot-crates-are-unstable: can't run rustc without RPATH ---- - src/test/codegen/sparc-struct-abi.rs | 1 + - src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++ - src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++ - src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++ - src/test/ui/env-funky-keys.rs | 1 + - 6 files changed, 10 insertions(+) - -diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs -index 78e5b14a212..6f93e93286b 100644 ---- a/src/test/codegen/sparc-struct-abi.rs -+++ b/src/test/codegen/sparc-struct-abi.rs -@@ -4,6 +4,7 @@ - - // only-sparc64 - // compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib -+// ignore-test - #![feature(no_core, lang_items)] - #![no_core] - -diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile -index f124ca2ab61..363b18f0985 100644 ---- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile -+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile -@@ -1,3 +1,5 @@ -+# ignore-aarch64 -+ - -include ../tools.mk - - all: -diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile -index 5876fbc94bc..5f167ece1a2 100644 ---- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile -+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile -@@ -1,3 +1,5 @@ -+# ignore-test -+ - -include ../tools.mk - - all: -diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile -index 9e770706857..6d92ec5cec8 100644 ---- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile -+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile -@@ -1,1 +1,3 @@ -+# ignore-test -+ - all: - python2.7 test.py -diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs -index c5c824ac58d..f3fe047a79c 100644 ---- a/src/test/ui/env-funky-keys.rs -+++ b/src/test/ui/env-funky-keys.rs -@@ -1,6 +1,7 @@ - // run-pass - // Ignore this test on Android, because it segfaults there. - -+// ignore-test - // ignore-android - // ignore-windows - // ignore-cloudabi no execve --- -2.24.1 - diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch b/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch deleted file mode 100644 index 25f1f27fcce..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 671ef2d1c228aed031b4232b8bea96f17b825263 Mon Sep 17 00:00:00 2001 -From: Georgy Yakovlev -Date: Mon, 23 Nov 2020 14:52:04 -0800 -Subject: [PATCH] add gentoo musl target specs - ---- - .../src/spec/aarch64_gentoo_linux_musl.rs | 11 +++++++++++ - .../src/spec/armv7_gentoo_linux_musleabihf.rs | 11 +++++++++++ - .../rustc_target/src/spec/i686_gentoo_linux_musl.rs | 11 +++++++++++ - compiler/rustc_target/src/spec/mod.rs | 8 ++++++++ - .../src/spec/powerpc64_gentoo_linux_musl.rs | 11 +++++++++++ - .../src/spec/powerpc64le_gentoo_linux_musl.rs | 11 +++++++++++ - .../src/spec/powerpc_gentoo_linux_musl.rs | 11 +++++++++++ - .../rustc_target/src/spec/x86_64_gentoo_linux_musl.rs | 11 +++++++++++ - 8 files changed, 85 insertions(+) - create mode 100644 compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs - create mode 100644 compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs - create mode 100644 compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs - create mode 100644 compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs - create mode 100644 compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs - create mode 100644 compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs - create mode 100644 compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs - -diff --git a/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..420fe7c ---- /dev/null -+++ b/compiler/rustc_target/src/spec/aarch64_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::aarch64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "aarch64-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs -new file mode 100644 -index 0000000..067e2d6 ---- /dev/null -+++ b/compiler/rustc_target/src/spec/armv7_gentoo_linux_musleabihf.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::armv7_unknown_linux_musleabihf::target(); -+ -+ base.llvm_target = "armv7-gentoo-linux-musleabihf".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..1cd39cd ---- /dev/null -+++ b/compiler/rustc_target/src/spec/i686_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::i686_unknown_linux_musl::target(); -+ -+ base.llvm_target = "i686-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs -index f1e8330..d8c0ba0 100644 ---- a/compiler/rustc_target/src/spec/mod.rs -+++ b/compiler/rustc_target/src/spec/mod.rs -@@ -490,6 +490,14 @@ macro_rules! supported_targets { - } - - supported_targets! { -+ ("aarch64-gentoo-linux-musl", aarch64_gentoo_linux_musl), -+ ("armv7-gentoo-linux-musleabihf", armv7_gentoo_linux_musleabihf), -+ ("i686-gentoo-linux-musl", i686_gentoo_linux_musl), -+ ("powerpc-gentoo-linux-musl", powerpc_gentoo_linux_musl), -+ ("powerpc64-gentoo-linux-musl", powerpc64_gentoo_linux_musl), -+ ("powerpc64le-gentoo-linux-musl", powerpc64le_gentoo_linux_musl), -+ ("x86_64-gentoo-linux-musl", x86_64_gentoo_linux_musl), -+ - ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), - ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), - ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), -diff --git a/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..e840bb2 ---- /dev/null -+++ b/compiler/rustc_target/src/spec/powerpc64_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc64-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..1037d82 ---- /dev/null -+++ b/compiler/rustc_target/src/spec/powerpc64le_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc64le_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc64le-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..a623ffe ---- /dev/null -+++ b/compiler/rustc_target/src/spec/powerpc_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::powerpc_unknown_linux_musl::target(); -+ -+ base.llvm_target = "powerpc-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} -diff --git a/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs -new file mode 100644 -index 0000000..f330473 ---- /dev/null -+++ b/compiler/rustc_target/src/spec/x86_64_gentoo_linux_musl.rs -@@ -0,0 +1,11 @@ -+use crate::spec::Target; -+ -+pub fn target() -> Target { -+ let mut base = super::x86_64_unknown_linux_musl::target(); -+ -+ base.llvm_target = "x86_64-gentoo-linux-musl".to_string(); -+ base.options.vendor = "gentoo".to_string(); -+ base.options.crt_static_default = false; -+ -+ base -+} --- -2.29.2 - diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch b/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch deleted file mode 100644 index bc6ae8be00b..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch +++ /dev/null @@ -1,234 +0,0 @@ -From 12efa21eb88cb43d3b927952da0c5635373ac92b Mon Sep 17 00:00:00 2001 -From: David Tolnay -Date: Thu, 17 Jun 2021 22:34:55 -0700 -Subject: [PATCH] Update rustversion to 1.0.5 - ---- - Cargo.lock | 4 +-- - vendor/rustversion/.cargo-checksum.json | 2 +- - vendor/rustversion/Cargo.toml | 2 +- - vendor/rustversion/build/build.rs | 6 ++++ - vendor/rustversion/build/rustc.rs | 30 +++++++++----------- - vendor/rustversion/src/lib.rs | 15 ++++++++++ - vendor/rustversion/src/time.rs | 13 +++++++-- - vendor/rustversion/tests/test_parse.rs | 10 +++++++ - vendor/rustversion/tests/ui/bad-bound.stderr | 4 +-- - vendor/rustversion/tests/ui/bad-date.stderr | 4 +-- - 10 files changed, 63 insertions(+), 27 deletions(-) - -diff --git a/Cargo.lock b/Cargo.lock -index 0939f19cdfe..26a89caf050 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -4582,9 +4582,9 @@ dependencies = [ - - [[package]] - name = "rustversion" --version = "1.0.4" -+version = "1.0.5" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" -+checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" - - [[package]] - name = "ryu" -diff --git a/vendor/rustversion/.cargo-checksum.json b/vendor/rustversion/.cargo-checksum.json -index e1277df7b59..0a134695aaf 100644 ---- a/vendor/rustversion/.cargo-checksum.json -+++ b/vendor/rustversion/.cargo-checksum.json -@@ -1 +1 @@ --{"files":{"Cargo.toml":"1a91782510461d54726e816ae776042b95c79c9949d49c11b8782caefc22ead2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"481daf363b7004c90ffc3e012863a4102e9f26b9aaa2a4a295c2dd78f690be28","build/rustc.rs":"4dc8f1764672137bd15758cc19242740b0d6ab99e4a69171ad0999f9112a15a6","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","src/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"f8347832d8072058dbb4af6b8d67a834a02fe9c5460bbaa26defec4b66317f1b","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"45fb48ff0a0046a5a1b108b9ce53b14885637ad868ede1d66970379c2b7f16ef","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"fbf9695f4208263743715e6c8b6294dfffee21462a65dfeb9339a70c0e18dbc6","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"bc9297f758c2541fb0a8b48d5785f4bbcd0d2a07d876ba0baf2fc9de9275e7e6","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"1ac3cab13ee900fc8344e8fab21ff4d9cad476aca44925a4c1b2293a6b59b742","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd"} -\ No newline at end of file -+{"files":{"Cargo.toml":"a09ee758f816eddff8a8c7fb5be54dd95e74caad18a207251faedd251ecfaf1c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"01dc6a1bf499a12bd0bfbbfe4db2ca8460b2c151235bcf2aad2356de4c2ec50a","build/build.rs":"bae427f344972e6e0e348ec48dce0947274b3ec6cac0938497a8d3da5c9834e5","build/rustc.rs":"3e4acf7ea679f9331dd4e8dbe42a08a312f58379ea1eee5898793a9848d06d8c","src/attr.rs":"9301cd4aff5a9648c057d5d8de9eb66921f0c3a715c51ada4459576bd49c8b19","src/bound.rs":"44bda74d3aacfeeeac9dae2f7eef3acc844d4c3c7eaa9d3e6288e5aeff269dff","src/constfn.rs":"613b8f53b21cc06b4f619fce9000993d3e7873b650701ca01cef1e53bed5b40a","src/date.rs":"454c749a60db8144a706a813e06fe3ae39c981920ba9832ef82f3f9debe1f052","src/error.rs":"cb37102f03ebbaca313d80f9714fe08dfef92fe956789ee87d93eb6121705f4f","src/expr.rs":"8e8ca76f4f5838436d9d7273f499c698bb41f6c15bc07d32ec5c1cb8bd3dd731","src/iter.rs":"8d4b817b9abc4e817105b673e15f29ef9bb8284a010ce01ac2d83387fe136947","src/lib.rs":"5652f6f84fc80136bd29b2125f7676e80e0df7d40aac274b0658c99cecbd871d","src/release.rs":"abb8ddd877c39a023bf5e7bd67063d6e4144e79758a8bafa338167f9d15b89f1","src/time.rs":"bdd05a743b07a6bbfa0dbc9d4e415e051aba4a51a430c3be1e23447eae298c8b","src/token.rs":"824ce765f692db73afa02d3ebb0281c750748035efc98fa547be29d3072665ce","src/version.rs":"afdb048bba95bbb885945eba5527b6bf0eca0105642bfc304c2f82a8b7d556df","tests/compiletest.rs":"0a52a44786aea1c299c695bf948b2ed2081e4cc344e5c2cadceab4eb03d0010d","tests/test_const.rs":"a8297ca6559f895a3b2664964a42b6f82bbbc3c8faa9556a513006e6e1827995","tests/test_eval.rs":"6f0ee3f49c9a0d0c374a4d0e9a9dce753cd9fc2ca7725e000a435dbd5f4a9ce3","tests/test_parse.rs":"cdfe376020b9391330292968046117b0935c828d73385e8faeb2e333ec897088","tests/ui/bad-bound.rs":"25bde278fcaabf62868417148a5e5f2006bf589d7ebd7bf6004fb8d78e47594f","tests/ui/bad-bound.stderr":"a03dc78b380191c10d3b3406b1fd3208bb2609d4c26b9c33ccd335721e3cd072","tests/ui/bad-date.rs":"6e23714dae8b6346fefe50dacd4abba3265248bbadfdd60c739138aa8a0037ba","tests/ui/bad-date.stderr":"3a607fb950a69f7dc1b503295bce53541f9dee9f4674edc5d13ee3a69ff0e8cd","tests/ui/bad-not.rs":"f003df8bd245e9dd8edc3a6d94078ee5162fac7a98db881271f0f5b6db98d45d","tests/ui/bad-not.stderr":"d4ef78fae4a82419e737757158796cb103a5920df498956eaf57ed201797b463","tests/ui/bad-version.rs":"f4ea2cd038e6c63deb9c2e3ceffce93dbf179d9ce18c16d88f3b6cd7138a8c8e","tests/ui/bad-version.stderr":"60ed51c62f4c2fb6ff95cff7523cfca379ed434f319da9d82704318588792338","tests/ui/const-not-fn.rs":"10bbe38f0d89391fff0698756e4cfd4e72a41090360393a0c951b67df14d1c35","tests/ui/const-not-fn.stderr":"9551f7f222445b31d7af2415d467301c332d55bb3d5a143846484f2f00047a01"},"package":"61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088"} -\ No newline at end of file -diff --git a/vendor/rustversion/Cargo.toml b/vendor/rustversion/Cargo.toml -index 56995ff0792..c72b1b2b343 100644 ---- a/vendor/rustversion/Cargo.toml -+++ b/vendor/rustversion/Cargo.toml -@@ -13,7 +13,7 @@ - [package] - edition = "2018" - name = "rustversion" --version = "1.0.4" -+version = "1.0.5" - authors = ["David Tolnay "] - build = "build/build.rs" - description = "Conditional compilation according to rustc compiler version" -diff --git a/vendor/rustversion/build/build.rs b/vendor/rustversion/build/build.rs -index 2a8bc4af39f..15312510d68 100644 ---- a/vendor/rustversion/build/build.rs -+++ b/vendor/rustversion/build/build.rs -@@ -1,3 +1,9 @@ -+#![allow( -+ clippy::enum_glob_use, -+ clippy::must_use_candidate, -+ clippy::single_match_else -+)] -+ - mod rustc; - - use std::env; -diff --git a/vendor/rustversion/build/rustc.rs b/vendor/rustversion/build/rustc.rs -index 723e6bdd0e2..dfc6a05166f 100644 ---- a/vendor/rustversion/build/rustc.rs -+++ b/vendor/rustversion/build/rustc.rs -@@ -48,23 +48,21 @@ pub fn parse(string: &str) -> Option { - Some(channel) if channel == "dev" => Dev, - Some(channel) if channel.starts_with("beta") => Beta, - Some(channel) if channel == "nightly" => match words.next() { -- Some(hash) => { -- if !hash.starts_with('(') { -- return None; -+ Some(hash) if hash.starts_with('(') => match words.next() { -+ None if hash.ends_with(')') => Dev, -+ Some(date) if date.ends_with(')') => { -+ let mut date = date[..date.len() - 1].split('-'); -+ let year = date.next()?.parse().ok()?; -+ let month = date.next()?.parse().ok()?; -+ let day = date.next()?.parse().ok()?; -+ match date.next() { -+ None => Nightly(Date { year, month, day }), -+ Some(_) => return None, -+ } - } -- let date = words.next()?; -- if !date.ends_with(')') { -- return None; -- } -- let mut date = date[..date.len() - 1].split('-'); -- let year = date.next()?.parse().ok()?; -- let month = date.next()?.parse().ok()?; -- let day = date.next()?.parse().ok()?; -- match date.next() { -- None => Nightly(Date { year, month, day }), -- Some(_) => return None, -- } -- } -+ None | Some(_) => return None, -+ }, -+ Some(_) => return None, - None => Dev, - }, - Some(_) => return None, -diff --git a/vendor/rustversion/src/lib.rs b/vendor/rustversion/src/lib.rs -index 2614105dd1a..172eb89382f 100644 ---- a/vendor/rustversion/src/lib.rs -+++ b/vendor/rustversion/src/lib.rs -@@ -145,6 +145,21 @@ - //! - //!
- -+#![allow( -+ clippy::cast_lossless, -+ clippy::cast_possible_truncation, -+ clippy::doc_markdown, -+ clippy::enum_glob_use, -+ clippy::from_iter_instead_of_collect, -+ clippy::module_name_repetitions, -+ clippy::must_use_candidate, -+ clippy::needless_doctest_main, -+ clippy::needless_pass_by_value, -+ clippy::redundant_else, -+ clippy::toplevel_ref_arg, -+ clippy::unreadable_literal -+)] -+ - extern crate proc_macro; - - mod attr; -diff --git a/vendor/rustversion/src/time.rs b/vendor/rustversion/src/time.rs -index 1e6dd9066b4..3c21463dd80 100644 ---- a/vendor/rustversion/src/time.rs -+++ b/vendor/rustversion/src/time.rs -@@ -1,4 +1,5 @@ - use crate::date::Date; -+use std::env; - use std::time::{SystemTime, UNIX_EPOCH}; - - // Timestamp of 2016-03-01 00:00:00 in UTC. -@@ -13,14 +14,20 @@ - - pub fn today() -> Date { - let default = Date { -- year: 2019, -- month: 1, -- day: 1, -+ year: 2020, -+ month: 2, -+ day: 25, - }; - try_today().unwrap_or(default) - } - - fn try_today() -> Option { -+ if let Some(pkg_name) = env::var_os("CARGO_PKG_NAME") { -+ if pkg_name.to_str() == Some("rustversion-tests") { -+ return None; // Stable date for ui testing. -+ } -+ } -+ - let now = SystemTime::now(); - let since_epoch = now.duration_since(UNIX_EPOCH).ok()?; - let secs = since_epoch.as_secs(); -diff --git a/vendor/rustversion/tests/test_parse.rs b/vendor/rustversion/tests/test_parse.rs -index 843bd73d3e5..cb39b3179f5 100644 ---- a/vendor/rustversion/tests/test_parse.rs -+++ b/vendor/rustversion/tests/test_parse.rs -@@ -1,3 +1,5 @@ -+#![allow(clippy::enum_glob_use, clippy::must_use_candidate)] -+ - include!("../build/rustc.rs"); - - #[test] -@@ -76,6 +78,14 @@ fn test_parse() { - }), - }, - ), -+ ( -+ "rustc 1.52.1-nightly (gentoo)", -+ Version { -+ minor: 52, -+ patch: 1, -+ channel: Dev, -+ }, -+ ), - ]; - - for (string, expected) in cases { -diff --git a/vendor/rustversion/tests/ui/bad-bound.stderr b/vendor/rustversion/tests/ui/bad-bound.stderr -index f8c498c8577..2c56acbdb33 100644 ---- a/vendor/rustversion/tests/ui/bad-bound.stderr -+++ b/vendor/rustversion/tests/ui/bad-bound.stderr -@@ -1,10 +1,10 @@ --error: expected rustc release number like 1.31, or nightly date like 2020-10-26 -+error: expected rustc release number like 1.31, or nightly date like 2020-02-25 - --> $DIR/bad-bound.rs:1:22 - | - 1 | #[rustversion::since(stable)] - | ^^^^^^ - --error: expected rustc release number like 1.31, or nightly date like 2020-10-26 -+error: expected rustc release number like 1.31, or nightly date like 2020-02-25 - --> $DIR/bad-bound.rs:4:26 - | - 4 | #[rustversion::any(since(stable))] -diff --git a/vendor/rustversion/tests/ui/bad-date.stderr b/vendor/rustversion/tests/ui/bad-date.stderr -index 734d7889075..c523ccc02bf 100644 ---- a/vendor/rustversion/tests/ui/bad-date.stderr -+++ b/vendor/rustversion/tests/ui/bad-date.stderr -@@ -1,10 +1,10 @@ --error: expected nightly date, like 2020-10-26 -+error: expected nightly date, like 2020-02-25 - --> $DIR/bad-date.rs:1:24 - | - 1 | #[rustversion::nightly(stable)] - | ^^^^^^ - --error: expected nightly date, like 2020-10-26 -+error: expected nightly date, like 2020-02-25 - --> $DIR/bad-date.rs:4:28 - | - 4 | #[rustversion::any(nightly(stable))] --- -2.32.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.54.0-parallel-miri.patch b/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.54.0-parallel-miri.patch deleted file mode 100644 index 68239d98d37..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/1.54.0-parallel-miri.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a789b49e4c0e7d742cc39713484596293d844537 Mon Sep 17 00:00:00 2001 -From: hyd-dev -Date: Fri, 30 Jul 2021 21:28:34 +0800 -Subject: [PATCH] Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()` - ---- - src/bin/miri.rs | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs -index 5a8f07263..18c393815 100644 ---- a/src/tools/miri/src/bin/miri.rs -+++ b/src/tools/miri/src/bin/miri.rs -@@ -1,5 +1,6 @@ - #![feature(rustc_private, bool_to_option, stmt_expr_attributes)] - -+extern crate rustc_data_structures; - extern crate rustc_driver; - extern crate rustc_errors; - extern crate rustc_hir; -@@ -12,12 +13,12 @@ use std::convert::TryFrom; - use std::env; - use std::num::NonZeroU64; - use std::path::PathBuf; --use std::rc::Rc; - use std::str::FromStr; - - use hex::FromHexError; - use log::debug; - -+use rustc_data_structures::sync::Lrc; - use rustc_driver::Compilation; - use rustc_errors::emitter::{ColorConfig, HumanReadableErrorType}; - use rustc_hir::{self as hir, def_id::LOCAL_CRATE, Node}; -@@ -42,7 +43,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls { - // HACK: rustc will emit "crate ... required to be available in rlib format, but - // was not found in this form" errors once we use `tcx.dependency_formats()` if - // there's no rlib provided, so setting a dummy path here to workaround those errors. -- Rc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All)); -+ Lrc::make_mut(&mut crate_source).rlib = Some((PathBuf::new(), PathKind::All)); - crate_source - }; - }); diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch b/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch deleted file mode 100644 index 1945372c4d0..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/files/llvm/12/cstdint-signals-h.patch +++ /dev/null @@ -1,24 +0,0 @@ -https://gitweb.gentoo.org/fork/llvm-project.git/commit/llvm/include/llvm/Support/Signals.h?h=gentoo-15.0.7-r7&id=ff1681ddb303223973653f7f5f3f3435b48a1983 -From: Sergei Trofimovich -Date: Mon, 23 May 2022 08:03:23 +0100 -Subject: [Support] Add missing header to Signals.h - -Without the change llvm build fails on this week's gcc-13 snapshot as: - - [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o - In file included from llvm/lib/Support/Signals.cpp:14: - llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void - 119 | void CleanupOnSignal(uintptr_t Context); - | ^~~~~~~~~~~~~~~ ---- a/src/llvm-project/llvm/include/llvm/Support/Signals.h -+++ b/src/llvm-project/llvm/include/llvm/Support/Signals.h -@@ -14,6 +14,7 @@ - #ifndef LLVM_SUPPORT_SIGNALS_H - #define LLVM_SUPPORT_SIGNALS_H - -+#include - #include - - namespace llvm { --- -cgit v1.2.3-65-gdbad diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml index c634998b355..94b0499334f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/metadata.xml @@ -21,6 +21,7 @@ Install clippy, Rust code linter Install dist tarballs (used for bootstrapping) Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken) + Use dev-lang/mrustc to build the bootstrap Rust sysroot from this package's source Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release) Build a multi-threaded rustc (experimental, not tested by upstream) Install rustfmt, Rust code formatter diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.54.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.54.0.ebuild deleted file mode 100644 index 360ae22cd5d..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.54.0.ebuild +++ /dev/null @@ -1,559 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..13} ) - -CARGO_BOOTSTRAP="yes" -RUST_MAX_VER=${PV} -RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" - -# Requried to build against openssl-3.* -CRATE_PATHS_OVERRIDE=" - openssl@0.10.35 - openssl-sys@0.9.65 -" - -inherit cargo check-reqs estack flag-o-matic multiprocessing \ - multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" - -SRC_URI=" - https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz - ${CARGO_CRATE_URIS} - verify-sig? ( - https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc - ) -" - -S="${WORKDIR}/rustc-${PV}-src" - -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 - NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) -ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) -LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} - -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" - -IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rustfmt test wasm ${ALL_LLVM_TARGETS[*]}" - -BDEPEND="${PYTHON_DEPS} - app-eselect/eselect-rust - || ( - >=sys-devel/gcc-4.7 - >=llvm-core/clang-3.5 - ) - >=dev-build/cmake-3.13.4 - dev-build/ninja - test? ( dev-debug/gdb ) - verify-sig? ( sec-keys/openpgp-keys-rust ) -" - -DEPEND=" - >=app-arch/xz-utils-5.2 - net-misc/curl:=[http2,ssl] - sys-libs/zlib:= - dev-libs/openssl:0= - elibc_musl? ( sys-libs/libunwind:= ) -" - -RDEPEND="${DEPEND} - app-eselect/eselect-rust - !dev-lang/rust:stable - !dev-lang/rust-bin:stable -" - -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) - miri? ( nightly ) - parallel-compiler? ( nightly ) - test? ( ${ALL_LLVM_TARGETS[*]} ) - wasm? ( llvm_targets_WebAssembly ) - x86? ( cpu_flags_x86_sse2 ) -" - -# we don't use cmake.eclass, but can get a warnings -CMAKE_WARN_UNUSED_CLI=no - -QA_FLAGS_IGNORED=" - usr/lib/${PN}/${PV}/bin/.* - usr/lib/${PN}/${PV}/libexec/.* - usr/lib/${PN}/${PV}/lib/lib.*.so - usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.* - usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so -" - -QA_SONAME=" - usr/lib/${PN}/${PV}/lib/lib.*.so.* - usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so -" - -# An rmeta file is custom binary format that contains the metadata for the crate. -# rmeta files do not support linking, since they do not contain compiled object files. -# so we can safely silence the warning for this QA check. -QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" - -# causes double bootstrap -RESTRICT="test" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc - -PATCHES=( - "${FILESDIR}"/1.47.0-ignore-broken-and-non-applicable-tests.patch - "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch - "${FILESDIR}"/1.53.0-rustversion-1.0.5.patch # https://github.com/rust-lang/rust/pull/86425 - "${FILESDIR}"/1.54.0-parallel-miri.patch # https://github.com/rust-lang/miri/pull/1863 - "${FILESDIR}/llvm/12/cstdint-signals-h.patch" -) - -toml_usex() { - usex "${1}" true false -} - -pre_build_checks() { - local M=7680 - # multiply requirements by 1.5 if we are doing x86-multilib - if use amd64; then - M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 )) - fi - M=$(( $(usex clippy 128 0) + ${M} )) - M=$(( $(usex miri 128 0) + ${M} )) - M=$(( $(usex rustfmt 256 0) + ${M} )) - local ltarget - for ltarget in ${ALL_LLVM_TARGETS[@]}; do - M=$(( $(usex ${ltarget} 256 0) + ${M} )) - done - M=$(( $(usex wasm 256 0) + ${M} )) - M=$(( $(usex debug 2 1) * ${M} )) - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - M=$(( 15 * ${M} / 10 )) - fi - eshopts_pop - M=$(( $(usex doc 256 0) + ${M} )) - CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} -} - -pkg_pretend() { - pre_build_checks -} - -pkg_setup() { - pre_build_checks - python-any-r1_pkg_setup - - export LIBGIT2_NO_PKG_CONFIG=1 #749381 - rust_pkg_setup -} - -src_unpack() { - verify-sig_src_unpack - cargo_src_unpack - # Vendored sources here override crates-io sources (repo) from cargo eclass. - sed -i '/\[source.crates-io\]/,+2d' "${ECARGO_HOME}"/config.toml -} - -src_configure() { - - local rust_target="" rust_targets="" arch_cflags - - # Collect rust target names to compile standard libs for all ABIs. - for v in $(multilib_get_enabled_abi_pairs); do - rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" - done - if use wasm; then - rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" - fi - rust_targets="${rust_targets#,}" - - local tools="\"cargo\",\"rls\",\"analysis\",\"src\"," - if use clippy; then - tools="\"clippy\",$tools" - fi - if use miri; then - tools="\"miri\",$tools" - fi - if use rustfmt; then - tools="\"rustfmt\",$tools" - fi - - local rust_stage0_root - rust_stage0_root="$(rustc --print sysroot || die "Can't determine rust's sysroot")" - - # in case of prefix it will be already prefixed, as --print sysroot returns full path - [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" - - rust_target="$(rust_abi)" - - cat <<- _EOF_ > "${S}"/config.toml - changelog-seen = 2 - [llvm] - download-ci-llvm = false - optimize = $(toml_usex !debug) - release-debuginfo = $(toml_usex debug) - assertions = $(toml_usex debug) - ninja = true - targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" - link-shared = false - [build] - build-stage = 2 - test-stage = 2 - doc-stage = 2 - build = "${rust_target}" - host = ["${rust_target}"] - target = [${rust_targets}] - cargo = "${rust_stage0_root}/bin/cargo" - rustc = "${rust_stage0_root}/bin/rustc" - rustfmt = "${rust_stage0_root}/bin/rustfmt" - docs = $(toml_usex doc) - compiler-docs = false - submodules = false - python = "${EPYTHON}" - locked-deps = true - vendor = true - extended = true - tools = [${tools}] - verbose = 2 - sanitizers = false - profiler = false - cargo-native-static = false - [install] - prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" - sysconfdir = "etc" - docdir = "share/doc/rust" - bindir = "bin" - libdir = "lib" - mandir = "share/man" - [rust] - # https://github.com/rust-lang/rust/issues/54872 - codegen-units-std = 1 - optimize = true - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - debug-assertions-std = $(toml_usex debug) - debuginfo-level = $(usex debug 2 0) - debuginfo-level-rustc = $(usex debug 2 0) - debuginfo-level-std = $(usex debug 2 0) - debuginfo-level-tools = $(usex debug 2 0) - debuginfo-level-tests = 0 - backtrace = true - incremental = false - default-linker = "$(tc-getCC)" - parallel-compiler = $(toml_usex parallel-compiler) - channel = "$(usex nightly nightly stable)" - description = "gentoo" - rpath = false - verbose-tests = true - optimize-tests = $(toml_usex !debug) - codegen-tests = true - dist-src = false - remap-debuginfo = true - lld = $(toml_usex wasm) - # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it - # https://github.com/rust-lang/rust/issues/74976 - # https://github.com/rust-lang/rust/issues/76526 - deny-warnings = $(usex wasm $(usex doc false true) true) - backtrace-on-ice = true - jemalloc = false - [dist] - src-tarball = false - compression-formats = ["gz"] - _EOF_ - - for v in $(multilib_get_enabled_abi_pairs); do - rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) - arch_cflags="$(get_abi_CFLAGS ${v##*.})" - - cat <<- _EOF_ >> "${S}"/config.env - CFLAGS_${rust_target}=${arch_cflags} - _EOF_ - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${rust_target}] - cc = "$(tc-getBUILD_CC)" - cxx = "$(tc-getBUILD_CXX)" - linker = "$(tc-getCC)" - ar = "$(tc-getAR)" - _EOF_ - # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; - if use elibc_musl; then - cat <<- _EOF_ >> "${S}"/config.toml - crt-static = false - _EOF_ - fi - done - if use wasm; then - cat <<- _EOF_ >> "${S}"/config.toml - [target.wasm32-unknown-unknown] - linker = "rust-lld" - _EOF_ - fi - - if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below - # experimental cross support - # discussion: https://bugs.gentoo.org/679878 - # TODO: c*flags, clang, cargo.eclass target support - # it would be much better if we could split out stdlib - # complilation to separate ebuild and abuse CATEGORY to - # just install to /usr/lib/rustlib/ - - # extra targets defined as a bash array - # spec format: :: - # best place would be /etc/portage/env/dev-lang/rust - # Example: - # RUST_CROSS_TARGETS=( - # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" - # ) - # no extra hand holding is done, no target transformations, all - # values are passed as-is with just basic checks, so it's up to user to supply correct values - # valid rust targets can be obtained with - # rustc --print target-list - # matching cross toolchain has to be installed - # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) - # only gcc toolchains installed with crossdev are checked for now. - - # BUG: we can't pass host flags to cross compiler, so just filter for now - # BUG: this should be more fine-grained. - filter-flags '-mcpu=*' '-march=*' '-mtune=*' - - local cross_target_spec - for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do - # extracts first element form :: - local cross_llvm_target="${cross_target_spec%%:*}" - # extracts toolchain triples, : - local cross_triples="${cross_target_spec#*:}" - # extracts first element after before : separator - local cross_rust_target="${cross_triples%%:*}" - # extracts last element after : separator - local cross_toolchain="${cross_triples##*:}" - use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" - command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${cross_rust_target}] - cc = "${cross_toolchain}-gcc" - cxx = "${cross_toolchain}-g++" - linker = "${cross_toolchain}-gcc" - ar = "${cross_toolchain}-ar" - _EOF_ - if [[ "${cross_toolchain}" == *-musl* ]]; then - cat <<- _EOF_ >> "${S}"/config.toml - musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" - _EOF_ - fi - - # append cross target to "normal" target list - # example 'target = ["powerpc64le-unknown-linux-gnu"]' - # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' - - rust_targets="${rust_targets},\"${cross_rust_target}\"" - sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die - - ewarn - ewarn "Enabled ${cross_rust_target} rust target" - ewarn "Using ${cross_toolchain} cross toolchain" - ewarn - if ! has_version -b 'sys-devel/binutils[multitarget]' ; then - ewarn "'sys-devel/binutils[multitarget]' is not installed" - ewarn "'strip' will be unable to strip cross libraries" - ewarn "cross targets will be installed with full debug information" - ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" - ewarn - ewarn "Alternatively llvm-strip can be used, it supports stripping any target" - ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" - ewarn - fi - done - fi # I_KNOW_WHAT_I_AM_DOING_CROSS - - einfo "Rust configured with the following flags:" - echo - echo RUSTFLAGS="${RUSTFLAGS:-}" - echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}" - echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}" - env | grep "CARGO_TARGET_.*_RUSTFLAGS=" - cat "${S}"/config.env || die - echo - einfo "config.toml contents:" - cat "${S}"/config.toml || die - echo -} - -src_compile() { - # we need \n IFS to have config.env with spaces loaded properly. #734018 - ( - IFS=$'\n' - env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ - "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die - ) -} - -src_test() { - # https://rustc-dev-guide.rust-lang.org/tests/intro.html - - # those are basic and codegen tests. - local tests=( - assembly - codegen - codegen-units - compile-fail - incremental - mir-opt - pretty - run-make - ) - - # fragile/expensive/less important tests - # or tests that require extra builds - # TODO: instead of skipping, just make some nonfatal. - if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then - tests+=( - rustdoc - rustdoc-js - rustdoc-js-std - rustdoc-ui - run-make-fulldeps - ui - ui-fulldeps - ) - fi - - local i failed=() - einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" - for i in "${tests[@]}"; do - local t="src/test/${i}" - einfo "rust_src_test: running ${t}" - if ! ( - IFS=$'\n' - env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \ - "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ - -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" - ) - then - failed+=( "${t}" ) - eerror "rust_src_test: ${t} failed" - fi - done - - if [[ ${#failed[@]} -ne 0 ]]; then - eerror "rust_src_test: failure summary: ${failed[@]}" - die "aborting due to test failures" - fi -} - -src_install() { - ( - IFS=$'\n' - env $(cat "${S}"/config.env) DESTDIR="${D}" \ - "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die - ) - - # bug #689562, #689160 - rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die - rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die - - local symlinks=( - cargo - rls - rust-gdb - rust-gdbgui - rust-lldb - rustc - rustdoc - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - use miri && symlinks+=( miri cargo-miri ) - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - - einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /usr/lib/rust//bin/rustc- - # need to fix eselect-rust to remove this hack. - local ver_i="${i}-${PV}" - if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then - einfo "Installing ${i} symlink" - ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die - else - ewarn "${i} symlink requested, but source file not found" - ewarn "please report this" - fi - dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" - done - - # symlinks to switch components to active rust in eselect - dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}" - dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" - dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" - dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" - dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" - - newenvd - "50${P}" <<-_EOF_ - LDPATH="${EPREFIX}/usr/lib/rust/lib-${PV}" - MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}" - $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') - $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') - _EOF_ - - rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die - rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${P}" - /usr/bin/cargo - /usr/bin/rls - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/bin/rustdoc - /usr/lib/rust/lib - /usr/lib/rust/libexec - /usr/lib/rust/man - /usr/lib/rustlib - /usr/share/doc/rust - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${P}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" - fi - if use miri; then - echo /usr/bin/miri >> "${T}/provider-${P}" - echo /usr/bin/cargo-miri >> "${T}/provider-${P}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${P}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${P}" -} - -pkg_postinst() { - eselect rust update - - if has_version dev-debug/gdb || has_version dev-util/lldb; then - elog "Rust installs a helper script for calling GDB and LLDB," - elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." - fi - - if has_version app-editors/emacs; then - elog "install app-emacs/rust-mode to get emacs support for rust." - fi - - if has_version app-editors/gvim || has_version app-editors/vim; then - elog "install app-vim/rust-vim to get vim support for rust." - fi -} - -pkg_postrm() { - eselect rust cleanup -} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.71.1-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.71.1-r100.ebuild index 6193d3d771e..dedaab4fcba 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.71.1-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.71.1-r100.ebuild @@ -38,6 +38,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai LoongArch Mips MSP43 ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA" SLOT="${PV}" @@ -237,6 +239,14 @@ src_configure() { rust_target="$(rust_abi)" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -247,7 +257,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.74.1-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.74.1-r100.ebuild index 3fe183405a8..d131b800b87 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.74.1-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.74.1-r100.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,8 +8,12 @@ PYTHON_COMPAT=( python3_{10..12} ) RUST_MAX_VER=${PV} RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" +RUST_OPTIONAL=1 -inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib multilib-build \ +MRUSTC_VERSION="0.11.2" +MRUSTC_RUST_VERSION="1.74.0" + +inherit check-reqs cmake edo estack flag-o-matic llvm-r1 multiprocessing multilib multilib-build \ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig if [[ ${PV} = *beta* ]]; then @@ -40,10 +44,12 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" -IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" +IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind +lto miri mrustc-bootstrap nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" LLVM_DEPEND=() # splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation @@ -65,6 +71,12 @@ BDEPEND="${PYTHON_DEPS} ) test? ( dev-debug/gdb ) verify-sig? ( sec-keys/openpgp-keys-rust ) + mrustc-bootstrap? ( + ~dev-lang/mrustc-${MRUSTC_VERSION} + dev-build/cmake + sys-devel/gcc:* + ) + !mrustc-bootstrap? ( ${RUST_DEPEND} ) " DEPEND=" @@ -172,6 +184,9 @@ pre_build_checks() { fi eshopts_pop M=$(( $(usex doc 256 0) + ${M} )) + if use mrustc-bootstrap; then + M=$(( 2 * ${M} )) + fi CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} } @@ -195,25 +210,44 @@ pkg_pretend() { } pkg_setup() { - pre_build_checks - python-any-r1_pkg_setup + if [[ ${MERGE_TYPE} != binary ]]; then + pre_build_checks + python-any-r1_pkg_setup + + export LIBGIT2_NO_PKG_CONFIG=1 #749381 + if tc-is-cross-compiler; then + use system-llvm && die "USE=system-llvm not allowed when cross-compiling" + local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" + use "llvm_targets_${cross_llvm_target}" || \ + die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" + fi - export LIBGIT2_NO_PKG_CONFIG=1 #749381 - if tc-is-cross-compiler; then - use system-llvm && die "USE=system-llvm not allowed when cross-compiling" - local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" - use "llvm_targets_${cross_llvm_target}" || \ - die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" - fi + if use mrustc-bootstrap; then + if ! tc-is-gcc; then + die "USE=mrustc-bootstrap reqires that the build environment use GCC" + fi + else + rust_pkg_setup + fi - rust_pkg_setup + if use system-llvm; then + llvm-r1_pkg_setup - if use system-llvm; then - llvm-r1_pkg_setup + local llvm_config="$(get_llvm_prefix)/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi + fi +} - local llvm_config="$(get_llvm_prefix)/bin/llvm-config" - export LLVM_LINK_SHARED=1 - export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" +src_prepare() { + default + # We'll need to revert this after the bootstrap. + if use mrustc-bootstrap; then + pushd "${S}" 2>/dev/null || die + patch -p0 < "${BROOT}"/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-src.patch || + die "Failed to patch sources to enable bootstrap with mrustc" + popd 2>/dev/null || die fi } @@ -251,14 +285,26 @@ src_configure() { use rust-analyzer && tools+=',"rust-analyzer"' use rust-src && tools+=',"src"' - local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" - # in case of prefix it will be already prefixed, as --print sysroot returns full path - [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + if use mrustc-bootstrap; then + local rust_stage0_root="${WORKDIR}/bootstrap/rust-${PV}" + else + local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" + # in case of prefix it will be already prefixed, as --print sysroot returns full path + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + fi rust_target="$(rust_abi)" rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -269,7 +315,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 @@ -504,7 +550,253 @@ src_configure() { echo } +# Build a very minimal llvm that we can use for bootstrap rustc codegen +llvm_bootstrap() { + # Reference ${P}/src/bootstrap/native.rs for these values + local llvm_cmake_opts=( + "-G Ninja" + "-DLLVM_TARGET_ARCH=${CFG_COMPILER_HOST_TRIPLE%%-*}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${CFG_COMPILER_HOST_TRIPLE}" + "-DLLVM_TARGETS_TO_BUILD=${BOOTSTRAP_LLVM_TARGETS:=X86;ARM;AArch64}" #;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX + "-DLLVM_ENABLE_ASSERTIONS=OFF" + "-DLLVM_INCLUDE_EXAMPLES=OFF" + "-DLLVM_INCLUDE_TESTS=OFF" + "-DLLVM_INCLUDE_DOCS=OFF" + "-DLLVM_INCLUDE_BENCHMARKS=OFF" + "-DLLVM_ENABLE_ZLIB=OFF" + "-DLLVM_ENABLE_TERMINFO=OFF" + "-DLLVM_ENABLE_LIBEDIT=OFF" + "-DCMAKE_CXX_COMPILER=$(tc-getCXX)" + "-DCMAKE_C_COMPILER=$(tc-getCC)" + "-DCMAKE_BUILD_TYPE=Release" + ) + + if [[ -z "${LLVM_CMAKE_OPTS_EXTRA}" ]]; then + llvm_cmake_opts+=( "${LLVM_CMAKE_OPTS_EXTRA}") + fi + + elog "Building bootstrap llvm ..." + + mkdir -p "${WORKDIR}/bootstrap/llvm" || die + pushd "${WORKDIR}/bootstrap/llvm" 2>/dev/null || die + edo cmake ${llvm_cmake_opts[*]} "${S}/src/llvm-project/llvm" + eninja || die "Failed to build bootstrap llvm" + popd 2>/dev/null || die +} + +# High level steps: +# Our system mrustc package has built stdlib for our current platform. +# - Step 1: Use system-installed mrustc, (m)rust(c) stdlib, and minicargo to +# bootstrap a `cargo` and `rustc` (mrustc-stage0) +# - Step 2: Use minicargo and the built `rustc` to build a working `sysroot` +# (includes `std`, `panic_unwind``, `test`, etc.) (mrustc-stage0) +# - Step 3: Build build libs again (this time using `cargo` and `rustc`) (mrustc-stage1) +# - Step 4: Build a `rustc` using those libs (mrustc-stage1) +# - Done so there's an optimised rustc arollvm_cmake_optsund (mrustc is bad at codegen) +# - Step 5: Build `libstd` with this `rustc` (mrustc-stage2) +# - Needed to match ABIs +# Stages: +# - mrustc-stage0: mrustc-built cargo and rustc +# - mrustc-stage1: rustc and sysroot built with mrustc-stage0 +# - mrustc-stage2: rustc from stage1 with sysroot built with stage0 +# See: +# - https://github.com/thepowersgang/mrustc/blob/master/run_rustc/Makefile +# - https://github.com/thepowersgang/mrustc/blob/master/TestRustcBootstrap.sh +# - Upstream Windows .cmd files are also a good reference for early bootstrap +mrustc_bootstrap() { + export RUSTC_BOOTSTRAP=1 # Possibly the only intended use of this variable in ::gentoo + # export these variables now and unset them at the end of the function so they don't leak + # into the rest of the build. + export CFG_COMPILER_HOST_TRIPLE="$(rust_abi)" + export CFG_RELEASE="${MRUSTC_RUST_VERSION}" # Let's pretend we're 1.74.0 + export CFG_RELEASE_CHANNEL="stable" + export CFG_VERSION="${MRUSTC_RUST_VERSION}-stable-mrustc" + export CFG_PREFIX="mrustc" + export CFG_LIBDIR_RELATIVE="lib" + export RUSTC_INSTALL_BINDIR="bin" + export REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" + + # These flags are used in every invocation of our bootstrap `cargo`. + local cargo_flags="--target ${CFG_COMPILER_HOST_TRIPLE} -j $(makeopts_jobs) --release --verbose" + + if use system-llvm; then + export LLVM_CONFIG="$(get_llvm_prefix)/bin/llvm-config" + else + llvm_bootstrap + export LLVM_CONFIG="${WORKDIR}/bootstrap/llvm/bin/llvm-config" + fi + + # define the mrustc sysroot and common minicargo arguments. + local mrustc_sysroot="${BROOT}/usr/lib/rust/mrustc-${MRUSTC_VERSION}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib" + local minicargo_common_args=( + "-L" "${mrustc_sysroot}" + "-j" "$(makeopts_jobs)" + "--vendor-dir" "${S}/vendor" + "--manifest-overrides" + "${BROOT}/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-overrides.toml" + ) + # There's a very good chance that minicargo and mrustc are not in the PATH. + if ! command -v minicargo &> /dev/null; then + export PATH="${BROOT}/usr/lib/rust/mrustc-${MRUSTC_VERSION}/bin:${PATH}" + fi + # Sanity check our bootstrap compiler & stdlib. + elog "Sanity checking mrustc and stdlib ..." + edo mrustc "${S}/tests/ui/hello_world/main.rs" -L "${mrustc_sysroot}" -o "${T}"/hello -g + "${T}"/hello || die "Failed to run hello_world" + # Seems fine, let's build some tools! + + # Step 1: Build a `cargo` and `rustc` using system-installed mrustc + # Anything we produce is going to be terribly unoptimised; mrustc does not do fantastic codegen. + # It's good enough to bootstrap the "real" rustc though. + elog "Building bootstrap cargo and rustc using mrustc and minicargo (mrustc-stage0) ..." + local stage0="${WORKDIR}/bootstrap/mrustc-stage0" + mkdir -p "${stage0}" || die + edo minicargo "${S}"/src/tools/cargo --output-dir "${stage0}"/cargo-build ${minicargo_common_args[*]} + "${stage0}"/cargo-build/cargo --version || die "Bootstrap cargo failed basic sanity check" + edo minicargo "${S}"/compiler/rustc --output-dir "${stage0}"/rustc-build ${minicargo_common_args[*]} \ + --features llvm + "${stage0}"/rustc-build/rustc_main --version || die "Bootstrap rustc failed basic sanity check" + # minicargo has special-casing for `rustc` so we need to rename it. + mv "${stage0}"/rustc-build/rustc_main "${stage0}"/rustc-build/rustc || die "Failed to rename rustc_main to rustc" + # rustc wants these here + mkdir -p "${stage0}"/codegen-backends || die + mv "${stage0}"/rustc-build/librustc_codegen_llvm.* "${stage0}"/codegen-backends || die + + # Step 2: use the bootstrapped rustc to build sysroot; we need to use `minicargo` for this - + # mrustc does not accept all of the arguments that rustc does, even with the rustc_proxy wrapper. + # `--script-overrides`: If the overrides are available, build scripts (and build-deps) are not built + # which is good since we don't have a working compiler yet, and can't build them. + + local stage0_sysroot_lib="${stage0}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib" + # minicargo <= 0.11.2 doesn't create this directory and silently fails, besides it's better to be explicit, right? + mkdir -p "${stage0_sysroot_lib}" || die "Failed to create stage0 directory" + + elog "Building 'sysroot' using bootstrap rustc (mrustc-stage0) ..." + edo env MRUSTC_PATH="${stage0}/rustc-build/rustc" minicargo -j $(makeopts_jobs) --vendor-dir "${S}"/vendor \ + --script-overrides "${BROOT}/usr/share/mrustc-0.11.2/script-overrides/stable-${MRUSTC_RUST_VERSION}-linux/" \ + --output-dir "${stage0_sysroot_lib}" "${S}"/library/sysroot || + die "Failed to build sysroot with bootstrap rust (mrustc-stage0)" + + elog "Sanity checking sysroot and rustc ..." + mkdir -p "${T}"/stage0-hello || die + edo "${stage0}"/rustc-build/rustc -L "${stage0_sysroot_lib}" -g "${S}/tests/ui/hello_world/main.rs" \ + -o "${T}"/stage0-hello/hello + "${T}"/stage0-hello/hello || die "Failed to run hello_world built with bootstrap rust stage0" + + elog "mrustc bootstrap stage0 complete!" + + # Step 3: Build a "proper" libstd, including dynamic libs using our bootstrap cargo and rustc. + elog "Building 'sysroot' with the stage0 rustc (mrustc-stage1) ..." + local stage1="${WORKDIR}/bootstrap/mrustc-stage1" + local stage1_sysroot_lib="${stage1}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib" + mkdir -p "${stage1_sysroot_lib}" || die "Failed to create stage1 directory" + mkdir -p "${stage1}/bin" || die + + # Simplified to avoid calling rustc_proxy; We don't need stage1 rustc until after this is built... + edo env RUSTFLAGS="-Z force-unstable-if-unmarked" CARGO_TARGET_DIR="${stage1}/sysroot-build" \ + RUSTC="${stage0}/rustc-build/rustc" "${stage0}"/cargo-build/cargo build ${cargo_flags} \ + --manifest-path "${S}/library/sysroot/Cargo.toml" --features panic-unwind + + # Move the built libs into the sysroot libdir. + mv "${stage1}/sysroot-build/${CFG_COMPILER_HOST_TRIPLE}/release/deps"/*.{rlib,rmeta,so} \ + "${stage1_sysroot_lib}" || die "Failed to move stage1 libs to stage1 sysroot" + + # We need to copy the stage0 rustc to the stage1 sysroot; this "updates" the sysroot location and enables + # resolution of stage1 libs. (run `rustc --print sysroot` on stage0 and stage1 rustc to verify) + cp "${stage0}/rustc-build/rustc" "${stage1}/bin/rustc" || die "Failed to copy rustc to stage1 sysroot" + + # Step 4: Build `rustc` with itself, so we have a rustc with the right ABI. + # This will be our final `rustc` for the bootstrap process. + elog "Building rustc with stage1 libs (mrustc-stage1) ..." + mkdir -p "${stage1}/rustc-build" || die + edo env RUSTFLAGS="-Z force-unstable-if-unmarked -C link_args=-Wl,-rpath,\$ORIGIN/../lib" \ + LD_LIBRARY_PATH="${stage2_sysroot_lib}" CARGO_TARGET_DIR="${stage1}/rustc-build" \ + RUSTC="${stage1}/bin/rustc" TMPDIR="${T}" "${stage0}"/cargo-build/cargo build ${cargo_flags} \ + --manifest-path "${S}/compiler/rustc/Cargo.toml" --features llvm + + # Step 5: Build `sysroot` with this `rustc` - Needed to match ABI + # We need to use the previous sysroot; we could reuse that dir but it's easier to just copy it. + elog "Building final 'sysroot' with the final rustc (mrustc-stage2) ..." + local stage2="${WORKDIR}/bootstrap/mrustc-stage2" + local stage2_sysroot_lib="${stage2}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib" + mkdir -p "${stage2_sysroot_lib}" || die "Failed to create stage2 directory" + mkdir -p "${stage2}/bin" || die + + # Copy required files from stage1 to stage2 sysroot + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/rustc-main "${stage2}/bin/rustc_binary" || + die "Failed to copy final rustc to stage2 sysroot" + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/librustc_driver.so "${stage2}/lib" || + die "Failed to copy librustc_driver to sysroot" + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/deps/*.{rlib,so} "${stage2_sysroot_lib}" || + die "Failed to copy final rustc libs to stage2 sysroot" + cp "${stage1_sysroot_lib}"/* "${stage2_sysroot_lib}" || die "Failed to copy stage1 so files to stage2 sysroot" + + # There's a magic script used in place of rustc so that libs can be found + cat <<- EOF > "${stage2}/bin/rustc" || die "Failed to create rustc wrapper" + #!/bin/sh + LD_LIBRARY_PATH="${stage2}/lib:${stage2_sysroot_lib}" ${stage2}/bin/rustc_binary "\$@" + EOF + chmod +x "${stage2}/bin/rustc" || die "Failed to make rustc wrapper executable" + + # Use rustc to build 'sysroot'; this is the final step in the bootstrap process. + # rpath probably isn't needed here, but it doesn't hurt. + edo env RUSTFLAGS="-Z force-unstable-if-unmarked -C link_args=-Wl,-rpath,\$ORIGIN/../lib" \ + CARGO_TARGET_DIR="${stage2}/stdlib-build" RUSTC="${stage2}/bin/rustc" \ + "${stage0}"/cargo-build/cargo build ${cargo_flags} --manifest-path "${S}/library/sysroot/Cargo.toml" \ + --features panic-unwind + + # Build our final output sysroot + local output="${WORKDIR}/bootstrap/rust-${PV}" + local output_sysroot_lib="${output}/lib/rustlib/${CFG_COMPILER_HOST_TRIPLE}/lib" + mkdir -p "${output_sysroot_lib}" || die "Failed to create output directory" + mkdir -p "${output}/bin" || die "Failed to create output directory" + + # Copy our various output files into the output sysroot + # rustc + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/rustc-main "${output}/bin/rustc_binary" || + die "Failed to copy final rustc to output" + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/librustc_driver.so "${output}/lib" || + die "Failed to copy librustc_driver to output" + cp "${stage1}/rustc-build/${CFG_COMPILER_HOST_TRIPLE}"/release/deps/*.{rlib,so} "${output_sysroot_lib}" || + die "Failed to copy final rustc libs to output" + # cargo; no need to build an optimised cargo if we're using this to build a complelety new Rust. + cp "${stage0}/cargo-build/cargo" "${output}/bin/cargo" || die "Failed to copy cargo to output" + # libs + mv "${stage2}/stdlib-build/${CFG_COMPILER_HOST_TRIPLE}/release/deps"/*.{rlib,rmeta,so} "${output_sysroot_lib}" || + die "Failed to copy stage2 libs to output" + # Our trusty rustc wrapper + cat <<- EOF > "${output}/bin/rustc" || die "Failed to create rustc wrapper" + #!/bin/sh + LD_LIBRARY_PATH="${output}/lib:${output_sysroot_lib}" ${output}/bin/rustc_binary "\$@" + EOF + chmod +x "${output}/bin/rustc" || die "Failed to make rustc wrapper executable" + + # Perform a sanity check on the final Rust. + mkdir -p "${T}"/output-hello || die + edo "${output}/bin/rustc" -L "${output_sysroot_lib}" -g "${S}/tests/ui/hello_world/main.rs" \ + -o "${T}"/output-hello/hello + "${T}"/output-hello/hello || die "Failed to run hello_world built with bootstrapped Rust" + + elog "Successfully bootstrapped Rust using mrustc!" + + # Note: The Rust sysroot that we've produced is pretty close to what we'd expect from a normal Rust build. + # If someone was so inclined they could build an optimised cargo using the stage2 rustc and sysroot, + # and install the output directly. This is untested, as I'm sure there's more to it than that. + # I'm satisfied with being able to build Rust normally at this point. + + # Tidy up the Rust sources; revert mrustc changes so Rust can be built normally. + pushd "${S}" 2>/dev/null || die + patch -R -p0 < "${BROOT}"/usr/share/mrustc-${MRUSTC_VERSION}/patches/rustc-${MRUSTC_RUST_VERSION}-src.patch || + die "Failed to revert mrustc patches" + popd 2>/dev/null || die + + # Tidy up any environment variables we've set in the bootstrap process. + unset CFG_COMPILER_HOST_TRIPLE CFG_RELEASE CFG_RELEASE_CHANNEL CFG_PREFIX CFG_VERSION + unset CFG_LIBDIR_RELATIVE LLVM_CONFIG REAL_LIBRARY_PATH_VAR RUSTFLAGS RUSTC_BOOTSTRAP RUSTC_INSTALL_BINDIR +} + src_compile() { + use mrustc-bootstrap && mrustc_bootstrap RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die } diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.75.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.75.0-r100.ebuild index 32f8d4d41fe..478f58c567f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.75.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.75.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -261,6 +263,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -271,7 +281,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.76.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.76.0-r100.ebuild index 04b921cbf7e..364d59bed5b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.76.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.76.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -260,6 +262,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -270,7 +280,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.77.1-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.77.1-r100.ebuild index 1a86dda8a2e..5461a2a6b93 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.77.1-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.77.1-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -259,6 +261,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -269,7 +279,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.78.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.78.0-r100.ebuild index feaca456180..19a64890ab0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.78.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.78.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -259,6 +261,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -268,7 +278,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.79.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.79.0-r100.ebuild index feaca456180..19a64890ab0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.79.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.79.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -259,6 +261,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -268,7 +278,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.80.1-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.80.1-r100.ebuild index 6e2454510dd..fb5eef4568b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.80.1-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.80.1-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -258,6 +260,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -267,7 +277,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.81.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.81.0-r100.ebuild index 5b0447c1e99..93dfa988757 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.81.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.81.0-r100.ebuild @@ -40,6 +40,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -262,6 +264,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -271,7 +281,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r100.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r100.ebuild index eca2deabe01..25fbe716b6a 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r100.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -269,6 +271,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -278,7 +288,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r101.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r101.ebuild index 84788dff318..1f70f958d49 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r101.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.82.0-r101.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -270,6 +272,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -279,7 +289,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.83.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.83.0-r1.ebuild index cc756f4e4da..2262915b0d6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.83.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust/rust-1.83.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,7 +20,7 @@ if [[ ${PV} = *beta* ]]; then else MY_P="rustc-${PV}" SRC="${MY_P}-src.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86" fi DESCRIPTION="Systems programming language from Mozilla" @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -270,6 +272,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml [llvm] @@ -279,7 +289,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 From 09771a72eecc910f8a46d5230435f66dbd5eb1f7 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:23 +0000 Subject: [PATCH 030/145] dev-lang/rust-bin: Sync with Gentoo It's from Gentoo commit 3f6812a2957a16e149dd14b24595a985dc357dba. --- .../portage-stable/dev-lang/rust-bin/Manifest | 47 ++--- .../dev-lang/rust-bin/rust-bin-1.54.0.ebuild | 188 ------------------ .../dev-lang/rust-bin/rust-bin-1.83.0.ebuild | 30 +-- .../dev-lang/rust-bin/rust-bin-1.84.0.ebuild | 38 ++-- 4 files changed, 47 insertions(+), 256 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.54.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/Manifest index 1fa0c33d6af..40f9dbf048b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/Manifest @@ -1,37 +1,3 @@ -DIST rust-1.54.0-aarch64-unknown-linux-gnu.tar.xz 231424908 BLAKE2B 6c403acd4b6b27208f95eb3fbfee5c8e7a63f3314f29ea7498dc0a4ae720d77c249c9ebc02a95d50278ac7f07b8d943b1c9c5e1561858f72ad1d8cdb29b779cc SHA512 3e6f638a35ed391f5393be7c92ef2560ed6bb26af1ea6ebf784bfadd3e153d1effd88fe49128eb98f5ec2ced7a65f3f4a596db71b9c4eca90429e50a8f168d11 -DIST rust-1.54.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f655d6f53a580041642871abd10993b771835770bebb6de1ff1dcc9b250ae52f862212feece533a9932c6efb0c3d02769cbbb03114d941c7e8d3117e1e23ce75 SHA512 d9508ae502e26694f83c04bbea3f95aeeee7990e703c8bb8be9ba098e0df86a39272022e1a94f8852ed23b8378ecb338dbd87ef226da444e29ccf7fb1f44e5f6 -DIST rust-1.54.0-aarch64-unknown-linux-musl.tar.xz 231629132 BLAKE2B 339e341eadd2cb0c763eb00b5a6750a1082da26bcae1b3c06459c99c64b4babf4aec5173222187eed7271e3c5847da47b49e6ab75674161b6e28297bb62ec781 SHA512 f0e20c079e4351fac5e8d635a37502e833a56fd216fd015117fb12be8b72e022bce946ec8e1612b320530dd186b1702b4384e74d64a479099db4562bcfc68453 -DIST rust-1.54.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5aa9872ad96668d392c1aecf7f54c171e7bef6e17f65efc6c3fff7eee8dd7fc3eacee03e6544cdc27c5d34ea946d1a61aca6298c91812e9f35c391211b563506 SHA512 07694566ae33492df31083887fe9b7d43fb9f7c469ccd2fe9c77d3c8d3bd6b58ddc5e185462e982f78d63db39703a60986acaad51f953ea7434bcd9432a96946 -DIST rust-1.54.0-arm-unknown-linux-gnueabi.tar.xz 209386412 BLAKE2B f33b802bdfa3cbafdd86eff2d43e0af99e54777b1a26f1106016a8bdc4c06b5cdac8810ac68785f6da4cbe6a6d7fa74c13a855a5ef9c5703b16a2100ef60f2df SHA512 5f68879abd5da5d37b555b0b6ca5850d68663878bd23b5f6a31efd0a9dd43809c4d413154f8f343688eca23a96adbd08fcb3132831b848690261964d6a24e160 -DIST rust-1.54.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 7b90cdac8d068bcd565b42bed2289deff1490ae51cb65bbf2f0c308f6187e4fcfd98898e8e590ade2c2af7f10080821a417445e5c3046b4e39e0099c32e62624 SHA512 35bc49bc4140207af140e561023826e565751e47bbee6c1fd374bd7a992b6499051f4d84ca12e17101ea552bcafd6b96b111af888cd891f6dc18fceda11c83c8 -DIST rust-1.54.0-arm-unknown-linux-gnueabihf.tar.xz 209102396 BLAKE2B 1190da5c96336a121b4d4f92dba36c52c5f2bb0b26fdd92ca92ae4954256aaa375ea174c9669a285365ff02d4f3cadbf2d2ac92b847b00e10606e3832629a864 SHA512 ca38f1948b02008c1e9355c12f6d1fd3721ae9c06e686a09a7eea48670d889879ac0f81c462d21f467d600fc0972b920219e7378f7ba438e756cbc9b419a5f43 -DIST rust-1.54.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 9f01100804d72dc7afb7660277daa5a0f0cd96e478a7dc5a242360d07b25a22c5769727a67a46d63f3283e22e89ef5a6f6f6c48ac46f01075e2d908bf681be5d SHA512 316662676cf52a2e58c6cbeb46152da3919e54b0385c33a8fd1d46c25e71604f7803174278f80d4cb72cae54829ba00e3c4ba58001b43cc1148347f1788fdb02 -DIST rust-1.54.0-armv7-unknown-linux-gnueabihf.tar.xz 217891252 BLAKE2B 657f366344fe911c5d93585ee0b1063815fb158069136c742512f21d3b47c64e42555d4e52ba305e5ddebbb1fb37fa8ba8ebc36f9a9e5fe5fe7ffdb31472e012 SHA512 0f4f4e075299cd369b4b53a425e9b290cd9cedca6a88878c6a4ae0487fe976b15bea0c8b92e7e376f77dc370552d95d738e99b7fa184a8e2c0e5ab94d65e7595 -DIST rust-1.54.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c23e12a70df5e58dfca0e9c66432844424dc166cbc7dfeef4f692ba076ba687fd871bbbb5d37ed82ed5662ada170520c56c426f89be4fa07a0c88cfb773fe91b SHA512 14a5674ed5862b6cd3ddcd3efff4ab1298285bc0d5604a869e74e055a319401b9bf48a60d44583ddeb2230dcfab2e5584e5149947fbc40d97c112a6dae51745a -DIST rust-1.54.0-i686-unknown-linux-gnu.tar.xz 226774108 BLAKE2B c56fb6ef24cda0c89b76403a38893a32382b09be8a8d08b066fbd437ac0a73a7d00af175c59bb7af6e6f5d8a74324e10afed2ea35d830f9f96f5ceaa4ec345d6 SHA512 15bc0c31a306aa1e2b16fec7f97963ca291b2632664c49add4281d3244054b2e2f51b0ade86a9d63db87124071fa25bd7d5e662acf4c30cf3267eb56da4a1f1f -DIST rust-1.54.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4d53a7760abd54973ef8ce95c10671db41136d7031a25ea0c0362feb65ce5755223d60a01c3418b69b902feebf75651bc4379ea66f98c862a573a8774a5e99c2 SHA512 e3dcef4d17bea43a1b0858da52e899d7a14db8ee7b9e3f506e9297dd0aba910d3808c25163a3f95698f32d25a3f128bb1759a808c84b8c75404300f60198fbd5 -DIST rust-1.54.0-mips-unknown-linux-gnu.tar.xz 147938432 BLAKE2B 38e7b768773cef9e3cfe707a716ba59ed67e2bbefe59db5531b06489131df219eba6a46eeb5c06bfd6d943fa4453f3d6f4b869725108fd2e069ab6ebbfa3d08b SHA512 aab52c26bd80b058772e0cd815bbd5ca0ab0fb10fa0ba43c07fc6151ec6e99d7ab48613a3e5cbdcb8f00b83108a716bd8b9f5d6f2c8518499b2482aa4d423a91 -DIST rust-1.54.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 05f4c8ee719ff857aa0a53661f6483c450a561905150217f886c25cf5c3e8dc3a36ebe2da38c75f843e3de4274d92c0c274906af40a94a6ecb122a9d38703e7f SHA512 6ba884e92b0ead2049f639405308ab6363268a8b42f827c9ecbfc5b16a0755bd1d345d989243f28662ce8c53611fb5984104001b3edec7b2dc22cc914970a7e5 -DIST rust-1.54.0-mips64-unknown-linux-gnuabi64.tar.xz 157458264 BLAKE2B cd68d03e058922a020665a35765913f3405b0c0d5c7e252da1dc63b4b6af27d31fa5ce7eee562635241baea422c84d7e2a9539a79e6ae152794aeb9636e97a46 SHA512 74a85d869141fc941bf4f9821945ce0efd0169415fc209cc2288015d4e358716380cf91e41342a231cd34ce88321f24c4d20fffec3be702498cec3846a14298b -DIST rust-1.54.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B aaca9b8e5007e0efc459a04ab95e6a3d76ab6cf177964acd4bb148f09ffac4f9c9bfba4ca4834e1ccc9505c259511f45ed1830285307388d79ac66b8dcddbbc5 SHA512 8d5d2a1200af550cdbc85b2dc847e524ada7f16fbc5f4c29d0e9e4e8c0067e04daaa273a99c14e6ad1a7d622e4f9d3da720b41f4ee75ff50cf2153cc190642e5 -DIST rust-1.54.0-mips64el-unknown-linux-gnuabi64.tar.xz 159901680 BLAKE2B d6ef3d514dce43878cb1f305ac0be9d2558c709adb61668ac8685964b663b08cd81793df893d1b5cd7edbf539823a9976dce75ac5bb1bf340246d33e03a0e7fe SHA512 9470fd938cb6b4c0ddb728428fa7d1d86b4bb2ca43563fbee9b21b82bc76f3350620b36a988ac0d9e274dd987c91ff0dc0a99ec5085cc8999257da8813889445 -DIST rust-1.54.0-mips64el-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 618073a30586c640ca3df15b377c16ae95e6599de68107f260b728dfeef4d95c13a07923550722e61b1afeffb89e8adc01047de32e60c3b40ee7ab4e2700e0b0 SHA512 29e35ba575441dc441529f154496e99e9db83ac6f7c19129085091f33cf5c7882235f60f27d9922d9873a1476cecbe70e7694cf6b865315c022758ba80959738 -DIST rust-1.54.0-mipsel-unknown-linux-gnu.tar.xz 154497208 BLAKE2B 40ab905d6088cb2e4364e2e6a0e4fb257365af05302abab81604d78b62bc255377ff7088884d9222f2997312befbf8efcd7f1821fd4bcf2dbae149c70cfa1224 SHA512 c61abff1df5e787d330abe4b3cbe8c3e67f02974dba3eb0fa4cbfeb0a74a956abb48199301e7f9af915b9be5a0d6ff7771198414458da52af18e9a74cab52620 -DIST rust-1.54.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B f525e1849a0c753a077ffadb7dd0b1d67b5fb369c061ec895878fbbd8d377572db2b5bb1fb5e1a24bcef61eb3f80b6f6bbb3d93b611e6b00e535b2e516ae0681 SHA512 d55ac3c329b20bd4e7f095ee2c710bd5c5be825ae517561bf670b96626427db39d362be553c3b92c90710ab8d9b677d2367aa85a397a4568c1146e0dff10cda6 -DIST rust-1.54.0-powerpc-unknown-linux-gnu.tar.xz 164089736 BLAKE2B a4e3c0b6f78444a2f48e842468e828e517d32fb1b62b2ad0c0000bee97ac5730977c8dacdc614ea2182fabf25e23804efed53b493ec611dd5d4d5d8ec237feb4 SHA512 ae8ba40e5843bd3ecc25156521f7e7cc7c869457151896371fd5faa3bc565ff9a6b7d437e3587dd9f1e87e9fa19463259ec18fe03badbd89372c11ddc7b577ee -DIST rust-1.54.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ac59496efd850b618b4013d0cbe09172f5828e60ae07afd0b233749ff3c1699e524e3a4fa93fea906f79dbc44f1d94ad52bf3952c2a4014d9d2653702d86349f SHA512 daf5da203c079cfca365990b0111d9df16defb49e1bc9c24407e423873992a9920d88fc2a097e1df8d2b03e05d1118bb3786e908d4f46fb282357c62d24df88c -DIST rust-1.54.0-powerpc64-unknown-linux-gnu.tar.xz 178088044 BLAKE2B e059572d2044aa05683d29370c395b714f25d0c7ec820bcb133d29667e9066b82e62e11000a3183a66cbeb87625517284d12263c2ea0eec60dc537ba3c78e6b9 SHA512 543dcaf3bab3343e796b3535a3b4e12d77227006e64e91b885f599fd94ffc9c1cc8d8c5ce3b788df0399c79dc785ff7c8dc375ae20d3b4156d1b16a7dec5a371 -DIST rust-1.54.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 663a3f7027c61f4a7e38bd0a72ffa55b9de2673cc0d48e94bb964e950b8a356b01011e94904efb3525c0ee2cd57e82ce8af50d2360a7e5b200b6eefeb4580927 SHA512 f0d03c2c3da60731cc05b9370df53766d6fc14ea3d49edbe0a7e809e35560a7cf06c4d8291896a604fdaddb665d117c53ec93671a0402dc093442ed3cbf4c596 -DIST rust-1.54.0-powerpc64le-unknown-linux-gnu.tar.xz 187058704 BLAKE2B bd90f56b50024cfce5bbfb5e84d28c06687b6a5524b1964064b1e53111b49805815d3dec47fd035f9e1d78c426d0b0689ac7c8baa1044cfbb9343da452d77694 SHA512 9d13d53a1ef106b190161096122da1bc9090dc495604c8ddbb9d6b02323e6b7c9b8bec82dfe33ae6cf1820e986811a701f7a4d4c3eb7c297c777fe3563b8e9ee -DIST rust-1.54.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3cfdbc8958b7025b6b3b76a6aef603820418c3aa2ee63c0a257dcd36004ca90203abb1b60a921310a9aea10545e32a11291a9d9baf3caf3e2b5a27ab4724bd9f SHA512 3ece925a1e3797cc6bf6ce44a3ca4768f57bc9bc3bb1261d6a82905907c635bb20ea7f5eeed062ff02582b035a22508990bfe83640006fe77fde8e699d5d55cc -DIST rust-1.54.0-riscv64gc-unknown-linux-gnu.tar.xz 180939260 BLAKE2B 856a431c22f286d42069dcd34101cc6e539004024619ba061a39d3bcc48834ce0002e2499466f976b81a7aa7d47f1c3249f2b21c69233df4d7d0940d80f5761c SHA512 5af3bbd68706bff03d51daf76551830810a8e225e8f0a9a394fd29a4fe9f0389bed3e0d94333483e089b4cce375c0320cc6ae360ddc4f08fca0ae80e671ba2a4 -DIST rust-1.54.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 366ef8f21801cc510b22217c4d974343ccb9f941faf08fba584b3f068a9d3128e3a15f5dc1400ed3749166afb622bb3aaafcf15381a0f2a5b60767db6ca9d3f2 SHA512 fdafdedb8f667124cb71eb44a6a61b1cef1df0baab385d2f5c674d900cd24139e555aa30df99f9d496b5fb30031bb86a43b118fafa083a24e2be10126e68df67 -DIST rust-1.54.0-s390x-unknown-linux-gnu.tar.xz 186478732 BLAKE2B 3d3ef6c37e0c24a4622814c51bfe1a5093f261e393a3dbb9c5eda023f8d0a63ebf0080cba5d43c8448b79503aecc62f04ccc18f040562db57dcd2ff1cb243124 SHA512 5033e3f61af7de144c3ed441f9fdf9f0c00a837d018ec3c0d4ef67f032e7f808d2dcc586e7b85b733ff9bc2196c2e05fcd104b3daa85698cc0e4e9ab69b870bd -DIST rust-1.54.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B b375bf65d9bef4a54792f93ac52fa408c85407d6aa646b64ee85d9220fdd9d7dda76c1e118def5262f5ab8fd9b7637c5d681d37c50d9e917eb6ba0d5b25e42fc SHA512 3bd16cdc61033d6e38de595ac145f0e7cebf3c3455491325ba89de8067cf6096beac7f00b3e4dc942cf4bf0f5ab59f6233b5d24f0ebf97ab3562260182baae4c -DIST rust-1.54.0-x86_64-unknown-linux-gnu.tar.xz 136593024 BLAKE2B 2f10b636982f335a200149d11c6cf212adb3e27f7d3eda9069881565a07f29aa6f2010ca786c3746190a3bbb8b8d79d531bee906e21e21f2c132f6c1e4198e17 SHA512 d2aad46556b164dac54be76a2459789fc686781b157f0c7d647464db3b03cbb902c8c4de5c6ef2e0811a94bdbba2973c93698c4f3a7c6ba294c0e652994e3fdc -DIST rust-1.54.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B cdfb03b6a75cd86e565b0b502cbd72636b67a92f9039fb148ca19fbef3d0775616ff03420cebeffe36db3d1d1db75e7e77ac473841a399dc2a218df09598b2eb SHA512 144ec35e82194d16cbf4e56c34dc25aa83d8ec8021052cc471ec85f169b74bd9394ec52c21c898d3ac0b966fd7463cd567d729eec9152f5fb8307c87eb02877d -DIST rust-1.54.0-x86_64-unknown-linux-musl.tar.xz 267840732 BLAKE2B 32e50467c4ee88cc502ea7e3e8cda9cbd89bcb6b7fac0c84b1509abf0a5c551d43f6522d148f54e4af65e0738b1dd13bfebaaba7e863909047fd53cac03bbbac SHA512 131f4743e5990c3e1ec2b7a0d1eb107a0e5264e6ce387cf4aa6db9a1693d0fe4a42de5722072708d72d580500d566f7772513974ce5589ea07997374fbdefdb9 -DIST rust-1.54.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 8b9194ce2b172cdd1fecbe064ddaa0047d30ddeafeaa903637e65775b139207c47da7eb17475ed17b1792b7c872ae71058c1f2cb7d59bd2d42a78cc590f9ec03 SHA512 2aaa42cab5272b6ee2ad0d3cd67b7dc648af68c5b9b5fd8f816688c0ebcc2cb0a24ac8c2a23dda5f17f7ba04f544625b3b03b22882c9122852bba680d8155afc DIST rust-1.71.1-aarch64-unknown-linux-gnu.tar.xz 209839296 BLAKE2B da65e966a6bd8c6a8a13e5ab747da2a8d9b55f90fc20c1bd041ccc1a2f4e2d11d50d2ed9cc7f3a470e7f886ec8b891ef98ea1295491414d5afeae7f83fa3a555 SHA512 a2ea1383a6ea965e4b0c3a7c648bb357fb531a6984418756abcff3c526ccd9221a28aeedd11b65180fd166575e07a00151460dbc15e3b132a0bcac643911d242 DIST rust-1.71.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 52d1fbdba32db7ac2578615fd10a3db1da84441274bb190624e517aec67279c7330f7c6b7fa0835d8e1cd8f578d34952813228a6a221e41c4193e9a079cc6fb6 SHA512 63cbbdd9a73f0223444565b60f59765a734633ef8e93843639969b96fb67550b85fe58079d486a927174f95619f0d6fdfe3f3b84d871f776bc48986be7965238 DIST rust-1.71.1-aarch64-unknown-linux-musl.tar.xz 193170880 BLAKE2B 26384119108f4503d35f79fc5401c46e1eee326eca4dc6cc282949d2f195928fda5d3bf56c0509b04fdaa3e7c3c47f4ba44b2b82a60b02f7bc520360b0433efe SHA512 3e79692cd4dba512516eb48970dc9711448c33e1d7a5ebe7c5fadaed7f053ae9c1a8e6efcd1713f87dd84107a37b0fb21b1246e0d5c3e0dab677e5c7ed210825 @@ -378,6 +344,10 @@ DIST rust-1.83.0-i686-unknown-linux-gnu.tar.xz 233693080 BLAKE2B 16a77a02a2a4f33 DIST rust-1.83.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 96b38ba9f35d825723b04395f2d6dae8b652c8c2604d724183c328432a991c9cfe9efe35bdb7a8cb32ce74b29be953cf71f782a369a975272f1a1b311bda74a6 SHA512 875298edf8769158e89b7e2c7fc939dab1e738021b8bfecb9bb1a7b287ff0bd87bf49e1784c567f7c63d7149b8348a06b9222d1071980d3128fe826c42549e2a DIST rust-1.83.0-loongarch64-unknown-linux-gnu.tar.xz 230967340 BLAKE2B b1356c331f85ca97717dcaab94aded8f20c577bf61051583e03b8530127e5cd3688f92ff920a6b2083d3d59b7d9faeea2a2de4382cf49766a74a71fe76214bd5 SHA512 68ed82264a89c8bed255ecf1b92279c8de1446186223f1d44c16eab263749de06cf1e8e07720f1326abe4663006ee636089db788124f3f0c7c9adabd3f2a68aa DIST rust-1.83.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7aaae04be9c09c8775ce6713f172f3523a7b008c921c68f1cd751f0bfea8144ac2bfb454fa1fa0d5e8486e62839737ad08d3381acaed633dc62c67abea65cd9c SHA512 b55652804fe3e5a574bd84fcf099e5ae733f211c87c5f3352660839f5ad2c29efbc02e553971734bcb6e7cd6f389bc875bfc92043c68339d8eaac797b1b6742e +DIST rust-1.83.0-mips-unknown-linux-gnu.tar.xz 72991436 BLAKE2B 8403529314903f0312f08b2b74ea95215f24cfa935eb582419c693fc57612a1b99d4e6ab69c47ae581e300248870742b81c88f6a39b621c28e52af3e4e550945 SHA512 790209ab21a5e2687df22681e1f79520ec04f3a6b53e8f6f206597c96356186c32df0a10dcfa21d0db80fa34c6ec5599ba1ad37dbbd0d7ea76fa823d5bfc0c94 +DIST rust-1.83.0-mips64-unknown-linux-gnuabi64.tar.xz 72669108 BLAKE2B 2158004650406ac248c6df07b6adb9bfa0f7005b79624fb23e9597f69a6fdb1c2d1f72af4d617b41259bb1ea8b25255382374113de085c2e74414df21f9a07f3 SHA512 b88df5767f0d30f3f1ceeb6354f2463f28abae2752fceb6ad9676475b4e29fa5d27d2d4d9431e0ffa1735270aaf39df72d398dc07b23d140b7c4a03794113d0b +DIST rust-1.83.0-mips64el-unknown-linux-gnuabi64.tar.xz 74172208 BLAKE2B a4bada0ba428b92f2c97a6791c337cf24a1b0e477a92bae57c29ff56c9019da9fb50289443ad01f9b50d6644426d56791b5f141c6c3d3de38eccbefecc899135 SHA512 711c87b06d02cc919a54d017a3ca704dca75b33cc0027927c244cc1c9e3d7433313b88dc05de9afb31159e8ef3a8f6a014e9f74c0bc63039bc4127cef5da6460 +DIST rust-1.83.0-mipsel-unknown-linux-gnu.tar.xz 74567868 BLAKE2B ac2a7d3ef64108a14447f35fba5c04920027ce42de26d8da8eaeb9f991d8dfc7bbe58ee7c667784647901c4f8271dc650424abf3572741ffa95c6e6ea9931bde SHA512 a247496009f59e29319f34f92238ea7b0d0be7ea66f1af1197d1de7bee65bbb743b208b0cc4110dadf145d5bde7fbe21f751bfc08fd44559b491366d9028394a DIST rust-1.83.0-powerpc-unknown-linux-gnu.tar.xz 222744280 BLAKE2B e32f9066394634d5855395d202256ba67c58d55bbc675bd440ac4d051260e7d2d237d0f8c35d3ef02f33512279aa3298c1993b2084b27fa017e18f1debd1b15a SHA512 ef67f29075d4248361885d0860d3040797d6a7a941e99ad49d6249e78fec00e306153fc28bf907a0cb4c58ecac73d92c4d8287b56132469eeeb18983ee84f01a DIST rust-1.83.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 16cce0091bc65719fc410e4b76fe3bdf4b3774402d300b72f46dbf1de55ef6ae29adbe0fa2c66aea119536b9446a0eeb70789cc9db2a36b64ba8cbdaae707f16 SHA512 cf94525aa6a868d1825d5fcaadc82190a6866a107aeee8884b7fb56b5ac427436be91737cfcaa0d5f7a44f21833127ff028e9247f8626f38a98e40282feb63f9 DIST rust-1.83.0-powerpc64-unknown-linux-gnu.tar.xz 218928260 BLAKE2B cdb8b3e0eb20df2ad4415a991c535c4db36fcfd45364adc415c870acfd5c61953d5b95c173213fb6c420a354adaccce2afc60d63c5afa21c77ecbcfecb99245b SHA512 0b39efed4cd9f5d176d81be196948697b72686cec907a075fac8d052197838f0ab536fd995952b56f58ad45bf2a5d89ba46bbd97cc2bf9b166658b508a959c11 @@ -388,6 +358,7 @@ DIST rust-1.83.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7c88fadadd DIST rust-1.83.0-powerpc64le-unknown-linux-musl.tar.xz 69860332 BLAKE2B 63a29db5bf9b1664fa95a902c222430b1a38b6dd8e4093333bc65f0807023fcd20566654df2b666eb7729c4053c4ee848ca1cbdea8e47afa08fd391a515d51df SHA512 6ba407ddfc00c6e06365e014b7cdd54ac5b529d998c5c743ca5fe70f2da20c2067182e9fef1c4d43934d8fe9b87a73bcc48f3514da3c0f0ad07e09e4b9922eb8 DIST rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz 218315040 BLAKE2B 91139066f3ac6a652db13985a225547eed242a6efaab0021bcf78b31e9e98fbedcdfe932110fa4c918f5eb3d8336b9b41a15dc2fcd316561d56e5bf205dd1567 SHA512 9bc1b82aff2e2447cb16680a8125378e33b7ceff4fdae7855bd7a79437f2df5b3989e82ffd68f157d50144018a74e6cc2053bda21de31d2c694aef29bf4e8bfc DIST rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e51ec506c4897e5e57cc94bfd3ba15d64e678a67b50acf48b8c69a5b95223006451d543275fc5291bb69369bead17a01d4934cda5b4744adfae2423200a002d0 SHA512 2d705740d928d49bd0eafe26cccf997f81c1f7ddd72bf6c4a4abe89e1984dca8e1b57af4b997939df355dea19abea2f45d430edafe88e7bb207abc0dc8d8ce3d +DIST rust-1.83.0-riscv64gc-unknown-linux-musl.tar.xz 78884296 BLAKE2B 1f59571a700a2e2547897f5b1ca7f447669e60c3b98995a0599ff98905b107e6b4d5cd74c6941bc5765a314723f8ef0b2583dde891a165d62d03c5e70900ea9f SHA512 99976036200eebac27453f06f41b6e347767576f619d6dbd74ea0c5a7fd888636f9c39fd6cc7c50d3fc91b429f710cbd7ca9fd7a036f3b30a89eb718a641dee1 DIST rust-1.83.0-s390x-unknown-linux-gnu.tar.xz 221194604 BLAKE2B 5d625e48296c171fe6da8ec70fa4daaf1632f6b63404d30ca0e908d63fcac3abc39f6fd9762d3670aa94f9a2587202d1b66f9751fd04e5e99f00caf8748243d6 SHA512 3aece2baaf66134ca339f3a9239c92ab7969c064eb35ede5dd61a3c2eca5eee4053b581edaab0acd6ba60cb7600b47902697e71c41873357fd53dbbe5c867d8b DIST rust-1.83.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bf07a1e0454e46e030918a44bfb04e54bc49266951ee7d88f13f7a66da7fba0b4d65022248fba1e51248a69e1a1975246f81cdecd56cbedb6ecb69e54eabe39f SHA512 6412d9b17f2c1d63c7b2c44a38dbde01670dd96bced6384b826abea8402608f239acb6eaac273f9a02b7f593b58e84ac0cebc854d2213350a000be139cbc5a47 DIST rust-1.83.0-sparc64-unknown-linux-gnu.tar.xz 63906648 BLAKE2B 2026153aa2e91a005be65e1602bfc1c6371835339a86722b47163bfa83d1ff0936223160704c6f8e5af0ed826487c27fd31a18bf904e608851e7ceec4e31af80 SHA512 8af0c1266e98f9d741c20d3e4046a6e57f18d951353d8764d633ca157db74f5747f3d0d2b9122a21ef49ac91ad8502dc01a1bee3c5c95caa62c4e0ebd3dd9ee3 @@ -409,16 +380,24 @@ DIST rust-1.84.0-i686-unknown-linux-gnu.tar.xz 235927300 BLAKE2B f0825b843745562 DIST rust-1.84.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9b8d092db5f894f563bbfb45666430f231ccdebcf05a811c3546be167d851a84891122c29ba3bceb6a2bf71e87817a29d703a40cad4f8fcdf3968d391347578a SHA512 51595e120a71958ed6551ff102f7891cdf3d9a6b9adaa990525b82ec75eb1c0266dce6350775139052a27d787612596cf083e9b0c3b9e7de5db8eb65a2546c59 DIST rust-1.84.0-loongarch64-unknown-linux-gnu.tar.xz 234981212 BLAKE2B 1e6616834440eac754ad0725ce88ec7d83e6804bf084bb2ab1c2adff1fbbbb0861780ebf57116f4fa38ad67667b89d0d7e9ca7184f0c0ee65f7b23886652ee10 SHA512 47671edf5c751bffcf87ab3a76cdb1233eb64c3d6815825ff0130bbb8956e6bc452bd75395bf8f44abd7b78c23db8d9f0047b6538a4f9c12d729d25ba43d038f DIST rust-1.84.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4cb2035ed10a735a688b2b80975aa16b2a311c9ccf5c8b6ec63af4dbe30e06713621c119721cde6e44d504133343ea2aa5158dc6bbb6253aa330894161559374 SHA512 ec74e916f9479ab046f0d997f4eee99b1c23028a3aa207fa7be71762ce7cf428af53a6d172714653fb30e5d6d8d42936cc7fe3d9c7f3a33262703d15fc9baffb +DIST rust-1.84.0-mips-unknown-linux-gnu.tar.xz 75963912 BLAKE2B 228b0605577f889d782fe468f5598e88df27a77453acca5e3a74e009cdd1463ffd2449f638166862ae4c0b84577ef4c11d0f7ee9198d653716fcf53fb54955de SHA512 dd636652841fdaa13c8c25b331f604060d4e232610098b524ed593164d60b59fc91c0325bc08afad301a9c221c08f015affc9f6f988d250dbc1051b76039a463 +DIST rust-1.84.0-mips64-unknown-linux-gnuabi64.tar.xz 75736380 BLAKE2B bfb81353be437e6eca4fa2133439e3774b42e388c21e64051073738165b7454e1a98d0f4d3c74bf668d789f622ee38c06f2e6ac5e9acbcc35351076f4baedf95 SHA512 e5ddca3ebfe1c952b3729c77ca6ae0dc429fc95be63e26dff26a0724e4b7c00faadda7c13267ddf8edff9af1bdf5c4c8ef8ad67439d509f3ee4038e95d245804 +DIST rust-1.84.0-mips64el-unknown-linux-gnuabi64.tar.xz 77348484 BLAKE2B 9c6bbcf37929e6da2459c498bb47027954b7b99780de35f0ac3e549d3779a0f74e81276015cccafdd75a2da4d2ecf7838aebf0420e2132979d40b7f66666051a SHA512 fe8aaa46773ca38f192befbf2adb11d66f50856778f8c54d2d9064681110fee7b32a1749871fbf32c83da4a867c668b81fe14f4596dd276a748c909d12fdb676 +DIST rust-1.84.0-mipsel-unknown-linux-gnu.tar.xz 77647044 BLAKE2B 7779f6d6e86eceb3f3e28c771745a2b52856504c8819ae515d34003b4454c967ac5481f36bc8cce9e75289c75eb2df3b966eba629b25afedfca2b1543e65b28d SHA512 3b07c7e45fdcefc327e1d0bbb76a55a8edb62fb1cfd5551c18210460153c1b00ef9e6fbb77e65c4cc2d7fd938f31e1a39a50dbfe836c65cc2c6397b26d1a509d DIST rust-1.84.0-powerpc-unknown-linux-gnu.tar.xz 226162544 BLAKE2B e1bb743b29f8dffed0e5b7f83da5ec58b4977dbb7621eb1a66f7d42dc9e588eecbd51013d2bca3dd24e679ec1f57bd8d1b9d5bd44fb155b8757b75c61f2649e1 SHA512 d09d52c64c097f9e8238c64a5e69530c8e7fc72db6c48c76f5118598d0c2c1186b40b053aa78b8b1d071cc716cc50ab7d824655af777b8a76c4131edac44e813 DIST rust-1.84.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 8eded34d62506f87d38ef3c503f62d5687a646aec8a0ff699d73d1b0907d0735aa7f7893d3b5ee481f069a01998182c70e10d48f664268bdec44655449825e78 SHA512 a3a5a6ae3ac2f210253c2eae61b0c0647cf5f526866e0f5c0141a07f9587cd614573bb2728186889483806a1a3ab5885c9abcca91a16dc36d042bc78239592d4 DIST rust-1.84.0-powerpc64-unknown-linux-gnu.tar.xz 222899356 BLAKE2B ff9b3bc680cae85485131d23fef5d04abffa69c7d4f4ad254a868707b1206bec543faf20a0be5c287c83165680da8dfbb9a0ce8c688e4f29231df2a589125450 SHA512 16440b2c604061dff6ebdb60af6697d3064ce6ec740c617968b22d8479cdb16cfb61330b2afeadbb544826c6fe90b245eba0de3956ae2924cf77ef8565defae0 DIST rust-1.84.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 67fd274e3315a21ed0b23fc8bcf013ab20b905c373785b74bada5431d0d1cc1b63e7ea3dcbfe4bd8def0861d08ce13cf769796e244437cc6beab6db95f01c6b6 SHA512 87ea6ead36d9dfddb5a71690f4d434978dcd73264c32e93ab7d3ef74f7c5835fd5e73316f1bb827c418492dd30f3a5bac752054ce1e27d99600249b64412d1c2 +DIST rust-1.84.0-powerpc64-unknown-linux-musl.tar.xz 78604816 BLAKE2B 5955afafb06908ddc25e469ff609bab22ca0bfb3d7ae84ab82232cc2d9534e944a2813f513f1b690d6736d0bc496ec6d7239e84e7449c08ac48d8490aef74e04 SHA512 066a192edc3519ee1bf18b8aaa4e0e1f49306985c3cea6ca8c60e3cf257b29cc72fa605c65a55e39f408168e7a09cc371efa42f8ec783ce6bdff37de5450a479 DIST rust-1.84.0-powerpc64le-unknown-linux-gnu.tar.xz 235629500 BLAKE2B 32903240ada4cf2640814374c55d71e3351a0dcf413d54041117a3f6603ddd6c19033368382bbb18c5d1f278c9bb3f5d6d0ace966bb1fcad9cc9389fdd066135 SHA512 626476e551869a066600f459e7a6e9c8435f61b4018efba5b3102af72ec7508cbd4464d0b60adce5c669d34adf4315ec3529d0ebdac6d294de7c7437da264367 DIST rust-1.84.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3e762822c5563db6efc128aab7ff704165dbe35cd06dda07c677ef2b94084a2ee37fdf77e8aaeaec4987de2f5bc73da9a2ab572e4e4d2b64a775a447b548e40b SHA512 113b7ef16977f24ad6acd72426ce389492aad7d8fc36bd3feeb921a21563e20c0144c3eaba3c63818556794df7904def0e83e5645cd4c766724898baca9ef208 +DIST rust-1.84.0-powerpc64le-unknown-linux-musl.tar.xz 80982656 BLAKE2B 9986395107b386ed047bb9843d46da27c44b5ecab77abec3902761b114131c5a28683cc52a19887af4a8d665a2e5d35146bfe0d358175de412673eda8cac8060 SHA512 13e0bcbcfcd3e0745b5d1c7b9ae379c7da3a629ec7467b7b8b0d7e623ccd314823162955157aa487927511934515f85b8847c5a7b14e5e1938884eca1a848777 DIST rust-1.84.0-riscv64gc-unknown-linux-gnu.tar.xz 221099540 BLAKE2B 0941d02fed906487753188150220c7e5a957e68b40e2e33929a74c6c520d34b2547307f74738ca6728f7e68213da81c5d2b07bc8b5ab7c0048bb222cc4aa2d6d SHA512 fe57aa11719164bb3865049ac91d1739f02e098f096db77a290f55f22423a870e1e0bc19d3ae2fd0bf32e5c6c9b10d5f3884b0070c5ffcf58b5d77598653b811 DIST rust-1.84.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e1100cd2dc56582472c312ce4d2a161a85cd371fc42bd281b14475f4ed922a38e8b79068aad5cf66c2c489965f782733edec1f72414f4b88628e4d661fea9014 SHA512 d54d69eca7651d166fa9c52bba562ce5008d5e6fd96eab8499a8dc9dcd178f009228e1d6788a4023478b29c2e477a379c6a2cc2b5c015072d87bbe929493eaab +DIST rust-1.84.0-riscv64gc-unknown-linux-musl.tar.xz 82884604 BLAKE2B 98fb594e11c35e2b93fc6bad089ee8d3a036b648eb2e7a5e5ea7a353291ad746d99f70949a3f12d884eb01dc881d8a521a877d7a54a81f9b72931f489d5a5575 SHA512 4133c5afac78201f72626c26d3359f5e4228be2f0a7f39e4c7c95e3797345fbe24e8c4a7daafb56836a8f00071d40916887a35656b7d9ebe43fd468f824345b0 DIST rust-1.84.0-s390x-unknown-linux-gnu.tar.xz 225691648 BLAKE2B e007b7c08998a488162721b418c9bd22dcb8ffbe450da543be285d4708ed366fc01f0bc6f668b7058e544c3df7025977454e3aa98fd98d29970be28e2a6d6438 SHA512 cafcb20513a27bfdb9d4caf0e53f929f30f40592f340ee6683294ef52c438c913381c677b6c266efe85b2980ddcddf7d2f90fd22b2482a6ea7348084e5638598 DIST rust-1.84.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 27b6afef3ca0c4df951e678469548784cbbc339772297966a449f17869ff7c47bad72c114edaca66d79dea6a63cf38755fa2c439e9283c7bb786a9c4eab02fb9 SHA512 6656f2ea30758ba23f7a1ac330695c262cea1c82d33bc64e968d8bbd5b39366e8d8e0983f6bdcbfa818225b63863fd941eeb9090d024e3d8ba254cb99f214a2e +DIST rust-1.84.0-sparc64-unknown-linux-gnu.tar.xz 67048992 BLAKE2B a84fcd2139ecdf9a5bd071518f7880e015a611a1d1ea9176ba3f8ed935e52254359bad0c15fb3d5e5fb2fb20913fcd3e3d4d29c764c04eb5269026d93c13dbf1 SHA512 47d0eee57de82fb155957631103399e2da1cafd74f7f16115549b4adde49fc58bd3a405acd0fc2e5095d89e3fbc5fa835a37f64b3e6f9079584de9b111a5cd60 DIST rust-1.84.0-x86_64-unknown-linux-gnu.tar.xz 183288052 BLAKE2B 6a9bdf25e8ebdad1e8b36feee4d152235397eb3a52351a166905f350a8fccabdc4f03f4c1e490bc81d4f403f2810b37aeee964b49f4c375a9792ca8a054c61ac SHA512 4d37691577636ecd233e4c507da4aa2c6c31f965fec29a59eb22bbc6c8d765eaf95d63fc1ffe8ba9ad309f5a0a712e60c5a94a832164bae283f06b41fecc2579 DIST rust-1.84.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3ceb1130faa28ed9caf86b0c66471b04aa2663bf6188230fd96a0c0d4ff7a4255cb0e7e3e6e71d8a3de86798bd7f53ccdafe21285ae247d1f1718fbd0aa04d31 SHA512 bb782d01731f8aeb4a54555ac2163bbf625e83a17f5d8e10fa76217b345b247b4d653b5bada065fe647c8b19e1dc66316b1ebea252525fa194cb7bdc6370c59b DIST rust-1.84.0-x86_64-unknown-linux-musl.tar.xz 263170948 BLAKE2B d4e43adbcc8ab3f49306d5ae624340f7e7b0844821c74140997510ca40d4bf252ff698e1295ab8138bae237d079c1e3cff6a46f895f55fbb7ba2c93054e1648c SHA512 6cf083cc2cda4591314ba49a302aba2aec8fd036eb9a72b775d16561d0739df23a1f3b0cb44d6539a068a47730142b09aeaafa1b0756703c51b539851e59bee5 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.54.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.54.0.ebuild deleted file mode 100644 index ce1061857a9..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.54.0.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit prefix rust-toolchain toolchain-funcs verify-sig multilib multilib-minimal - -MY_P="rust-${PV}" - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" -SRC_URI="$(rust_all_arch_uris ${MY_P})" - -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" -IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rustfmt" - -RDEPEND=">=app-eselect/eselect-rust-20190311" -BDEPEND=" - prefix? ( dev-util/patchelf ) - verify-sig? ( sec-keys/openpgp-keys-rust ) -" - -REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" - -QA_PREBUILT=" - opt/${P}/bin/.* - opt/${P}/lib/.*.so - opt/${P}/libexec/.* - opt/${P}/lib/rustlib/.*/bin/.* - opt/${P}/lib/rustlib/.*/lib/.* -" - -# An rmeta file is custom binary format that contains the metadata for the crate. -# rmeta files do not support linking, since they do not contain compiled object files. -# so we can safely silence the warning for this QA check. -QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc - -pkg_pretend() { - if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then - die "${CHOST} is not supported by upstream Rust. You must use a hard float version." - fi -} - -src_unpack() { - verify-sig_src_unpack - mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die -} - -patchelf_for_bin() { - local filetype=$(file -b ${1}) - if [[ ${filetype} == *ELF*interpreter* ]]; then - einfo "${1}'s interpreter changed" - patchelf ${1} --set-interpreter ${2} || die - elif [[ ${filetype} == *script* ]]; then - hprefixify ${1} - fi -} - -multilib_src_install() { - if multilib_is_native_abi; then - - # start native abi install - pushd "${S}" >/dev/null || die - local analysis std - analysis="$(grep 'analysis' ./components)" - std="$(grep 'std' ./components)" - local components="rustc,cargo,${std},rls-preview,${analysis}" - use doc && components="${components},rust-docs" - use clippy && components="${components},clippy-preview" - use rustfmt && components="${components},rustfmt-preview" - ./install.sh \ - --components="${components}" \ - --disable-verify \ - --prefix="${ED}/opt/${P}" \ - --mandir="${ED}/opt/${P}/man" \ - --disable-ldconfig \ - || die - - if use prefix; then - local interpreter=$(patchelf --print-interpreter "${EPREFIX}/bin/bash") - ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" - find "${ED}/opt/${P}/bin" -type f -print0 | \ - while IFS= read -r -d '' filename; do - patchelf_for_bin ${filename} ${interpreter} \; || die - done - eend $? - fi - - local symlinks=( - cargo - rls - rust-gdb - rust-gdbgui - rust-lldb - rustc - rustdoc - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - - einfo "installing eselect-rust symlinks and paths" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- - local ver_i="${i}-bin-${PV}" - ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" - dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" - done - - # symlinks to switch components to active rust in eselect - dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" - dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" - dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" - dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" - - # musl logic can be improved a bit, but fine as is for now - cat <<-_EOF_ > "${T}/50${P}" - LDPATH="${EPREFIX}/usr/lib/rust/lib" - MANPATH="${EPREFIX}/usr/lib/rust/man" - $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') - $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') - _EOF_ - doenvd "${T}/50${P}" - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${P}" - /usr/bin/cargo - /usr/bin/rustdoc - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/lib/rustlib - /usr/lib/rust/lib - /usr/lib/rust/man - /usr/share/doc/rust - /usr/bin/rls - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${P}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${P}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${P}" - popd >/dev/null || die - #end native abi install - - else - local rust_target - rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" - dodir "/opt/${P}/lib/rustlib" - cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ - "${ED}/opt/${P}/lib/rustlib" || die - fi - - # BUG: installs x86_64 binary on other arches - rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die -} - -pkg_postinst() { - eselect rust update - - elog "Rust installs a helper script for calling GDB now," - elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." - - if has_version app-editors/emacs; then - elog "install app-emacs/rust-mode to get emacs support for rust." - fi - - if has_version app-editors/gvim || has_version app-editors/vim; then - elog "install app-vim/rust-vim to get vim support for rust." - fi -} - -pkg_postrm() { - eselect rust cleanup -} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.83.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.83.0.ebuild index 3b04eb349c4..eae591d4611 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.83.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.83.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,19 +20,19 @@ SRC_URI="$(rust_all_arch_uris ${MY_P}) " # Keep this separate to allow easy commenting out if not yet built SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " -#SRC_URI+=" mips? ( -# abi_mips_o32? ( -# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) -# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) -# ) -# abi_mips_n64? ( -# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) -# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) -# ) -#)" -#SRC_URI+=" riscv? ( -# elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) -#)" +SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) +)" +SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) +)" SRC_URI+=" ppc64? ( elibc_musl? ( big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64le-unknown-linux-musl.tar.xz ) @@ -40,7 +40,7 @@ SRC_URI+=" ppc64? ( elibc_musl? ( LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" RDEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.84.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.84.0.ebuild index 6c5a0dfdb75..48da1d3e8bd 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.84.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust-bin/rust-bin-1.84.0.ebuild @@ -19,28 +19,28 @@ SRC_URI="$(rust_all_arch_uris ${MY_P}) rust-src? ( ${MY_SRC_URI} ) " # Keep this separate to allow easy commenting out if not yet built -#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " -#SRC_URI+=" mips? ( -# abi_mips_o32? ( -# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) -# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) -# ) -# abi_mips_n64? ( -# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) -# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) -# ) -#)" -#SRC_URI+=" riscv? ( -# elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) -#)" -#SRC_URI+=" ppc64? ( elibc_musl? ( -# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) -# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64le-unknown-linux-musl.tar.xz ) -#) )" +SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " +SRC_URI+=" mips? ( + abi_mips_o32? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) + ) + abi_mips_n64? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) + ) +)" +SRC_URI+=" riscv? ( + elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) +)" +SRC_URI+=" ppc64? ( elibc_musl? ( + big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) + !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64le-unknown-linux-musl.tar.xz ) +) )" LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" RDEPEND=" From 1691577738d3359445d4e80b9ebbda948bd94256 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:23 +0000 Subject: [PATCH 031/145] dev-lang/rust-common: Sync with Gentoo It's from Gentoo commit 93d8984fc566fc7285eca62f0f2c53b5ecfed3b4. --- .../dev-lang/rust-common/rust-common-1.83.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/rust-common/rust-common-1.83.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/rust-common/rust-common-1.83.0.ebuild index 285a9a5b8e5..5c676ac678b 100644 --- a/sdk_container/src/third_party/portage-stable/dev-lang/rust-common/rust-common-1.83.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-lang/rust-common/rust-common-1.83.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -27,7 +27,7 @@ S="${WORKDIR}/${MY_P}-src" LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv sparc x86" # Legacy non-slotted versions bash completions will collide. RDEPEND=" From 39eec3bb82584fbb1dc247f24aac7eef4706ea29 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:32 +0000 Subject: [PATCH 032/145] dev-libs/libassuan: Sync with Gentoo It's from Gentoo commit e2f4867c7659270d19e1a3de839bca2f0d12e02e. --- .../dev-libs/libassuan/Manifest | 2 - .../dev-libs/libassuan/libassuan-2.5.6.ebuild | 56 ------------------- .../dev-libs/libassuan/libassuan-3.0.0.ebuild | 4 +- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.6.ebuild 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 80682a2ca2b..a1f97e92bfa 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 @@ -1,5 +1,3 @@ -DIST libassuan-2.5.6.tar.bz2 577012 BLAKE2B 462af1eab69e157f65f8134a492cde01dd1e0ee00609f2c2585e742fb9c5532b3fd96054b4fb7449e305690f70aa7a120085db42e2de2e3b0ef8b1603e7e5846 SHA512 dcca942d222a2c226a7e34ba7988ee0c3c55bd6032166eb472caf2053db89aeeea7a40e93d8c2887c7ee73c5f838e8b0725e8cfb595accc1606646559362f7ee -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.0.tar.bz2 592353 BLAKE2B c86f7d62413c6f7a228deb47abe0388790a7c0e3c89b5ee7a7a72f72bea6502d5cbe199b10f06efc885af6fefab358dbe0e61a6f798493dcfcc63df0cfacdb55 SHA512 7c5c95c1b85bef2d4890c068a5a8ea8a1fe0d8def6ab09e5f34fc2746d8808bbb0fc168e3bd66d52ee5ed799dcf9f258f4125cda98c8384f6411bcad8d8b3139 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.6.ebuild deleted file mode 100644 index e659cd5964e..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.6.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit libtool verify-sig - -DESCRIPTION="IPC library used by GnuPG and GPGME" -HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="GPL-3 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -# Note: On each bump, update dep bounds on each version from configure.ac! -RDEPEND=">=dev-libs/libgpg-error-1.33" -DEPEND="${RDEPEND}" -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-gnupg )" - -src_prepare() { - default - - if [[ ${CHOST} == *-solaris* ]] ; then - elibtoolize - - # fix standards conflict - sed -i \ - -e '/_XOPEN_SOURCE/s/500/600/' \ - -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \ - -e 's/__EXTENSIONS__/_NO&/' \ - configure || die - fi -} - -src_configure() { - local myeconfargs=( - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - econf "${myeconfargs[@]}" -} - -src_install() { - default - # ppl need to use libassuan-config for --cflags and --libs - find "${ED}" -type f -name '*.la' -delete || die -} 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 d57b0803627..14a0793c4ea 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 @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -19,7 +19,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" LICENSE="GPL-3 LGPL-2.1" SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" # Note: On each bump, update dep bounds on each version from configure.ac! RDEPEND=">=dev-libs/libgpg-error-1.33" From 05ddb287a59ea21cc5be132dd8e0ab7cef8e1d91 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:35 +0000 Subject: [PATCH 033/145] dev-libs/libffi: Sync with Gentoo It's from Gentoo commit 236e2237fad1ef81a4c8bfd4d49d61009704d3a1. --- .../portage-stable/dev-libs/libffi/libffi-3.4.6-r2.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.6-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.6-r2.ebuild index 61fa9d5ad84..689780e0121 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.6-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libffi/libffi-3.4.6-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -17,7 +17,7 @@ if [[ ${PV} == 9999 ]] ; then else SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi S="${WORKDIR}"/${MY_P} From de18dd4fb356b7c8140705e673564ef18f76c57f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:35 +0000 Subject: [PATCH 034/145] dev-libs/libgcrypt: Sync with Gentoo It's from Gentoo commit a7918fc1880931749a25dad7c88729b573557911. --- .../libgcrypt/libgcrypt-1.10.2.ebuild | 5 +- .../libgcrypt/libgcrypt-1.10.3-r1.ebuild | 5 +- .../libgcrypt/libgcrypt-1.10.3-r2.ebuild | 5 +- .../libgcrypt/libgcrypt-1.11.0-r1.ebuild | 7 +- .../libgcrypt/libgcrypt-1.11.0-r2.ebuild | 5 +- .../libgcrypt/libgcrypt-1.11.0.ebuild | 179 ------------------ 6 files changed, 21 insertions(+), 185 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild index 6c0585d8969..7954c5f2aa9 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -167,6 +167,9 @@ multilib_src_test() { # t-secmem and t-sexp need mlock which requires extra privileges; nspawn # at least disallows that by default. local -x GCRYPT_IN_ASAN_TEST=1 + # Avoid running (very) expensive bench-slope test. On hppa, it + # takes at least 7 hours. + local -x GCRYPT_NO_BENCHMARKS=1 default } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild index ec0db5a77c6..c651cc767b8 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -165,6 +165,9 @@ multilib_src_test() { # t-secmem and t-sexp need mlock which requires extra privileges; nspawn # at least disallows that by default. local -x GCRYPT_IN_ASAN_TEST=1 + # Avoid running (very) expensive bench-slope test. On hppa, it + # takes at least 7 hours. + local -x GCRYPT_NO_BENCHMARKS=1 default } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r2.ebuild index 07596861dd7..c546de3cf23 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.3-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -171,6 +171,9 @@ multilib_src_test() { # t-secmem and t-sexp need mlock which requires extra privileges; nspawn # at least disallows that by default. local -x GCRYPT_IN_ASAN_TEST=1 + # Avoid running (very) expensive bench-slope test. On hppa, it + # takes at least 7 hours. + local -x GCRYPT_NO_BENCHMARKS=1 default } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r1.ebuild index 9e0ef5665a8..45bc4ef0ff0 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" LICENSE="LGPL-2.1+ GPL-2+ MIT" SLOT="0/20" # subslot = soname major version -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="+asm doc +getentropy static-libs" IUSE+=" cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_arm_sve" IUSE+=" cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3" @@ -165,6 +165,9 @@ multilib_src_test() { # t-secmem and t-sexp need mlock which requires extra privileges; nspawn # at least disallows that by default. local -x GCRYPT_IN_ASAN_TEST=1 + # Avoid running (very) expensive bench-slope test. On hppa, it + # takes at least 7 hours. + local -x GCRYPT_NO_BENCHMARKS=1 default } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r2.ebuild index 4b77f2ee8ad..f1ad0491785 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -172,6 +172,9 @@ multilib_src_test() { # t-secmem and t-sexp need mlock which requires extra privileges; nspawn # at least disallows that by default. local -x GCRYPT_IN_ASAN_TEST=1 + # Avoid running (very) expensive bench-slope test. On hppa, it + # takes at least 7 hours. + local -x GCRYPT_NO_BENCHMARKS=1 default } diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0.ebuild deleted file mode 100644 index 77bc6b55e34..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.11.0.ebuild +++ /dev/null @@ -1,179 +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/gnupg.asc -inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig - -DESCRIPTION="General purpose crypto library based on the code used in GnuPG" -HOMEPAGE="https://www.gnupg.org/" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="LGPL-2.1+ GPL-2+ MIT" -SLOT="0/20" # subslot = soname major version -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="+asm doc +getentropy static-libs" -IUSE+=" cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_arm_sve" -IUSE+=" cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3" -IUSE+=" cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1" - -# Build system only has --disable-arm-crypto-support right now -# If changing this, update src_configure logic too. -# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions, -# but this looks like it might change in future. This is just a safety check -# in case people somehow do have a CPU which only supports some. They must -# for now disable them all if that's the case. -REQUIRED_USE=" - cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 ) - cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 ) - cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 ) - cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec ) -" - -RDEPEND=" - >=dev-libs/libgpg-error-1.49[${MULTILIB_USEDEP}] - getentropy? ( - kernel_linux? ( - elibc_glibc? ( >=sys-libs/glibc-2.25 ) - elibc_musl? ( >=sys-libs/musl-1.1.20 ) - ) - ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - doc? ( virtual/texi2dvi ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-multilib-syspath.patch - "${FILESDIR}"/${PN}-powerpc-darwin.patch - "${FILESDIR}"/${P}-s390x.patch - "${FILESDIR}"/${P}-o-flag-munging.patch -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/libgcrypt-config -) - -pkg_pretend() { - if [[ ${MERGE_TYPE} == buildonly ]]; then - return - fi - if use kernel_linux && use getentropy; then - unset KV_FULL - get_running_version - if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then - eerror "The getentropy function requires the getrandom syscall." - eerror "This was introduced in Linux 3.17." - eerror "Your system is currently running Linux ${KV_FULL}." - eerror "Disable the 'getentropy' USE flag or upgrade your kernel." - die "Kernel is too old for getentropy" - fi - fi -} - -pkg_setup() { - : -} - -src_prepare() { - default - eautoreconf -} - -src_configure() { - # Sensitive to optimisation; parts of the codebase are built with - # -O0 already. Don't risk it with UB. - strip-flags - - multilib-minimal_src_configure -} - -multilib_src_configure() { - if [[ ${CHOST} == powerpc* ]] ; then - # ./configure does a lot of automagic, prevent that - # generic ppc32+ppc64 altivec - use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no - use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no - # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support - use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no - # power9 vector extension, aka arch 3.00 ISA - use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no - fi - - # Workaround for GCC < 11.3 bug - # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29 - # https://dev.gnupg.org/T5581 - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 - if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && - (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then - append-flags -fno-tree-loop-vectorize - fi - - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - local myeconfargs=( - CC_FOR_BUILD="$(tc-getBUILD_CC)" - - --enable-noexecstack - $(use_enable cpu_flags_arm_neon neon-support) - # See REQUIRED_USE comment above - $(use_enable cpu_flags_arm_aes arm-crypto-support) - $(use_enable cpu_flags_arm_sve sve-support) - $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support) - $(use_enable cpu_flags_x86_aes aesni-support) - $(use_enable cpu_flags_x86_avx avx-support) - $(use_enable cpu_flags_x86_avx2 avx2-support) - $(use_enable cpu_flags_x86_avx512f avx512-support) - $(use_enable cpu_flags_x86_padlock padlock-support) - $(use_enable cpu_flags_x86_sha shaext-support) - $(use_enable cpu_flags_x86_sse4_1 sse41-support) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - - # disabled due to various applications requiring privileges - # after libgcrypt drops them (bug #468616) - --without-capabilities - - $(use asm || echo "--disable-asm") - - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - ) - - if use kernel_linux; then - # --enable-random=getentropy requires getentropy/getrandom. - # --enable-random=linux enables legacy code that tries getrandom - # and falls back to reading /dev/random. - myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) ) - fi - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') -} - -multilib_src_compile() { - default - multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf -} - -multilib_src_test() { - # t-secmem and t-sexp need mlock which requires extra privileges; nspawn - # at least disallows that by default. - local -x GCRYPT_IN_ASAN_TEST=1 - - default -} - -multilib_src_install() { - emake DESTDIR="${D}" install - multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf -} - -multilib_src_install_all() { - default - find "${ED}" -type f -name '*.la' -delete || die -} From 2c6cb57d1e4271b4695a16e5899a95840c6cca85 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:36 +0000 Subject: [PATCH 035/145] dev-libs/libgpg-error: Sync with Gentoo It's from Gentoo commit a0fbc08f0b3ce3f08a75ee7bc1ca739c02d3bb20. --- .../dev-libs/libgpg-error/Manifest | 8 -- ...ibgpg-error-1.44-remove_broken_check.patch | 22 ----- ...ibgpg-error-1.48-remove_broken_check.patch | 20 ---- .../files/libgpg-error-1.50-environ.patch | 31 ------- .../libgpg-error/libgpg-error-1.47-r1.ebuild | 86 ----------------- .../libgpg-error/libgpg-error-1.48.ebuild | 86 ----------------- .../libgpg-error/libgpg-error-1.49.ebuild | 89 ------------------ .../libgpg-error/libgpg-error-1.50.ebuild | 93 ------------------- .../libgpg-error/libgpg-error-1.51.ebuild | 2 +- 9 files changed, 1 insertion(+), 436 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.48-remove_broken_check.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.50-environ.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.48.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.49.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.50.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest index a7417773ca1..14430fb0585 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest @@ -1,10 +1,2 @@ -DIST libgpg-error-1.47.tar.bz2 1020862 BLAKE2B bc04efa0686b1b7d7cdce045fc080c090c1abec60349b673c2e1ce27900483aea090eb6ebcb3fb49a4eed36f18156a12413d5446f739475632f4ed2a2481ff27 SHA512 bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30 -DIST libgpg-error-1.47.tar.bz2.sig 119 BLAKE2B d23ea6c38621407c8f9f0c6bde71abd0e50c136d2e5de9a6cef64627f5d398c344a3438995a2405c4ef148ad8638ef7125f34670819957acd7d597370f1630e5 SHA512 09343016eaf7fcc455f8ce533847153a8a9b7c36f375a8ebe71ef5fc2923edf7b70842f834f52c51874e427869487b74a2286ea0112cffad0d72f79cb6d4eceb -DIST libgpg-error-1.48.tar.bz2 1080417 BLAKE2B 4ced63058586558f4d001bcc468f4bd419b8ec29fbd7dbcaa1a21f959d847c9e12c10c548a0038fd4eac0bdfc9907b61e9f6be71c95fc61c964c649e2415dfd7 SHA512 3e9ea99cfb7d706791eb3349a9356b6bc44a53ef8bfa9a4e89afb5203dad5af3f466a039a1764361c0c7f697a6fa668a21d05ceaeb8e44ec5a11d6468998adf2 -DIST libgpg-error-1.48.tar.bz2.sig 119 BLAKE2B 36e74c520df1740d48630584cb7093413c7974157038dd0e732cb821d6e3b3386a331be9e94a7f19ea10256bd2902d778d52fe1eeab68065ef9dc2625ac2902c SHA512 302091beddab877acf4355f913fae4bd0a795f0a032f47e0e17c58fe1049833116a743d3470669cff59eab2f6d184b143689763cbb4d0f2f9bcab598e09dc12c -DIST libgpg-error-1.49.tar.bz2 1081175 BLAKE2B f1d7ce3c8b32a1a98495576b4ed7bf938b847a84d0fa3ed585d461ad6b136cf87112055a39b4859301f87f555666d9dbf0dda5ec03ea6270802d98352224071e SHA512 bb4dd3faa8e2ec945e61fb2006697b48a51da7ee510b6650a6ab09c8734a987bc33c9835bc710ca9a9395c088271939091be418efc6ca5130b426c2fbc4959a3 -DIST libgpg-error-1.49.tar.bz2.sig 238 BLAKE2B ff9b3adbbd587afc09e4b7bc58bfa63446f92b7a42baa541e564ee52d88434bca621686f6db6312e8cd8b81f458ce9ee6307c0e6700ab3dc7d7a46d003c934cc SHA512 39d45939c17755e3dd126506d758a1a86f66827616f270c5b663df50e55692e2ef4f27e6e12a7eb1dbe44afc03b415f1fcb3160990b75980cafe6d9cd5a55ed2 -DIST libgpg-error-1.50.tar.bz2 1082003 BLAKE2B 621d9a604585daa1fbd08aaa94f3b177f6265046ccf452317e126e73079c567c555cbb8ab8b63e09b76bdf4f11a1aad7effd118651fe9e9cbcf01229f20ab297 SHA512 96e466d892a50843af6d7c08c0da602518bc6a28836bfc35f0a28cde74d368f57c5c70c65f0f41edb4fc1ca5ebd00f2ece531d8b3eb1bd6db566adbb29bc61ff -DIST libgpg-error-1.50.tar.bz2.sig 119 BLAKE2B ee3a8e9221d4df8b37ceef70240ecf79efef045cfbde67f6a8bbc0f58dfa4955ed5a75e3cd31de7644707049919b154c1d9607e370dec7e8f2b0b6cb1b997beb SHA512 02e29838be3225f4894bcebd2c53355a98f5857baa4e9f8a78227a03f849677c35b1d2d009610badd6540dcfe5378b5365abcae77d29ba2d95dd252e9c93c893 DIST libgpg-error-1.51.tar.bz2 1085510 BLAKE2B 8727a993fb5e589beceafce9d06d843b28ceff80398c33a5655608bdcd3d92ee363389bc209a1dff675b9f78d56f13b78d77e55696c0736612b09275ae0da7f3 SHA512 4489f615c6a0389577a7d1fd7d3917517bb2fe032abd9a6d87dfdbd165dabcf53f8780645934020bf27517b67a064297475888d5b368176cf06bc22f1e735e2b DIST libgpg-error-1.51.tar.bz2.sig 119 BLAKE2B 34bacbe1923aebc015ea1b975616836dd80278c8edc293474f83633fef59326edfe4043419729de4c8f26c49a6292f7d13a23c3ccda8aea3d1923913df616a5e SHA512 fc793d674c0f5b26efdc71a4420e9743e9dcf8ab646577be3561dc46f15343be42991cf3fe5c49d049f49e929618e7c05dbd32f9e4ceb1d58b90263058621a9e diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch deleted file mode 100644 index 043099c097b..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch +++ /dev/null @@ -1,22 +0,0 @@ -This breaks our multilib builds: - - Confirm gpg-error-config works... no - *** Please report to with gpg-error-config-test.log - ---- libgpg-error-1.44/src/Makefile.am -+++ libgpg-error-1.44/src/Makefile.am -@@ -347,14 +347,6 @@ - cp gpg-error.h gpgrt.h - - gpg-error-config: gpgrt-config gpg-error-config-old gpg-error-config-test.sh -- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" -- @if ./gpg-error-config-test.sh --old-new; then \ -- echo "good"; \ -- else \ -- echo "no"; \ -- echo "*** Please report to with gpg-error-config-test.log"; \ -- exit 1; \ -- fi - cp gpg-error-config-old $@ - - install-data-local: diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.48-remove_broken_check.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.48-remove_broken_check.patch deleted file mode 100644 index 7ccdb2223a5..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.48-remove_broken_check.patch +++ /dev/null @@ -1,20 +0,0 @@ -This breaks our multilib builds: - - Confirm gpg-error-config works... no - *** Please report to with gpg-error-config-test.log - ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -318,12 +318,4 @@ gpgrt.h: gpg-error.h - cp gpg-error.h gpgrt.h - - gpg-error-config: gpgrt-config gpg-error-config-old gpg-error-config-test.sh -- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" -- @if ./gpg-error-config-test.sh --old-new; then \ -- echo "good"; \ -- else \ -- echo "no"; \ -- echo "*** Please report to with gpg-error-config-test.log"; \ -- exit 1; \ -- fi - cp gpg-error-config-old $@ diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.50-environ.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.50-environ.patch deleted file mode 100644 index 761e884aa80..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.50-environ.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commit;h=a59e902b887fd92337c9728f668cf9c89da3957a - -From a59e902b887fd92337c9728f668cf9c89da3957a Mon Sep 17 00:00:00 2001 -From: Werner Koch -Date: Thu, 20 Jun 2024 12:05:15 +0200 -Subject: [PATCH] core: Declare environ for macOS and others. - -* src/spawn-posix.c (environ): Declare. --- - -GnuPG-bug-id: 7169 ---- - src/spawn-posix.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/spawn-posix.c b/src/spawn-posix.c -index 7de02a9..96f1536 100644 ---- a/src/spawn-posix.c -+++ b/src/spawn-posix.c -@@ -57,6 +57,9 @@ - - #include "gpgrt-int.h" - -+/* (Only glibc's unistd.h declares this iff _GNU_SOURCE is used.) */ -+extern char **environ; -+ - - /* Definition for the gpgrt_spawn_actions_t. Note that there is a - * different one for Windows. */ --- -2.30.2 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47-r1.ebuild deleted file mode 100644 index 63ad459a6b5..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47-r1.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit autotools multilib-minimal toolchain-funcs verify-sig - -DESCRIPTION="Contains error handling functions used by GnuPG software" -HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="common-lisp nls static-libs test" -RESTRICT="!test? ( test )" - -RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND}" -BDEPEND=" - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/gpg-error.h - /usr/include/gpgrt.h -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/gpg-error-config - /usr/bin/gpgrt-config -) - -PATCHES=( - "${FILESDIR}/${PN}-1.44-remove_broken_check.patch" -) - -src_prepare() { - default - - if use prefix ; then - # don't hardcode /usr/xpg4/bin/sh as shell on Solaris - sed -i -e 's/solaris\*/disabled/' configure.ac || die - fi - - # only necessary for as long as we run eautoreconf, configure.ac - # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is - # not a pure /bin/sh script, so it fails on some hosts - sed -i -e "1s:.*:#\!${BASH}:" autogen.sh || die - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(multilib_is_native_abi || echo --disable-languages) - $(use_enable common-lisp languages) - $(use_enable nls) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable test tests) - - # See bug #699206 and its duplicates wrt gpgme-config - # Upstream no longer install this by default and we should - # seek to disable it at some point. - --enable-install-gpg-error-config - - --enable-threads - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.48.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.48.ebuild deleted file mode 100644 index 8ce92b96f6b..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.48.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit autotools multilib-minimal toolchain-funcs verify-sig - -DESCRIPTION="Contains error handling functions used by GnuPG software" -HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="common-lisp nls static-libs test" -RESTRICT="!test? ( test )" - -RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND}" -BDEPEND=" - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/gpg-error.h - /usr/include/gpgrt.h -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/gpg-error-config - /usr/bin/gpgrt-config -) - -PATCHES=( - "${FILESDIR}/${PN}-1.48-remove_broken_check.patch" -) - -src_prepare() { - default - - if use prefix ; then - # don't hardcode /usr/xpg4/bin/sh as shell on Solaris - sed -i -e 's/solaris\*/disabled/' configure.ac || die - fi - - # only necessary for as long as we run eautoreconf, configure.ac - # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is - # not a pure /bin/sh script, so it fails on some hosts - sed -i -e "1s:.*:#\!${BASH}:" autogen.sh || die - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(multilib_is_native_abi || echo --disable-languages) - $(use_enable common-lisp languages) - $(use_enable nls) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable test tests) - - # See bug #699206 and its duplicates wrt gpgme-config - # Upstream no longer install this by default and we should - # seek to disable it at some point. - --enable-install-gpg-error-config - - --enable-threads - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.49.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.49.ebuild deleted file mode 100644 index 45db1541289..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.49.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit libtool multilib-minimal toolchain-funcs verify-sig - -DESCRIPTION="Contains error handling functions used by GnuPG software" -HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error/" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="common-lisp nls static-libs test" -RESTRICT="!test? ( test )" - -RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND}" -BDEPEND=" - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/gpg-error.h - /usr/include/gpgrt.h -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/gpg-error-config - /usr/bin/gpgrt-config -) - -src_prepare() { - default - elibtoolize - - if use prefix ; then - # don't hardcode /usr/xpg4/bin/sh as shell on Solaris - sed -i -e 's:INSTALLSHELLPATH=/usr/xpg4/bin/sh:INSTALLSHELLPATH=/bin/sh:g' configure.ac configure || die - fi - - # This check breaks multilib - cat <<-EOF > src/gpg-error-config-test.sh.in || die - #!@INSTALLSHELLPATH@ - exit 0 - EOF - - # only necessary for as long as we run eautoreconf, configure.ac - # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is - # not a pure /bin/sh script, so it fails on some hosts - #sed -i -e "1s:.*:#\!${BASH}:" autogen.sh || die - #eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(multilib_is_native_abi || echo --disable-languages) - $(use_enable common-lisp languages) - $(use_enable nls) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable test tests) - - # See bug #699206 and its duplicates wrt gpgme-config - # Upstream no longer install this by default and we should - # seek to disable it at some point. - --enable-install-gpg-error-config - - --enable-threads - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.50.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.50.ebuild deleted file mode 100644 index e7a6826c3e7..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.50.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -inherit libtool multilib-minimal toolchain-funcs verify-sig - -DESCRIPTION="Contains error handling functions used by GnuPG software" -HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error/" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="common-lisp nls static-libs test" -RESTRICT="!test? ( test )" - -RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" -DEPEND="${RDEPEND}" -BDEPEND=" - nls? ( sys-devel/gettext ) - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/gpg-error.h - /usr/include/gpgrt.h -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/gpg-error-config - /usr/bin/gpgrt-config -) - -PATCHES=( - "${FILESDIR}"/${P}-environ.patch -) - -src_prepare() { - default - elibtoolize - - if use prefix ; then - # don't hardcode /usr/xpg4/bin/sh as shell on Solaris - sed -i -e 's:INSTALLSHELLPATH=/usr/xpg4/bin/sh:INSTALLSHELLPATH=/bin/sh:g' configure.ac configure || die - fi - - # This check breaks multilib - cat <<-EOF > src/gpg-error-config-test.sh.in || die - #!@INSTALLSHELLPATH@ - exit 0 - EOF - - # only necessary for as long as we run eautoreconf, configure.ac - # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is - # not a pure /bin/sh script, so it fails on some hosts - #sed -i -e "1s:.*:#\!${BASH}:" autogen.sh || die - #eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - $(multilib_is_native_abi || echo --disable-languages) - $(use_enable common-lisp languages) - $(use_enable nls) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable test tests) - - # See bug #699206 and its duplicates wrt gpgme-config - # Upstream no longer install this by default and we should - # seek to disable it at some point. - --enable-install-gpg-error-config - - --enable-threads - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_install_all() { - einstalldocs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.51.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.51.ebuild index 43580d85220..ceb71858adb 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.51.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.51.ebuild @@ -19,7 +19,7 @@ SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" LICENSE="GPL-2 LGPL-2.1" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="common-lisp nls static-libs test" RESTRICT="!test? ( test )" From 426e9df313cf1d4740576b88dc88b054683c7645 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:36 +0000 Subject: [PATCH 036/145] dev-libs/libksba: Sync with Gentoo It's from Gentoo commit 5200c1417b1d19a6eae58a2176072d05f218351f. --- .../portage-stable/dev-libs/libksba/Manifest | 4 -- .../dev-libs/libksba/libksba-1.6.5.ebuild | 62 ------------------- .../dev-libs/libksba/libksba-1.6.6.ebuild | 62 ------------------- 3 files changed, 128 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.5.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.6.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libksba/Manifest index 287f14a52a7..250b2f5895c 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libksba/Manifest @@ -1,6 +1,2 @@ -DIST libksba-1.6.5.tar.bz2 708400 BLAKE2B 934bde6412de6c1f3062b101930d7b2beac3f6e3f2fbeb5c964a6252b68a3b70c7cb3a48c7eac04b7f1d2ea3c717e1c7e164c1bc6113b46244b9dd130c64b540 SHA512 959312ac0bb2dabcdd22217266daccdf3938d62ff2936c767cade76888757ece1bb6fe79f2c679db03d1baf3919757265d0ded216fee8b8d235e94a70fcf05de -DIST libksba-1.6.5.tar.bz2.sig 119 BLAKE2B 70f290ed44160af2882b5f2543965e3003dd0fd106ab6eaa1f7dfbb878d1f0402c16f3e802af6be589e501e17d0ead82c03afe73c8353b314c8cafb24e7d4a11 SHA512 e70f136edcf29bf931eccaf930e0ae644fd372e0a6f472599898d2fd5e44e64ab2cea63b0be2b1d9a468f73f607881dfdf06adfe6d1fc9ebd66b21e4c245f837 -DIST libksba-1.6.6.tar.bz2 708510 BLAKE2B 9985b16e946d6b407b5acbf005610cfb2f01d2a733ddff110e329dec8d95bd248cce6e9936d441676a4b06f031cc9122e26146a0f6d36cb343fb9ec16aef3627 SHA512 3b30bef9452ae0c52b4a52e9145fbd6dc57cf7a2b59302e3af063db6b45384e8ed7af62604efd7939b9e0cb5931e946b15609888e9699fafe4acbb0cbf138087 -DIST libksba-1.6.6.tar.bz2.sig 238 BLAKE2B 0d62b39821dee0a3f921e87190247cacec1fcde253d26773a378f3a55a61468feba7b79fc875b1b2b8735f9ff310467dc30d8e5b5b06f37bd1ef4744a3fbfeec SHA512 053b594044ea2d5ad90341e14cf9969e3d8695e4671586cbcdf12d33c7864bf258fcf4474ea09db9612677cb239cb629d6b61799f684a1d838a57c0b53e27bf8 DIST libksba-1.6.7.tar.bz2 706437 BLAKE2B 95f51bc9a0a7ee14b91089aded3a420cf2f986a1599e39e36dc46fd0b71bef465af9c6576c19516d0aadae67399eca69ae0448239216ba486812884ebefa1ae7 SHA512 60cb9df9f502ca479818f45b78c4bc2b78f6f359be2b8da489ea98f8896a43ab2c20cf97526b79a3220fb32f1701e62a6481fe61e91e567186ecf4f33d8e64d3 DIST libksba-1.6.7.tar.bz2.sig 119 BLAKE2B 74b3fd7682ae526c7430fe3792f873838c366ec0de1d80b699370a8cefdfdfc386f883b1d45df8df62e64d9de992f4bbfa7f74cfbb38419694f1a11ff1d3110a SHA512 97df523f0640f8fed0c3c7603218058021475d5b0e47a36610aa88312a6bb5f302e1e2016f5721a9077d0d27b35b28c7c96d9843866c957c965b2c580d3ee60b diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.5.ebuild deleted file mode 100644 index 45f7d7ba863..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.5.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit toolchain-funcs out-of-source verify-sig libtool - -DESCRIPTION="X.509 and CMS (PKCS#7) library" -HOMEPAGE="https://www.gnupg.org/related_software/libksba" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="LGPL-3+ GPL-2+ GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/libgpg-error-1.33" -DEPEND="${RDEPEND}" -BDEPEND=" - app-alternatives/yacc - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-1.6.0-no-fgrep-ksba-config.patch -) - -src_prepare() { - default - - elibtoolize # necessary on Solaris for shared lib support -} - -my_src_configure() { - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - - local myeconfargs=( - --disable-valgrind-tests - $(use_enable static-libs static) - - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" - ) - - econf "${myeconfargs[@]}" -} - -my_src_install() { - default - - # People need to use ksba-config for --cflags and --libs - find "${ED}" -type f -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.6.ebuild deleted file mode 100644 index 45f7d7ba863..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libksba/libksba-1.6.6.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Maintainers should: -# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ -# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 -# (find the one for the current release then subscribe to it + -# any subsequent ones linked within so you're covered for a while.) - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc -# in-source builds are not supported: https://dev.gnupg.org/T6313#166339 -inherit toolchain-funcs out-of-source verify-sig libtool - -DESCRIPTION="X.509 and CMS (PKCS#7) library" -HOMEPAGE="https://www.gnupg.org/related_software/libksba" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" -SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" - -LICENSE="LGPL-3+ GPL-2+ GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="static-libs" - -RDEPEND=">=dev-libs/libgpg-error-1.33" -DEPEND="${RDEPEND}" -BDEPEND=" - app-alternatives/yacc - verify-sig? ( sec-keys/openpgp-keys-gnupg ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-1.6.0-no-fgrep-ksba-config.patch -) - -src_prepare() { - default - - elibtoolize # necessary on Solaris for shared lib support -} - -my_src_configure() { - export CC_FOR_BUILD="$(tc-getBUILD_CC)" - - local myeconfargs=( - --disable-valgrind-tests - $(use_enable static-libs static) - - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" - ) - - econf "${myeconfargs[@]}" -} - -my_src_install() { - default - - # People need to use ksba-config for --cflags and --libs - find "${ED}" -type f -name '*.la' -delete || die -} From 211e10ea5ce6ffe135ede35ef5b94376afb05377 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:36 +0000 Subject: [PATCH 037/145] dev-libs/libltdl: Sync with Gentoo It's from Gentoo commit 0e5810cb2cc85e0421ae3cf947e64bbdc8a43120. --- .../portage-stable/dev-libs/libltdl/Manifest | 1 - .../dev-libs/libltdl/libltdl-2.5.3.ebuild | 48 ------------------- .../dev-libs/libltdl/libltdl-2.5.4.ebuild | 2 +- 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest index 8d83e556484..b5e24ed5bf6 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest @@ -1,3 +1,2 @@ DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da -DIST libtool-2.5.3.tar.xz 1050076 BLAKE2B e7bc3421d2273851f894583b879c897239bddaef00dc335176f00ce971d3c77e4d4304ae3b1d1b97d4b6b1b4fd9859ddc0eb5dcadac2e0de959b68cae973f726 SHA512 7a2b86716b2cbefcd45bda7f65af81fcb0aaa3dce96b09f417d6b94721a4dd9e72a9552862783d998ddf785e509315bb49f65c464dbc949d58e36f0960cf9b1b DIST libtool-2.5.4.tar.xz 1056924 BLAKE2B 47de3c49a690d44d7ddd5e3b5e4090c91dc5fbb9c40fc4a3963e150fb7329326ee3e21b8c149974726171c4b0380028e0efc7a369c4f04357eea46f69852e1cc SHA512 eed207094bcc444f4bfbb13710e395e062e3f1d312ca8b186ab0cbd22dc92ddef176a0b3ecd43e02676e37bd9e328791c59a38ef15846d4eae15da4f20315724 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.3.ebuild deleted file mode 100644 index b367c10d5e4..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.3.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-build/libtool. - -inherit multilib-minimal flag-o-matic - -MY_P="libtool-${PV}" - -DESCRIPTION="A shared library tool for developers" -HOMEPAGE="https://www.gnu.org/software/libtool/" -if false && ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then - SRC_URI="https://alpha.gnu.org/gnu/libtool/${MY_P}.tar.xz" -else - SRC_URI="mirror://gnu/libtool/${MY_P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -S="${WORKDIR}"/${MY_P}/libltdl - -LICENSE="GPL-2" -SLOT="0" -IUSE="static-libs" -# libltdl doesn't have a testsuite. Don't bother trying. -RESTRICT="test" - -BDEPEND="app-arch/xz-utils" - -multilib_src_configure() { - # bug #907427 - filter-lto - - append-lfs-flags - ECONF_SOURCE="${S}" \ - econf \ - --enable-ltdl-install \ - $(use_enable static-libs static) -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - # While the libltdl.la file is not used directly, the m4 ltdl logic - # keys off of its existence when searching for ltdl support. # bug #293921 - #use static-libs || find "${D}" -name libltdl.la -delete -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.4.ebuild index 93790c2c82b..54e89859efc 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.5.4.ebuild @@ -15,7 +15,7 @@ if false && ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then SRC_URI="https://alpha.gnu.org/gnu/libtool/${MY_P}.tar.xz" else SRC_URI="mirror://gnu/libtool/${MY_P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi S="${WORKDIR}"/${MY_P}/libltdl From 8cbd2a3719144dc4b1bff27a423ddd8a95118493 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:45 +0000 Subject: [PATCH 038/145] dev-libs/libxml2: Sync with Gentoo It's from Gentoo commit 81abbf8de0338022f9f423c67b5a199f9dd96025. --- .../portage-stable/dev-libs/libxml2/libxml2-2.12.9.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libxml2/libxml2-2.12.9.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libxml2/libxml2-2.12.9.ebuild index b8ac21f2695..32d2937863d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/libxml2/libxml2-2.12.9.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/libxml2/libxml2-2.12.9.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,7 +23,7 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 else inherit gnome.org - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi SRC_URI+=" From 7d8f17498bff75a3af8687ec840ee7d356a59423 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:53 +0000 Subject: [PATCH 039/145] dev-libs/protobuf: Sync with Gentoo It's from Gentoo commit d4f51336b058fe58fbb6e4f9de803ef52c2a5ae6. --- .../portage-stable/dev-libs/protobuf/Manifest | 1 + .../dev-libs/protobuf/protobuf-25.6.ebuild | 169 ++++++++++++++++++ .../dev-libs/protobuf/protobuf-29.2.ebuild | 2 +- .../dev-libs/protobuf/protobuf-9999.ebuild | 7 +- 4 files changed, 174 insertions(+), 5 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest index 92ff8602671..ba801668d16 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/Manifest @@ -7,6 +7,7 @@ DIST protobuf-24.4.tar.gz 5180235 BLAKE2B 1c7e9035d9f3810886baaea7d679414c882463 DIST protobuf-25.3.tar.gz 5878962 BLAKE2B 9268f9bd993a1cfd6d3937a2ad56ba4cfe3d84923756513841cbf13039d4a07acb260468745cb1294f30334cb34b45c6fde272f5c40d9de63ac6a4ce5c263077 SHA512 1f73e237c919082e5423ae9e2ea8813dccf672c059051d1531fe89ffaa45872d3cf3052b8c3af26f674296ec17d7dc861c67b8f0834ed80261ce4a6a14ed7115 DIST protobuf-25.4.tar.gz 5878444 BLAKE2B 9b40985bda31a84dd3ab7a1d18f746d5f88660d9e036a20234cbc85e79322005d2ffd4e60d72c55a8b5f624d7cc50522771f0804f203f2eabca7b0b8ace0545e SHA512 1b3ba1a1575bcc9d52ddce93d466912863d600dfbb40f64845b8e66c8000047d05508b8f1baba8d5eef42a7ff90eb778f7c8a553c9ec2778fd3a9a18122c67ab DIST protobuf-25.5.tar.gz 5877036 BLAKE2B a8174c7cbda47afa3f31d64c7a7aa7f233efd5df5a783abedd229613c8c27a2380684fb5851dad67f76f063688dd8060a0a373f2c95441c2ad91630eb187af22 SHA512 9fe130f5c04919accc99113e13096df93db4c2254a9c2428faf9459416907c77fbf4adefbae3fe644e1f26d9c1fc597165e2c5b6219156c97500d6ef3fdc0793 +DIST protobuf-25.6.tar.gz 5878040 BLAKE2B b82848406890460d9321e6736e413290e1b4a73dc5f2d3db17dd4419e7ddbb788b6cdb52c884c3e7f0c49c5a69ce31468dcc311d73efca06f94ec51577472fcc SHA512 f1920414bbaed0a882b73349e1cd9cdf87c0d9c99790d70ab8ef589161a8dcad92361daec67bf9bf8350f4181fa8514b50362f1495f082ba5805c4a2e70b6308 DIST protobuf-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4 DIST protobuf-27.2.tar.gz 6282174 BLAKE2B 86d12e9f87e8e1c2961ad517115c8689a8dd984722513816d8d626e59a76f5e7a698a90cbf6007daacf66c6053c9ff28108ff113579a442ce61cd221178bda44 SHA512 664c66b62cf1ed0c65d9b910d8e67d4d5d471113697f1b8edf1573cd5c0fc8e850ac53ce984e48e6c6b9cbbefa12f8530058384e7388e65a59c1e46d03772397 DIST protobuf-27.4.tar.gz 9156456 BLAKE2B 004427f4923e523bf77298600bf91a8fe4ca8be4bd6da5b7efcfe9186a032155e525426f83f683e1bed1e799ed1e62d250053386c1463cbd0c062bd05da786d0 SHA512 d076ce7e075096d0dba7ee2314b12e3223c4239c019e25670636a0ef812ddf0ce3f1fd9b9fe8517319db87b14bbdb2653cc4e06023f90032dfedb014457b2863 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild new file mode 100644 index 00000000000..6a9820f1a03 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-25.6.ebuild @@ -0,0 +1,169 @@ +# Copyright 2008-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib elisp-common multilib + +# NOTE from https://github.com/protocolbuffers/protobuf/blob/main/.gitmodules +ABSEIL_BRANCH="lts_2023_08_02" + +ABSEIL_MIN_VER="${ABSEIL_BRANCH//lts_}" +ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" + +if [[ "${PV}" == *9999 ]]; then + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" + EGIT_SUBMODULES=( '-*' ) + MY_SLOT="28.0" + + inherit git-r3 +else + SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + MY_SLOT=$(ver_cut 1-2) +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://protobuf.dev/" + +LICENSE="BSD" +SLOT="0/${MY_SLOT}.0" +IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" + +# Require protobuf for the time being +REQUIRED_USE=" + protobuf + examples? ( protobuf protoc ) + libprotoc? ( protobuf ) + libupb? ( protobuf ) + protoc? ( protobuf ) +" + +RESTRICT="!test? ( test )" + +BDEPEND=" + emacs? ( app-editors/emacs:* ) +" + +COMMON_DEPEND=" + >=dev-cpp/abseil-cpp-${ABSEIL_MIN_VER}:=[${MULTILIB_USEDEP}] + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] ) +" + +DEPEND=" + ${COMMON_DEPEND} + conformance? ( dev-libs/jsoncpp[${MULTILIB_USEDEP}] ) + test? ( >=dev-cpp/gtest-1.11[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${COMMON_DEPEND} + ${BDEPEND} +" + +PATCHES=( + "${FILESDIR}/${PN}-26.1-disable-32-bit-tests.patch" + "${FILESDIR}/${PN}-23.3-static_assert-failure.patch" + "${FILESDIR}/${PN}-27.4-findJsonCpp.patch" +) + +DOCS=( CONTRIBUTORS.txt README.md ) + +src_prepare() { + cmake_src_prepare + + cp "${FILESDIR}/FindJsonCpp.cmake" "${S}/cmake" || die +} + +multilib_src_configure() { + local mycmakeargs=( + -Dprotobuf_ABSL_PROVIDER="package" + -Dprotobuf_JSONCPP_PROVIDER="package" + + -Dprotobuf_BUILD_CONFORMANCE="$(usex test "$(usex conformance)")" + -Dprotobuf_BUILD_LIBPROTOC="$(usex libprotoc)" + -Dprotobuf_BUILD_LIBUPB="$(usex libupb)" + -Dprotobuf_BUILD_PROTOBUF_BINARIES="$(usex protobuf)" + -Dprotobuf_BUILD_PROTOC_BINARIES="$(usex protoc)" + -Dprotobuf_BUILD_SHARED_LIBS="yes" + -Dprotobuf_BUILD_TESTS="$(usex test)" + + -Dprotobuf_DISABLE_RTTI="no" + + -Dprotobuf_INSTALL="yes" + -Dprotobuf_TEST_XML_OUTDIR="$(usex test)" + + -Dprotobuf_WITH_ZLIB="$(usex zlib)" + -Dprotobuf_VERBOSE="$(usex debug)" + -DCMAKE_MODULE_PATH="${S}/cmake" + ) + if use protobuf ; then + if use examples ; then + mycmakeargs+=( + -Dprotobuf_BUILD_EXAMPLES="$(usex examples)" + -Dprotobuf_INSTALL_EXAMPLES="$(usex examples)" + ) + fi + fi + + use test && mycmakeargs+=( -Dprotobuf_USE_EXTERNAL_GTEST="yes" ) + + cmake_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +src_test() { + local -x srcdir="${S}/src" + + local -x TEST_TMPDIR="${T%/}/TEST_TMPDIR_${ABI}" + mkdir -m 777 "${TEST_TMPDIR}" || die + + setup_test_env() { + ln -sr "${S}/src" "${BUILD_DIR}/include" || die + } + + multilib_foreach_abi setup_test_env + + cmake-multilib_src_test +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" ]]; then + eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \ + "Expected value: ${ED}/usr/$(get_libdir)/libprotobuf$(get_libname ${SLOT#*/})" + die "Please update SLOT variable" + fi + + insinto /usr/share/vim/vimfiles/syntax + doins editors/proto.vim + insinto /usr/share/vim/vimfiles/ftdetect + doins "${FILESDIR}/proto.vim" + + if use emacs; then + elisp-install "${PN}" editors/protobuf-mode.el* + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el" + fi + + if use examples; then + DOCS+=(examples) + docompress -x "/usr/share/doc/${PF}/examples" + fi + + einstalldocs +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.2.ebuild index 3080cc281d8..90c31cdfe7a 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-29.2.ebuild @@ -19,7 +19,7 @@ if [[ "${PV}" == *9999 ]]; then inherit git-r3 else SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" MY_SLOT=$(ver_cut 1-2) fi diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild index 3080cc281d8..42712e4699f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-9999.ebuild @@ -14,20 +14,19 @@ ABSEIL_MIN_VER="${ABSEIL_MIN_VER//_/}" if [[ "${PV}" == *9999 ]]; then EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git" EGIT_SUBMODULES=( '-*' ) - MY_SLOT="28.0" + SLOT="0/9999" inherit git-r3 else SRC_URI="https://github.com/protocolbuffers/protobuf/releases/download/v${PV}/${P}.tar.gz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" - MY_SLOT=$(ver_cut 1-2) + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" + SLOT="0/$(ver_cut 1-2).0" fi DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" HOMEPAGE="https://protobuf.dev/" LICENSE="BSD" -SLOT="0/${MY_SLOT}.0" IUSE="conformance debug emacs examples +libprotoc libupb +protobuf +protoc test zlib" # Require protobuf for the time being From 3424caba488035855e3abf8684a195965c7e3bfb Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:05:54 +0000 Subject: [PATCH 040/145] dev-libs/xmlsec: Sync with Gentoo It's from Gentoo commit 11c8c4299952b623de821784d8276767201d3473. --- .../portage-stable/dev-libs/xmlsec/xmlsec-1.3.6.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.6.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.6.ebuild index 2021483cd92..78ba551e9c1 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.6.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/xmlsec/xmlsec-1.3.6.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -16,7 +16,7 @@ S="${WORKDIR}/${PN}1-${PV}" LICENSE="MIT" # Upstream consider major version bumps to be changes in either X or Y in X.Y.Z SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86" IUSE="doc gcrypt gnutls http nss +openssl static-libs test" RESTRICT="!test? ( test )" REQUIRED_USE=" From 7121551632a89722d687cf1c85cbd4724f1bf819 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:08 +0000 Subject: [PATCH 041/145] dev-python/ensurepip-setuptools: Sync with Gentoo It's from Gentoo commit 35101cdf00325283df75dce051d91a80e3166777. --- .../dev-python/ensurepip-setuptools/Manifest | 2 -- .../ensurepip-setuptools-75.6.0.ebuild | 20 ------------------- .../ensurepip-setuptools-75.7.0.ebuild | 20 ------------------- .../ensurepip-setuptools-75.8.0.ebuild | 2 +- 4 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.6.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.7.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/Manifest index 0bd2860b9e9..95569b2f0ce 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/Manifest @@ -1,3 +1 @@ -DIST setuptools-75.6.0-py3-none-any.whl 1224032 BLAKE2B 7a91cf811611082234c0d4d52970f81126c5908f6ef1fe8455e33870c6872d86181447bdb052e21a145558cd259983e73b6e18128a7d9f42478c716816c74394 SHA512 2c80b0bbcfa0d09a8a380b60ef9512d387129fba233e1aab83279caa5ca53ecc252f060edaef9ed00eb6d79312cd10fed82dd2491b723d50940828d1766aee89 -DIST setuptools-75.7.0-py3-none-any.whl 1224467 BLAKE2B a08aa2c039769980c4b895f224846c8977abefeb6980fc383fd49569107de7e2f59e8833ced4830641f1e8df94c9e48e50b122a8ca2cf1ac22cc5959c0032dd9 SHA512 52360623989144e511426d948647d091925f705a417892e3ba9ae62267ca3dcd3365a493e809329da0b4673afeb51a5247113c2807d66d872267c26b4e7b76ef DIST setuptools-75.8.0-py3-none-any.whl 1228782 BLAKE2B 0e53d2e2d3666bce8072b23556c77a013a6db704eaa1b582a37defcd5691bb6cc66533bc9edc164911e5e5839c0c418571052a696c5c9a98b289ea232d045a38 SHA512 02760ed1215eefe7ad4beae24243fa6372d47b975a060dd69d5c521c6c53fe9ba1a6e73f39448ed9471b89371d19273824becbc8471da40cf43d3c799f0b50cf diff --git a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.6.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.6.0.ebuild deleted file mode 100644 index 4d3a3181338..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.6.0.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit pypi - -DESCRIPTION="Shared setuptools wheel for ensurepip Python module" -HOMEPAGE="https://pypi.org/project/setuptools/" -SRC_URI="$(pypi_wheel_url "${PN#ensurepip-}")" -S=${DISTDIR} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -src_install() { - insinto /usr/lib/python/ensurepip - doins "${A}" -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.7.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.7.0.ebuild deleted file mode 100644 index b76c3f6972d..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.7.0.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit pypi - -DESCRIPTION="Shared setuptools wheel for ensurepip Python module" -HOMEPAGE="https://pypi.org/project/setuptools/" -SRC_URI="$(pypi_wheel_url "${PN#ensurepip-}")" -S=${DISTDIR} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -src_install() { - insinto /usr/lib/python/ensurepip - doins "${A}" -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.8.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.8.0.ebuild index b76c3f6972d..473fddfd3cc 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.8.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/ensurepip-setuptools-75.8.0.ebuild @@ -12,7 +12,7 @@ S=${DISTDIR} LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" src_install() { insinto /usr/lib/python/ensurepip From 5efa7278d26a2f9e517af5ffc4267d2c8627b287 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:29 +0000 Subject: [PATCH 042/145] dev-python/more-itertools: Sync with Gentoo It's from Gentoo commit c451e6bf71c693ec75a948b89b202263d6b36bb5. --- .../dev-python/more-itertools/Manifest | 1 + .../more-itertools-10.6.0.ebuild | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-python/more-itertools/more-itertools-10.6.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/Manifest index 2cb8e7dac33..585448cbb56 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/Manifest @@ -1 +1,2 @@ DIST more-itertools-10.5.0.tar.gz 121020 BLAKE2B 16ab278873f4d7de97f61a2e865ff8561baa0aacd743c7483138c3dc7c8a219609ae80a0ff30bfc22f7064bfed45d764f17e35c2780ac6caf3a24231ab544e9b SHA512 fdb56b6bce26b335da61ae3a4bd0154a78389786132f62eaea53f0e8ee603c5609e35c69baccaac57935e81f839409b70f94cb8bbab9d541b0964a2c929c8168 +DIST more-itertools-10.6.0.tar.gz 125009 BLAKE2B f4bade093a730f7daf035d698bfb0fb8f0f8aa6832546e30f9e6d0c39aef96e9cd326d73682c7fa5458f7e75511d759c443a58fed96e831d11375818abb020d8 SHA512 57322c80252e79d1ef82fe5cfc3a3f0208ab6f90d2e59c47491974c23fc30ad1b48d1671c06507b0489b2bdb240c52dee5419a19b96ae06a3d2bdb3a3b483eab diff --git a/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/more-itertools-10.6.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/more-itertools-10.6.0.ebuild new file mode 100644 index 00000000000..3fe77bf8eaa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/more-itertools/more-itertools-10.6.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{10..13} python3_13t pypy3 ) + +inherit distutils-r1 pypi + +DESCRIPTION="More routines for operating on iterables, beyond itertools" +HOMEPAGE=" + https://github.com/more-itertools/more-itertools/ + https://pypi.org/project/more-itertools/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + +distutils_enable_sphinx docs \ + dev-python/sphinx-rtd-theme +distutils_enable_tests unittest From 4663c2da526a91b3fee80e5b2d825f520452ccf4 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:34 +0000 Subject: [PATCH 043/145] dev-python/pillow: Sync with Gentoo It's from Gentoo commit 57aa973c8f342594619c02d915ffe76f917dbe33. --- .../portage-stable/dev-python/pillow/Manifest | 4 - .../pillow/files/pillow-10.3.0-py313.patch | 23 --- .../pillow-11.0.0-automagic-disable.patch | 26 --- .../files/pillow-11.0.0-wrong-arg.patch | 32 ---- .../dev-python/pillow/pillow-10.2.0-r1.ebuild | 131 --------------- .../dev-python/pillow/pillow-10.3.0.ebuild | 139 ---------------- .../dev-python/pillow/pillow-10.4.0.ebuild | 137 ---------------- .../dev-python/pillow/pillow-11.0.0-r1.ebuild | 149 ----------------- .../dev-python/pillow/pillow-11.0.0-r2.ebuild | 151 ------------------ .../dev-python/pillow/pillow-11.0.0.ebuild | 136 ---------------- .../dev-python/pillow/pillow-11.1.0.ebuild | 2 +- 11 files changed, 1 insertion(+), 929 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-10.3.0-py313.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-automagic-disable.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-wrong-arg.patch delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.2.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.3.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.4.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/pillow/Manifest index f4a38677adf..4f95ca51fa5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/pillow/Manifest @@ -1,5 +1 @@ -DIST pillow-10.2.0.gh.tar.gz 46244216 BLAKE2B 27bb076f0adade34295e6dfec5c5a1499471036e4f5358f0b3985c064a0ae962be9e91985851b369a49162ef520a84bb20eb1a5acb074fe94d861f042e4ada92 SHA512 d77ebedfb89d541db2fcba4fc354e097b9917594170bad07c67e22de123c9e0bbc9c55a938fc152bbdcca3ce23de6fa374a6d3d3bdbd44f16dbc2616c1bddf60 -DIST pillow-10.3.0.gh.tar.gz 46636534 BLAKE2B 523486a3adc8905dbe0691e7092654e7884c34703f351e228a49b1cb6e9cffdf504b842aa0c83b18afb8f0dbe1265274044003aba540d6427ec3cd46ddda1498 SHA512 11095f435ba30ac364575271de4c94d498b6fc1d67730b8212fae6f187902129018ca950aa878843f4d1b29e25aab1be245ed313fd3bc110ccf9ce3ae266d840 -DIST pillow-10.4.0.gh.tar.gz 46617167 BLAKE2B 3eb7852ab087d18e5b9a03d6cbf83ead96b637a71d4209a4574d66c9d098936d240c0be3235d9e951ec094b9b0def196b265a8e68f59802f843171c74ca7bbac SHA512 835a8766c384ec3fcf67b42c9bbad35dad0848cc5bd9eba1b0768a864e174a1d9c4a5e989f22496a40f2c29dd7f492f6f80465903fe872b10749cfa0340e1bc5 -DIST pillow-11.0.0.gh.tar.gz 46807844 BLAKE2B c91b92152d2f763fd20a74e2bddf413a669430074b8c5304b623ff63df177346ec4031e928fbc9765e1e0ca5f21cc101d5b7688a09dea19c5828f0cea02fe018 SHA512 0a74d7b12311acb3c9b39af87dc4e1e2ecae22134300a2a8c979daa3947a20f78bf77a93cd7f0029e98936a07e8d5e4fae826322fe0ccc1d1a8200350f9cbb7b DIST pillow-11.1.0.gh.tar.gz 46815201 BLAKE2B 7990683c90359e0a72e17a13e1a29455bc3ace8ce3616d6af59360edfc1ac87541bd1fd6967160bd8d7dd25cfedfc9d2e9b058c3ed433a6208379834f15bc312 SHA512 bb0622fae0b9c3903ddd945dced8e2b94348b2bd06c14bc74da00d8aa3a795aab2daaff39ca6c40b712dcce4f10218cd30739f0eb616c9dfbc16efcf80886f1e diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-10.3.0-py313.patch b/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-10.3.0-py313.patch deleted file mode 100644 index 1574d6be3ce..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-10.3.0-py313.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 57399ce204d79c74c80612c622bb788e20d786e8 Mon Sep 17 00:00:00 2001 -From: Andrew Murray -Date: Fri, 10 May 2024 22:43:56 +1000 -Subject: [PATCH] Parse _version contents instead of using exec() - ---- - setup.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index 7d8e1c1ee21..abdd87ea252 100644 ---- a/setup.py -+++ b/setup.py -@@ -23,8 +23,7 @@ - def get_version(): - version_file = "src/PIL/_version.py" - with open(version_file, encoding="utf-8") as f: -- exec(compile(f.read(), version_file, "exec")) -- return locals()["__version__"] -+ return f.read().split('"')[1] - - - configuration = {} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-automagic-disable.patch b/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-automagic-disable.patch deleted file mode 100644 index 81bd47dc4a8..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-automagic-disable.patch +++ /dev/null @@ -1,26 +0,0 @@ -https://bugs.gentoo.org/947136 -https://github.com/python-pillow/Pillow/issues/8468 -https://github.com/python-pillow/Pillow/pull/8469 - -From 7c194b54ef3e7a04c5b669353622687075b5ebb4 Mon Sep 17 00:00:00 2001 -From: Andrew Murray -Date: Wed, 16 Oct 2024 21:37:14 +1100 -Subject: [PATCH] Fixed disabling a feature - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 60707083f6e..def3417845d 100644 ---- a/setup.py -+++ b/setup.py -@@ -389,7 +389,7 @@ def finalize_options(self) -> None: - pass - for x in self.feature: - if getattr(self, f"disable_{x}"): -- setattr(self.feature, x, False) -+ self.feature.set(x, False) - self.feature.required.discard(x) - _dbg("Disabling %s", x) - if getattr(self, f"enable_{x}"): diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-wrong-arg.patch b/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-wrong-arg.patch deleted file mode 100644 index 3337b8c4be2..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/files/pillow-11.0.0-wrong-arg.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 180c1d1ef0c0ef12e0c56adfe10c7779dff3b55f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Sun, 3 Nov 2024 16:35:54 +0100 -Subject: [PATCH] Revert "Corrected passing TIFF_LONG to libtiff" - -This is the wrong solution to the problem at hand, and results -in passing an int64_t where libtiff expects uint32_t. This seems -to miraculously work on most of our platforms but it is clearly wrong, -and it breaks ppc32. - -Bug: https://github.com/python-pillow/Pillow/issues/8522 -Reverts: b1b0353d17bcdca99cfcb2ea48c6af7861fb43ba ---- - src/encode.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/encode.c b/src/encode.c -index 1a4cd489d..ba350c39a 100644 ---- a/src/encode.c -+++ b/src/encode.c -@@ -929,7 +929,7 @@ PyImaging_LibTiffEncoderNew(PyObject *self, PyObject *args) { - ); - } else if (type == TIFF_LONG) { - status = ImagingLibTiffSetField( -- &encoder->state, (ttag_t)key_int, PyLong_AsLongLong(value) -+ &encoder->state, (ttag_t)key_int, (UINT32)PyLong_AsLong(value) - ); - } else if (type == TIFF_SSHORT) { - status = ImagingLibTiffSetField( --- -2.47.0 - diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.2.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.2.0-r1.ebuild deleted file mode 100644 index c9d3ec32f1c..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.2.0-r1.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..12} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - ${RDEPEND} - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_DESELECT=( - # TODO; incompatible Qt version? - Tests/test_qt_image_qapplication.py::test_sanity -) - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${P}-cross.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - # It's important that these flags are also passed during the install phase - # as well. Make sure of that if you change the lines below. See bug 661308. - cat >> setup.cfg <<-EOF || die - [build_ext] - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil webp)_webpmux = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - - # We have patched in this env var. - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - ) - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - # no:relaxed: pytest-relaxed plugin make our tests fail. deactivate if installed - epytest -p no:relaxed || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.3.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.3.0.ebuild deleted file mode 100644 index 81b77d909bc..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.3.0.ebuild +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${PN}-10.2.0-cross.patch" - # https://github.com/python-pillow/Pillow/pull/8050 - "${FILESDIR}/${P}-py313.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - debug = True - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil webp)_webpmux = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - if use truetype; then - # these dependencies are implicitly disabled by USE=-truetype - # and we can't pass both disable_* and vendor_* - # https://bugs.gentoo.org/935124 - cat >> setup.cfg <<-EOF || die - vendor_raqm = False - vendor_fribidi = False - EOF - fi - - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - # requires xz-utils[extra-filters]? - Tests/test_file_libtiff.py::TestFileLibTiff::test_lzma - ) - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - # leak tests are fragile and broken under xdist - epytest -k "not leak" -p timeout || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.4.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.4.0.ebuild deleted file mode 100644 index 4b882d2ca2d..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-10.4.0.ebuild +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${PN}-10.2.0-cross.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - debug = True - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil webp)_webpmux = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - if use truetype; then - # these dependencies are implicitly disabled by USE=-truetype - # and we can't pass both disable_* and vendor_* - # https://bugs.gentoo.org/935124 - cat >> setup.cfg <<-EOF || die - vendor_raqm = False - vendor_fribidi = False - EOF - fi - - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - # requires xz-utils[extra-filters]? - Tests/test_file_libtiff.py::TestFileLibTiff::test_lzma - ) - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - # leak tests are fragile and broken under xdist - epytest -k "not leak" -p timeout || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r1.ebuild deleted file mode 100644 index 3ffd135f83d..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r1.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${PN}-10.2.0-cross.patch" - # https://github.com/python-pillow/Pillow/issues/8522 - "${FILESDIR}/${P}-wrong-arg.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - debug = True - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - if use truetype; then - # these dependencies are implicitly disabled by USE=-truetype - # and we can't pass both disable_* and vendor_* - # https://bugs.gentoo.org/935124 - cat >> setup.cfg <<-EOF || die - vendor_raqm = False - vendor_fribidi = False - EOF - fi - - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - # requires xz-utils[extra-filters]? - Tests/test_file_libtiff.py::TestFileLibTiff::test_lzma - ) - - case ${ARCH} in - ppc) - EPYTEST_DESELECT+=( - # https://github.com/python-pillow/Pillow/issues/7008 - # (we've reverted the upstream patch because it was worse - # than the original issue) - Tests/test_file_libtiff.py::TestFileLibTiff::test_exif_ifd - ) - ;; - esac - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - # leak tests are fragile and broken under xdist - epytest -k "not leak" -p timeout || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r2.ebuild deleted file mode 100644 index 95d2098b332..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0-r2.ebuild +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${PN}-10.2.0-cross.patch" - # https://github.com/python-pillow/Pillow/issues/8522 - "${FILESDIR}/${P}-wrong-arg.patch" - # https://github.com/python-pillow/Pillow/pull/8469 - "${FILESDIR}/${P}-automagic-disable.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - debug = True - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - if use truetype; then - # these dependencies are implicitly disabled by USE=-truetype - # and we can't pass both disable_* and vendor_* - # https://bugs.gentoo.org/935124 - cat >> setup.cfg <<-EOF || die - vendor_raqm = False - vendor_fribidi = False - EOF - fi - - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - # requires xz-utils[extra-filters]? - Tests/test_file_libtiff.py::TestFileLibTiff::test_lzma - ) - - case ${ARCH} in - ppc) - EPYTEST_DESELECT+=( - # https://github.com/python-pillow/Pillow/issues/7008 - # (we've reverted the upstream patch because it was worse - # than the original issue) - Tests/test_file_libtiff.py::TestFileLibTiff::test_exif_ifd - ) - ;; - esac - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - # leak tests are fragile and broken under xdist - epytest -k "not leak" -p timeout || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0.ebuild deleted file mode 100644 index 1545baf3567..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.0.0.ebuild +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_EXT=1 -# setuptools wrapper -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE='tk?,threads(+)' - -inherit distutils-r1 toolchain-funcs virtualx - -MY_PN=Pillow -MY_P=${MY_PN}-${PV} - -DESCRIPTION="Python Imaging Library (fork)" -HOMEPAGE=" - https://python-pillow.org/ - https://github.com/python-pillow/Pillow/ - https://pypi.org/project/pillow/ -" -SRC_URI=" - https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" -S="${WORKDIR}/${MY_P}" - -LICENSE="HPND" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" -IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" -REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" -RESTRICT="!test? ( test )" - -DEPEND=" - imagequant? ( media-gfx/libimagequant:= ) - jpeg? ( media-libs/libjpeg-turbo:= ) - jpeg2k? ( media-libs/openjpeg:2= ) - lcms? ( media-libs/lcms:2= ) - tiff? ( media-libs/tiff:=[jpeg,zlib] ) - truetype? ( media-libs/freetype:2= ) - webp? ( media-libs/libwebp:= ) - xcb? ( x11-libs/libxcb ) - zlib? ( sys-libs/zlib:= ) -" -RDEPEND=" - ${DEPEND} - dev-python/olefile[${PYTHON_USEDEP}] -" -BDEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - dev-python/wheel[${PYTHON_USEDEP}] - virtual/pkgconfig - test? ( - dev-python/defusedxml[${PYTHON_USEDEP}] - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - || ( - media-gfx/imagemagick[png] - media-gfx/graphicsmagick[png] - ) - ) -" - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -PATCHES=( - # https://github.com/python-pillow/pillow/pull/7634 - "${FILESDIR}/${PN}-10.2.0-cross.patch" -) - -usepil() { - usex "${1}" enable disable -} - -python_configure_all() { - cat >> setup.cfg <<-EOF || die - [build_ext] - debug = True - disable_platform_guessing = True - $(usepil truetype)_freetype = True - $(usepil jpeg)_jpeg = True - $(usepil jpeg2k)_jpeg2000 = True - $(usepil lcms)_lcms = True - $(usepil tiff)_tiff = True - $(usepil imagequant)_imagequant = True - $(usepil webp)_webp = True - $(usepil xcb)_xcb = True - $(usepil zlib)_zlib = True - EOF - if use truetype; then - # these dependencies are implicitly disabled by USE=-truetype - # and we can't pass both disable_* and vendor_* - # https://bugs.gentoo.org/935124 - cat >> setup.cfg <<-EOF || die - vendor_raqm = False - vendor_fribidi = False - EOF - fi - - tc-export PKG_CONFIG -} - -src_test() { - virtx distutils-r1_src_test -} - -python_test() { - local EPYTEST_DESELECT=( - # TODO (is clipboard unreliable in Xvfb?) - Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard - # requires xz-utils[extra-filters]? - Tests/test_file_libtiff.py::TestFileLibTiff::test_lzma - ) - - "${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}" - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - # leak tests are fragile and broken under xdist - epytest -k "not leak" -p timeout || die "Tests failed with ${EPYTHON}" -} - -python_install() { - python_doheader src/libImaging/*.h - distutils-r1_python_install -} - -python_install_all() { - if use examples ; then - docinto example - dodoc docs/example/* - docompress -x /usr/share/doc/${PF}/example - fi - distutils-r1_python_install_all -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.1.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.1.0.ebuild index 627cfd511ac..b60acd1a51f 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.1.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/pillow/pillow-11.1.0.ebuild @@ -28,7 +28,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="HPND" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos" IUSE="examples imagequant +jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib" REQUIRED_USE="test? ( jpeg jpeg2k lcms tiff truetype )" RESTRICT="!test? ( test )" From 22adb9472d5d22aa9d81e901d6194c0021e5d601 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:41 +0000 Subject: [PATCH 044/145] dev-python/pygments: Sync with Gentoo It's from Gentoo commit a6fd898cebc87f7d8b5f39fad7b9f0270f076d2f. --- .../dev-python/pygments/Manifest | 2 - .../pygments/pygments-2.18.0.ebuild | 46 ------------------- .../pygments/pygments-2.19.0.ebuild | 46 ------------------- .../pygments/pygments-2.19.1.ebuild | 2 +- 4 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.18.0.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pygments/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/pygments/Manifest index d452f23483b..e3285e99b30 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pygments/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/pygments/Manifest @@ -1,3 +1 @@ -DIST pygments-2.18.0.tar.gz 4891905 BLAKE2B 4ff1cc75ca348eecb96ecefe549a1e1c9a9cc81e1829a2354c70ce6f6e538bddbb9b7f90e781bbdd6433cee36e4a99fef9adaef95ca275d1be57a33ed8a77351 SHA512 2f696fed7f2120f9e3bd5f3d2837a5d6b883434b8d0f68d039c2620213508638cedf1517375019809720d56fc52f07e3bddd0defc4707703ace5d707908c00fb -DIST pygments-2.19.0.tar.gz 4967733 BLAKE2B 0240b876edc619623f9102ef5d88a1135c9229aa34ce44a7482d6004b3b2618c1d0727bd3a43c056a0b9f745aa3fac73a13eb9875a0cd1338c43482439ba0f74 SHA512 ac7b8c85b54acf65fc4de2202c25a0dfc35daf3ac8eacc9bbae5a07fa0b66bfb5fdedd952b0917773e4f4ce5359854b2e8c4ac368c2137e5b5a794b6f267ea74 DIST pygments-2.19.1.tar.gz 4968581 BLAKE2B 24bc120c4709af2f313010ed953a446bc29ee32269d47c3325067fea60c2a945376426a7c8d37e8916cc09e0534c2b6e63f69226768d6afd6e88dac875cc4419 SHA512 f8547b1eb032fb4c0ad15f1bb61bc6d8c25b309e61850a7ebe4e879fefe1ebb0acba53192d1294e8ef243613ba546e1e7ac7474ab1b49b1a1c1551c6733d9ec7 diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.18.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.18.0.ebuild deleted file mode 100644 index 073baf5caf0..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.18.0.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_PN=${PN^} -PYTHON_COMPAT=( python3_{10..13} pypy3 ) - -inherit distutils-r1 bash-completion-r1 pypi - -DESCRIPTION="Pygments is a syntax highlighting package written in Python" -HOMEPAGE=" - https://pygments.org/ - https://github.com/pygments/pygments/ - https://pypi.org/project/Pygments/ -" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos" - -BDEPEND=" - test? ( - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pillow[${PYTHON_USEDEP}] - dev-python/wcag-contrast-ratio[${PYTHON_USEDEP}] - virtual/ttf-fonts - ) -" - -EPYTEST_DESELECT=( - # fuzzing tests, very slow - tests/test_basic_api.py::test_random_input - # incompatibility with python-ctags3, apparently - # https://github.com/pygments/pygments/issues/2486 - tests/test_html_formatter.py::test_ctags -) - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -src_install() { - distutils-r1_src_install - newbashcomp external/pygments.bashcomp pygmentize -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.0.ebuild deleted file mode 100644 index 32672a54af5..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.0.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=hatchling -PYPI_PN=${PN^} -PYTHON_COMPAT=( python3_{10..13} pypy3 ) - -inherit distutils-r1 bash-completion-r1 pypi - -DESCRIPTION="Pygments is a syntax highlighting package written in Python" -HOMEPAGE=" - https://pygments.org/ - https://github.com/pygments/pygments/ - https://pypi.org/project/Pygments/ -" - -LICENSE="BSD-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos" - -BDEPEND=" - test? ( - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pillow[${PYTHON_USEDEP}] - dev-python/wcag-contrast-ratio[${PYTHON_USEDEP}] - virtual/ttf-fonts - ) -" - -EPYTEST_DESELECT=( - # fuzzing tests, very slow - tests/test_basic_api.py::test_random_input - # incompatibility with python-ctags3, apparently - # https://github.com/pygments/pygments/issues/2486 - tests/test_html_formatter.py::test_ctags -) - -EPYTEST_XDIST=1 -distutils_enable_tests pytest - -src_install() { - distutils-r1_src_install - newbashcomp external/pygments.bashcomp pygmentize -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.1.ebuild index 32672a54af5..ab3acbf4709 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/pygments/pygments-2.19.1.ebuild @@ -18,7 +18,7 @@ HOMEPAGE=" LICENSE="BSD-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos" BDEPEND=" test? ( From a742ba1401d963736b8cd77975b3bda77e6237c5 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:44 +0000 Subject: [PATCH 045/145] dev-python/rich: Sync with Gentoo It's from Gentoo commit e7bdbd86051c454557c5aa3d19dddc7028b4cc9f. --- .../portage-stable/dev-python/rich/Manifest | 2 - .../dev-python/rich/rich-13.7.1.ebuild | 74 ------------------ .../dev-python/rich/rich-13.9.3.ebuild | 77 ------------------- .../dev-python/rich/rich-13.9.4.ebuild | 4 +- 4 files changed, 2 insertions(+), 155 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.7.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/rich/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/rich/Manifest index 4622b9eef06..8af3d857f14 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/rich/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/rich/Manifest @@ -1,3 +1 @@ -DIST rich-13.7.1.gh.tar.gz 15058064 BLAKE2B 6fad18bf0a4e4f72e530c78db7a498f27dd8c9a7b9b17ca5ef12a94bbe513857f3c42d4903f8ebbfe8907727cddaf290f08862c27efb29db8aaf70c7bcb13ace SHA512 0c69101bc6c2a238a4c516812cda08299115b903b8282ee348b45b212a88fcbfbf69d11a3705a97bdb6192988ee3047804bb5b52b7950d860542cde8ce2d4bd2 -DIST rich-13.9.3.gh.tar.gz 15064090 BLAKE2B 4ef76583ed13692b9f4a9714a68186fd06262e76d691f79cd256b4ab153052efd5fdf2320df797683ea1765cf063215a6b2d2614cd8040ebed0b89178cdcf2e0 SHA512 ca74d59e5df0476b482f60fac8d1f2e0810ffa61a10d410ff188c82548df3307405119f3b18992d96b01458b921ebcd61c99bf68dd808358395e9b04cf78579b DIST rich-13.9.4.gh.tar.gz 15064359 BLAKE2B bf0bd53f3993fbfa309012b646d293799699040827c160a627fb4dbf292146e43b4a823606a6d9855d835f9739c1d75f539328aa093471db54adff44ef7d4e77 SHA512 36d9f0442759784453a75c9a80cd3dde113db5544d62da1eb85bc0572c16b6247da9b5254246fa571007ce0e70a234aea2ab1ed5dc20c1ec23084070733d39a1 diff --git a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.7.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.7.1.ebuild deleted file mode 100644 index c930ae408f0..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.7.1.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( python3_{10..13} pypy3 ) - -inherit distutils-r1 optfeature - -DESCRIPTION="Python library for rendering rich text, tables, etc. to the terminal" -HOMEPAGE=" - https://github.com/Textualize/rich/ - https://pypi.org/project/rich/ -" -SRC_URI=" - https://github.com/Textualize/rich/archive/v${PV}.tar.gz - -> ${P}.gh.tar.gz -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - -RDEPEND=" - dev-python/colorama[${PYTHON_USEDEP}] - >=dev-python/markdown-it-py-2.2.0[${PYTHON_USEDEP}] - >=dev-python/pygments-2.13.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - >=dev-python/attrs-21.4.0[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -python_test() { - local EPYTEST_DESELECT=( - # TODO - tests/test_console.py::test_size_can_fall_back_to_std_descriptors - # TODO: segfault in recursion (PyQt6 interfering?) - tests/test_traceback.py::test_recursive - ) - # version-specific output -- the usual deal - case ${EPYTHON} in - pypy3) - EPYTEST_DESELECT+=( - # pypy3.10, to be more precise - tests/test_inspect.py::test_inspect_integer_with_methods_python310only - ) - ;; - python3.13) - EPYTEST_DESELECT+=( - tests/test_inspect.py::test_inspect_builtin_function_except_python311 - tests/test_inspect.py::test_inspect_integer_with_methods_python38_and_python39 - tests/test_inspect.py::test_inspect_integer_with_methods_python310only - tests/test_inspect.py::test_inspect_integer_with_methods_python311 - tests/test_pretty.py::test_pretty_dataclass - tests/test_pretty.py::test_reference_cycle_dataclass - tests/test_pretty.py::test_max_depth_dataclass - tests/test_pretty.py::test_attrs_broken - ) - ;; - esac - - local -x COLUMNS=80 - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - epytest -} - -pkg_postinst() { - optfeature "integration with HTML widgets for Jupyter" dev-python/ipywidgets -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.3.ebuild deleted file mode 100644 index 6bcdf3a18c4..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.3.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 2022-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( python3_{10..13} pypy3 ) - -inherit distutils-r1 optfeature - -DESCRIPTION="Python library for rendering rich text, tables, etc. to the terminal" -HOMEPAGE=" - https://github.com/Textualize/rich/ - https://pypi.org/project/rich/ -" -SRC_URI=" - https://github.com/Textualize/rich/archive/v${PV}.tar.gz - -> ${P}.gh.tar.gz -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" - -RDEPEND=" - dev-python/colorama[${PYTHON_USEDEP}] - >=dev-python/markdown-it-py-2.2.0[${PYTHON_USEDEP}] - >=dev-python/pygments-2.13.0[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - >=dev-python/typing-extensions-4.0.0[${PYTHON_USEDEP}] - ' 3.10) -" -BDEPEND=" - test? ( - >=dev-python/attrs-21.4.0[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -python_test() { - local EPYTEST_DESELECT=( - # TODO - tests/test_console.py::test_size_can_fall_back_to_std_descriptors - # TODO: segfault in recursion (PyQt6 interfering?) - tests/test_traceback.py::test_recursive - ) - # version-specific output -- the usual deal - case ${EPYTHON} in - pypy3) - EPYTEST_DESELECT+=( - # pypy3.10, to be more precise - tests/test_inspect.py::test_inspect_integer_with_methods_python310only - ) - ;; - python3.13) - EPYTEST_DESELECT+=( - tests/test_inspect.py::test_inspect_builtin_function_except_python311 - tests/test_inspect.py::test_inspect_integer_with_methods_python38_and_python39 - tests/test_inspect.py::test_inspect_integer_with_methods_python310only - tests/test_inspect.py::test_inspect_integer_with_methods_python311 - tests/test_pretty.py::test_pretty_dataclass - tests/test_pretty.py::test_reference_cycle_dataclass - tests/test_pretty.py::test_max_depth_dataclass - tests/test_pretty.py::test_attrs_broken - ) - ;; - esac - - local -x COLUMNS=80 - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - epytest -} - -pkg_postinst() { - optfeature "integration with HTML widgets for Jupyter" dev-python/ipywidgets -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.4.ebuild index de21ed690f8..80df0e3fb36 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-13.9.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,7 +20,7 @@ SRC_URI=" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" RDEPEND=" dev-python/colorama[${PYTHON_USEDEP}] From 731aa6ec05e63687c7fd41172cb5692182998800 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:44 +0000 Subject: [PATCH 046/145] dev-python/setuptools: Sync with Gentoo It's from Gentoo commit 8663123693a001c067e1fc20ae6ad909130c95b4. --- .../dev-python/setuptools/Manifest | 2 - .../setuptools/setuptools-75.6.0-r1.ebuild | 130 ------------------ .../setuptools/setuptools-75.7.0.ebuild | 130 ------------------ .../setuptools/setuptools-75.8.0.ebuild | 2 +- 4 files changed, 1 insertion(+), 263 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.6.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.7.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/Manifest index 02a92c745c2..1e8dbbf9fd4 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/Manifest @@ -1,3 +1 @@ -DIST setuptools-75.6.0.tar.gz 1337429 BLAKE2B 65ba2e3de8dd0c86ab0ad59a5dc99a860ef5b59f357272eb2568347a496d853ef8e12a2d456dee3effe6f100bfb8d29e2f9f60123b58d791003ce3cddac23e8a SHA512 bdc12309165912f8de84e6f4ceaaf8f6b05dc1506a9205201784eb740346d773a7701af9b570cb13c272d81dcc0b4928e53ea1c4bb7c179debf479701c35bb6e -DIST setuptools-75.7.0.tar.gz 1338616 BLAKE2B df1a44a354fc48fc9bdbbea3883d0659f9865c1000b50dc8a329f6c8be9c9777b1f9cc6ce93e2e38cc53f46d08daadd470101913bf1a5992a50cd4049684c1fa SHA512 22cb119056efbfd5986eaa38ab37b24bdbbfd9903202fa031eb9a8acc4cbc1586df04bdf871eaaeeb09bfe1ad28d117e9b187f16d54afe26afc658295b5183f1 DIST setuptools-75.8.0.tar.gz 1343222 BLAKE2B a71cba4c11ede52aae24e8a8045f2733f93001b896ea4dd46ebdfa0dd639fccfcc24b038cf4f9b6363b768e98d66cbeac2331cbcd4bb38767ea73f1811a11837 SHA512 4afa657c5259f9f405c39d82d8c264236749861ba2b104e8b26dd49da8ffb27ad3089ea894f2bb65208f480d7a4042114b93228f1cf2b224dc248774d7681a3d diff --git a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.6.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.6.0-r1.ebuild deleted file mode 100644 index ee55ef5f35e..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.6.0-r1.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# please keep this ebuild at EAPI 8 -- sys-apps/portage dep -EAPI=8 - -# please bump dev-python/ensurepip-setuptools along with this package! - -DISTUTILS_USE_PEP517=standalone -PYTHON_TESTED=( python3_{10..13} pypy3 ) -PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t ) -PYTHON_REQ_USE="xml(+)" - -inherit distutils-r1 pypi - -DESCRIPTION="Collection of extensions to Distutils" -HOMEPAGE=" - https://github.com/pypa/setuptools/ - https://pypi.org/project/setuptools/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND=" - !=dev-python/jaraco-functools-4[${PYTHON_USEDEP}] - >=dev-python/jaraco-text-3.7.0-r1[${PYTHON_USEDEP}] - >=dev-python/more-itertools-8.12.0-r1[${PYTHON_USEDEP}] - >=dev-python/packaging-24.2[${PYTHON_USEDEP}] - >=dev-python/platformdirs-4.2.2[${PYTHON_USEDEP}] - >=dev-python/wheel-0.44.0[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - >=dev-python/tomli-2.0.1[${PYTHON_USEDEP}] - ' 3.10) - !<=dev-libs/gobject-introspection-1.76.1-r0 - !=dev-libs/gobject-introspection-1.78.1-r0 - !=dev-libs/gobject-introspection-1.80.1-r1 -" -BDEPEND=" - ${RDEPEND} - test? ( - $(python_gen_cond_dep ' - >=dev-python/build-1.0.3[${PYTHON_USEDEP}] - >=dev-python/ini2toml-0.14[${PYTHON_USEDEP}] - >=dev-python/filelock-3.4.0[${PYTHON_USEDEP}] - >=dev-python/jaraco-envs-2.2[${PYTHON_USEDEP}] - >=dev-python/jaraco-path-3.2.0[${PYTHON_USEDEP}] - >=dev-python/jaraco-test-5.5[${PYTHON_USEDEP}] - dev-python/pip[${PYTHON_USEDEP}] - dev-python/pip-run[${PYTHON_USEDEP}] - dev-python/pyproject-hooks[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] - >=dev-python/pytest-home-0.5[${PYTHON_USEDEP}] - dev-python/pytest-subprocess[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - >=dev-python/tomli-w-1.0.0[${PYTHON_USEDEP}] - >=dev-python/virtualenv-20[${PYTHON_USEDEP}] - ' "${PYTHON_TESTED[@]}") - ) -" -# setuptools-scm is here because installing plugins apparently breaks stuff at -# runtime, so let's pull it early. See bug #663324. -# -# trove-classifiers are optionally used in validation, if they are -# installed. Since we really oughtn't block them, let's always enforce -# the newest version for the time being to avoid errors. -# https://github.com/pypa/setuptools/issues/4459 -PDEPEND=" - dev-python/setuptools-scm[${PYTHON_USEDEP}] - >=dev-python/trove-classifiers-2024.10.16[${PYTHON_USEDEP}] -" - -src_prepare() { - local PATCHES=( - # TODO: remove this when we're 100% PEP517 mode - "${FILESDIR}/setuptools-62.4.0-py-compile.patch" - # https://github.com/abravalheri/validate-pyproject/pull/221 - "${FILESDIR}/setuptools-75.6.0-disable-trove-classifiers.patch" - ) - - distutils-r1_src_prepare - - # breaks tests - sed -i -e '/--import-mode/d' pytest.ini || die - - # remove bundled dependencies - rm -r */_vendor || die -} - -python_test() { - if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then - return - fi - - local EPYTEST_DESELECT=( - # network - setuptools/tests/test_build_meta.py::test_legacy_editable_install - setuptools/tests/test_distutils_adoption.py - setuptools/tests/test_editable_install.py - setuptools/tests/test_virtualenv.py::test_no_missing_dependencies - setuptools/tests/test_virtualenv.py::test_test_command_install_requirements - # TODO - setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_basic - setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_ignore_errors - # expects bundled deps in virtualenv - setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_in_sdist - setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_not_in_wheel - # fails if python-xlib is installed - setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts - # TODO, probably some random package - setuptools/tests/config/test_setupcfg.py::TestOptions::test_cmdclass - # broken by unbundling - setuptools/tests/test_setuptools.py::test_wheel_includes_vendored_metadata - # fails on normalized metadata, perhaps different dep version? - setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_with_pyproject_config - # TODO - setuptools/tests/test_sdist.py::test_sanity_check_setuptools_own_sdist - ) - - local EPYTEST_XDIST=1 - local -x PRE_BUILT_SETUPTOOLS_WHEEL=${DISTUTILS_WHEEL_PATH} - epytest -o tmp_path_retention_policy=all \ - -m "not uses_network" setuptools -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.7.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.7.0.ebuild deleted file mode 100644 index 5b55118e8f2..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.7.0.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# please keep this ebuild at EAPI 8 -- sys-apps/portage dep -EAPI=8 - -# please bump dev-python/ensurepip-setuptools along with this package! - -DISTUTILS_USE_PEP517=standalone -PYTHON_TESTED=( python3_{10..13} pypy3 ) -PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t ) -PYTHON_REQ_USE="xml(+)" - -inherit distutils-r1 pypi - -DESCRIPTION="Collection of extensions to Distutils" -HOMEPAGE=" - https://github.com/pypa/setuptools/ - https://pypi.org/project/setuptools/ -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND=" - !=dev-python/jaraco-functools-4[${PYTHON_USEDEP}] - >=dev-python/jaraco-text-3.7.0-r1[${PYTHON_USEDEP}] - >=dev-python/more-itertools-8.12.0-r1[${PYTHON_USEDEP}] - >=dev-python/packaging-24.2[${PYTHON_USEDEP}] - >=dev-python/platformdirs-4.2.2[${PYTHON_USEDEP}] - >=dev-python/wheel-0.44.0[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - >=dev-python/tomli-2.0.1[${PYTHON_USEDEP}] - ' 3.10) - !<=dev-libs/gobject-introspection-1.76.1-r0 - !=dev-libs/gobject-introspection-1.78.1-r0 - !=dev-libs/gobject-introspection-1.80.1-r1 -" -BDEPEND=" - ${RDEPEND} - test? ( - $(python_gen_cond_dep ' - >=dev-python/build-1.0.3[${PYTHON_USEDEP}] - >=dev-python/ini2toml-0.14[${PYTHON_USEDEP}] - >=dev-python/filelock-3.4.0[${PYTHON_USEDEP}] - >=dev-python/jaraco-envs-2.2[${PYTHON_USEDEP}] - >=dev-python/jaraco-path-3.7.2[${PYTHON_USEDEP}] - >=dev-python/jaraco-test-5.5[${PYTHON_USEDEP}] - dev-python/pip[${PYTHON_USEDEP}] - dev-python/pip-run[${PYTHON_USEDEP}] - dev-python/pyproject-hooks[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] - >=dev-python/pytest-home-0.5[${PYTHON_USEDEP}] - dev-python/pytest-subprocess[${PYTHON_USEDEP}] - dev-python/pytest-timeout[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - >=dev-python/tomli-w-1.0.0[${PYTHON_USEDEP}] - >=dev-python/virtualenv-20[${PYTHON_USEDEP}] - ' "${PYTHON_TESTED[@]}") - ) -" -# setuptools-scm is here because installing plugins apparently breaks stuff at -# runtime, so let's pull it early. See bug #663324. -# -# trove-classifiers are optionally used in validation, if they are -# installed. Since we really oughtn't block them, let's always enforce -# the newest version for the time being to avoid errors. -# https://github.com/pypa/setuptools/issues/4459 -PDEPEND=" - dev-python/setuptools-scm[${PYTHON_USEDEP}] - >=dev-python/trove-classifiers-2024.10.16[${PYTHON_USEDEP}] -" - -src_prepare() { - local PATCHES=( - # TODO: remove this when we're 100% PEP517 mode - "${FILESDIR}/setuptools-62.4.0-py-compile.patch" - # https://github.com/abravalheri/validate-pyproject/pull/221 - "${FILESDIR}/setuptools-75.6.0-disable-trove-classifiers.patch" - ) - - distutils-r1_src_prepare - - # breaks tests - sed -i -e '/--import-mode/d' pytest.ini || die - - # remove bundled dependencies - rm -r */_vendor || die -} - -python_test() { - if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then - return - fi - - local EPYTEST_DESELECT=( - # network - setuptools/tests/test_build_meta.py::test_legacy_editable_install - setuptools/tests/test_distutils_adoption.py - setuptools/tests/test_editable_install.py - setuptools/tests/test_virtualenv.py::test_no_missing_dependencies - setuptools/tests/test_virtualenv.py::test_test_command_install_requirements - # TODO - setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_basic - setuptools/tests/config/test_setupcfg.py::TestConfigurationReader::test_ignore_errors - # expects bundled deps in virtualenv - setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_in_sdist - setuptools/tests/config/test_apply_pyprojecttoml.py::TestMeta::test_example_file_not_in_wheel - # fails if python-xlib is installed - setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_with_allow_hosts - # TODO, probably some random package - setuptools/tests/config/test_setupcfg.py::TestOptions::test_cmdclass - # broken by unbundling - setuptools/tests/test_setuptools.py::test_wheel_includes_vendored_metadata - # fails on normalized metadata, perhaps different dep version? - setuptools/tests/test_build_meta.py::TestBuildMetaBackend::test_build_with_pyproject_config - # TODO - setuptools/tests/test_sdist.py::test_sanity_check_setuptools_own_sdist - ) - - local EPYTEST_XDIST=1 - local -x PRE_BUILT_SETUPTOOLS_WHEEL=${DISTUTILS_WHEEL_PATH} - epytest -o tmp_path_retention_policy=all \ - -m "not uses_network" setuptools -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.8.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.8.0.ebuild index 4daa92c3dd0..5da039c6790 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.8.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/setuptools/setuptools-75.8.0.ebuild @@ -21,7 +21,7 @@ HOMEPAGE=" LICENSE="MIT" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" IUSE="test" RESTRICT="!test? ( test )" From ca2bde9b810756ed2ed6771ad5bc7104028595e5 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:46 +0000 Subject: [PATCH 047/145] dev-python/snakeoil: Sync with Gentoo It's from Gentoo commit f07aeeb3059ef6ff0a87e621ffe345d43bfe8a44. --- .../dev-python/snakeoil/Manifest | 1 - .../snakeoil/snakeoil-0.10.9.ebuild | 33 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/snakeoil/snakeoil-0.10.9.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/Manifest index c2df97b38a6..677180f7d67 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/Manifest @@ -1,2 +1 @@ DIST snakeoil-0.10.10.tar.gz 174648 BLAKE2B b71a7006bef87527b1fca1dac4608ba38c33f38de23d7b3533ee5333b3671f69b0300c18a737d663532ce1a60f092fb4d9a40f1edab020604c4a78e92053ad59 SHA512 606204d80f099334abfc73475982b724da78117753a545ebcee9378f7cc88cd67e42c0f3c4dbf98c9c138dddf2bcf067ca47add664fde8454e4185bb8e8474d1 -DIST snakeoil-0.10.9.tar.gz 174546 BLAKE2B c42771bff9b068aa4c31f76e0d8efc44121d2946b24ff8b8ce6e11028503d7272087ae62c1b6c9963c9b3eb89202ffbad917c63984d478d062c4ba2272811ba2 SHA512 0cedfeca3c8a30cfa53a2135b9dc8f83b003dd07fd0a1767fc1e2fe3d1ee67022033c20c4f990dede7e6a0ad0e8dc94eeebce7529b230ce83c84d6161c1b656d diff --git a/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/snakeoil-0.10.9.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/snakeoil-0.10.9.ebuild deleted file mode 100644 index c5937703364..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/snakeoil/snakeoil-0.10.9.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( python3_{10..13} pypy3 ) -PYTHON_REQ_USE="threads(+)" -inherit distutils-r1 - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/snakeoil.git - https://github.com/pkgcore/snakeoil.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" - inherit pypi -fi - -DESCRIPTION="misc common functionality and useful optimizations" -HOMEPAGE="https://github.com/pkgcore/snakeoil" - -LICENSE="BSD BSD-2 MIT" -SLOT="0" - -RDEPEND=" - dev-python/lazy-object-proxy[${PYTHON_USEDEP}] -" -BDEPEND=" - >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] -" - -distutils_enable_tests pytest From 4a22cefcb02f82e69751fa282d69ba6d2e5571a6 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:48 +0000 Subject: [PATCH 048/145] dev-python/trove-classifiers: Sync with Gentoo It's from Gentoo commit f984e0379a5d8e541848dbf565e2a219304860e3. --- .../dev-python/trove-classifiers/Manifest | 4 +- .../trove-classifiers-2025.1.10.15.ebuild | 42 ------------------- ... => trove-classifiers-2025.1.15.22.ebuild} | 2 +- .../trove-classifiers-2025.1.7.14.ebuild | 42 ------------------- 4 files changed, 2 insertions(+), 88 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.10.15.ebuild rename sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/{trove-classifiers-2024.10.21.16.ebuild => trove-classifiers-2025.1.15.22.ebuild} (96%) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.7.14.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/Manifest index 0f203f3a558..c0332644661 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/Manifest @@ -1,3 +1 @@ -DIST trove_classifiers-2024.10.21.16.tar.gz 16153 BLAKE2B 9170a2f78b41d2d6793a5bbf7df7ce2ae4c1d70a193a92874bf74cad5a083d8153a9cd8ae42c85da3cdedc690c485aff8d864626efdb52965301f2a377ebb048 SHA512 4fca7cc5d172ddcb210bfbd6e993fc3d7243887762ba37c05aca3d6c5fcece8f573372704160c8048eb39c68d284fe808ca289c8c07564b06334bed6bafdc61e -DIST trove_classifiers-2025.1.10.15.tar.gz 16251 BLAKE2B 38e4cf90c855762fe2fda81c7bb4099127e0d6e92b160026b0b29a1da211d8ae6f63c3002e37aed5abbbdc77f1d715d116aa44a2db0c3a020881d0199c2793b7 SHA512 d07e3c68e08c7a9488bc05f59762eaf70934c7645b4714860944e720b43cad20ca844d6d40eb468a40b7127080c11f526ed688a1fd38181a1701a7fa2eea5223 -DIST trove_classifiers-2025.1.7.14.tar.gz 16130 BLAKE2B 7c5278e30dd939bfdf8795a8d73a50293a64f3e1c0784fda44d546d9c70ec98c69e88a87160517e6d759597b06e9728b53ac9bb26b9e8ac2995d4356c245a2d9 SHA512 06210009c52e6d4bb070f40052a396a48d9643b09864d2ac370449a91200818aabb595703048b3cb1fb97551e8e86d17b4cccbc3dbc19b34d199bdcbe50c3d96 +DIST trove_classifiers-2025.1.15.22.tar.gz 16236 BLAKE2B 23003b48c5f6b919559c3355b9eda56d229c5e19420368200952ab9a81a6ca850c779788ccb3c9340bd08e11f9c1da6ea67ecc180c206216313064881d3469f8 SHA512 460df4327866ea6ef19ea04e9ea4dd746eb733ceafec0db9920b1e6eb1649abfcc914f4e103700072696846c4af4c85003a1ef6323b4605a8f1659126d459503 diff --git a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.10.15.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.10.15.ebuild deleted file mode 100644 index 6b9c9bfd7c0..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.10.15.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( pypy3 python3_{10..13} python3_13t ) - -inherit distutils-r1 pypi - -DESCRIPTION="Canonical source for classifiers on PyPI (pypi.org)" -HOMEPAGE=" - https://github.com/pypa/trove-classifiers/ - https://pypi.org/project/trove-classifiers/ -" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -distutils_enable_tests pytest - -src_configure() { - grep -q 'build-backend = "setuptools' pyproject.toml || - die "Upstream changed build-backend, recheck" - # write a custom pyproject.toml to ease hatchling bootstrap - cat > pyproject.toml <<-EOF || die - [build-system] - requires = ["flit_core >=3.2,<4"] - build-backend = "flit_core.buildapi" - - [project] - name = "trove-classifiers" - version = "${PV}" - description = "Canonical source for classifiers on PyPI (pypi.org)." - EOF -} - -python_test() { - epytest - "${EPYTHON}" -m tests.lib || die -} diff --git a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2024.10.21.16.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.15.22.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2024.10.21.16.ebuild rename to sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.15.22.ebuild index 85a55be33f6..afd6244be11 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2024.10.21.16.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.15.22.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.7.14.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.7.14.ebuild deleted file mode 100644 index 6b9c9bfd7c0..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-python/trove-classifiers/trove-classifiers-2025.1.7.14.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit -PYTHON_COMPAT=( pypy3 python3_{10..13} python3_13t ) - -inherit distutils-r1 pypi - -DESCRIPTION="Canonical source for classifiers on PyPI (pypi.org)" -HOMEPAGE=" - https://github.com/pypa/trove-classifiers/ - https://pypi.org/project/trove-classifiers/ -" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - -distutils_enable_tests pytest - -src_configure() { - grep -q 'build-backend = "setuptools' pyproject.toml || - die "Upstream changed build-backend, recheck" - # write a custom pyproject.toml to ease hatchling bootstrap - cat > pyproject.toml <<-EOF || die - [build-system] - requires = ["flit_core >=3.2,<4"] - build-backend = "flit_core.buildapi" - - [project] - name = "trove-classifiers" - version = "${PV}" - description = "Canonical source for classifiers on PyPI (pypi.org)." - EOF -} - -python_test() { - epytest - "${EPYTHON}" -m tests.lib || die -} From 5fa6f9df13413edb5aece86ff9cb4ce0f81f6bf6 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:57 +0000 Subject: [PATCH 049/145] dev-util/maturin: Sync with Gentoo It's from Gentoo commit 1639cb53995fb96af672e050d7d5b45c6a8bd85b. --- .../portage-stable/dev-util/maturin/maturin-1.8.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/dev-util/maturin/maturin-1.8.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/maturin/maturin-1.8.1.ebuild index 270a05dccac..f9a362883ee 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/maturin/maturin-1.8.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/maturin/maturin-1.8.1.ebuild @@ -24,7 +24,7 @@ LICENSE+=" MIT MPL-2.0 Unicode-3.0 Unicode-DFS-2016 " # crates SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86" IUSE="doc +ssl test" RESTRICT="!test? ( test )" From cfe19f82aa0edfc20f3b5ad6555ea7eaa410387c Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:58 +0000 Subject: [PATCH 050/145] dev-util/pahole: Sync with Gentoo It's from Gentoo commit 69ad20f8c79f48eda2e748332811ebccde382acf. --- .../portage-stable/dev-util/pahole/Manifest | 2 + .../dev-util/pahole/pahole-1.29.ebuild | 73 +++++++++++++++++++ .../dev-util/pahole/pahole-9999.ebuild | 11 +-- 3 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-1.29.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pahole/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/pahole/Manifest index b8ff3e47118..680be6c597d 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/pahole/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/pahole/Manifest @@ -1,2 +1,4 @@ DIST dwarves-1.27.tar.sign 228 BLAKE2B c15de74840aac809912b4b8bdd4c9171ba909bf6ad5d1466b33e67371455c19182e713d1a6abe134205cef909be5a5c1dcf8a24964b9e17fe1903963e7682e20 SHA512 4f46766f4d0bdd2d6b5409a62d59eb4f27473bd78aa2a9e03b44f13f740dab94e41ce565a44428f042f1b9eaf465392c136398aebc532b339db2a6d0b147fdfa DIST dwarves-1.27.tar.xz 2254968 BLAKE2B 0a0f8ec8bf26240e17dc3319e76e16299514d662a79b25c4c962f723127f55d185d557adba7230d23b2e2b38fc62044aaa3474a458dc3df2000260637f995121 SHA512 4eae00e2e5b636fce6c6b38f59ac561b0e613c23af1bc6e16d9e9df2b71323e090d4101dde7e5020e30c2251c364cb731c82865fd0c65c4aa417b7cc706cfe25 +DIST dwarves-1.29.tar.sign 228 BLAKE2B ebf58feb5a3823263ef0bd2cd1fabfd4ed196a02954b3479faca6a028168bc2198fe6bd25b8a508704762c19809047babaa2ceeaf00d14e1be49ec5208e69fd0 SHA512 1c679706b87b763771b2a83b67df952b1fa27023e4d56d558772bcccda114cd7febcbcce7ee52211c9161e7f7984197d37e6c68955312271a282af90e3e6925e +DIST dwarves-1.29.tar.xz 2341312 BLAKE2B a13738139445ed78243566d569e635600bbf9515c77bccde856ac41537541ad4f5c432913fd6becfa959b7a912a9d483b9d77d7aa597f7f5e96495bd70bfb7e2 SHA512 02f1922d8db46e60b4aedb4e37da34eaf28d6ee86d8c202c9eaaf31f8acc931dc2ec8c715fd62e1adef676022f366b45f3ac843d93e9b1e7865323bb0a92ca24 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-1.29.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-1.29.ebuild new file mode 100644 index 00000000000..6996620bd84 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-1.29.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit cmake python-single-r1 + +MY_PN=dwarves +MY_P=${MY_PN}-${PV%%_p*} + +DESCRIPTION="pahole (Poke-a-Hole) and other DWARF utilities" +HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/devel/pahole/pahole.git" + inherit git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/arnaldocarvalhodemelo.asc + inherit verify-sig + SRC_URI="http://fedorapeople.org/~acme/${MY_PN}/${MY_P}.tar.xz + verify-sig? ( http://fedorapeople.org/~acme/${MY_PN}/${MY_P}.tar.sign )" + if [[ ${PV} == *_p* ]] ; then + # Patch rollups from git format-patch. Sometimes there are important + # fixes in git which haven't been released (and no release in sight). + # Patch rollups are a bit better for understanding where changes have + # come from for users. + SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches.tar.xz" + fi + S="${WORKDIR}"/${MY_P} + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-arnaldocarvalhodemelo )" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +LICENSE="GPL-2" # only +SLOT="0" +IUSE="debug" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + >=dev-libs/elfutils-0.178 + sys-libs/zlib" +DEPEND="${RDEPEND}" + +DOCS=( README README.ctracer NEWS ) + +PATCHES=( + "${FILESDIR}/${PN}-1.10-python-import.patch" +) + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi + + # Upstream sign the decompressed .tar + if use verify-sig; then + einfo "Unpacking ${MY_P}.tar.xz ..." + verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ + < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) + assert "Unpack failed" + else + default + fi +} + +src_prepare() { + [[ -d "${WORKDIR}"/${P}-patches ]] && PATCHES+=( "${WORKDIR}"/${P}-patches ) + + cmake_src_prepare + python_fix_shebang ostra/ostra-cg ostra/python/ostra.py +} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-9999.ebuild index 560c9a73d4a..6996620bd84 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-util/pahole/pahole-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -29,7 +29,7 @@ else fi S="${WORKDIR}"/${MY_P} BDEPEND="verify-sig? ( sec-keys/openpgp-keys-arnaldocarvalhodemelo )" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi LICENSE="GPL-2" # only @@ -45,7 +45,7 @@ DEPEND="${RDEPEND}" DOCS=( README README.ctracer NEWS ) PATCHES=( - "${FILESDIR}"/${PN}-1.10-python-import.patch + "${FILESDIR}/${PN}-1.10-python-import.patch" ) src_unpack() { @@ -71,8 +71,3 @@ src_prepare() { cmake_src_prepare python_fix_shebang ostra/ostra-cg ostra/python/ostra.py } - -src_configure() { - local mycmakeargs=( "-D__LIB=$(get_libdir)" ) - cmake_src_configure -} From 42888d4349d892b6445977bf9bd216957fd3555d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:06:59 +0000 Subject: [PATCH 051/145] dev-util/pkgcheck: Sync with Gentoo It's from Gentoo commit a16cf590404ccecad3604347ea02cecfde286f7f. --- .../portage-stable/dev-util/pkgcheck/Manifest | 3 - .../pkgcheck/pkgcheck-0.10.30-r1.ebuild | 94 ------------------- .../dev-util/pkgcheck/pkgcheck-0.10.31.ebuild | 93 ------------------ .../dev-util/pkgcheck/pkgcheck-0.10.32.ebuild | 93 ------------------ 4 files changed, 283 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.30-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.31.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.32.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/Manifest index 2752ca317c9..ecb90628638 100644 --- a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/Manifest @@ -1,4 +1 @@ -DIST pkgcheck-0.10.30.tar.gz 378098 BLAKE2B f80224d707f7656ca45f58932936e1ce780d670be596312532b88940fbe1cfb1c7e14a877a955fc4f21fb003a2ee5c6095c2c6919475cdc95db9be0736050b50 SHA512 078ba2275e39e645eca22a265c9f06c6dd7d1cb310979ab5e48bb86a374b42edc50c0ca8d0bd671a3b51341b7fae80ff2c9adf2dc2eeabd93a545c84373902b4 -DIST pkgcheck-0.10.31.tar.gz 379079 BLAKE2B b3e308a8d496c954d649677a41394b1fe1fbab43ce6c629616249306fafaad8e5c2cfa38fc9c838117f7abc381a0c04cea60ba5a2b3ab6a1612bbfc68d858832 SHA512 539cf262c950547dbd85441a7b40e76fcdc0810fdd633ab9042a13c7b19db4826c05ea1bbacf64b50c68884e31fff6a88e6b2baf94b2e6a4b2738123441da6ec -DIST pkgcheck-0.10.32.tar.gz 380032 BLAKE2B a424f49932c1a55d39cb1869aedb2adb5fe25f9edd0d87037b8364dcacb263fba12db601966da983fc62e142f3bc8d07259a05e0be92b6ece5cf26111c0a6db1 SHA512 86aa47bd71c2553e1b9e4fcf7ca1749a7e249e8f2656438fd0d9527583625bb57cae07e64d39e35345ca11831b1cf7d489e9c68d220e2f39e8af01bc8dc37017 DIST pkgcheck-0.10.33.tar.gz 380205 BLAKE2B 7f732443cc03e5bfb184f976f1af507cae55f3c98b9d251701d209cc18e76a99e168afcdffe359b9b3ec731aa754eb6223381cc7bc5a7661cfde82a50337f8fe SHA512 f4a1de6d99982d6ec4d77e245ea968922a2a906087449a0d98ebe3d8fc22a4a6cf060b09d3455efdbe7e9a445e785c0312120d3158a08790880a94c8e045e9c6 diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.30-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.30-r1.ebuild deleted file mode 100644 index 976f2d57e46..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.30-r1.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} ) -inherit elisp-common distutils-r1 optfeature - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgcheck.git - https://github.com/pkgcore/pkgcheck.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" - inherit pypi -fi - -DESCRIPTION="pkgcore-based QA utility for ebuild repos" -HOMEPAGE="https://github.com/pkgcore/pkgcheck" - -LICENSE="BSD MIT" -SLOT="0" -IUSE="emacs" - -if [[ ${PV} == *9999 ]]; then - RDEPEND=" - ~dev-python/snakeoil-9999[${PYTHON_USEDEP}] - ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]" -else - RDEPEND=" - >=dev-python/snakeoil-0.10.8[${PYTHON_USEDEP}] - >=sys-apps/pkgcore-0.12.25[${PYTHON_USEDEP}]" -fi -RDEPEND+=" - >=dev-libs/tree-sitter-bash-0.21.0[python,${PYTHON_USEDEP}] - dev-python/chardet[${PYTHON_USEDEP}] - dev-python/lazy-object-proxy[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pathspec[${PYTHON_USEDEP}] - >=dev-python/tree-sitter-0.22.0[${PYTHON_USEDEP}] - =app-editors/emacs-24.1:* - app-emacs/ebuild-mode - app-emacs/flycheck - ) -" -BDEPEND="${RDEPEND} - >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] - test? ( - dev-python/pytest[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] - dev-vcs/git - ) -" - -SITEFILE="50${PN}-gentoo.el" - -distutils_enable_tests pytest - -export USE_SYSTEM_TREE_SITTER_BASH=1 - -src_compile() { - distutils-r1_src_compile - - if use emacs ; then - pushd "${S}"/contrib/emacs >/dev/null || die - elisp-compile *.el - popd >/dev/null || die - fi -} - -python_install_all() { - local DOCS=( NEWS.rst ) - [[ ${PV} == *9999 ]] || doman build/sphinx/man/* - distutils-r1_python_install_all - - if use emacs ; then - elisp-install ${PN} "${S}"/contrib/emacs/*.el{,c} - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen - - optfeature "Network check support" dev-python/requests - optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.31.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.31.ebuild deleted file mode 100644 index 5babef749b7..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.31.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} ) -inherit elisp-common distutils-r1 optfeature - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgcheck.git - https://github.com/pkgcore/pkgcheck.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" - inherit pypi -fi - -DESCRIPTION="pkgcore-based QA utility for ebuild repos" -HOMEPAGE="https://github.com/pkgcore/pkgcheck" - -LICENSE="BSD MIT" -SLOT="0" -IUSE="emacs" - -if [[ ${PV} == *9999 ]]; then - RDEPEND=" - ~dev-python/snakeoil-9999[${PYTHON_USEDEP}] - ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]" -else - RDEPEND=" - >=dev-python/snakeoil-0.10.8[${PYTHON_USEDEP}] - >=sys-apps/pkgcore-0.12.25[${PYTHON_USEDEP}]" -fi -RDEPEND+=" - >=dev-libs/tree-sitter-bash-0.21.0[python,${PYTHON_USEDEP}] - dev-python/chardet[${PYTHON_USEDEP}] - dev-python/lazy-object-proxy[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pathspec[${PYTHON_USEDEP}] - >=dev-python/tree-sitter-0.23.0[${PYTHON_USEDEP}] - =app-editors/emacs-24.1:* - app-emacs/ebuild-mode - app-emacs/flycheck - ) -" -BDEPEND="${RDEPEND} - >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] - test? ( - dev-python/requests[${PYTHON_USEDEP}] - dev-vcs/git - ) -" - -SITEFILE="50${PN}-gentoo.el" - -distutils_enable_tests pytest - -export USE_SYSTEM_TREE_SITTER_BASH=1 - -src_compile() { - distutils-r1_src_compile - - if use emacs ; then - pushd "${S}"/contrib/emacs >/dev/null || die - elisp-compile *.el - popd >/dev/null || die - fi -} - -python_install_all() { - local DOCS=( NEWS.rst ) - [[ ${PV} == *9999 ]] || doman build/sphinx/man/* - distutils-r1_python_install_all - - if use emacs ; then - elisp-install ${PN} "${S}"/contrib/emacs/*.el{,c} - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen - - optfeature "Network check support" dev-python/requests - optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.32.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.32.ebuild deleted file mode 100644 index e8720591938..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-util/pkgcheck/pkgcheck-0.10.32.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=standalone -PYTHON_COMPAT=( python3_{10..13} ) -inherit elisp-common distutils-r1 optfeature - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/pkgcore/pkgcheck.git - https://github.com/pkgcore/pkgcheck.git" - inherit git-r3 -else - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" - inherit pypi -fi - -DESCRIPTION="pkgcore-based QA utility for ebuild repos" -HOMEPAGE="https://github.com/pkgcore/pkgcheck" - -LICENSE="BSD MIT" -SLOT="0" -IUSE="emacs" - -if [[ ${PV} == *9999 ]]; then - RDEPEND=" - ~dev-python/snakeoil-9999[${PYTHON_USEDEP}] - ~sys-apps/pkgcore-9999[${PYTHON_USEDEP}]" -else - RDEPEND=" - >=dev-python/snakeoil-0.10.8[${PYTHON_USEDEP}] - >=sys-apps/pkgcore-0.12.25[${PYTHON_USEDEP}]" -fi -RDEPEND+=" - >=dev-libs/tree-sitter-bash-0.21.0[python,${PYTHON_USEDEP}] - dev-python/chardet[${PYTHON_USEDEP}] - dev-python/lazy-object-proxy[${PYTHON_USEDEP}] - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pathspec[${PYTHON_USEDEP}] - >=dev-python/tree-sitter-0.23.0[${PYTHON_USEDEP}] - =app-editors/emacs-24.1:* - app-emacs/ebuild-mode - app-emacs/flycheck - ) -" -BDEPEND="${RDEPEND} - >=dev-python/flit-core-3.8[${PYTHON_USEDEP}] - test? ( - dev-python/requests[${PYTHON_USEDEP}] - dev-vcs/git - ) -" - -SITEFILE="50${PN}-gentoo.el" - -distutils_enable_tests pytest - -export USE_SYSTEM_TREE_SITTER_BASH=1 - -src_compile() { - distutils-r1_src_compile - - if use emacs ; then - pushd "${S}"/contrib/emacs >/dev/null || die - elisp-compile *.el - popd >/dev/null || die - fi -} - -python_install_all() { - local DOCS=( NEWS.rst ) - [[ ${PV} == *9999 ]] || doman build/sphinx/man/* - distutils-r1_python_install_all - - if use emacs ; then - elisp-install ${PN} "${S}"/contrib/emacs/*.el{,c} - elisp-site-file-install "${FILESDIR}/${SITEFILE}" - fi -} - -pkg_postinst() { - use emacs && elisp-site-regen - - optfeature "Network check support" dev-python/requests - optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version -} - -pkg_postrm() { - use emacs && elisp-site-regen -} From ad103a908edc75ad845a72bce3ab6c298f5adfa2 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:07:01 +0000 Subject: [PATCH 052/145] dev-vcs/git: Sync with Gentoo It's from Gentoo commit e7c25270a6c461fc79b2a81e00a72a012660e935. --- .../portage-stable/dev-vcs/git/Manifest | 18 +- .../git/files/git-2.48.0_rc2-meson-deps.patch | 91 --- .../{git-2.44.2.ebuild => git-2.45.3.ebuild} | 9 +- .../dev-vcs/git/git-2.46.2.ebuild | 667 ----------------- .../dev-vcs/git/git-2.47.1.ebuild | 670 ------------------ ...git-2.48.0-r1.ebuild => git-2.48.1.ebuild} | 14 + .../dev-vcs/git/git-9999-r1.ebuild | 14 + .../dev-vcs/git/git-9999-r2.ebuild | 14 + .../dev-vcs/git/git-9999-r3.ebuild | 14 + .../dev-vcs/git/git-9999.ebuild | 342 ++------- 10 files changed, 143 insertions(+), 1710 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.48.0_rc2-meson-deps.patch rename sdk_container/src/third_party/portage-stable/dev-vcs/git/{git-2.44.2.ebuild => git-2.45.3.ebuild} (98%) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.46.2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.47.1.ebuild rename sdk_container/src/third_party/portage-stable/dev-vcs/git/{git-2.48.0-r1.ebuild => git-2.48.1.ebuild} (97%) diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/Manifest b/sdk_container/src/third_party/portage-stable/dev-vcs/git/Manifest index 7fc0a522378..162e1a83793 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/Manifest @@ -1,15 +1,9 @@ -DIST git-2.44.2.tar.xz 7435020 BLAKE2B 625071528e6575af86aa51d7d5baeaa9b1b8be0e9f2b13f9f1c948a6dc0e9e03e227462c6ed9e8b80c413f02840f4f6b5d73487e0722d30835233480ea93caf3 SHA512 4dc70065fb1f47678cbed0d055f7734fce5cc26eeb627bda928056a80253053b230200db4b2936319df5b5b577eaaa1186a8bb041a205ac600d691e5663117ed DIST git-2.45.2.tar.xz 7487680 BLAKE2B 477acc786c26e0b04843ad6d07333607b2274d587263d72c6d036cade725e6f62f8c773903f401c799de71527d0473589afc507eec02f445e0c148dd7cbf407c SHA512 dce30d0d563f3f76ef49c8dc88105e0cf0941c8cd70303418d9d737f840ffba36bcc575c380c75080edf64af74487e1a680db146ec5f527a32104e887d4ceb73 -DIST git-2.46.2.tar.xz 7581344 BLAKE2B 1ea2a166bd2717d581020a9921cf7e82dc2c77e2a9bd6bc70f4b6396c214c74b30e8ae6815eba33bd2995f7a6e2570b96c51acbfce25ab85e05d5fdbd09d870c SHA512 d8d1cec9a4ddc7b1892b7f5b3c808d235bcd4bfb1714ce0ce0e721242acc94f9ae7c2ae3181311feb5b458b04e89cd32acd3e9c90adbc4e86e05e7d5589d8a00 -DIST git-2.47.1.tar.xz 7654244 BLAKE2B 5dd5d1bde226469d8de0952456dbaa408739f8613cfefdd76715e6a2bc1fdf8695740f005cc3b2caab876fccfbff0609201a827e0bd9837ec68056ba2a41da34 SHA512 6abe551c464b307bc3f6f474257e0be3e1a9eba1406af6463216b796c55a35356009c2f7bd9b4fa2d1798da5f885a3843f6ad8750ab69595f748f9ea8ed76fea -DIST git-2.48.0.tar.xz 7723336 BLAKE2B 63d0ac06aef75120ff2aab34b76039cc9e2606a4e69ee36fed868df7243318abac6550e03054bebc9b65a086c54a4f00d95affcc121fa690a3a580cb352ecbb3 SHA512 0b8b6633d65f20830577a073a78f13cedf4f43c8634d5d62918cddca9ca8b75519e6674307782e0eacb9e8e920a04014aa2a0f5cd2e75be06728e9160f794c9e -DIST git-htmldocs-2.44.2.tar.xz 1559412 BLAKE2B 9a62ab1d70b009a9bc29250c49ca835a46928703a73ec004ea57e7dc74212c5a29d7e0784cd752c8d2c1e23b70702e2c2f280904dfedefb3d4a687002a950596 SHA512 2a82e3c37aaca91643976d21fac3bd82b23fe2374856d73b0ba726339450ea6f8a5e8e38326546292f83923e28da280ca3bed549afff1aad684ebfb3926e4992 +DIST git-2.45.3.tar.xz 7492256 BLAKE2B 51c08789487070c33ff7c6c2135203010f12641eaf9908bf70724255e72bed24a7f0b7cc0b5c947081dad22041d0ee80c53971e5634510d35d797747338cd2d8 SHA512 b5b98bcc886f6a015b54193a9481092d4bfdc3689c479a8751e63529ce1dd1db226f2da38d26f25f54b81fe2c3c48d8edbe18af534fff65f6fcaa4c50923f93b +DIST git-2.48.1.tar.xz 7723580 BLAKE2B 092ed16fab3b3e56c81cb91db48e4db1f41b6d91d4855a7c73fb642f1fd0272823a92b8963644ef33517c61956bca89a95e4b4dc3e9237cb0520aa37c0770966 SHA512 75c89ab4ca83adc46989a4b05a9b482b40a7ba69d15aa1c1f27d0cee37c2908e154a75d59b0a0a540647352b9c55020f1a5ad309f0eff78e9fd8e631ef9e4606 DIST git-htmldocs-2.45.2.tar.xz 1569148 BLAKE2B 5013a13da54d87728f621a09d04dee1cba7b44d230360394b86e04269bf276399cf44de74ffc14a76ec1724e1015b630300d551b3a268273a768e0edc1a7fa45 SHA512 272bb31d8d43b270d5281c5d1beadea8e5a580c738ece2580d2c6ba7e7fe6fdbca71b672a2811273119495e62613f7a4d34764b4dfbc26e4dbf9dee5797fb440 -DIST git-htmldocs-2.46.2.tar.xz 1553104 BLAKE2B 9a7b784c1a01153dc660b4fe6eaa3ceac2d30eeb96015ab4ec73296811d27cc84715abd19f723ad16c64028114c2aceee2727380e7c9f8ff220ae4538dcc9c62 SHA512 51c5363ac48f04118071218ea095dae97676ac299a482511ef55e9267724f08e7c021ffa15418d9e32e676333ba31643c9049860f154f58a67d9604e141376c3 -DIST git-htmldocs-2.47.1.tar.xz 1564776 BLAKE2B ff8c313e00867423ddb122572e730868541ab22c76cb73aad54ee5dab298c4a8fdc29d50ebdceb658d7799132258dad9ffcaa582439a74463a8c212c3d82005c SHA512 7df2c572413d42f954c0ca01577f9324a60810dd712a8a36b0b503708d9795a90ffa95ee96b13c082796e276bcbc65094de32ade0f71ff744f6e45869cbbb4d7 -DIST git-htmldocs-2.48.0.tar.xz 1579956 BLAKE2B 012afa8f22ef59e0e96a2c72d04f634d5ac4266e5d0b7eb5e3b51815bbdc30299606eee2a57066b54025a2622ca6ac4e4945348aab10ba0967e52a8f84225ba6 SHA512 3d02d6d64ae174103d266f67e1e0b5251b4427e13ea0b802f1a29211d6134e2adea6aa211d8bf22180ccf29ff2c13e19309021d01acd1954a84bff622d343a27 -DIST git-manpages-2.44.2.tar.xz 574316 BLAKE2B ecfca8e05ca682097376ce6a1e8b9de8fcc36472860321987be12291a53d1a92befb950fd856775df65f28300b267b80975775cba046cfb89159887e8cba5516 SHA512 2ad6d922acf46028b3b7dd5a686c0396e5452e4d50b32ba9af0cc51cc3431003524b91279e2a795065a179af3d760ce72530580295ed09a53673274cf9567cc6 +DIST git-htmldocs-2.45.3.tar.xz 1527700 BLAKE2B 1baf8df995d6a31b550d91425c94ac63425eb4efc5a334dd5a312cf1c8da84e132c30dbbb192d9bcdfcabfa9f7b758ff2445ed8d634ad31723d3835bef2ca49c SHA512 4e8b16e77f7606c279e7793cbd6f8e18973213339f56a379dbf1fc074b7d1f032783bb956de0ebb58fad7e8954b7a75ab990b265f1858b32321e7c33de414601 +DIST git-htmldocs-2.48.1.tar.xz 1580120 BLAKE2B 4d57fc0ab8256d4cf5984696485610329f63bccce8ad6bcda20bca9abbaac0725dfac0aef385a62371c2c8e7d26e86c62e0de36321f40a3da667fa2b92e43ef4 SHA512 703f237c129d3d54cea9104dc1d47ad8881400a1c90e1a55153e63912c8e7d03e1000fef5cd1962933e8a600d71e11f28a94214853047ac8e748dc53ba906ac5 DIST git-manpages-2.45.2.tar.xz 576428 BLAKE2B c89ebd25c0caf391fcd29cc8609252daf2cf742a8cc78ce5b64931befb126c951ebb7504bc8ccbee06b81727dc3e4ded67c69adf8d737f4df38dfda758e3c734 SHA512 d39a5c92c1cfcae145713b8ff1a84258947392a3cf1490e3f7d4f87836d05e79dc4fecbff16b7c1bc314572d6d32aa2c29e7fcde993b549b2fab71620734c19b -DIST git-manpages-2.46.2.tar.xz 584812 BLAKE2B dd5592a1fd61b6eda0afa4f9292ce86dd14bca6a88016f96c53617f6505f27cc9a2ba9437c6330bb8003b3f57cd1e75bf441bf2a2168554bbda9c26db37db4cb SHA512 ce7a2a1fbb9376182b8ce3ed772fbeeef2cf338bc06bf9bcf3c07a65419e41b3754d6851a44886d0b07dfd82f8eefe7b8b1d9f5c28ed6b6a0ea4168ed457e121 -DIST git-manpages-2.47.1.tar.xz 586432 BLAKE2B df4eafa03ba235202c361d16fd6db1c6b2a4fea5501f62dcd7b53e3764542a2b70ab44e1525d5f4437dad9505c507ba88aa14b1e8e828713b81cb66b6d9a73c2 SHA512 9acd5207e6c2751ec87708eedc4f060ee6bed0841564f787cd3fd5dbce712c4c2afbb9ce4e85a466fb52a8f399420ca24c7cd4eb8e14edb7ea7a5c06e3c82a5e -DIST git-manpages-2.48.0.tar.xz 590480 BLAKE2B 73e61821d48b524331d8b2bc56047065307cab7b2831cc869cc76d9e3b1da6bdbda8184e14f17cb7bf1efdb26f6dd87682e259b69b597c12fff00ee6a98377c9 SHA512 f9f5844b39361d379e66f68e327bd99693ae4c3f0bb3a85de4c1a36e665771f69afced98fb454d2f6574284c08e1043a75b0af7a774912a2b2ec958994fcc17d +DIST git-manpages-2.45.3.tar.xz 576480 BLAKE2B 61eeccea65dcae72e0151459ad4a225d455fd6c57dc55394aa2e5e8f3179643f63eb64c8d75ac51ae467b8c277df2ac9777c55134efcc05805bef16019171b30 SHA512 c06b97a8f2c43c7a11355dea95e4766bc58978a70c30d5ee4af86e45dadd5be11d1ba30e1750535c067169af7b6497d2d03ae5cc1f36aff1b96a80a1f34dbc1c +DIST git-manpages-2.48.1.tar.xz 590608 BLAKE2B 54ff646cd1d5ce93e8e37eef4682e81a1c95f99903b2d760f70e51f2c9f02378f6de5464a5fcca24c08f8327ec114cdd1684eee07fd2512af7e9615c47104a99 SHA512 b086ac89e77b1af58beff26576fb5c3a1dfe8641315ab0b60819dcf0ba9e5be4173deaa77fa1f95d8594895a583ed629c469714b0a5e87fecd36e5be397ba8f5 diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.48.0_rc2-meson-deps.patch b/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.48.0_rc2-meson-deps.patch deleted file mode 100644 index 533a8b10803..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/files/git-2.48.0_rc2-meson-deps.patch +++ /dev/null @@ -1,91 +0,0 @@ -https://lore.kernel.org/git/371571630df201b0b0c680f6437decc6c60ecd3b.1736307757.git.sam@gentoo.org/ - -From 371571630df201b0b0c680f6437decc6c60ecd3b Mon Sep 17 00:00:00 2001 -Message-ID: <371571630df201b0b0c680f6437decc6c60ecd3b.1736307813.git.sam@gentoo.org> -From: Sam James -Date: Wed, 8 Jan 2025 03:40:55 +0000 -Subject: [PATCH] meson: fix perl dependencies - -`generate_perl_command` needs `depends: [git_version_file]` and the uses -in top-level meson.build were fine, but the ones in perl/ weren't, causing -parallel build failures in some cases as GIT-BUILD-OPTIONS wasn't yet -available. - -Signed-off-by: Sam James ---- a/perl/FromCPAN/Mail/meson.build -+++ b/perl/FromCPAN/Mail/meson.build -@@ -4,4 +4,5 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/FromCPAN/Mail', -+ depends: [git_version_file], - ) ---- a/perl/FromCPAN/meson.build -+++ b/perl/FromCPAN/meson.build -@@ -4,6 +4,7 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/FromCPAN', -+ depends: [git_version_file], - ) - - subdir('Mail') ---- a/perl/Git/LoadCPAN/Mail/meson.build -+++ b/perl/Git/LoadCPAN/Mail/meson.build -@@ -4,4 +4,5 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN/Mail', -+ depends: [git_version_file], - ) ---- a/perl/Git/LoadCPAN/meson.build -+++ b/perl/Git/LoadCPAN/meson.build -@@ -4,6 +4,7 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/Git/LoadCPAN', -+ depends: [git_version_file], - ) - - subdir('Mail') ---- a/perl/Git/SVN/Memoize/meson.build -+++ b/perl/Git/SVN/Memoize/meson.build -@@ -4,4 +4,5 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/Git/SVN', -+ depends: [git_version_file], - ) ---- a/perl/Git/SVN/meson.build -+++ b/perl/Git/SVN/meson.build -@@ -14,6 +14,7 @@ foreach source : [ - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/Git/SVN', -+ depends: [git_version_file], - ) - endforeach - ---- a/perl/Git/meson.build -+++ b/perl/Git/meson.build -@@ -11,6 +11,7 @@ foreach source : [ - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5/Git', -+ depends: [git_version_file], - ) - endforeach - ---- a/perl/meson.build -+++ b/perl/meson.build -@@ -4,6 +4,7 @@ test_dependencies += custom_target( - command: generate_perl_command, - install: true, - install_dir: get_option('datadir') / 'perl5', -+ depends: [git_version_file], - ) - - subdir('Git') --- -2.48.0.rc2.29.g7bab57bd98 - diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.44.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.3.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.44.2.ebuild rename to sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.3.ebuild index 11889906c18..c9bea87cf99 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.44.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.45.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,7 +6,7 @@ EAPI=8 GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd @@ -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="" @@ -570,7 +574,6 @@ src_install() { local contrib_objects=( buildsystems fast-import - hg-to-git hooks remotes2config.sh rerere-train.sh diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.46.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.46.2.ebuild deleted file mode 100644 index 17a8afd1ac8..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.46.2.ebuild +++ /dev/null @@ -1,667 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -GENTOO_DEPEND_ON_PERL=no - -# bug #329479: git-remote-testgit is not multiple-version aware -PYTHON_COMPAT=( python3_{10..13} ) - -inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd - -PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" - -if [[ ${PV} == *9999 ]]; then - EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" - - inherit git-r3 - # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. - # See https://git-scm.com/docs/gitworkflows#_graduation - # In order of stability: - # 9999-r0: maint - # 9999-r1: master - # 9999-r2: next - # 9999-r3: seen - case ${PVR} in - 9999) EGIT_BRANCH=maint ;; - 9999-r1) EGIT_BRANCH=master ;; - 9999-r2) EGIT_BRANCH=next;; - 9999-r3) EGIT_BRANCH=seen ;; - esac -fi - -MY_PV="${PV/_rc/.rc}" -MY_P="${PN}-${MY_PV}" - -DOC_VER="${MY_PV}" - -DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency" -HOMEPAGE="https://www.git-scm.com/" - -if [[ ${PV} != *9999 ]]; then - SRC_URI_SUFFIX="xz" - SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" - - [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing' - - SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}" - SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}" - SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )" - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - fi -fi - -S="${WORKDIR}"/${MY_P} - -LICENSE="GPL-2" -SLOT="0" -IUSE="+blksha1 +curl cgi doc keyring +gpg highlight +iconv mediawiki +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test" - -# Common to both DEPEND and RDEPEND -DEPEND=" - dev-libs/openssl:= - sys-libs/zlib - curl? ( - net-misc/curl - webdav? ( dev-libs/expat ) - ) - keyring? ( - app-crypt/libsecret - dev-libs/glib:2 - ) - iconv? ( virtual/libiconv ) - pcre? ( dev-libs/libpcre2:= ) - perl? ( dev-lang/perl:=[-build(-)] ) - tk? ( dev-lang/tk:= ) -" -RDEPEND=" - ${DEPEND} - gpg? ( app-crypt/gnupg ) - perl? ( - dev-perl/Error - dev-perl/MailTools - dev-perl/Authen-SASL - >=virtual/perl-libnet-3.110.0-r4[ssl] - cgi? ( - dev-perl/CGI - highlight? ( app-text/highlight ) - ) - cvs? ( - >=dev-vcs/cvsps-2.1:0 - dev-perl/DBI - dev-perl/DBD-SQLite - ) - mediawiki? ( - dev-perl/DateTime-Format-ISO8601 - dev-perl/HTML-Tree - dev-perl/MediaWiki-API - ) - subversion? ( - dev-vcs/subversion[-dso(-),perl] - dev-perl/libwww-perl - dev-perl/TermReadKey - ) - ) - perforce? ( ${PYTHON_DEPS} ) - selinux? ( sec-policy/selinux-git ) -" - -# This is how info docs are created with Git: -# .txt/asciidoc --(asciidoc)---------> .xml/docbook -# .xml/docbook --(docbook2texi.pl)--> .texi -# .texi --(makeinfo)---------> .info -BDEPEND=" - doc? ( - app-text/asciidoc - app-text/docbook2X - app-text/xmlto - sys-apps/texinfo - ) - keyring? ( virtual/pkgconfig ) - nls? ( sys-devel/gettext ) - test? ( app-crypt/gnupg ) -" - -# Live ebuild builds man pages and HTML docs, additionally -if [[ ${PV} == *9999 ]]; then - BDEPEND+=" app-text/asciidoc" -fi - -SITEFILE="50${PN}-gentoo.el" - -REQUIRED_USE=" - cgi? ( perl ) - cvs? ( perl ) - mediawiki? ( perl ) - perforce? ( ${PYTHON_REQUIRED_USE} ) - subversion? ( perl ) - webdav? ( curl ) -" - -RESTRICT="!test? ( test )" - -PATCHES=( - # Avoid automagic CVS, bug #350330 - "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch - - # Make submodule output quiet - "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch -) - -pkg_setup() { - if use subversion && has_version "dev-vcs/subversion[dso]" ; then - ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" - ewarn "with USE=dso, there may be weird crashes in git-svn. You" - ewarn "have been warned!" - fi - - if use perforce ; then - python-single-r1_pkg_setup - fi -} - -# This is needed because for some obscure reasons future calls to make don't -# pick up these exports if we export them in src_unpack() -exportmakeopts() { - local extlibs myopts - - myopts=( - ASCIIDOC_NO_ROFF=YesPlease - - $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) - - $(usev elibc_musl NO_REGEX=NeedsStartEnd) - $(usev !cvs NO_CVS=YesPlease) - $(usev !iconv NO_ICONV=YesPlease) - $(usev !nls NO_GETTEXT=YesPlease) - $(usev !perforce NO_PYTHON=YesPlease) - $(usev !subversion NO_SVN_TESTS=YesPlease) - $(usev !tk NO_TCLTK=YesPlease) - ) - - if use blksha1 ; then - myopts+=( BLK_SHA1=YesPlease ) - fi - - if use curl ; then - use webdav || myopts+=( NO_EXPAT=YesPlease ) - else - myopts+=( NO_CURL=YesPlease ) - fi - - # Broken assumptions because of static build system - myopts+=( - NO_FINK=YesPlease - NO_DARWIN_PORTS=YesPlease - INSTALL=install - TAR=tar - SHELL_PATH="${EPREFIX}/bin/sh" - SANE_TOOL_PATH= - OLD_ICONV= - NO_EXTERNAL_GREP= - ) - - # Can't define this to null, since the entire makefile depends on it - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die - - if use pcre; then - myopts+=( USE_LIBPCRE2=YesPlease ) - extlibs+=( -lpcre2-8 ) - fi - - if [[ ${CHOST} == *-solaris* ]]; then - myopts+=( - NEEDS_LIBICONV=YesPlease - HAVE_CLOCK_MONOTONIC=1 - ) - - if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then - myopts+=( HAVE_GETDELIM=1 ) - fi - fi - - myopts+=( ASCIIDOC8=YesPlease ) - - export MY_MAKEOPTS="${myopts[@]}" - export EXTLIBS="${extlibs[@]}" -} - -src_unpack() { - if [[ ${PV} != *9999 ]] ; then - unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - - cd "${S}" || die - unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - - if use doc ; then - pushd "${S}"/Documentation &>/dev/null || die - unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - popd &>/dev/null || die - fi - else - git-r3_src_unpack - #cp "${FILESDIR}"/GIT-VERSION-GEN . || die - fi - -} - -src_prepare() { - if ! use safe-directory ; then - # This patch neuters the "safe directory" detection. - # bugs #838271, #838223 - PATCHES+=( - "${FILESDIR}"/git-2.46.2-unsafe-directory.patch - ) - fi - - default - - if use prefix ; then - # bug #757309 - sed -i \ - -e 's:/usr/local/opt/gettext/:/do/not/look/elsewhere/:g' \ - -e 's:/opt/homebrew/:/do/not/look/elsewhere/:g' \ - config.mak.uname || die - fi - - sed -i \ - -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ - -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ - -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ - -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ - -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - Makefile || die - - # Fix docbook2texi command - sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die -} - -git_emake() { - # bug #320647: PYTHON_PATH - local PYTHON_PATH="" - use perforce && PYTHON_PATH="${PYTHON}" - - local mymakeargs=( - ${MY_MAKEOPTS} - - prefix="${EPREFIX}"/usr - htmldir="${EPREFIX}"/usr/share/doc/${PF}/html - perllibdir="$(use perl && perl_get_raw_vendorlib)" - sysconfdir="${EPREFIX}"/etc - - CC="$(tc-getCC)" - CFLAGS="${CFLAGS}" - PKG_CONFIG="$(tc-getPKG_CONFIG)" - - # TODO: --verbose? - GIT_TEST_OPTS="--no-color" - - OPTAR="$(tc-getAR)" - OPTCC="$(tc-getCC)" - 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="" - - PYTHON_PATH="${PYTHON_PATH}" - - V=1 - "$@" - ) - - emake "${mymakeargs[@]}" -} - -src_configure() { - exportmakeopts -} - -src_compile() { - git_emake - - if use perl && use cgi ; then - git_emake gitweb - fi - - if use perl ; then - git_emake -C contrib/credential/netrc - fi - - if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then - git_emake -C contrib/credential/osxkeychain - fi - - pushd Documentation &>/dev/null || die - if [[ ${PV} == *9999 ]] ; then - git_emake man - if use doc ; then - git_emake info html - fi - else - if use doc ; then - git_emake info - fi - fi - popd &>/dev/null || die - - if use keyring ; then - git_emake -C contrib/credential/libsecret - fi - - pushd contrib/subtree &>/dev/null || die - git_emake git-subtree - # git-subtree.1 requires the full USE=doc dependency stack - use doc && git_emake git-subtree.html git-subtree.1 - popd &>/dev/null || die - - git_emake -C contrib/diff-highlight - - if use mediawiki ; then - git_emake -C contrib/mw-to-git - fi -} - -src_test() { - local disabled=( - # We make safe-directory optional - t0033-safe-directory.sh - ) - - local tests_cvs=( - t9200-git-cvsexportcommit.sh - t9400-git-cvsserver-server.sh - t9401-git-cvsserver-crlf.sh - t9402-git-cvsserver-refs.sh - t9600-cvsimport.sh - t9601-cvsimport-vendor-branch.sh - t9602-cvsimport-branches-tags.sh - t9603-cvsimport-patchsets.sh - t9604-cvsimport-timestamps.sh - ) - - local tests_perl=( - t3701-add-interactive.sh - t5502-quickfetch.sh - t5512-ls-remote.sh - t5520-pull.sh - t7106-reset-unborn-branch.sh - t7501-commit.sh - ) - # Bug #225601 - t0004 is not suitable for root perm - # Bug #219839 - t1004 is not suitable for root perm - # t0001-init.sh - check for init notices EPERM* fails - local tests_nonroot=( - t0001-init.sh - t0004-unwritable.sh - t0070-fundamental.sh - t1004-read-tree-m-u-wf.sh - t3700-add.sh - t7300-clean.sh - ) - # t9100 still fails with symlinks in SVN 1.7 - local test_svn=( t9100-git-svn-basic.sh ) - - # Unzip is used only for the testcase code, not by any normal parts of Git. - if ! has_version app-arch/unzip ; then - einfo "Disabling tar-tree tests" - disabled+=( t5000-tar-tree.sh ) - fi - - local cvs=0 - use cvs && let cvs=${cvs}+1 - if [[ ${EUID} -eq 0 ]] ; then - if [[ ${cvs} -eq 1 ]] ; then - ewarn "Skipping CVS tests because CVS does not work as root!" - ewarn "You should retest with FEATURES=userpriv!" - disabled+=( ${tests_cvs[@]} ) - fi - einfo "Skipping other tests that require being non-root" - disabled+=( ${tests_nonroot[@]} ) - else - if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -lt 3 ]] ; then - einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=( ${tests_cvs[@]} ) - fi - fi - - if ! use perl ; then - einfo "Disabling tests that need Perl" - disabled+=( ${tests_perl[@]} ) - fi - - einfo "Disabling tests that fail with SVN 1.7" - disabled+=( ${test_svn[@]} ) - - # Reset all previously disabled tests - pushd t &>/dev/null || die - local i - for i in *.sh.DISABLED ; do - [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" - done - einfo "Disabled tests:" - for i in ${disabled[@]} ; do - if [[ -f "${i}" ]] ; then - mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}" - fi - done - - # Avoid the test system removing the results because we want them ourselves - sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die - - # Clean old results first, must always run - nonfatal git_emake clean - popd &>/dev/null || die - - # Now run the tests, keep going if we hit an error, and don't terminate on - # failure - local rc - # t0610-reftable-basics.sh uses $A - local -x A= - einfo "Start test run" - #MAKEOPTS=-j1 - nonfatal git_emake --keep-going test - rc=$? - - # Display nice results, now print the results - pushd t &>/dev/null || die - nonfatal git_emake aggregate-results - - # And bail if there was a problem - [[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!" - - popd &>/dev/null || die - if use perl ; then - emake -C contrib/credential/netrc testverbose - fi -} - -src_install() { - git_emake DESTDIR="${D}" install - - if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then - dobin contrib/credential/osxkeychain/git-credential-osxkeychain - fi - - # Depending on the tarball and manual rebuild of the documentation, the - # manpages may exist in either OR both of these directories. - find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] - find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] - dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} - use doc && dodir /usr/share/doc/${PF}/html - local d - for d in / /howto/ /technical/ ; do - docinto ${d} - dodoc Documentation${d}*.txt - if use doc ; then - docinto ${d}/html - dodoc Documentation${d}*.html - fi - done - docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info - - newbashcomp contrib/completion/git-completion.bash ${PN} - bashcomp_alias git gitk - # Not really a bash-completion file (bug #477920) - # but still needed uncompressed (bug #507480) - insinto /usr/share/${PN} - doins contrib/completion/git-prompt.sh - - #dobin contrib/fast-import/git-p4 # Moved upstream - #dodoc contrib/fast-import/git-p4.txt # Moved upstream - newbin contrib/fast-import/import-tars.perl import-tars - exeinto /usr/libexec/git-core/ - newexe contrib/git-resurrect.sh git-resurrect - - # git-subtree - pushd contrib/subtree &>/dev/null || die - git_emake DESTDIR="${D}" install - if use doc ; then - # Do not move git subtree install-man outside USE=doc! - git_emake DESTDIR="${D}" install-man install-html - fi - newdoc README README.git-subtree - dodoc git-subtree.txt - popd &>/dev/null || die - - if use mediawiki ; then - git_emake -C contrib/mw-to-git DESTDIR="${D}" install - fi - - # diff-highlight - dobin contrib/diff-highlight/diff-highlight - newdoc contrib/diff-highlight/README README.diff-highlight - - # git-jump - exeinto /usr/libexec/git-core/ - doexe contrib/git-jump/git-jump - newdoc contrib/git-jump/README git-jump.txt - - # git-contacts - exeinto /usr/libexec/git-core/ - doexe contrib/contacts/git-contacts - dodoc contrib/contacts/git-contacts.txt - - if use keyring ; then - pushd contrib/credential/libsecret &>/dev/null || die - dobin git-credential-libsecret - popd &>/dev/null || die - fi - - dodir /usr/share/${PN}/contrib - # The following are excluded: - # completion - installed above - # diff-highlight - done above - # emacs - removed upstream - # examples - these are stuff that is not used in Git anymore actually - # git-jump - done above - # gitview - installed above - # p4import - excluded because fast-import has a better one - # patches - stuff the Git guys made to go upstream to other places - # persistent-https - TODO - # mw-to-git - TODO - # subtree - build seperately - # svnimport - use git-svn - # thunderbird-patch-inline - fixes thunderbird - local contrib_objects=( - buildsystems - fast-import - hooks - remotes2config.sh - rerere-train.sh - stats - workdir - ) - local i - for i in "${contrib_objects[@]}" ; do - cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}" - done - - if use perl && use cgi ; then - # We used to install in /usr/share/${PN}/gitweb - # but upstream installs in /usr/share/gitweb - # so we will install a symlink and use their location for compat with other - # distros - dosym ../gitweb /usr/share/${PN}/gitweb - - # INSTALL discusses configuration issues, not just installation - docinto / - newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb - newdoc "${S}"/gitweb/README README.gitweb - - for d in "${ED}"/usr/lib{,64}/perl5/ ; do - if [[ -d "${d}" ]] ; then - find "${d}" -name .packlist -delete || die - fi - done - else - rm -rf "${ED}"/usr/share/gitweb - fi - - if use perl ; then - pushd contrib/credential/netrc &>/dev/null || die - dobin git-credential-netrc - popd &>/dev/null || die - fi - - if ! use subversion ; then - rm -f "${ED}"/usr/libexec/git-core/git-svn \ - "${ED}"/usr/share/man/man1/git-svn.1* - fi - - if use xinetd ; then - insinto /etc/xinetd.d - newins "${FILESDIR}"/git-daemon.xinetd git-daemon - fi - - if ! use prefix ; then - newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon - newconfd "${FILESDIR}"/git-daemon.confd git-daemon - systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service" - systemd_dounit "${FILESDIR}/git-daemon.socket" - fi - - perl_delete_localpod - - # Remove disabled linguas - # we could remove sources in src_prepare, but install does not - # handle missing locale dir well - rm_loc() { - if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then - rm -r "${ED}/usr/share/locale/${1}" || die - fi - } - plocale_for_each_disabled_locale rm_loc -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog "Please read /usr/share/bash-completion/completions/git for Git bash command" - elog "completion." - elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" - elog "Note that the prompt bash code is now in that separate script" - fi - - optfeature_header "Some scripts require additional dependencies:" - optfeature git-quiltimport dev-util/quilt - optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx -} diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.47.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.47.1.ebuild deleted file mode 100644 index 9701a056aae..00000000000 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.47.1.ebuild +++ /dev/null @@ -1,670 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -GENTOO_DEPEND_ON_PERL=no - -# bug #329479: git-remote-testgit is not multiple-version aware -PYTHON_COMPAT=( python3_{10..13} ) - -inherit flag-o-matic toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd - -PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" - -if [[ ${PV} == *9999 ]]; then - EGIT_REPO_URI="https://git.kernel.org/pub/scm/git/git.git" - - inherit git-r3 - # Please ensure that all _four_ 9999 ebuilds get updated; they track the 4 upstream branches. - # See https://git-scm.com/docs/gitworkflows#_graduation - # In order of stability: - # 9999-r0: maint - # 9999-r1: master - # 9999-r2: next - # 9999-r3: seen - case ${PVR} in - 9999) EGIT_BRANCH=maint ;; - 9999-r1) EGIT_BRANCH=master ;; - 9999-r2) EGIT_BRANCH=next;; - 9999-r3) EGIT_BRANCH=seen ;; - esac -fi - -MY_PV="${PV/_rc/.rc}" -MY_P="${PN}-${MY_PV}" - -DOC_VER="${MY_PV}" - -DESCRIPTION="Stupid content tracker: distributed VCS designed for speed and efficiency" -HOMEPAGE="https://www.git-scm.com/" - -if [[ ${PV} != *9999 ]]; then - SRC_URI_SUFFIX="xz" - SRC_URI_KORG="https://www.kernel.org/pub/software/scm/git" - - [[ ${PV/rc} != ${PV} ]] && SRC_URI_KORG+='/testing' - - SRC_URI="${SRC_URI_KORG}/${MY_P}.tar.${SRC_URI_SUFFIX}" - SRC_URI+=" ${SRC_URI_KORG}/${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX}" - SRC_URI+=" doc? ( ${SRC_URI_KORG}/${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} )" - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - fi -fi - -S="${WORKDIR}"/${MY_P} - -LICENSE="GPL-2" -SLOT="0" -IUSE="+blksha1 +curl cgi doc keyring +gpg highlight +iconv mediawiki +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test" - -# Common to both DEPEND and RDEPEND -DEPEND=" - dev-libs/openssl:= - sys-libs/zlib - curl? ( - net-misc/curl - webdav? ( dev-libs/expat ) - ) - keyring? ( - app-crypt/libsecret - dev-libs/glib:2 - ) - iconv? ( virtual/libiconv ) - pcre? ( dev-libs/libpcre2:= ) - perl? ( dev-lang/perl:=[-build(-)] ) - tk? ( dev-lang/tk:= ) -" -RDEPEND=" - ${DEPEND} - gpg? ( app-crypt/gnupg ) - perl? ( - dev-perl/Error - dev-perl/MailTools - dev-perl/Authen-SASL - >=virtual/perl-libnet-3.110.0-r4[ssl] - cgi? ( - dev-perl/CGI - highlight? ( app-text/highlight ) - ) - cvs? ( - >=dev-vcs/cvsps-2.1:0 - dev-perl/DBI - dev-perl/DBD-SQLite - ) - mediawiki? ( - dev-perl/DateTime-Format-ISO8601 - dev-perl/HTML-Tree - dev-perl/MediaWiki-API - ) - subversion? ( - dev-vcs/subversion[-dso(-),perl] - dev-perl/libwww-perl - dev-perl/TermReadKey - ) - ) - perforce? ( ${PYTHON_DEPS} ) - selinux? ( sec-policy/selinux-git ) -" - -# This is how info docs are created with Git: -# .txt/asciidoc --(asciidoc)---------> .xml/docbook -# .xml/docbook --(docbook2texi.pl)--> .texi -# .texi --(makeinfo)---------> .info -BDEPEND=" - doc? ( - app-text/asciidoc - app-text/docbook2X - app-text/xmlto - sys-apps/texinfo - ) - keyring? ( virtual/pkgconfig ) - nls? ( sys-devel/gettext ) - test? ( app-crypt/gnupg ) -" - -# Live ebuild builds man pages and HTML docs, additionally -if [[ ${PV} == *9999 ]]; then - BDEPEND+=" app-text/asciidoc" -fi - -SITEFILE="50${PN}-gentoo.el" - -REQUIRED_USE=" - cgi? ( perl ) - cvs? ( perl ) - mediawiki? ( perl ) - perforce? ( ${PYTHON_REQUIRED_USE} ) - subversion? ( perl ) - webdav? ( curl ) -" - -RESTRICT="!test? ( test )" - -PATCHES=( - # Avoid automagic CVS, bug #350330 - "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch - - # Make submodule output quiet - "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch -) - -pkg_setup() { - if use subversion && has_version "dev-vcs/subversion[dso]" ; then - ewarn "Per Gentoo bugs #223747, #238586, when subversion is built" - ewarn "with USE=dso, there may be weird crashes in git-svn. You" - ewarn "have been warned!" - fi - - if use perforce ; then - python-single-r1_pkg_setup - fi -} - -# This is needed because for some obscure reasons future calls to make don't -# pick up these exports if we export them in src_unpack() -exportmakeopts() { - local extlibs myopts - - myopts=( - ASCIIDOC_NO_ROFF=YesPlease - - $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) - - $(usev elibc_musl NO_REGEX=NeedsStartEnd) - $(usev !cvs NO_CVS=YesPlease) - $(usev !iconv NO_ICONV=YesPlease) - $(usev !nls NO_GETTEXT=YesPlease) - $(usev !perforce NO_PYTHON=YesPlease) - $(usev !subversion NO_SVN_TESTS=YesPlease) - $(usev !tk NO_TCLTK=YesPlease) - ) - - if use blksha1 ; then - myopts+=( BLK_SHA1=YesPlease ) - fi - - if use curl ; then - use webdav || myopts+=( NO_EXPAT=YesPlease ) - else - myopts+=( NO_CURL=YesPlease ) - fi - - # Broken assumptions because of static build system - myopts+=( - NO_FINK=YesPlease - NO_DARWIN_PORTS=YesPlease - INSTALL=install - TAR=tar - SHELL_PATH="${EPREFIX}/bin/sh" - SANE_TOOL_PATH= - OLD_ICONV= - NO_EXTERNAL_GREP= - ) - - # Can't define this to null, since the entire makefile depends on it - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die - - if use pcre; then - myopts+=( USE_LIBPCRE2=YesPlease ) - extlibs+=( -lpcre2-8 ) - fi - - if [[ ${CHOST} == *-solaris* ]]; then - myopts+=( - NEEDS_LIBICONV=YesPlease - HAVE_CLOCK_MONOTONIC=1 - ) - - if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then - myopts+=( HAVE_GETDELIM=1 ) - fi - fi - - myopts+=( ASCIIDOC8=YesPlease ) - - export MY_MAKEOPTS="${myopts[@]}" - export EXTLIBS="${extlibs[@]}" -} - -src_unpack() { - if [[ ${PV} != *9999 ]] ; then - unpack ${MY_P}.tar.${SRC_URI_SUFFIX} - - cd "${S}" || die - unpack ${PN}-manpages-${DOC_VER}.tar.${SRC_URI_SUFFIX} - - if use doc ; then - pushd "${S}"/Documentation &>/dev/null || die - unpack ${PN}-htmldocs-${DOC_VER}.tar.${SRC_URI_SUFFIX} - popd &>/dev/null || die - fi - else - git-r3_src_unpack - #cp "${FILESDIR}"/GIT-VERSION-GEN . || die - fi - -} - -src_prepare() { - if ! use safe-directory ; then - # This patch neuters the "safe directory" detection. - # bugs #838271, #838223 - PATCHES+=( - "${FILESDIR}"/git-2.46.2-unsafe-directory.patch - ) - fi - - default - - if use prefix ; then - # bug #757309 - sed -i \ - -e 's:/usr/local/opt/gettext/:/do/not/look/elsewhere/:g' \ - -e 's:/opt/homebrew/:/do/not/look/elsewhere/:g' \ - config.mak.uname || die - fi - - sed -i \ - -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ - -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ - -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ - -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ - -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - Makefile || die - - # Fix docbook2texi command - sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die -} - -git_emake() { - # bug #320647: PYTHON_PATH - local PYTHON_PATH="" - use perforce && PYTHON_PATH="${PYTHON}" - - local mymakeargs=( - ${MY_MAKEOPTS} - - prefix="${EPREFIX}"/usr - htmldir="${EPREFIX}"/usr/share/doc/${PF}/html - perllibdir="$(use perl && perl_get_raw_vendorlib)" - sysconfdir="${EPREFIX}"/etc - - CC="$(tc-getCC)" - CFLAGS="${CFLAGS}" - PKG_CONFIG="$(tc-getPKG_CONFIG)" - - # TODO: --verbose? - GIT_TEST_OPTS="--no-color" - - OPTAR="$(tc-getAR)" - OPTCC="$(tc-getCC)" - 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="" - - PYTHON_PATH="${PYTHON_PATH}" - - V=1 - "$@" - ) - - emake "${mymakeargs[@]}" -} - -src_configure() { - # https://lore.kernel.org/git/87ed3apy2u.fsf@gentoo.org/ - append-cflags $(test-flags-CC -std=gnu17) - - exportmakeopts -} - -src_compile() { - git_emake - - if use perl && use cgi ; then - git_emake gitweb - fi - - if use perl ; then - git_emake -C contrib/credential/netrc - fi - - if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then - git_emake -C contrib/credential/osxkeychain - fi - - pushd Documentation &>/dev/null || die - if [[ ${PV} == *9999 ]] ; then - git_emake man - if use doc ; then - git_emake info html - fi - else - if use doc ; then - git_emake info - fi - fi - popd &>/dev/null || die - - if use keyring ; then - git_emake -C contrib/credential/libsecret - fi - - pushd contrib/subtree &>/dev/null || die - git_emake git-subtree - # git-subtree.1 requires the full USE=doc dependency stack - use doc && git_emake git-subtree.html git-subtree.1 - popd &>/dev/null || die - - git_emake -C contrib/diff-highlight - - if use mediawiki ; then - git_emake -C contrib/mw-to-git - fi -} - -src_test() { - local disabled=( - # We make safe-directory optional - t0033-safe-directory.sh - ) - - local tests_cvs=( - t9200-git-cvsexportcommit.sh - t9400-git-cvsserver-server.sh - t9401-git-cvsserver-crlf.sh - t9402-git-cvsserver-refs.sh - t9600-cvsimport.sh - t9601-cvsimport-vendor-branch.sh - t9602-cvsimport-branches-tags.sh - t9603-cvsimport-patchsets.sh - t9604-cvsimport-timestamps.sh - ) - - local tests_perl=( - t3701-add-interactive.sh - t5502-quickfetch.sh - t5512-ls-remote.sh - t5520-pull.sh - t7106-reset-unborn-branch.sh - t7501-commit.sh - ) - # Bug #225601 - t0004 is not suitable for root perm - # Bug #219839 - t1004 is not suitable for root perm - # t0001-init.sh - check for init notices EPERM* fails - local tests_nonroot=( - t0001-init.sh - t0004-unwritable.sh - t0070-fundamental.sh - t1004-read-tree-m-u-wf.sh - t3700-add.sh - t7300-clean.sh - ) - # t9100 still fails with symlinks in SVN 1.7 - local test_svn=( t9100-git-svn-basic.sh ) - - # Unzip is used only for the testcase code, not by any normal parts of Git. - if ! has_version app-arch/unzip ; then - einfo "Disabling tar-tree tests" - disabled+=( t5000-tar-tree.sh ) - fi - - local cvs=0 - use cvs && let cvs=${cvs}+1 - if [[ ${EUID} -eq 0 ]] ; then - if [[ ${cvs} -eq 1 ]] ; then - ewarn "Skipping CVS tests because CVS does not work as root!" - ewarn "You should retest with FEATURES=userpriv!" - disabled+=( ${tests_cvs[@]} ) - fi - einfo "Skipping other tests that require being non-root" - disabled+=( ${tests_nonroot[@]} ) - else - if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -lt 3 ]] ; then - einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=( ${tests_cvs[@]} ) - fi - fi - - if ! use perl ; then - einfo "Disabling tests that need Perl" - disabled+=( ${tests_perl[@]} ) - fi - - einfo "Disabling tests that fail with SVN 1.7" - disabled+=( ${test_svn[@]} ) - - # Reset all previously disabled tests - pushd t &>/dev/null || die - local i - for i in *.sh.DISABLED ; do - [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" - done - einfo "Disabled tests:" - for i in ${disabled[@]} ; do - if [[ -f "${i}" ]] ; then - mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}" - fi - done - - # Avoid the test system removing the results because we want them ourselves - sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die - - # Clean old results first, must always run - nonfatal git_emake clean - popd &>/dev/null || die - - # Now run the tests, keep going if we hit an error, and don't terminate on - # failure - local rc - # t0610-reftable-basics.sh uses $A - local -x A= - einfo "Start test run" - #MAKEOPTS=-j1 - nonfatal git_emake --keep-going test - rc=$? - - # Display nice results, now print the results - pushd t &>/dev/null || die - nonfatal git_emake aggregate-results - - # And bail if there was a problem - [[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!" - - popd &>/dev/null || die - if use perl ; then - emake -C contrib/credential/netrc testverbose - fi -} - -src_install() { - git_emake DESTDIR="${D}" install - - if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then - dobin contrib/credential/osxkeychain/git-credential-osxkeychain - fi - - # Depending on the tarball and manual rebuild of the documentation, the - # manpages may exist in either OR both of these directories. - find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] - find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] - dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} - use doc && dodir /usr/share/doc/${PF}/html - local d - for d in / /howto/ /technical/ ; do - docinto ${d} - dodoc Documentation${d}*.txt - if use doc ; then - docinto ${d}/html - dodoc Documentation${d}*.html - fi - done - docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info - - newbashcomp contrib/completion/git-completion.bash ${PN} - bashcomp_alias git gitk - # Not really a bash-completion file (bug #477920) - # but still needed uncompressed (bug #507480) - insinto /usr/share/${PN} - doins contrib/completion/git-prompt.sh - - #dobin contrib/fast-import/git-p4 # Moved upstream - #dodoc contrib/fast-import/git-p4.txt # Moved upstream - newbin contrib/fast-import/import-tars.perl import-tars - exeinto /usr/libexec/git-core/ - newexe contrib/git-resurrect.sh git-resurrect - - # git-subtree - pushd contrib/subtree &>/dev/null || die - git_emake DESTDIR="${D}" install - if use doc ; then - # Do not move git subtree install-man outside USE=doc! - git_emake DESTDIR="${D}" install-man install-html - fi - newdoc README README.git-subtree - dodoc git-subtree.txt - popd &>/dev/null || die - - if use mediawiki ; then - git_emake -C contrib/mw-to-git DESTDIR="${D}" install - fi - - # diff-highlight - dobin contrib/diff-highlight/diff-highlight - newdoc contrib/diff-highlight/README README.diff-highlight - - # git-jump - exeinto /usr/libexec/git-core/ - doexe contrib/git-jump/git-jump - newdoc contrib/git-jump/README git-jump.txt - - # git-contacts - exeinto /usr/libexec/git-core/ - doexe contrib/contacts/git-contacts - dodoc contrib/contacts/git-contacts.txt - - if use keyring ; then - pushd contrib/credential/libsecret &>/dev/null || die - dobin git-credential-libsecret - popd &>/dev/null || die - fi - - dodir /usr/share/${PN}/contrib - # The following are excluded: - # completion - installed above - # diff-highlight - done above - # emacs - removed upstream - # examples - these are stuff that is not used in Git anymore actually - # git-jump - done above - # gitview - installed above - # p4import - excluded because fast-import has a better one - # patches - stuff the Git guys made to go upstream to other places - # persistent-https - TODO - # mw-to-git - TODO - # subtree - build seperately - # svnimport - use git-svn - # thunderbird-patch-inline - fixes thunderbird - local contrib_objects=( - buildsystems - fast-import - hooks - remotes2config.sh - rerere-train.sh - stats - workdir - ) - local i - for i in "${contrib_objects[@]}" ; do - cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}" - done - - if use perl && use cgi ; then - # We used to install in /usr/share/${PN}/gitweb - # but upstream installs in /usr/share/gitweb - # so we will install a symlink and use their location for compat with other - # distros - dosym ../gitweb /usr/share/${PN}/gitweb - - # INSTALL discusses configuration issues, not just installation - docinto / - newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb - newdoc "${S}"/gitweb/README README.gitweb - - for d in "${ED}"/usr/lib{,64}/perl5/ ; do - if [[ -d "${d}" ]] ; then - find "${d}" -name .packlist -delete || die - fi - done - else - rm -rf "${ED}"/usr/share/gitweb - fi - - if use perl ; then - pushd contrib/credential/netrc &>/dev/null || die - dobin git-credential-netrc - popd &>/dev/null || die - fi - - if ! use subversion ; then - rm -f "${ED}"/usr/libexec/git-core/git-svn \ - "${ED}"/usr/share/man/man1/git-svn.1* - fi - - if use xinetd ; then - insinto /etc/xinetd.d - newins "${FILESDIR}"/git-daemon.xinetd git-daemon - fi - - if ! use prefix ; then - newinitd "${FILESDIR}"/git-daemon-r2.initd git-daemon - newconfd "${FILESDIR}"/git-daemon.confd git-daemon - systemd_newunit "${FILESDIR}/git-daemon_at-r1.service" "git-daemon@.service" - systemd_dounit "${FILESDIR}/git-daemon.socket" - fi - - perl_delete_localpod - - # Remove disabled linguas - # we could remove sources in src_prepare, but install does not - # handle missing locale dir well - rm_loc() { - if [[ -e "${ED}/usr/share/locale/${1}" ]] ; then - rm -r "${ED}/usr/share/locale/${1}" || die - fi - } - plocale_for_each_disabled_locale rm_loc -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog "Please read /usr/share/bash-completion/completions/git for Git bash command" - elog "completion." - elog "Please read /usr/share/git/git-prompt.sh for Git bash prompt" - elog "Note that the prompt bash code is now in that separate script" - fi - - optfeature_header "Some scripts require additional dependencies:" - optfeature git-quiltimport dev-util/quilt - optfeature git-instaweb www-servers/lighttpd www-servers/apache www-servers/nginx -} diff --git a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.1.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.0-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.1.ebuild index 2097a69cfda..f90f10f55f1 100644 --- a/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-vcs/git/git-2.48.1.ebuild @@ -181,6 +181,18 @@ src_unpack() { } +src_prepare() { + if ! use safe-directory ; then + # This patch neuters the "safe directory" detection. + # bugs #838271, #838223 + PATCHES+=( + "${FILESDIR}"/git-2.46.2-unsafe-directory.patch + ) + fi + + default +} + src_configure() { local emesonargs=( $(meson_feature curl) @@ -253,6 +265,7 @@ src_compile() { if use tk ; then git_emake -C gitk-git + git_emake -C git-gui fi if use doc ; then @@ -432,6 +445,7 @@ src_install() { if use tk ; then git_emake -C gitk-git DESTDIR="${D}" install + git_emake -C git-gui DESTDIR="${D}" install fi perl_delete_localpod 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 2097a69cfda..f90f10f55f1 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 @@ -181,6 +181,18 @@ src_unpack() { } +src_prepare() { + if ! use safe-directory ; then + # This patch neuters the "safe directory" detection. + # bugs #838271, #838223 + PATCHES+=( + "${FILESDIR}"/git-2.46.2-unsafe-directory.patch + ) + fi + + default +} + src_configure() { local emesonargs=( $(meson_feature curl) @@ -253,6 +265,7 @@ src_compile() { if use tk ; then git_emake -C gitk-git + git_emake -C git-gui fi if use doc ; then @@ -432,6 +445,7 @@ src_install() { if use tk ; then git_emake -C gitk-git DESTDIR="${D}" install + git_emake -C git-gui DESTDIR="${D}" install fi perl_delete_localpod 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 2097a69cfda..f90f10f55f1 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 @@ -181,6 +181,18 @@ src_unpack() { } +src_prepare() { + if ! use safe-directory ; then + # This patch neuters the "safe directory" detection. + # bugs #838271, #838223 + PATCHES+=( + "${FILESDIR}"/git-2.46.2-unsafe-directory.patch + ) + fi + + default +} + src_configure() { local emesonargs=( $(meson_feature curl) @@ -253,6 +265,7 @@ src_compile() { if use tk ; then git_emake -C gitk-git + git_emake -C git-gui fi if use doc ; then @@ -432,6 +445,7 @@ src_install() { if use tk ; then git_emake -C gitk-git DESTDIR="${D}" install + git_emake -C git-gui DESTDIR="${D}" install fi perl_delete_localpod 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 2097a69cfda..f90f10f55f1 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 @@ -181,6 +181,18 @@ src_unpack() { } +src_prepare() { + if ! use safe-directory ; then + # This patch neuters the "safe directory" detection. + # bugs #838271, #838223 + PATCHES+=( + "${FILESDIR}"/git-2.46.2-unsafe-directory.patch + ) + fi + + default +} + src_configure() { local emesonargs=( $(meson_feature curl) @@ -253,6 +265,7 @@ src_compile() { if use tk ; then git_emake -C gitk-git + git_emake -C git-gui fi if use doc ; then @@ -432,6 +445,7 @@ src_install() { if use tk ; then git_emake -C gitk-git DESTDIR="${D}" install + git_emake -C git-gui DESTDIR="${D}" install fi perl_delete_localpod 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 17a8afd1ac8..f90f10f55f1 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 @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,7 +8,7 @@ GENTOO_DEPEND_ON_PERL=no # bug #329479: git-remote-testgit is not multiple-version aware PYTHON_COMPAT=( python3_{10..13} ) -inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd +inherit toolchain-funcs perl-module bash-completion-r1 optfeature plocale python-single-r1 systemd meson PLOCALES="bg ca de es fr is it ko pt_PT ru sv vi zh_CN" @@ -58,7 +58,7 @@ S="${WORKDIR}"/${MY_P} LICENSE="GPL-2" SLOT="0" -IUSE="+blksha1 +curl cgi doc keyring +gpg highlight +iconv mediawiki +nls +pcre perforce +perl +safe-directory selinux subversion tk +webdav xinetd cvs test" +IUSE="+curl cgi cvs doc keyring +gpg highlight +iconv mediawiki +nls +pcre perforce +perl +safe-directory selinux subversion test tk +webdav xinetd" # Common to both DEPEND and RDEPEND DEPEND=" @@ -122,7 +122,11 @@ BDEPEND=" ) keyring? ( virtual/pkgconfig ) nls? ( sys-devel/gettext ) - test? ( app-crypt/gnupg ) + test? ( + app-arch/unzip + app-crypt/gnupg + dev-lang/perl + ) " # Live ebuild builds man pages and HTML docs, additionally @@ -144,11 +148,7 @@ REQUIRED_USE=" RESTRICT="!test? ( test )" PATCHES=( - # Avoid automagic CVS, bug #350330 - "${FILESDIR}"/git-2.37.0_rc1-optional-cvs.patch - - # Make submodule output quiet - "${FILESDIR}"/git-2.21.0-quiet-submodules-testcase.patch + "${FILESDIR}"/${PN}-2.48.0-doc-deps.patch ) pkg_setup() { @@ -163,72 +163,6 @@ pkg_setup() { fi } -# This is needed because for some obscure reasons future calls to make don't -# pick up these exports if we export them in src_unpack() -exportmakeopts() { - local extlibs myopts - - myopts=( - ASCIIDOC_NO_ROFF=YesPlease - - $(usex perl 'INSTALLDIRS=vendor NO_PERL_CPAN_FALLBACKS=YesPlease' NO_PERL=YesPlease) - - $(usev elibc_musl NO_REGEX=NeedsStartEnd) - $(usev !cvs NO_CVS=YesPlease) - $(usev !iconv NO_ICONV=YesPlease) - $(usev !nls NO_GETTEXT=YesPlease) - $(usev !perforce NO_PYTHON=YesPlease) - $(usev !subversion NO_SVN_TESTS=YesPlease) - $(usev !tk NO_TCLTK=YesPlease) - ) - - if use blksha1 ; then - myopts+=( BLK_SHA1=YesPlease ) - fi - - if use curl ; then - use webdav || myopts+=( NO_EXPAT=YesPlease ) - else - myopts+=( NO_CURL=YesPlease ) - fi - - # Broken assumptions because of static build system - myopts+=( - NO_FINK=YesPlease - NO_DARWIN_PORTS=YesPlease - INSTALL=install - TAR=tar - SHELL_PATH="${EPREFIX}/bin/sh" - SANE_TOOL_PATH= - OLD_ICONV= - NO_EXTERNAL_GREP= - ) - - # Can't define this to null, since the entire makefile depends on it - sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile || die - - if use pcre; then - myopts+=( USE_LIBPCRE2=YesPlease ) - extlibs+=( -lpcre2-8 ) - fi - - if [[ ${CHOST} == *-solaris* ]]; then - myopts+=( - NEEDS_LIBICONV=YesPlease - HAVE_CLOCK_MONOTONIC=1 - ) - - if grep -Fq getdelim "${ESYSROOT}"/usr/include/stdio.h ; then - myopts+=( HAVE_GETDELIM=1 ) - fi - fi - - myopts+=( ASCIIDOC8=YesPlease ) - - export MY_MAKEOPTS="${myopts[@]}" - export EXTLIBS="${extlibs[@]}" -} - src_unpack() { if [[ ${PV} != *9999 ]] ; then unpack ${MY_P}.tar.${SRC_URI_SUFFIX} @@ -243,7 +177,6 @@ src_unpack() { fi else git-r3_src_unpack - #cp "${FILESDIR}"/GIT-VERSION-GEN . || die fi } @@ -258,80 +191,61 @@ src_prepare() { fi default +} - if use prefix ; then - # bug #757309 - sed -i \ - -e 's:/usr/local/opt/gettext/:/do/not/look/elsewhere/:g' \ - -e 's:/opt/homebrew/:/do/not/look/elsewhere/:g' \ - config.mak.uname || die +src_configure() { + local emesonargs=( + $(meson_feature curl) + $(meson_feature cgi gitweb) + $(meson_feature webdav expat) + $(meson_feature iconv) + $(meson_feature nls gettext) + $(meson_feature pcre pcre2) + $(meson_feature perl) + $(meson_feature perforce python) + $(meson_use test tests) + -Dperl_cpan_fallback=false + ) + + # For non-live, we use a downloaded docs tarball instead. + if [[ ${PV} == *9999 ]] || use doc ; then + emesonargs+=( + -Ddocs="man$(usev doc ',html')" + ) fi - sed -i \ - -e 's:^\(CFLAGS[[:space:]]*=\).*$:\1 $(OPTCFLAGS) -Wall:' \ - -e 's:^\(LDFLAGS[[:space:]]*=\).*$:\1 $(OPTLDFLAGS):' \ - -e 's:^\(CC[[:space:]]* =\).*$:\1$(OPTCC):' \ - -e 's:^\(AR[[:space:]]* =\).*$:\1$(OPTAR):' \ - -e "s:\(PYTHON_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - -e "s:\(PERL_PATH[[:space:]]\+=[[:space:]]\+\)\(.*\)$:\1${EPREFIX}\2:" \ - Makefile || die - - # Fix docbook2texi command - sed -r -i 's/DOCBOOK2X_TEXI[[:space:]]*=[[:space:]]*docbook2x-texi/DOCBOOK2X_TEXI = docbook2texi.pl/' \ - Documentation/Makefile || die + meson_src_configure } git_emake() { - # bug #320647: PYTHON_PATH - local PYTHON_PATH="" - use perforce && PYTHON_PATH="${PYTHON}" - local mymakeargs=( - ${MY_MAKEOPTS} - prefix="${EPREFIX}"/usr htmldir="${EPREFIX}"/usr/share/doc/${PF}/html - perllibdir="$(use perl && perl_get_raw_vendorlib)" sysconfdir="${EPREFIX}"/etc + perllibdir="$(use perl && perl_get_raw_vendorlib)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + LDFLAGS="${LDFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)" - - # TODO: --verbose? - GIT_TEST_OPTS="--no-color" - OPTAR="$(tc-getAR)" OPTCC="$(tc-getCC)" 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="" - PYTHON_PATH="${PYTHON_PATH}" - V=1 + "$@" ) emake "${mymakeargs[@]}" } -src_configure() { - exportmakeopts -} - src_compile() { - git_emake - - if use perl && use cgi ; then - git_emake gitweb - fi + meson_src_compile if use perl ; then git_emake -C contrib/credential/netrc @@ -341,170 +255,61 @@ src_compile() { git_emake -C contrib/credential/osxkeychain fi - pushd Documentation &>/dev/null || die - if [[ ${PV} == *9999 ]] ; then - git_emake man - if use doc ; then - git_emake info html - fi - else - if use doc ; then - git_emake info - fi - fi - popd &>/dev/null || die - if use keyring ; then git_emake -C contrib/credential/libsecret fi - pushd contrib/subtree &>/dev/null || die - git_emake git-subtree - # git-subtree.1 requires the full USE=doc dependency stack - use doc && git_emake git-subtree.html git-subtree.1 - popd &>/dev/null || die - - git_emake -C contrib/diff-highlight - if use mediawiki ; then git_emake -C contrib/mw-to-git fi -} - -src_test() { - local disabled=( - # We make safe-directory optional - t0033-safe-directory.sh - ) - local tests_cvs=( - t9200-git-cvsexportcommit.sh - t9400-git-cvsserver-server.sh - t9401-git-cvsserver-crlf.sh - t9402-git-cvsserver-refs.sh - t9600-cvsimport.sh - t9601-cvsimport-vendor-branch.sh - t9602-cvsimport-branches-tags.sh - t9603-cvsimport-patchsets.sh - t9604-cvsimport-timestamps.sh - ) - - local tests_perl=( - t3701-add-interactive.sh - t5502-quickfetch.sh - t5512-ls-remote.sh - t5520-pull.sh - t7106-reset-unborn-branch.sh - t7501-commit.sh - ) - # Bug #225601 - t0004 is not suitable for root perm - # Bug #219839 - t1004 is not suitable for root perm - # t0001-init.sh - check for init notices EPERM* fails - local tests_nonroot=( - t0001-init.sh - t0004-unwritable.sh - t0070-fundamental.sh - t1004-read-tree-m-u-wf.sh - t3700-add.sh - t7300-clean.sh - ) - # t9100 still fails with symlinks in SVN 1.7 - local test_svn=( t9100-git-svn-basic.sh ) - - # Unzip is used only for the testcase code, not by any normal parts of Git. - if ! has_version app-arch/unzip ; then - einfo "Disabling tar-tree tests" - disabled+=( t5000-tar-tree.sh ) + if use tk ; then + git_emake -C gitk-git + git_emake -C git-gui fi - local cvs=0 - use cvs && let cvs=${cvs}+1 - if [[ ${EUID} -eq 0 ]] ; then - if [[ ${cvs} -eq 1 ]] ; then - ewarn "Skipping CVS tests because CVS does not work as root!" - ewarn "You should retest with FEATURES=userpriv!" - disabled+=( ${tests_cvs[@]} ) - fi - einfo "Skipping other tests that require being non-root" - disabled+=( ${tests_nonroot[@]} ) - else - if [[ ${cvs} -gt 0 ]] && has_version dev-vcs/cvs ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -gt 1 ]] && has_version "dev-vcs/cvs[server]" ; then - let cvs=${cvs}+1 - fi - - if [[ ${cvs} -lt 3 ]] ; then - einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])" - disabled+=( ${tests_cvs[@]} ) - fi - fi - - if ! use perl ; then - einfo "Disabling tests that need Perl" - disabled+=( ${tests_perl[@]} ) + if use doc ; then + # Workaround fragments that still use the Makefile and can't + # find the bits from Meson's out-of-source build + ln -s "${BUILD_DIR}"/Documentation/asciidoc.conf "${S}"/Documentation/asciidoc.conf || die fi - einfo "Disabling tests that fail with SVN 1.7" - disabled+=( ${test_svn[@]} ) - - # Reset all previously disabled tests - pushd t &>/dev/null || die - local i - for i in *.sh.DISABLED ; do - [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}" - done - einfo "Disabled tests:" - for i in ${disabled[@]} ; do - if [[ -f "${i}" ]] ; then - mv -f "${i}" "${i}.DISABLED" && einfo "Disabled ${i}" - fi - done - - # Avoid the test system removing the results because we want them ourselves - sed -e '/^[[:space:]]*$(MAKE) clean/s,^,#,g' -i Makefile || die - - # Clean old results first, must always run - nonfatal git_emake clean - popd &>/dev/null || die + git_emake -C contrib/diff-highlight + git_emake -C contrib/subtree git-subtree + # git-subtree.1 requires the full USE=doc dependency stack + use doc && git_emake -C contrib/subtree git-subtree.html git-subtree.1 +} - # Now run the tests, keep going if we hit an error, and don't terminate on - # failure - local rc +src_test() { # t0610-reftable-basics.sh uses $A local -x A= - einfo "Start test run" - #MAKEOPTS=-j1 - nonfatal git_emake --keep-going test - rc=$? - # Display nice results, now print the results - pushd t &>/dev/null || die - nonfatal git_emake aggregate-results + meson_src_test - # And bail if there was a problem - [[ ${rc} -eq 0 ]] || die "Tests failed. Please file a bug!" - - popd &>/dev/null || die - if use perl ; then - emake -C contrib/credential/netrc testverbose - fi + # TODO: Needs help finding built git with meson + #if use perl ; then + # git_emake -C contrib/credential/netrc testverbose + #fi } src_install() { - git_emake DESTDIR="${D}" install + meson_src_install if [[ ${CHOST} == *-darwin* ]] && tc-is-clang ; then dobin contrib/credential/osxkeychain/git-credential-osxkeychain fi + if use doc ; then + cp -r "${ED}"/usr/share/doc/git-doc/. "${ED}"/usr/share/doc/${PF}/html || die + rm -rf "${ED}"/usr/share/doc/git-doc/ || die + fi + # Depending on the tarball and manual rebuild of the documentation, the # manpages may exist in either OR both of these directories. find man?/*.[157] >/dev/null 2>&1 && doman man?/*.[157] find Documentation/*.[157] >/dev/null 2>&1 && doman Documentation/*.[157] dodoc README* Documentation/{SubmittingPatches,CodingGuidelines} + use doc && dodir /usr/share/doc/${PF}/html local d for d in / /howto/ /technical/ ; do @@ -516,8 +321,6 @@ src_install() { fi done docinto / - # Upstream does not ship this pre-built :-( - use doc && doinfo Documentation/{git,gitman}.info newbashcomp contrib/completion/git-completion.bash ${PN} bashcomp_alias git gitk @@ -543,10 +346,6 @@ src_install() { dodoc git-subtree.txt popd &>/dev/null || die - if use mediawiki ; then - git_emake -C contrib/mw-to-git DESTDIR="${D}" install - fi - # diff-highlight dobin contrib/diff-highlight/diff-highlight newdoc contrib/diff-highlight/README README.diff-highlight @@ -562,9 +361,7 @@ src_install() { dodoc contrib/contacts/git-contacts.txt if use keyring ; then - pushd contrib/credential/libsecret &>/dev/null || die - dobin git-credential-libsecret - popd &>/dev/null || die + dobin contrib/credential/libsecret/git-credential-libsecret fi dodir /usr/share/${PN}/contrib @@ -596,7 +393,7 @@ src_install() { cp -rf "${S}"/contrib/${i} "${ED}"/usr/share/${PN}/contrib || die "Failed contrib ${i}" done - if use perl && use cgi ; then + if use cgi ; then # We used to install in /usr/share/${PN}/gitweb # but upstream installs in /usr/share/gitweb # so we will install a symlink and use their location for compat with other @@ -618,9 +415,15 @@ src_install() { fi if use perl ; then - pushd contrib/credential/netrc &>/dev/null || die - dobin git-credential-netrc - popd &>/dev/null || die + dodir "$(perl_get_vendorlib)" + mv "${ED}"/usr/share/perl5/Git.pm "${ED}/$(perl_get_vendorlib)" || die + mv "${ED}"/usr/share/perl5/Git "${ED}/$(perl_get_vendorlib)" || die + + dobin contrib/credential/netrc/git-credential-netrc + fi + + if use mediawiki ; then + git_emake -C contrib/mw-to-git DESTDIR="${D}" install fi if ! use subversion ; then @@ -640,6 +443,11 @@ src_install() { systemd_dounit "${FILESDIR}/git-daemon.socket" fi + if use tk ; then + git_emake -C gitk-git DESTDIR="${D}" install + git_emake -C git-gui DESTDIR="${D}" install + fi + perl_delete_localpod # Remove disabled linguas From 5a9b4dea35b144c119293d35da564080938b2d6b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:07:06 +0000 Subject: [PATCH 053/145] eclass/cargo: Sync with Gentoo It's from Gentoo commit 89e3c1416372bd56bd6c8de7b5352c61b9f826f4. --- .../src/third_party/portage-stable/eclass/cargo.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/cargo.eclass b/sdk_container/src/third_party/portage-stable/eclass/cargo.eclass index b1285e13a5b..0bc24feea22 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/cargo.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/cargo.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: cargo.eclass @@ -527,6 +527,12 @@ cargo_src_unpack() { done < <(sha256sum -z "${crates[@]}" || die) popd >/dev/null || die + + if [[ ${#crates[@]} -ge 300 ]]; then + eqawarn "This package uses a very large number of CRATES. Please provide" + eqawarn "a crate tarball instead and fetch it via SRC_URI. You can use" + eqawarn "'pycargoebuild --crate-tarball' to create one." + fi fi cargo_gen_config From 5085d0dc6f35baa896a07f6f72a73c3a0f9439cd Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:08:10 +0000 Subject: [PATCH 054/145] eclass/optfeature: Sync with Gentoo It's from Gentoo commit 623294d2cb0ab7815d2b7b8a4202f2a7c481299b. --- .../src/third_party/portage-stable/eclass/optfeature.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass index c8b4911320d..b82ac893add 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/optfeature.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: optfeature.eclass @@ -79,7 +79,7 @@ optfeature_header() { # @CODE # pkg_postinst() { # optfeature "foo support" app-misc/foo -# optfeature "bar support" app-misc/bar app-misc/baz[bar] +# optfeature "bar support" app-misc/bar "app-misc/baz[bar]" # optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c # } # @CODE From f3b9fa709b76bfb83a7cc924ecac30c614490d72 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:08:56 +0000 Subject: [PATCH 055/145] eclass/toolchain: Sync with Gentoo It's from Gentoo commit b9c5c7723b11f68319ff9d00a3eeba26c4a22733. --- .../portage-stable/eclass/toolchain.eclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 d8599485570..3f7c2fbff78 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass @@ -2749,7 +2749,9 @@ gcc_movelibs() { # code to run on the target. if is_crosscompile ; then dodir "${HOSTLIBPATH#${EPREFIX}}" - mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die + # XXX: Ideally, we'd use $(get_libdir) here, but it's + # not right for cross. See bug #942573 and bug #794181. + mv "${ED}"/usr/lib*/libcc1* "${D}${HOSTLIBPATH}" || die fi # libgccjit gets installed to /usr/lib, not /usr/$(get_libdir). Probably @@ -3153,21 +3155,24 @@ XGCC() { get_make_var GCC_FOR_TARGET ; } has toolchain_death_notice ${EBUILD_DEATH_HOOKS} || EBUILD_DEATH_HOOKS+=" toolchain_death_notice" toolchain_death_notice() { + # TODO: For bootstrap comparison failures, include the stage2 & stage3 + # differing objects to avoid having to ask reporters to manually collect... local dir for dir in "${WORKDIR}"/build-jit "${WORKDIR}"/build ; do if [[ -e "${dir}" ]] ; then pushd "${WORKDIR}" >/dev/null (echo '' | $(tc-getCC ${CTARGET}) ${CFLAGS} -v -E - 2>&1) > "${dir}"/gccinfo.log [[ -e "${T}"/build.log ]] && cp "${T}"/build.log "${dir}" - tar -arf "${WORKDIR}"/gcc-build-logs.tar.xz \ - "${dir#${WORKDIR}/}"/gccinfo.log "${dir#${WORKDIR}/}"/build.log $(find -name "${dir}"/config.log) - rm "${dir}"/gccinfo.log "${dir}"/build.log + tar -rf "${WORKDIR}"/gcc-build-logs.tar \ + "${dir#${WORKDIR}/}"/gccinfo.log "${dir#${WORKDIR}/}"/build.log $(find "${dir#${WORKDIR}/}" -type f -name "config.log") + rm "${dir#${WORKDIR}/}"/gccinfo.log "${dir#${WORKDIR}/}"/build.log eerror eerror "Please include ${WORKDIR}/gcc-build-logs.tar.xz in your bug report." eerror popd >/dev/null fi done + xz -9e "${WORKDIR}"/gcc-build-logs.tar } fi From b5dea8e50e523f8f12a07cf801c7a9817f02f1b2 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:14 +0000 Subject: [PATCH 056/145] licenses: Sync with Gentoo It's from Gentoo commit f2d671eb43e59aff1f54af9824a9dd6d676ed6bd. --- .../portage-stable/licenses/FDL-1.1 | 2 +- .../portage-stable/licenses/FDL-1.2 | 2 +- .../third_party/portage-stable/licenses/GPL-1 | 9 +- .../third_party/portage-stable/licenses/GPL-2 | 9 +- ...L-2+-with-Pyinstaller-Bootloader-exception | 592 +-------------- .../licenses/GPL-2-with-MySQL-FLOSS-exception | 344 +-------- .../licenses/GPL-2-with-classpath-exception | 323 +-------- .../licenses/GPL-2-with-font-exception | 343 +-------- .../licenses/GPL-2-with-linking-exception | 344 +-------- .../licenses/GPL-3-with-font-exception | 678 +----------------- .../licenses/GPL-3-with-openssl-exception | 678 +----------------- .../portage-stable/licenses/Interbase-1.0 | 104 --- .../portage-stable/licenses/LGPL-2 | 13 +- .../licenses/LGPL-2-with-linking-exception | 488 +------------ .../portage-stable/licenses/LGPL-2.1 | 11 +- .../licenses/LGPL-2.1-with-linking-exception | 507 +------------ .../licenses/LGPL-3-with-linking-exception | 170 +---- 17 files changed, 48 insertions(+), 4569 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/licenses/Interbase-1.0 diff --git a/sdk_container/src/third_party/portage-stable/licenses/FDL-1.1 b/sdk_container/src/third_party/portage-stable/licenses/FDL-1.1 index a03f6040394..247a2b9574e 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/FDL-1.1 +++ b/sdk_container/src/third_party/portage-stable/licenses/FDL-1.1 @@ -2,7 +2,7 @@ Version 1.1, March 2000 Copyright (C) 2000 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/sdk_container/src/third_party/portage-stable/licenses/FDL-1.2 b/sdk_container/src/third_party/portage-stable/licenses/FDL-1.2 index 68d93f4f67f..42a2ee9cf02 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/FDL-1.2 +++ b/sdk_container/src/third_party/portage-stable/licenses/FDL-1.2 @@ -3,7 +3,7 @@ Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-1 b/sdk_container/src/third_party/portage-stable/licenses/GPL-1 index 1ca5119e5a0..e65a4b54b71 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-1 +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-1 @@ -2,7 +2,7 @@ Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -215,8 +215,7 @@ the exclusion of warranty; and each file should have at least the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + along with this program; if not, see . Also add information on how to contact you by electronic and paper mail. @@ -242,7 +241,7 @@ necessary. Here a sample; alter the names: program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. - , 1 April 1989 - Ty Coon, President of Vice + , 1 April 1989 + Moe Ghoul, President of Vice That's all there is to it! diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2 b/sdk_container/src/third_party/portage-stable/licenses/GPL-2 index 0e845b5e312..e5afae94fab 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2 +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2 @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -304,8 +304,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + with this program; if not, see . Also add information on how to contact you by electronic and paper mail. @@ -329,8 +328,8 @@ necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. - , 1 April 1989 - Ty Coon, President of Vice + , 1 April 1989 + Moe Ghoul, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2+-with-Pyinstaller-Bootloader-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-2+-with-Pyinstaller-Bootloader-exception index 9236991d738..d535c7be9fe 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2+-with-Pyinstaller-Bootloader-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2+-with-Pyinstaller-Bootloader-exception @@ -1,16 +1,5 @@ -================================ - The PyInstaller licensing terms -================================ - - -Copyright (c) 2010-2022, PyInstaller Development Team -Copyright (c) 2005-2009, Giovanni Bajo -Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc. - - -PyInstaller is licensed under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. +GNU General Public License, version 2 or any later version. +See GPL-2 for the full text of this license. Bootloader Exception @@ -23,580 +12,3 @@ those combinations without any restriction coming from the use of those files. (The General Public License restrictions do apply in other respects; for example, they cover modification of the files, and distribution when not linked into a combined executable.) - - -Bootloader and Related Files ----------------------------- - -Bootloader and related files are files which are embedded within the -final executable. This includes files in directories: - -./bootloader/ -./PyInstaller/loader - - -Run-time Hooks ----------------------------- - -Run-time Hooks are a different kind of files embedded within the final -executable. To ease moving them into a separate repository, or into the -respective project, these files are now licensed under the Apache License, -Version 2.0. - -Run-time Hooks are in the directory -./PyInstaller/hooks/rthooks - - -About the PyInstaller Development Team --------------------------------------- - -The PyInstaller Development Team is the set of contributors -to the PyInstaller project. A full list with details is kept -in the documentation directory, in the file -``doc/CREDITS.rst``. - -The core team that coordinates development on GitHub can be found here: -https://github.com/pyinstaller/pyinstaller. As of 2021, it consists of: - -* Hartmut Goebel -* Jasper Harrison -* Bryan Jones -* Brenainn Woodsend -* Rok Mandeljc - -Our Copyright Policy --------------------- - -PyInstaller uses a shared copyright model. Each contributor maintains copyright -over their contributions to PyInstaller. But, it is important to note that these -contributions are typically only changes to the repositories. Thus, -the PyInstaller source code, in its entirety is not the copyright of any single -person or institution. Instead, it is the collective copyright of the entire -PyInstaller Development Team. If individual contributors want to maintain -a record of what changes/contributions they have specific copyright on, they -should indicate their copyright in the commit message of the change, when they -commit the change to the PyInstaller repository. - -With this in mind, the following banner should be used in any source code file -to indicate the copyright and license terms: - - -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2022, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License (version 2 -# or later) with exception for distributing the bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception) -#----------------------------------------------------------------------------- - - -For run-time hooks, the following banner should be used: - -#----------------------------------------------------------------------------- -# Copyright (c) 2005-2022, PyInstaller Development Team. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# -# The full license is in the file COPYING.txt, distributed with this software. -# -# SPDX-License-Identifier: Apache-2.0 -#----------------------------------------------------------------------------- - - -================================ -GNU General Public License -================================ - -https://gnu.org/licenses/gpl-2.0.html - - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - -================================ -Apache License 2.0 -================================ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-MySQL-FLOSS-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-MySQL-FLOSS-exception index 96a2205c6dd..a3aecf74b12 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-MySQL-FLOSS-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-MySQL-FLOSS-exception @@ -1,3 +1,7 @@ +GNU General Public License, version 2. +See GPL-2 for the full text of this license. + + MySQL FLOSS License Exception The MySQL AB Exception for Free/Libre and Open Source Software-only @@ -97,343 +101,3 @@ removing the FLOSS Exception notice from that copy of the Program, provided that the copy has never been modified by you or any third party. $Id: FLOSS-exception.txt,v 1.5 2004/07/15 15:24:19 z Exp $ - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-classpath-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-classpath-exception index 5da7859773f..8e25e4d9944 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-classpath-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-classpath-exception @@ -1,328 +1,7 @@ GNU General Public License, version 2, with the Classpath Exception The GNU General Public License (GPL) - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Library General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you -can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny -you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must -make sure that they, too, receive or can get the source code. And you must -show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program proprietary. -To prevent this, we have made it clear that any patent must be licensed for -everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included -without limitation in the term "modification".) Each licensee is addressed as -"you". - -Activities other than copying, distribution and modification are not covered by -this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made by -running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as -you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may -at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus -forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all of -these conditions: - - a) You must cause the modified files to carry prominent notices stating - that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in whole or - in part contains or is derived from the Program or any part thereof, to be - licensed as a whole at no charge to all third parties under the terms of - this License. - - c) If the modified program normally reads commands interactively when run, - you must cause it, when started running for such interactive use in the - most ordinary way, to print or display an announcement including an - appropriate copyright notice and a notice that there is no warranty (or - else, saying that you provide a warranty) and that users may redistribute - the program under these conditions, and telling the user how to view a copy - of this License. (Exception: if the Program itself is interactive but does - not normally print such an announcement, your work based on the Program is - not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, and -its terms, do not apply to those sections when you distribute them as separate -works. But when you distribute the same sections as part of a whole which is a -work based on the Program, the distribution of the whole must be on the terms -of this License, whose permissions for other licensees extend to the entire -whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on -the Program. - -In addition, mere aggregation of another work not based on the Program with the -Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this -License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 and -2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source - code, which must be distributed under the terms of Sections 1 and 2 above - on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three years, to - give any third party, for a charge no more than your cost of physically - performing source distribution, a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of Sections 1 - and 2 above on a medium customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer to - distribute corresponding source code. (This alternative is allowed only - for noncommercial distribution and only if you received the program in - object code or executable form with such an offer, in accord with - Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code -distributed need not include anything that is normally distributed (in either -source or binary form) with the major components (compiler, kernel, and so on) -of the operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the source -code from the same place counts as distribution of the source code, even though -third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the Program -or its derivative works. These actions are prohibited by law if you do not -accept this License. Therefore, by modifying or distributing the Program (or -any work based on the Program), you indicate your acceptance of this License to -do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor to -copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of the -rights granted herein. You are not responsible for enforcing compliance by -third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), conditions -are imposed on you (whether by court order, agreement or otherwise) that -contradict the conditions of this License, they do not excuse you from the -conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In -such case, this License incorporates the limitation as if written in the body -of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new problems -or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either of -that version or of any later version published by the Free Software Foundation. -If the Program does not specify a version number of this License, you may -choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE -PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE -PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR -INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA -BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER -OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - - One line to give the program's name and a brief idea of what it does. - - Copyright (C) - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., 59 - Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it -starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author Gnomovision comes - with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free - software, and you are welcome to redistribute it under certain conditions; - type 'show c' for details. - -The hypothetical commands 'show w' and 'show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than 'show w' and 'show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - 'Gnomovision' (which makes passes at compilers) written by James Hacker. - - signature of Ty Coon, 1 April 1989 - - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General Public -License instead of this License. +See GPL-2 for the full text of this license. "CLASSPATH" EXCEPTION TO THE GPL diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-font-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-font-exception index fb2cdf893c5..f20f0ae63c2 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-font-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-font-exception @@ -1,3 +1,6 @@ +GNU General Public License, version 2. +See GPL-2 for the full text of this license. + As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to @@ -7,343 +10,3 @@ by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-linking-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-linking-exception index 0b5de4cb4f4..70513a6092f 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-linking-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-2-with-linking-exception @@ -1,3 +1,6 @@ +GNU General Public License, version 2. +See GPL-2 for the full text of this license. + As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, @@ -8,344 +11,3 @@ which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. - - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-font-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-font-exception index 2b14281c786..f3146f5376a 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-font-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-font-exception @@ -1,3 +1,6 @@ +GNU General Public License, version 3. +See GPL-3 for the full text of this license. + As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to @@ -7,678 +10,3 @@ by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-openssl-exception b/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-openssl-exception index e7a6be5c2ea..79131af3803 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-openssl-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/GPL-3-with-openssl-exception @@ -1,679 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - - Exception +GNU General Public License, version 3. +See GPL-3 for the full text of this license. In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library under diff --git a/sdk_container/src/third_party/portage-stable/licenses/Interbase-1.0 b/sdk_container/src/third_party/portage-stable/licenses/Interbase-1.0 deleted file mode 100644 index beb977adf9f..00000000000 --- a/sdk_container/src/third_party/portage-stable/licenses/Interbase-1.0 +++ /dev/null @@ -1,104 +0,0 @@ -INTERBASE PUBLIC LICENSE -Version 1.0 -1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications. -1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. -1.5. ''Executable'' means Covered Code in any form other than Source Code. -1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.8. ''License'' means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. -1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with, all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. -2. Source Code License. -2.1. The Initial Developer Grant. -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and -(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. -2.2. Contributor Grant. -Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license -(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. -3. Distribution Obligations. -3.1. Application of License. -The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. -Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -3.3. Description of Modifications. -You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. -3.4. Intellectual Property Matters -(a) Third Party Claims. -If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(b) Contributor APIs. -If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. -(c) Representations. -Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -3.5. Required Notices. -You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.6. Distribution of Executable Versions. -You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -3.7. Larger Works. -You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. -4. Inability to Comply Due to Statute or Regulation. -If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -5. Application of this License. -This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. -6. Versions of the License. -6.1. New Versions. -Inprise Corporation (''Inprise'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -6.2. Effect of New Versions. -Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Inprise. No one other than Inprise has the right to modify the terms applicable to Covered Code created under this License. -6.3. Derivative Works. -If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL", "Inprise", "ISC", "InterBase", "IB'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) -6.4 Origin of the InterBase Public License. -The InterBase Public License V 1.0 is based on the Mozilla Public License V 1.1 with the following changes: -1. The license is published by Inprise Corporation. Only Inprise Corporation can modify the terms applicable to Covered Code. -2. The license can be modified and used for code which is not already governed by this license. Modified versions of the license must be renamed to avoid confusion with Netscape's or Inprise Corporation's public license and must include a description of changes from the InterBase Public License. -3. The name of the license in Exhibit A is the "InterBase Public License". -4. The reference to an alternative license in Exhibit A has been removed. -5. Amendments I, II, III, V, and VI have been deleted. -6. Exhibit A, Netscape Public License has been deleted -7. A new amendment (II) has been added, describing the required and restricted rights to use the trademarks of Inprise Corporation. -7. DISCLAIMER OF WARRANTY. -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -8. TERMINATION. -8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -8.2. If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: -(a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. -(b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. -8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -9. LIMITATION OF LIABILITY. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -10. U.S. GOVERNMENT END USERS. -The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -11. MISCELLANEOUS. -This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -12. RESPONSIBILITY FOR CLAIMS. -As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -13. MULTIPLE-LICENSED CODE. -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the IPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. -EXHIBIT A - InterBase Public License. -``The contents of this file are subject to the InterBase Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.Inprise.com/IPL.html -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -The Original Code was created by Inprise Corporation and its predecessors. -Portions created by Inprise Corporation are Copyright (C) Inprise Corporation. All Rights Reserved. -Contributor(s): ______________________________________. -AMENDMENTS -I. Inprise and logo. This License does not grant any rights to use the trademarks "Inprise'', "InterBase," "Java" or "JavaScript" even if such marks are included in the Original Code or Modifications. -II. Trademark Usage. -II.1. Advertising Materials. All advertising materials mentioning features or use of the covered Code must display the following acknowledgement: "This product includes software developed by Inprise Corporation. " -II.2. Endorsements. The names "Inprise," "InterBase," "ISC," and "IB" must not be used to endorse or promote Contributor Versions or Larger Works without the prior written permission of Inprise. -II.3. Product Names. Contributor Versions and Larger Works may not be called "Inprise" or "InterBase" nor may the words "Inprise" or "InterBase" appear in their names without the prior written permission of Inprise Corporation. diff --git a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2 b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2 index 5bc8fb2c8f7..d53864f9088 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2 +++ b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2 @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. - + 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an @@ -462,9 +462,8 @@ convey the exclusion of warranty; and each file should have at least the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Library General Public License + along with this library; if not, see . Also add information on how to contact you by electronic and paper mail. @@ -475,7 +474,7 @@ necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. - , 1 April 1990 - Ty Coon, President of Vice + , 1 April 1990 + Moe Ghoul, President of Vice That's all there is to it! diff --git a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2-with-linking-exception b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2-with-linking-exception index ccdb9fb8b77..29063c7a231 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2-with-linking-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2-with-linking-exception @@ -1,3 +1,6 @@ +GNU Lesser General Public License, version 2. +See LGPL-2 for the full text of this license. + As a special exception to the GNU Library General Public License, you may link, statically or dynamically, a "work that uses the Library" with a publicly distributed version of the Library to produce an @@ -11,488 +14,3 @@ conditions defined in clause 3 of the GNU Library General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Library General Public License. - ----------------------------------------------------------------------- - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1 b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1 index 4362b49151d..4a9ee500e27 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1 +++ b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1 @@ -2,7 +2,7 @@ Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -483,9 +483,8 @@ convey the exclusion of warranty; and each file should have at least the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + You should have received a copy of the GNU Lesser General Public License + along with this library; if not, see . Also add information on how to contact you by electronic and paper mail. @@ -496,7 +495,7 @@ necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. - , 1 April 1990 - Ty Coon, President of Vice + , 1 April 1990 + Moe Ghoul, President of Vice That's all there is to it! diff --git a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1-with-linking-exception b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1-with-linking-exception index 82aadf03280..5c06a0bdac6 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1-with-linking-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/LGPL-2.1-with-linking-exception @@ -1,3 +1,6 @@ +GNU Lesser General Public License, version 2.1. +See LGPL-2.1 for the full text of this license. + As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, @@ -8,507 +11,3 @@ module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/sdk_container/src/third_party/portage-stable/licenses/LGPL-3-with-linking-exception b/sdk_container/src/third_party/portage-stable/licenses/LGPL-3-with-linking-exception index 6f83af9a91a..914d4100f45 100644 --- a/sdk_container/src/third_party/portage-stable/licenses/LGPL-3-with-linking-exception +++ b/sdk_container/src/third_party/portage-stable/licenses/LGPL-3-with-linking-exception @@ -1,3 +1,6 @@ +GNU Lesser General Public License, version 3. +See LGPL-3 for the full text of this license. + As a special exception to the GNU Lesser General Public License, you may link, statically or dynamically, a "work that uses the Library" with a publicly distributed version of the Library to produce an @@ -11,170 +14,3 @@ the conditions defined in clause 3 of the GNU Library General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. From b03c05485f4621b703c04e857d9d3f520be8033b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:17 +0000 Subject: [PATCH 057/145] net-dialup/lrzsz: Sync with Gentoo It's from Gentoo commit 82e9a34c10b55948f6b41a26ae6b1ee99fb10052. --- .../portage-stable/net-dialup/lrzsz/Manifest | 1 - .../net-dialup/lrzsz/lrzsz-0.12.20-r10.ebuild | 4 +- .../net-dialup/lrzsz/lrzsz-0.12.20-r9.ebuild | 76 ------------------- 3 files changed, 2 insertions(+), 79 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r9.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/Manifest b/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/Manifest index d492485ee7d..f0ba33792cd 100644 --- a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/Manifest @@ -1,3 +1,2 @@ DIST gettext-0.19.8-runtime-m4.tar.xz 26092 BLAKE2B 671c43cbdc393658c0f9960cf6b743b5126a52ff0a87dbd8a59f6a8c398eecfab7509421d6e01096d73e40f2feb7b2bc229822c4d475d91a703c941134a506b5 SHA512 a5e5a64c7e2bd1a0fa6d426ff72a286027451ff034050541a92ba5a4d7889f925e4674e1df89e0c7e9657329209284995afcb0180a2e441136694556450e4edd DIST lrzsz-0.12.20.tar.gz 280938 BLAKE2B 86511ab112da849f5894f18c045f2c8a9dd4c4e97426c1d98c5b91aade6c39e26f4a7e5674e057c9596a240dfd3ef32053fcdc8ee58b33654cf15eec64779b1e SHA512 9bce64036f1f1c65f5910f19802aecaf3dc5ffeab0feeca10fa8d2fe1b83e212391cce23056d22fd0eda52df89e12ede68eb5d22ffcf22f935910d2af7399f12 -DIST lrzsz-m4-0.12.20.tar.bz2 23959 BLAKE2B 933e43f80a40478baef77d69f81fcb04947f2d0afb87f777b0c000ea4223408bf3e55d687cf625ab4835fb30e274f7058ff09ee3b51ad90e09723cd3053ee038 SHA512 c8818381f2e5271bc2dd7d469c0a33a6b22d42d3159b41f168223473a8b03322f3ff91a49ce398e3ef5abe7b355d92b83b1429d0c6d450d19985a60e2e1190d4 diff --git a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r10.ebuild b/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r10.ebuild index d1ea630d21b..945241880ce 100644 --- a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r10.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r10.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,7 +14,7 @@ SRC_URI=" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="nls" DEPEND="nls? ( virtual/libintl )" diff --git a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r9.ebuild b/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r9.ebuild deleted file mode 100644 index f9405537db4..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-dialup/lrzsz/lrzsz-0.12.20-r9.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools toolchain-funcs - -DESCRIPTION="Communication package providing the X, Y, and ZMODEM file transfer protocols" -HOMEPAGE="https://www.ohse.de/uwe/software/lrzsz.html" -SRC_URI=" - https://www.ohse.de/uwe/releases/${P}.tar.gz - https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-m4-${PV}.tar.bz2 -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="nls" - -DEPEND="nls? ( virtual/libintl )" -BDEPEND="nls? ( sys-devel/gettext )" - -PATCHES=( - "${FILESDIR}"/${PN}-autotools.patch - "${FILESDIR}"/${PN}-implicit-decl.patch - "${FILESDIR}"/${P}-automake-1.12.patch - "${FILESDIR}"/${P}-automake-1.13.patch - "${FILESDIR}"/${P}-gettext-0.20.patch - "${FILESDIR}"/${P}-AR.patch - "${FILESDIR}"/${P}-configure-clang16.patch - "${FILESDIR}"/${P}-gettext-0.22.patch - "${FILESDIR}"/${P}-disable-nls.patch - "${FILESDIR}"/${P}-c99.patch - "${FILESDIR}"/${P}-fix-integer-overflow.patch -) - -DOCS=( AUTHORS COMPATABILITY ChangeLog NEWS \ - README{,.cvs,.gettext,.isdn4linux,.tests} THANKS TODO ) - -src_prepare() { - default - - # automake is unhappy if this is missing - >> config.rpath || die - # This is too old. Remove it so automake puts in a newer copy. - rm missing || die - # Autoheader does not like seeing this file. - rm acconfig.h || die - # embed default m4 files in case gettext is not installed - mv "${WORKDIR}"/m4 . || die - - eautoreconf -} - -src_configure() { - tc-export CC - - econf $(use_enable nls) -} - -src_test() { - # Don't use check target. - # See bug #120748 before changing this function. - emake vcheck -} - -src_install() { - default - - local x - for x in {r,s}{b,x,z} ; do - dosym l${x} /usr/bin/${x} - dosym l${x:0:1}z.1 /usr/share/man/man1/${x}.1 - [ "${x:1:1}" = "z" ] || dosym l${x:0:1}z.1 /usr/share/man/man1/l${x}.1 - done -} From a737c5664ddc54001f8f0e46fcab8ef95f9f4451 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:19 +0000 Subject: [PATCH 058/145] net-dns/c-ares: Sync with Gentoo It's from Gentoo commit a05dc1b34573d50ed92eabc800f57e589fedf478. --- .../portage-stable/net-dns/c-ares/c-ares-1.34.3.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/net-dns/c-ares/c-ares-1.34.3.ebuild b/sdk_container/src/third_party/portage-stable/net-dns/c-ares/c-ares-1.34.3.ebuild index 50d00053a96..ca266b9127b 100644 --- a/sdk_container/src/third_party/portage-stable/net-dns/c-ares/c-ares-1.34.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-dns/c-ares/c-ares-1.34.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -18,7 +18,7 @@ SRC_URI=" LICENSE="MIT ISC" # Subslot = SONAME of libcares.so.2 SLOT="0/2" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="static-libs test" RESTRICT="!test? ( test )" From d65fda6e641e7b76f0d7d08b8b398f3394928c7a Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:22 +0000 Subject: [PATCH 059/145] net-firewall/ipset: Sync with Gentoo It's from Gentoo commit 84d2b00b12d30db4d0041b185b88a0288c99e9a0. --- .../net-firewall/ipset/Manifest | 1 - .../ipset/files/ipset-7.22-argv-bounds.patch | 36 ------ .../ipset-7.22-asan-buffer-overflow.patch | 52 -------- .../ipset-7.22-fix-building-on-musl.patch | 10 -- .../net-firewall/ipset/ipset-7.22-r2.ebuild | 121 ------------------ .../net-firewall/ipset/ipset-7.23.ebuild | 4 +- 6 files changed, 2 insertions(+), 222 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-argv-bounds.patch delete mode 100644 sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-asan-buffer-overflow.patch delete mode 100644 sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-fix-building-on-musl.patch delete mode 100644 sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.22-r2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/Manifest b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/Manifest index 60be5672158..afca750b459 100644 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/Manifest @@ -1,2 +1 @@ -DIST ipset-7.22.tar.bz2 694069 BLAKE2B 9daaff54adb6f9daf69cd7dabbd9134d8fcf8cd7f8ef0c52296961579ad3c8202087158a01664228eff70356ba97f77ec61abbab7c7ce323112fbdc32abd661b SHA512 e375a9110eb7974480147c57eb2cff4bdd03c7704cdae006a3d254cc80fada587aa8aee25a86f7cab29db83f5e283c5f9a47a314297317660ebba5097f623d79 DIST ipset-7.23.tar.bz2 695655 BLAKE2B a596630d12a8bcc1383475627e5e62b7be4c17570ae9d3650b9dbcac0ec46324e1ac7c0e7e11f674fb5354871538f6f15e57476ac752b1ac1415023d837904e6 SHA512 5a43c790abf157a55db5a9a22cb5f28a225f5c7969beda81566a2259aa82c9d852979eb805b11b4347f47c6a0c2cc4de6f14e4733bee5b562844422a45fb9dab diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-argv-bounds.patch b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-argv-bounds.patch deleted file mode 100644 index 07d18303642..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-argv-bounds.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://git.netfilter.org/ipset/commit/?id=851cb04ffee5040f1e0063f77c3fe9bc6245e0fb - -From 851cb04ffee5040f1e0063f77c3fe9bc6245e0fb Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 27 Jun 2024 10:18:17 +0200 -Subject: lib: ipset: Avoid 'argv' array overstepping - -The maximum accepted value for 'argc' is MAX_ARGS which matches 'argv' -array size. The maximum allowed array index is therefore argc-1. - -This fix will leave items in argv non-NULL-terminated, so explicitly -NULL the formerly last entry after shifting. - -Looks like a day-1 bug. Interestingly, this neither triggered ASAN nor -valgrind. Yet adding debug output printing argv entries being copied -did. - -Fixes: 1e6e8bd9a62aa ("Third stage to ipset-5") -Signed-off-by: Phil Sutter -Signed-off-by: Jozsef Kadlecsik ---- a/lib/ipset.c -+++ b/lib/ipset.c -@@ -343,9 +343,9 @@ ipset_shift_argv(int *argc, char *argv[], int from) - - assert(*argc >= from + 1); - -- for (i = from + 1; i <= *argc; i++) -+ for (i = from + 1; i < *argc; i++) - argv[i-1] = argv[i]; -- (*argc)--; -+ argv[--(*argc)] = NULL; - return; - } - --- -cgit v1.2.3 diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-asan-buffer-overflow.patch b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-asan-buffer-overflow.patch deleted file mode 100644 index 56d126db5ef..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-asan-buffer-overflow.patch +++ /dev/null @@ -1,52 +0,0 @@ -https://git.netfilter.org/ipset/commit/?id=f1bcacf5eeb8620ea684524e1ce9c3951a77f1f9 - -From f1bcacf5eeb8620ea684524e1ce9c3951a77f1f9 Mon Sep 17 00:00:00 2001 -From: Phil Sutter -Date: Thu, 27 Jun 2024 10:18:16 +0200 -Subject: lib: data: Fix for global-buffer-overflow warning by ASAN - -After compiling with CFLAGS="-fsanitize=address -g", running the -testsuite triggers the following warning: - -| ipmap: Range: Check syntax error: missing range/from-to: FAILED -| Failed test: ../src/ipset 2>.foo.err -N test ipmap -| ================================================================= -| ==4204==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55a21e77172a at pc 0x7f1ef246f2a6 bp 0x7fffed8f4f40 sp 0x7fffed8f46e8 -| READ of size 32 at 0x55a21e77172a thread T0 -| #0 0x7f1ef246f2a5 in __interceptor_memcpy /var/tmp/portage/sys-devel/gcc-13.2.1_p20231014/work/gcc-13-20231014/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:899 -| #1 0x55a21e758bf6 in ipset_strlcpy /home/n0-1/git/ipset/lib/data.c:119 -| #2 0x55a21e758bf6 in ipset_data_set /home/n0-1/git/ipset/lib/data.c:349 -| #3 0x55a21e75ee2f in ipset_parse_typename /home/n0-1/git/ipset/lib/parse.c:1819 -| #4 0x55a21e754119 in ipset_parser /home/n0-1/git/ipset/lib/ipset.c:1205 -| #5 0x55a21e752cef in ipset_parse_argv /home/n0-1/git/ipset/lib/ipset.c:1344 -| #6 0x55a21e74ea45 in main /home/n0-1/git/ipset/src/ipset.c:38 -| #7 0x7f1ef224cf09 (/lib64/libc.so.6+0x23f09) -| #8 0x7f1ef224cfc4 in __libc_start_main (/lib64/libc.so.6+0x23fc4) -| #9 0x55a21e74f040 in _start (/home/n0-1/git/ipset/src/ipset+0x1d040) -| -| 0x55a21e77172a is located 54 bytes before global variable '*.LC1' defined in 'ipset_bitmap_ip.c' (0x55a21e771760) of size 19 -| '*.LC1' is ascii string 'IP|IP/CIDR|FROM-TO' -| 0x55a21e77172a is located 0 bytes after global variable '*.LC0' defined in 'ipset_bitmap_ip.c' (0x55a21e771720) of size 10 -| '*.LC0' is ascii string 'bitmap:ip' - -Fix this by avoiding 'src' array overstep in ipset_strlcpy(): In -contrast to strncpy(), memcpy() does not respect NUL-chars in input but -stubbornly reads as many bytes as specified. - -Fixes: a7432ba786ca4 ("Workaround misleading -Wstringop-truncation warning") -Signed-off-by: Phil Sutter -Signed-off-by: Jozsef Kadlecsik ---- a/lib/data.c -+++ b/lib/data.c -@@ -111,6 +111,9 @@ ipset_strlcpy(char *dst, const char *src, size_t len) - assert(dst); - assert(src); - -+ if (strlen(src) < len) -+ len = strlen(src) + 1; -+ - memcpy(dst, src, len); - dst[len - 1] = '\0'; - } --- -cgit v1.2.3 diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-fix-building-on-musl.patch b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-fix-building-on-musl.patch deleted file mode 100644 index 7a77aa95286..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/files/ipset-7.22-fix-building-on-musl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/ipset.c 2024-08-30 14:21:19.201863069 +0000 -+++ b/src/ipset.c 2024-08-30 14:21:52.525571560 +0000 -@@ -15,6 +15,7 @@ - #include - #include /* ipset library */ - #include /* translate to nftables */ -+#include - - int - main(int argc, char *argv[]) diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.22-r2.ebuild b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.22-r2.ebuild deleted file mode 100644 index affe9147840..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.22-r2.ebuild +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -MODULES_OPTIONAL_IUSE=modules -inherit autotools bash-completion-r1 linux-mod-r1 systemd - -DESCRIPTION="IPset tool for iptables, successor to ippool" -HOMEPAGE="https://ipset.netfilter.org/ https://git.netfilter.org/ipset/" -SRC_URI="https://ipset.netfilter.org/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86" - -RDEPEND=" - net-firewall/iptables - net-libs/libmnl:= -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -DOCS=( ChangeLog INSTALL README UPGRADE ) - -# configurable from outside, e.g. /etc/portage/make.conf -IP_NF_SET_MAX=${IP_NF_SET_MAX:-256} - -PATCHES=( - "${FILESDIR}/${PN}-bash-completion.patch" - "${FILESDIR}/${P}-asan-buffer-overflow.patch" - "${FILESDIR}/${P}-argv-bounds.patch" - "${FILESDIR}/${P}-fix-building-on-musl.patch" -) - -src_prepare() { - default - eautoreconf -} - -pkg_setup() { - get_version - CONFIG_CHECK="NETFILTER" - ERROR_NETFILTER="ipset requires NETFILTER support in your kernel." - CONFIG_CHECK+=" NETFILTER_NETLINK" - ERROR_NETFILTER_NETLINK="ipset requires NETFILTER_NETLINK support in your kernel." - # It does still build without NET_NS, but it may be needed in future. - #CONFIG_CHECK="${CONFIG_CHECK} NET_NS" - #ERROR_NET_NS="ipset requires NET_NS (network namespace) support in your kernel." - CONFIG_CHECK+=" !PAX_CONSTIFY_PLUGIN" - ERROR_PAX_CONSTIFY_PLUGIN="ipset contains constified variables (#614896)" - - build_modules=0 - if use modules; then - if linux_config_src_exists && linux_chkconfig_builtin "MODULES" ; then - if linux_chkconfig_present "IP_NF_SET" || \ - linux_chkconfig_present "IP_SET"; then #274577 - eerror "There is IP{,_NF}_SET or NETFILTER_XT_SET support in your kernel." - eerror "Please either build ipset with modules USE flag disabled" - eerror "or rebuild kernel without IP_SET support and make sure" - eerror "there is NO kernel ip_set* modules in /lib/modules//... ." - die "USE=modules and in-kernel ipset support detected." - else - einfo "Modular kernel detected. Gonna build kernel modules..." - build_modules=1 - fi - else - eerror "Nonmodular kernel detected, but USE=modules. Either build" - eerror "modular kernel (without IP_SET) or disable USE=modules" - die "Nonmodular kernel detected, will not build kernel modules" - fi - fi - - [[ ${build_modules} -eq 1 ]] && linux-mod-r1_pkg_setup -} - -src_configure() { - export bashcompdir="$(get_bashcompdir)" - - econf \ - --enable-bashcompl \ - $(use_with modules kmod) \ - --with-maxsets=${IP_NF_SET_MAX} \ - --with-ksource="${KV_DIR}" \ - --with-kbuild="${KV_OUT_DIR}" -} - -src_compile() { - einfo "Building userspace" - - local modlist=( xt_set=kernel/net/netfilter/ipset/:"${S}":kernel/net/netfilter/: - em_ipset=kernel/net/sched:"${S}":kernel/net/sched/:modules ) - - for i in ip_set{,_bitmap_{ip{,mac},port},_hash_{ip{,mac,mark,port{,ip,net}},mac,net{,port{,net},iface,net}},_list_set}; do - modlist+=( ${i}=kernel/net/netfilter/ipset/:"${S}":kernel/net/netfilter/ipset ) - done - - emake - - if [[ ${build_modules} -eq 1 ]]; then - einfo "Building kernel modules" - linux-mod-r1_src_compile - fi -} - -src_install() { - einfo "Installing userspace" - default - - find "${ED}" -name '*.la' -delete || die - - newinitd "${FILESDIR}"/ipset.initd-r7 ${PN} - newconfd "${FILESDIR}"/ipset.confd-r1 ${PN} - systemd_newunit "${FILESDIR}"/ipset.systemd-r1 ${PN}.service - keepdir /var/lib/ipset - - if [[ ${build_modules} -eq 1 ]]; then - einfo "Installing kernel modules" - linux-mod-r1_src_install - fi -} diff --git a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.23.ebuild b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.23.ebuild index 00688b5a167..431969f5d7c 100644 --- a/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.23.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-firewall/ipset/ipset-7.23.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,7 +12,7 @@ SRC_URI="https://ipset.netfilter.org/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv x86" RDEPEND=" net-firewall/iptables From cab47dcca4ef3a1cbb2f2e3862d96fd05d456749 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:22 +0000 Subject: [PATCH 060/145] net-libs/gnutls: Sync with Gentoo It's from Gentoo commit 5cd5773dd95588bfe3a3ea2e271302ba6b1935e1. --- .../portage-stable/net-libs/gnutls/gnutls-3.8.8.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.8.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.8.ebuild index e1f02d5e42d..4fb2c915607 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.8.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/gnutls/gnutls-3.8.8.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -21,7 +21,7 @@ LICENSE="GPL-3 LGPL-2.1+" # Subslot format: # . SLOT="0/30.30" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="brotli +cxx dane doc examples +idn nls +openssl pkcs11 sslv2 sslv3 static-libs test test-full +tls-heartbeat tools zlib zstd" REQUIRED_USE="test-full? ( cxx dane doc examples idn nls openssl pkcs11 tls-heartbeat tools )" RESTRICT="!test? ( test )" From 9eaa42c402a0da81eca1361e7d82fbe5005170ab Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:41 +0000 Subject: [PATCH 061/145] net-libs/nghttp2: Sync with Gentoo It's from Gentoo commit a4a7ba540706b56c56209259681f73c007367b1c. --- .../portage-stable/net-libs/nghttp2/nghttp2-1.64.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/net-libs/nghttp2/nghttp2-1.64.0.ebuild b/sdk_container/src/third_party/portage-stable/net-libs/nghttp2/nghttp2-1.64.0.ebuild index 1c37ea0ab83..d29f89a4640 100644 --- a/sdk_container/src/third_party/portage-stable/net-libs/nghttp2/nghttp2-1.64.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-libs/nghttp2/nghttp2-1.64.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/nghttp2/nghttp2/releases/download/v${PV}/${P}.tar.xz LICENSE="MIT" SLOT="0/1.14" # 1. -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" IUSE="debug hpack-tools jemalloc static-libs systemd test utils xml" REQUIRED_USE="test? ( static-libs )" From 49fa28a6930a765a0c4a03a14fde857c34943528 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:48 +0000 Subject: [PATCH 062/145] net-misc/openssh: Sync with Gentoo It's from Gentoo commit f13728b4c5933853265b4c412100d3189d775e54. --- .../portage-stable/net-misc/openssh/openssh-9.8_p1-r3.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/net-misc/openssh/openssh-9.8_p1-r3.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/openssh/openssh-9.8_p1-r3.ebuild index 026cf4390af..8c01a4e3a88 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/openssh/openssh-9.8_p1-r3.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/openssh/openssh-9.8_p1-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,7 +20,7 @@ S="${WORKDIR}/${PARCH}" LICENSE="BSD GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" # Probably want to drop ssl defaulting to on in a future version. IUSE="abi_mips_n32 audit debug kerberos ldns legacy-ciphers libedit livecd pam +pie security-key selinux +ssl static test xmss" From a394198ddd789bdd0787f442fd787bd5974b4cba Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:48 +0000 Subject: [PATCH 063/145] net-misc/rsync: Sync with Gentoo It's from Gentoo commit d6a4eaea0b9cabe23cc6424de17267b7eeb82218. --- .../3.3.0/rsync-3.3.0-CVE-2024-12084.patch | 132 ++++++++++++ .../3.3.0/rsync-3.3.0-CVE-2024-12085.patch | 17 ++ .../3.3.0/rsync-3.3.0-CVE-2024-12086-1.patch | 200 +++++++++++++++++ .../3.3.0/rsync-3.3.0-CVE-2024-12086-2.patch | 26 +++ .../3.3.0/rsync-3.3.0-CVE-2024-12087-1.patch | 39 ++++ .../3.3.0/rsync-3.3.0-CVE-2024-12087-2.patch | 36 ++++ .../3.3.0/rsync-3.3.0-CVE-2024-12088.patch | 60 ++++++ .../3.3.0/rsync-3.3.0-CVE-2024-12747-1.patch | 166 +++++++++++++++ .../3.3.0/rsync-3.3.0-CVE-2024-12747-2.patch | 34 +++ ...-3.2.7-r4.ebuild => rsync-3.3.0-r2.ebuild} | 14 +- .../net-misc/rsync/rsync-3.3.0.ebuild | 201 ------------------ 11 files changed, 718 insertions(+), 207 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12084.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12085.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-1.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-2.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-1.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-2.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12088.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-1.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-2.patch rename sdk_container/src/third_party/portage-stable/net-misc/rsync/{rsync-3.2.7-r4.ebuild => rsync-3.3.0-r2.ebuild} (94%) delete mode 100644 sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12084.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12084.patch new file mode 100644 index 00000000000..c4479ef8a80 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12084.patch @@ -0,0 +1,132 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/io.c b/io.c +index a99ac0e..bb60eec 100644 +--- a/io.c ++++ b/io.c +@@ -55,6 +55,7 @@ extern int read_batch; + extern int compat_flags; + extern int protect_args; + extern int checksum_seed; ++extern int xfer_sum_len; + extern int daemon_connection; + extern int protocol_version; + extern int remove_source_files; +@@ -1977,7 +1978,7 @@ void read_sum_head(int f, struct sum_struct *sum) + exit_cleanup(RERR_PROTOCOL); + } + sum->s2length = protocol_version < 27 ? csum_length : (int)read_int(f); +- if (sum->s2length < 0 || sum->s2length > MAX_DIGEST_LEN) { ++ if (sum->s2length < 0 || sum->s2length > xfer_sum_len) { + rprintf(FERROR, "Invalid checksum length %d [%s]\n", + sum->s2length, who_am_i()); + exit_cleanup(RERR_PROTOCOL); +diff --git a/match.c b/match.c +index cdb30a1..36e78ed 100644 +--- a/match.c ++++ b/match.c +@@ -232,7 +232,7 @@ static void hash_search(int f,struct sum_struct *s, + done_csum2 = 1; + } + +- if (memcmp(sum2,s->sums[i].sum2,s->s2length) != 0) { ++ if (memcmp(sum2, sum2_at(s, i), s->s2length) != 0) { + false_alarms++; + continue; + } +@@ -252,7 +252,7 @@ static void hash_search(int f,struct sum_struct *s, + if (i != aligned_i) { + if (sum != s->sums[aligned_i].sum1 + || l != s->sums[aligned_i].len +- || memcmp(sum2, s->sums[aligned_i].sum2, s->s2length) != 0) ++ || memcmp(sum2, sum2_at(s, aligned_i), s->s2length) != 0) + goto check_want_i; + i = aligned_i; + } +@@ -271,7 +271,7 @@ static void hash_search(int f,struct sum_struct *s, + if (sum != s->sums[i].sum1) + goto check_want_i; + get_checksum2((char *)map, l, sum2); +- if (memcmp(sum2, s->sums[i].sum2, s->s2length) != 0) ++ if (memcmp(sum2, sum2_at(s, i), s->s2length) != 0) + goto check_want_i; + /* OK, we have a re-alignment match. Bump the offset + * forward to the new match point. */ +@@ -290,7 +290,7 @@ static void hash_search(int f,struct sum_struct *s, + && (!updating_basis_file || s->sums[want_i].offset >= offset + || s->sums[want_i].flags & SUMFLG_SAME_OFFSET) + && sum == s->sums[want_i].sum1 +- && memcmp(sum2, s->sums[want_i].sum2, s->s2length) == 0) { ++ && memcmp(sum2, sum2_at(s, want_i), s->s2length) == 0) { + /* we've found an adjacent match - the RLL coder + * will be happy */ + i = want_i; +diff --git a/rsync.c b/rsync.c +index cd288f5..b130aba 100644 +--- a/rsync.c ++++ b/rsync.c +@@ -437,7 +437,10 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, cha + */ + void free_sums(struct sum_struct *s) + { +- if (s->sums) free(s->sums); ++ if (s->sums) { ++ free(s->sums); ++ free(s->sum2_array); ++ } + free(s); + } + +diff --git a/rsync.h b/rsync.h +index d3709fe..0f9e277 100644 +--- a/rsync.h ++++ b/rsync.h +@@ -958,12 +958,12 @@ struct sum_buf { + uint32 sum1; /**< simple checksum */ + int32 chain; /**< next hash-table collision */ + short flags; /**< flag bits */ +- char sum2[SUM_LENGTH]; /**< checksum */ + }; + + struct sum_struct { + OFF_T flength; /**< total file length */ + struct sum_buf *sums; /**< points to info for each chunk */ ++ char *sum2_array; /**< checksums of length xfer_sum_len */ + int32 count; /**< how many chunks */ + int32 blength; /**< block_length */ + int32 remainder; /**< flength % block_length */ +@@ -982,6 +982,8 @@ struct map_struct { + int status; /* first errno from read errors */ + }; + ++#define sum2_at(s, i) ((s)->sum2_array + ((size_t)(i) * xfer_sum_len)) ++ + #define NAME_IS_FILE (0) /* filter name as a file */ + #define NAME_IS_DIR (1<<0) /* filter name as a dir */ + #define NAME_IS_XATTR (1<<2) /* filter name as an xattr */ +diff --git a/sender.c b/sender.c +index 3d4f052..2bbff2f 100644 +--- a/sender.c ++++ b/sender.c +@@ -31,6 +31,7 @@ extern int log_before_transfer; + extern int stdout_format_has_i; + extern int logfile_format_has_i; + extern int want_xattr_optim; ++extern int xfer_sum_len; + extern int csum_length; + extern int append_mode; + extern int copy_links; +@@ -94,10 +95,11 @@ static struct sum_struct *receive_sums(int f) + return(s); + + s->sums = new_array(struct sum_buf, s->count); ++ s->sum2_array = new_array(char, (size_t)s->count * xfer_sum_len); + + for (i = 0; i < s->count; i++) { + s->sums[i].sum1 = read_int(f); +- read_buf(f, s->sums[i].sum2, s->s2length); ++ read_buf(f, sum2_at(s, i), s->s2length); + + s->sums[i].offset = offset; + s->sums[i].flags = 0; diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12085.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12085.patch new file mode 100644 index 00000000000..d841ad0716d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12085.patch @@ -0,0 +1,17 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/match.c b/match.c +index 36e78ed..dfd6af2 100644 +--- a/match.c ++++ b/match.c +@@ -147,6 +147,9 @@ static void hash_search(int f,struct sum_struct *s, + int more; + schar *map; + ++ // prevent possible memory leaks ++ memset(sum2, 0, sizeof sum2); ++ + /* want_i is used to encourage adjacent matches, allowing the RLL + * coding of the output to work more efficiently. */ + want_i = 0; diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-1.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-1.patch new file mode 100644 index 00000000000..b0ab88e8c10 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-1.patch @@ -0,0 +1,200 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/receiver.c b/receiver.c +index 6b4b369..8031b8f 100644 +--- a/receiver.c ++++ b/receiver.c +@@ -66,6 +66,7 @@ extern char sender_file_sum[MAX_DIGEST_LEN]; + extern struct file_list *cur_flist, *first_flist, *dir_flist; + extern filter_rule_list daemon_filter_list; + extern OFF_T preallocated_len; ++extern int fuzzy_basis; + + extern struct name_num_item *xfer_sum_nni; + extern int xfer_sum_len; +@@ -551,6 +552,8 @@ int recv_files(int f_in, int f_out, char *local_name) + progress_init(); + + while (1) { ++ const char *basedir = NULL; ++ + cleanup_disable(); + + /* This call also sets cur_flist. */ +@@ -716,28 +719,34 @@ int recv_files(int f_in, int f_out, char *local_name) + fnamecmp = get_backup_name(fname); + break; + case FNAMECMP_FUZZY: ++ if (fuzzy_basis == 0) { ++ rprintf(FERROR_XFER, "rsync: refusing malicious fuzzy operation for %s\n", xname); ++ exit_cleanup(RERR_PROTOCOL); ++ } + if (file->dirname) { +- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, file->dirname, xname); +- fnamecmp = fnamecmpbuf; +- } else +- fnamecmp = xname; ++ basedir = file->dirname; ++ } ++ fnamecmp = xname; + break; + default: + if (fnamecmp_type > FNAMECMP_FUZZY && fnamecmp_type-FNAMECMP_FUZZY <= basis_dir_cnt) { + fnamecmp_type -= FNAMECMP_FUZZY + 1; + if (file->dirname) { +- stringjoin(fnamecmpbuf, sizeof fnamecmpbuf, +- basis_dir[fnamecmp_type], "/", file->dirname, "/", xname, NULL); +- } else +- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], xname); ++ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], file->dirname); ++ basedir = fnamecmpbuf; ++ } else { ++ basedir = basis_dir[fnamecmp_type]; ++ } ++ fnamecmp = xname; + } else if (fnamecmp_type >= basis_dir_cnt) { + rprintf(FERROR, + "invalid basis_dir index: %d.\n", + fnamecmp_type); + exit_cleanup(RERR_PROTOCOL); +- } else +- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basis_dir[fnamecmp_type], fname); +- fnamecmp = fnamecmpbuf; ++ } else { ++ basedir = basis_dir[fnamecmp_type]; ++ fnamecmp = fname; ++ } + break; + } + if (!fnamecmp || (daemon_filter_list.head +@@ -760,7 +769,7 @@ int recv_files(int f_in, int f_out, char *local_name) + } + + /* open the file */ +- fd1 = do_open(fnamecmp, O_RDONLY, 0); ++ fd1 = secure_relative_open(basedir, fnamecmp, O_RDONLY, 0); + + if (fd1 == -1 && protocol_version < 29) { + if (fnamecmp != fname) { +@@ -771,14 +780,20 @@ int recv_files(int f_in, int f_out, char *local_name) + + if (fd1 == -1 && basis_dir[0]) { + /* pre-29 allowed only one alternate basis */ +- pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, +- basis_dir[0], fname); +- fnamecmp = fnamecmpbuf; ++ basedir = basis_dir[0]; ++ fnamecmp = fname; + fnamecmp_type = FNAMECMP_BASIS_DIR_LOW; +- fd1 = do_open(fnamecmp, O_RDONLY, 0); ++ fd1 = secure_relative_open(basedir, fnamecmp, O_RDONLY, 0); + } + } + ++ if (basedir) { ++ // for the following code we need the full ++ // path name as a single string ++ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf, basedir, fnamecmp); ++ fnamecmp = fnamecmpbuf; ++ } ++ + one_inplace = inplace_partial && fnamecmp_type == FNAMECMP_PARTIAL_DIR; + updating_basis_or_equiv = one_inplace + || (inplace && (fnamecmp == fname || fnamecmp_type == FNAMECMP_BACKUP)); +diff --git a/syscall.c b/syscall.c +index d92074a..47c5ea5 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -33,6 +33,8 @@ + #include + #endif + ++#include "ifuncs.h" ++ + extern int dry_run; + extern int am_root; + extern int am_sender; +@@ -712,3 +714,82 @@ int do_open_nofollow(const char *pathname, int flags) + + return fd; + } ++ ++/* ++ open a file relative to a base directory. The basedir can be NULL, ++ in which case the current working directory is used. The relpath ++ must be a relative path, and the relpath must not contain any ++ elements in the path which follow symlinks (ie. like O_NOFOLLOW, but ++ applies to all path components, not just the last component) ++ ++ The relpath must also not contain any ../ elements in the path ++*/ ++int secure_relative_open(const char *basedir, const char *relpath, int flags, mode_t mode) ++{ ++ if (!relpath || relpath[0] == '/') { ++ // must be a relative path ++ errno = EINVAL; ++ return -1; ++ } ++ if (strncmp(relpath, "../", 3) == 0 || strstr(relpath, "/../")) { ++ // no ../ elements allowed in the relpath ++ errno = EINVAL; ++ return -1; ++ } ++ ++#if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY) ++ // really old system, all we can do is live with the risks ++ if (!basedir) { ++ return open(relpath, flags, mode); ++ } ++ char fullpath[MAXPATHLEN]; ++ pathjoin(fullpath, sizeof fullpath, basedir, relpath); ++ return open(fullpath, flags, mode); ++#else ++ int dirfd = AT_FDCWD; ++ if (basedir != NULL) { ++ dirfd = openat(AT_FDCWD, basedir, O_RDONLY | O_DIRECTORY); ++ if (dirfd == -1) { ++ return -1; ++ } ++ } ++ int retfd = -1; ++ ++ char *path_copy = my_strdup(relpath, __FILE__, __LINE__); ++ if (!path_copy) { ++ return -1; ++ } ++ ++ for (const char *part = strtok(path_copy, "/"); ++ part != NULL; ++ part = strtok(NULL, "/")) ++ { ++ int next_fd = openat(dirfd, part, O_RDONLY | O_DIRECTORY | O_NOFOLLOW); ++ if (next_fd == -1 && errno == ENOTDIR) { ++ if (strtok(NULL, "/") != NULL) { ++ // this is not the last component of the path ++ errno = ELOOP; ++ goto cleanup; ++ } ++ // this could be the last component of the path, try as a file ++ retfd = openat(dirfd, part, flags | O_NOFOLLOW, mode); ++ goto cleanup; ++ } ++ if (next_fd == -1) { ++ goto cleanup; ++ } ++ if (dirfd != AT_FDCWD) close(dirfd); ++ dirfd = next_fd; ++ } ++ ++ // the path must be a directory ++ errno = EINVAL; ++ ++cleanup: ++ free(path_copy); ++ if (dirfd != AT_FDCWD) { ++ close(dirfd); ++ } ++ return retfd; ++#endif // O_NOFOLLOW, O_DIRECTORY ++} diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-2.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-2.patch new file mode 100644 index 00000000000..ae0a85bc4a5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12086-2.patch @@ -0,0 +1,26 @@ +https://github.com/RsyncProject/rsync/pull/707 + +From 4e9b6476325eb08931025d719cfc3ff2c94d2b23 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Wed, 15 Jan 2025 15:59:17 +0100 +Subject: [PATCH] Fix build on ancient glibc without openat(AT_FDCWD + +Fixes: https://github.com/RsyncProject/rsync/issues/701 +--- + syscall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/syscall.c b/syscall.c +index 8cea2900..34a9bba0 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -734,7 +734,7 @@ int secure_relative_open(const char *basedir, const char *relpath, int flags, mo + return -1; + } + +-#if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY) ++#if !defined(O_NOFOLLOW) || !defined(O_DIRECTORY) || !defined(AT_FDCWD) + // really old system, all we can do is live with the risks + if (!basedir) { + return open(relpath, flags, mode); + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-1.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-1.patch new file mode 100644 index 00000000000..2328f3c0f6e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-1.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/flist.c b/flist.c +index 464d556..087f9da 100644 +--- a/flist.c ++++ b/flist.c +@@ -2584,6 +2584,19 @@ struct file_list *recv_file_list(int f, int dir_ndx) + init_hard_links(); + #endif + ++ if (inc_recurse && dir_ndx >= 0) { ++ if (dir_ndx >= dir_flist->used) { ++ rprintf(FERROR_XFER, "rsync: refusing invalid dir_ndx %u >= %u\n", dir_ndx, dir_flist->used); ++ exit_cleanup(RERR_PROTOCOL); ++ } ++ struct file_struct *file = dir_flist->files[dir_ndx]; ++ if (file->flags & FLAG_GOT_DIR_FLIST) { ++ rprintf(FERROR_XFER, "rsync: refusing malicious duplicate flist for dir %d\n", dir_ndx); ++ exit_cleanup(RERR_PROTOCOL); ++ } ++ file->flags |= FLAG_GOT_DIR_FLIST; ++ } ++ + flist = flist_new(0, "recv_file_list"); + flist_expand(flist, FLIST_START_LARGE); + +diff --git a/rsync.h b/rsync.h +index 0f9e277..b9a7101 100644 +--- a/rsync.h ++++ b/rsync.h +@@ -84,6 +84,7 @@ + #define FLAG_DUPLICATE (1<<4) /* sender */ + #define FLAG_MISSING_DIR (1<<4) /* generator */ + #define FLAG_HLINKED (1<<5) /* receiver/generator (checked on all types) */ ++#define FLAG_GOT_DIR_FLIST (1<<5)/* sender/receiver/generator - dir_flist only */ + #define FLAG_HLINK_FIRST (1<<6) /* receiver/generator (w/FLAG_HLINKED) */ + #define FLAG_IMPLIED_DIR (1<<6) /* sender/receiver/generator (dirs only) */ + #define FLAG_HLINK_LAST (1<<7) /* receiver/generator */ diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-2.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-2.patch new file mode 100644 index 00000000000..dd4c7fb87a7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12087-2.patch @@ -0,0 +1,36 @@ +https://github.com/RsyncProject/rsync/pull/705 + +From efb85fd8db9e8f74eb3ab91ebf44f6ed35e3da5b Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Wed, 15 Jan 2025 15:10:24 +0100 +Subject: [PATCH] Fix FLAG_GOT_DIR_FLIST collission with FLAG_HLINKED + +fixes commit 688f5c379a43 (Refuse a duplicate dirlist.) + +Fixes: https://github.com/RsyncProject/rsync/issues/702 +Fixes: https://github.com/RsyncProject/rsync/issues/697 +--- + rsync.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rsync.h b/rsync.h +index 9be1297b..479ac484 100644 +--- a/rsync.h ++++ b/rsync.h +@@ -84,7 +84,6 @@ + #define FLAG_DUPLICATE (1<<4) /* sender */ + #define FLAG_MISSING_DIR (1<<4) /* generator */ + #define FLAG_HLINKED (1<<5) /* receiver/generator (checked on all types) */ +-#define FLAG_GOT_DIR_FLIST (1<<5)/* sender/receiver/generator - dir_flist only */ + #define FLAG_HLINK_FIRST (1<<6) /* receiver/generator (w/FLAG_HLINKED) */ + #define FLAG_IMPLIED_DIR (1<<6) /* sender/receiver/generator (dirs only) */ + #define FLAG_HLINK_LAST (1<<7) /* receiver/generator */ +@@ -93,6 +92,7 @@ + #define FLAG_SKIP_GROUP (1<<10) /* receiver/generator */ + #define FLAG_TIME_FAILED (1<<11)/* generator */ + #define FLAG_MOD_NSEC (1<<12) /* sender/receiver/generator */ ++#define FLAG_GOT_DIR_FLIST (1<<13)/* sender/receiver/generator - dir_flist only */ + + /* These flags are passed to functions but not stored. */ + + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12088.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12088.patch new file mode 100644 index 00000000000..422a45e2c03 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12088.patch @@ -0,0 +1,60 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/testsuite/unsafe-byname.test b/testsuite/unsafe-byname.test +index 75e7201..d2e318e 100644 +--- a/testsuite/unsafe-byname.test ++++ b/testsuite/unsafe-byname.test +@@ -40,7 +40,7 @@ test_unsafe ..//../dest from/dir unsafe + test_unsafe .. from/file safe + test_unsafe ../.. from/file unsafe + test_unsafe ..//.. from//file unsafe +-test_unsafe dir/.. from safe ++test_unsafe dir/.. from unsafe + test_unsafe dir/../.. from unsafe + test_unsafe dir/..//.. from unsafe + +diff --git a/util1.c b/util1.c +index da50ff1..f260d39 100644 +--- a/util1.c ++++ b/util1.c +@@ -1318,7 +1318,14 @@ int handle_partial_dir(const char *fname, int create) + * + * "src" is the top source directory currently applicable at the level + * of the referenced symlink. This is usually the symlink's full path +- * (including its name), as referenced from the root of the transfer. */ ++ * (including its name), as referenced from the root of the transfer. ++ * ++ * NOTE: this also rejects dest names with a .. component in other ++ * than the first component of the name ie. it rejects names such as ++ * a/b/../x/y. This needs to be done as the leading subpaths 'a' or ++ * 'b' could later be replaced with symlinks such as a link to '.' ++ * resulting in the link being transferred now becoming unsafe ++ */ + int unsafe_symlink(const char *dest, const char *src) + { + const char *name, *slash; +@@ -1328,6 +1335,23 @@ int unsafe_symlink(const char *dest, const char *src) + if (!dest || !*dest || *dest == '/') + return 1; + ++ // reject destinations with /../ in the name other than at the start of the name ++ const char *dest2 = dest; ++ while (strncmp(dest2, "../", 3) == 0) { ++ dest2 += 3; ++ while (*dest2 == '/') { ++ // allow for ..//..///../foo ++ dest2++; ++ } ++ } ++ if (strstr(dest2, "/../")) ++ return 1; ++ ++ // reject if the destination ends in /.. ++ const size_t dlen = strlen(dest); ++ if (dlen > 3 && strcmp(&dest[dlen-3], "/..") == 0) ++ return 1; ++ + /* find out what our safety margin is */ + for (name = src; (slash = strchr(name, '/')) != 0; name = slash+1) { + /* ".." segment starts the count over. "." segment is ignored. */ diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-1.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-1.patch new file mode 100644 index 00000000000..527da204612 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-1.patch @@ -0,0 +1,166 @@ +https://bugs.gentoo.org/948106 + +Backport provided by Red Hat on the VINCE case. +diff --git a/checksum.c b/checksum.c +index cb21882..66e8089 100644 +--- a/checksum.c ++++ b/checksum.c +@@ -406,7 +406,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum) + int32 remainder; + int fd; + +- fd = do_open(fname, O_RDONLY, 0); ++ fd = do_open_checklinks(fname); + if (fd == -1) { + memset(sum, 0, file_sum_len); + return; +diff --git a/flist.c b/flist.c +index 087f9da..1783253 100644 +--- a/flist.c ++++ b/flist.c +@@ -1390,7 +1390,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, + + if (copy_devices && am_sender && IS_DEVICE(st.st_mode)) { + if (st.st_size == 0) { +- int fd = do_open(fname, O_RDONLY, 0); ++ int fd = do_open_checklinks(fname); + if (fd >= 0) { + st.st_size = get_device_size(fd, fname); + close(fd); +diff --git a/generator.c b/generator.c +index 110db28..3f13bb9 100644 +--- a/generator.c ++++ b/generator.c +@@ -1798,7 +1798,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, + + if (write_devices && IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0) { + /* This early open into fd skips the regular open below. */ +- if ((fd = do_open(fnamecmp, O_RDONLY, 0)) >= 0) ++ if ((fd = do_open_nofollow(fnamecmp, O_RDONLY)) >= 0) + real_sx.st.st_size = sx.st.st_size = get_device_size(fd, fnamecmp); + } + +@@ -1867,7 +1867,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, + } + + /* open the file */ +- if (fd < 0 && (fd = do_open(fnamecmp, O_RDONLY, 0)) < 0) { ++ if (fd < 0 && (fd = do_open_checklinks(fnamecmp)) < 0) { + rsyserr(FERROR, errno, "failed to open %s, continuing", + full_fname(fnamecmp)); + pretend_missing: +diff --git a/receiver.c b/receiver.c +index 8031b8f..edfbb21 100644 +--- a/receiver.c ++++ b/receiver.c +@@ -775,7 +775,7 @@ int recv_files(int f_in, int f_out, char *local_name) + if (fnamecmp != fname) { + fnamecmp = fname; + fnamecmp_type = FNAMECMP_FNAME; +- fd1 = do_open(fnamecmp, O_RDONLY, 0); ++ fd1 = do_open_nofollow(fnamecmp, O_RDONLY); + } + + if (fd1 == -1 && basis_dir[0]) { +diff --git a/sender.c b/sender.c +index 2bbff2f..a4d46c3 100644 +--- a/sender.c ++++ b/sender.c +@@ -350,7 +350,7 @@ void send_files(int f_in, int f_out) + exit_cleanup(RERR_PROTOCOL); + } + +- fd = do_open(fname, O_RDONLY, 0); ++ fd = do_open_checklinks(fname); + if (fd == -1) { + if (errno == ENOENT) { + enum logcode c = am_daemon && protocol_version < 28 ? FERROR : FWARNING; +diff --git a/syscall.c b/syscall.c +index 47c5ea5..c55ae5f 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -45,6 +45,8 @@ extern int preallocate_files; + extern int preserve_perms; + extern int preserve_executability; + extern int open_noatime; ++extern int copy_links; ++extern int copy_unsafe_links; + + #ifndef S_BLKSIZE + # if defined hpux || defined __hpux__ || defined __hpux +@@ -793,3 +795,21 @@ cleanup: + return retfd; + #endif // O_NOFOLLOW, O_DIRECTORY + } ++ ++/* ++ varient of do_open/do_open_nofollow which does do_open() if the ++ copy_links or copy_unsafe_links options are set and does ++ do_open_nofollow() otherwise ++ ++ This is used to prevent a race condition where an attacker could be ++ switching a file between being a symlink and being a normal file ++ ++ The open is always done with O_RDONLY flags ++ */ ++int do_open_checklinks(const char *pathname) ++{ ++ if (copy_links || copy_unsafe_links) { ++ return do_open(pathname, O_RDONLY, 0); ++ } ++ return do_open_nofollow(pathname, O_RDONLY); ++} +diff --git a/t_unsafe.c b/t_unsafe.c +index 010cac5..e10619a 100644 +--- a/t_unsafe.c ++++ b/t_unsafe.c +@@ -28,6 +28,9 @@ int am_root = 0; + int am_sender = 1; + int read_only = 0; + int list_only = 0; ++int copy_links = 0; ++int copy_unsafe_links = 0; ++ + short info_levels[COUNT_INFO], debug_levels[COUNT_DEBUG]; + + int +diff --git a/tls.c b/tls.c +index e6b0708..858f8f1 100644 +--- a/tls.c ++++ b/tls.c +@@ -49,6 +49,9 @@ int list_only = 0; + int link_times = 0; + int link_owner = 0; + int nsec_times = 0; ++int safe_symlinks = 0; ++int copy_links = 0; ++int copy_unsafe_links = 0; + + #ifdef SUPPORT_XATTRS + +diff --git a/trimslash.c b/trimslash.c +index 1ec928c..f2774cd 100644 +--- a/trimslash.c ++++ b/trimslash.c +@@ -26,6 +26,8 @@ int am_root = 0; + int am_sender = 1; + int read_only = 1; + int list_only = 0; ++int copy_links = 0; ++int copy_unsafe_links = 0; + + int + main(int argc, char **argv) +diff --git a/util1.c b/util1.c +index f260d39..d84bc41 100644 +--- a/util1.c ++++ b/util1.c +@@ -365,7 +365,7 @@ int copy_file(const char *source, const char *dest, int tmpfilefd, mode_t mode) + int len; /* Number of bytes read into `buf'. */ + OFF_T prealloc_len = 0, offset = 0; + +- if ((ifd = do_open(source, O_RDONLY, 0)) < 0) { ++ if ((ifd = do_open_nofollow(source, O_RDONLY)) < 0) { + int save_errno = errno; + rsyserr(FERROR_XFER, errno, "open %s", full_fname(source)); + errno = save_errno; diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-2.patch b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-2.patch new file mode 100644 index 00000000000..2a3add75e0a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/files/3.3.0/rsync-3.3.0-CVE-2024-12747-2.patch @@ -0,0 +1,34 @@ +https://github.com/RsyncProject/rsync/pull/706 + +From f923b19fd85039a2b0e908391074872334646d51 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Wed, 15 Jan 2025 15:48:04 +0100 +Subject: [PATCH] Fix use-after-free in generator + +full_fname() will free the return value in the next call so we need to +duplicate it before passing it to rsyserr. + +Fixes: https://github.com/RsyncProject/rsync/issues/704 +--- + generator.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/generator.c b/generator.c +index 3f13bb95..b56fa569 100644 +--- a/generator.c ++++ b/generator.c +@@ -2041,8 +2041,12 @@ int atomic_create(struct file_struct *file, char *fname, const char *slnk, const + + if (!skip_atomic) { + if (do_rename(tmpname, fname) < 0) { ++ char *full_tmpname = strdup(full_fname(tmpname)); ++ if (full_tmpname == NULL) ++ out_of_memory("atomic_create"); + rsyserr(FERROR_XFER, errno, "rename %s -> \"%s\" failed", +- full_fname(tmpname), full_fname(fname)); ++ full_tmpname, full_fname(fname)); ++ free(full_tmpname); + do_unlink(tmpname); + return 0; + } + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r4.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0-r2.ebuild similarity index 94% rename from sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r4.ebuild rename to sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0-r2.ebuild index a747693763f..7fbdb2af33f 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.2.7-r4.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0-r2.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # Uncomment when introducing a patch which touches configure RSYNC_NEEDS_AUTOCONF=1 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit flag-o-matic prefix python-single-r1 systemd DESCRIPTION="File transfer program to keep remote files into sync" @@ -77,9 +77,8 @@ else fi PATCHES=( - "${FILESDIR}"/${P}-flist-memcmp-ub.patch - "${FILESDIR}"/${P}-fortify-source-3.patch - "${FILESDIR}"/${PN}-3.2.7-ipv6-configure-c99.patch + # Temporary just for the bug #948106 CVE fixes + "${FILESDIR}"/3.3.0 ) pkg_setup() { @@ -114,6 +113,9 @@ src_prepare() { } src_configure() { + # Should be fixed upstream in next release (>3.3.0) (bug #943745) + append-cflags $(test-flags-CC -std=gnu17) + local myeconfargs=( --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf --without-included-popt @@ -149,7 +151,7 @@ src_install() { dodoc NEWS.md README.md TODO tech_report.tex insinto /etc - newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf + newins "${FILESDIR}"/rsyncd.conf-3.2.7-r5 rsyncd.conf insinto /etc/logrotate.d newins "${FILESDIR}"/rsyncd.logrotate rsyncd diff --git a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0.ebuild deleted file mode 100644 index 8c66b403fc3..00000000000 --- a/sdk_container/src/third_party/portage-stable/net-misc/rsync/rsync-3.3.0.ebuild +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Uncomment when introducing a patch which touches configure -RSYNC_NEEDS_AUTOCONF=1 -PYTHON_COMPAT=( python3_{10..12} ) -inherit flag-o-matic prefix python-single-r1 systemd - -DESCRIPTION="File transfer program to keep remote files into sync" -HOMEPAGE="https://rsync.samba.org/" -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/WayneD/rsync.git" - inherit autotools git-r3 - - REQUIRED_USE="${PYTHON_REQUIRED_USE}" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/waynedavison.asc - inherit verify-sig - - if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then - inherit autotools - fi - - if [[ ${PV} == *_pre* ]] ; then - SRC_DIR="src-previews" - else - SRC_DIR="src" - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - fi - - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" - S="${WORKDIR}"/${P/_/} -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd" -REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - >=dev-libs/popt-1.5 - acl? ( virtual/acl ) - examples? ( - ${PYTHON_DEPS} - dev-lang/perl - ) - lz4? ( app-arch/lz4:= ) - rrsync? ( - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/bracex[${PYTHON_USEDEP}] - ') - ) - ssl? ( dev-libs/openssl:= ) - system-zlib? ( sys-libs/zlib ) - xattr? ( kernel_linux? ( sys-apps/attr ) ) - xxhash? ( >=dev-libs/xxhash-0.8 ) - zstd? ( >=app-arch/zstd-1.4:= ) - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND=" - examples? ( ${PYTHON_DEPS} ) - rrsync? ( ${PYTHON_DEPS} ) -" - -if [[ ${PV} == *9999 ]] ; then - BDEPEND+=" ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/commonmark[${PYTHON_USEDEP}] - ')" -else - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-waynedavison )" -fi - -pkg_setup() { - # - USE=examples needs Python itself at runtime, but nothing else - # - 9999 needs commonmark at build time - if [[ ${PV} == *9999 ]] || use examples || use rrsync; then - python-single-r1_pkg_setup - fi -} - -src_prepare() { - default - - sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac - - if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then - eaclocal -I m4 - eautoconf -o configure.sh - eautoheader && touch config.h.in - fi - - if use examples || use rrsync; then - python_fix_shebang support/ - fi - - if [[ -f rrsync.1 ]]; then - # If the pre-build rrsync.1 man page exists, then link to it - # from support/rrsync.1 to avoid rsync's build system attempting - # re-creating the man page (bug #883049). - ln -s ../rrsync.1 support/rrsync.1 || die - fi -} - -src_configure() { - local myeconfargs=( - --with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf - --without-included-popt - --enable-ipv6 - $(use_enable acl acl-support) - $(use_enable iconv) - $(use_enable lz4) - $(use_with rrsync) - $(use_enable ssl openssl) - $(use_with !system-zlib included-zlib) - $(use_enable xattr xattr-support) - $(use_enable xxhash) - $(use_enable zstd) - ) - - # https://github.com/WayneD/rsync/pull/428 - if is-flagq -fsanitize=undefined ; then - sed -E -i \ - -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ - byteorder.h || die - append-flags -DCAREFUL_ALIGNMENT - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd - - dodoc NEWS.md README.md TODO tech_report.tex - - insinto /etc - newins "${FILESDIR}"/rsyncd.conf-3.0.9-r1 rsyncd.conf - - insinto /etc/logrotate.d - newins "${FILESDIR}"/rsyncd.logrotate rsyncd - - insinto /etc/xinetd.d - newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd - - # Install stunnel helpers - if use stunnel ; then - emake DESTDIR="${D}" install-ssl-daemon - fi - - # Install the useful contrib scripts - if use examples ; then - # The 'rrsync' script is installed conditionally via the 'rrysnc' - # USE flag, and not via the 'examples' USE flag. - rm support/rrsync* || die - - exeinto /usr/share/rsync - doexe support/* - - rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c} - fi - - eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd* - - systemd_newunit packaging/systemd/rsync.service rsyncd.service -} - -pkg_postinst() { - if grep -Eqis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \ - "${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then - ewarn "You have disabled chroot support in your rsyncd.conf. This" - ewarn "is a security risk which you should fix. Please check your" - ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'." - fi - - if use stunnel ; then - einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature." - einfo - einfo "You maybe have to update the certificates configured in" - einfo "${EROOT}/etc/stunnel/rsync.conf" - fi - - if use system-zlib ; then - ewarn "Using system-zlib is incompatible with =rsync-3.1.1 built with bundled zlib," - ewarn "and the --compress option, add --new-compress (-zz)." - ewarn - ewarn "For syncing the portage tree, add:" - ewarn "PORTAGE_RSYNC_EXTRA_OPTS=\"--new-compress\" to make.conf" - fi -} From 405e530899f1b8628d629d00650844ba3065985e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:49 +0000 Subject: [PATCH 064/145] net-misc/socat: Sync with Gentoo It's from Gentoo commit 50f463294b6e8c982683bddcc1e9ee04b5a9eec0. --- .../portage-stable/net-misc/socat/socat-1.8.0.1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/net-misc/socat/socat-1.8.0.1.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/socat/socat-1.8.0.1.ebuild index 956b49fe571..2d9c8f3c989 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/socat/socat-1.8.0.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-misc/socat/socat-1.8.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" IUSE="ipv6 readline ssl tcpd" DEPEND=" From 917044bff7603fb03814a56a551528fb23fa8d26 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:53 +0000 Subject: [PATCH 065/145] perl-core/Getopt-Long: Sync with Gentoo It's from Gentoo commit bde9e7e09d1375d3d661f8c2b6fe386b617ed32f. --- .../perl-core/Getopt-Long/Getopt-Long-2.580.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/perl-core/Getopt-Long/Getopt-Long-2.580.0.ebuild b/sdk_container/src/third_party/portage-stable/perl-core/Getopt-Long/Getopt-Long-2.580.0.ebuild index 95c0ec5237c..7f61b9e8c62 100644 --- a/sdk_container/src/third_party/portage-stable/perl-core/Getopt-Long/Getopt-Long-2.580.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/perl-core/Getopt-Long/Getopt-Long-2.580.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -11,4 +11,4 @@ inherit perl-module DESCRIPTION="Advanced handling of command line options" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" From 0d1f709d4ed7a3ee75dfc69e4cf52df767f24302 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:09:54 +0000 Subject: [PATCH 066/145] profiles: Sync with Gentoo It's from Gentoo commit aa83e57725062655fd5efbbbb8128cf9c8953885. --- .../profiles/arch/alpha/package.use.mask | 8 ++ .../profiles/arch/amd64/package.use.mask | 10 +-- .../arch/amd64/package.use.stable.mask | 4 + .../profiles/arch/amd64/use.stable.mask | 6 +- .../profiles/arch/arm/make.defaults | 6 -- .../profiles/arch/arm/package.use.mask | 9 +- .../portage-stable/profiles/arch/arm/use.mask | 2 - .../profiles/arch/arm/use.stable.mask | 6 +- .../profiles/arch/arm64/make.defaults | 6 -- .../profiles/arch/arm64/package.use.mask | 7 +- .../profiles/arch/arm64/use.mask | 6 -- .../profiles/arch/arm64/use.stable.mask | 7 +- .../profiles/arch/base/package.use.mask | 6 +- .../arch/hppa/hppa1.1/package.use.mask | 2 +- .../arch/hppa/hppa2.0/package.use.mask | 2 +- .../profiles/arch/hppa/make.defaults | 6 -- .../profiles/arch/hppa/package.mask | 5 -- .../profiles/arch/hppa/package.use.mask | 11 +++ .../profiles/arch/hppa/use.mask | 2 - .../profiles/arch/hppa/use.stable.mask | 7 +- .../profiles/arch/loong/package.mask | 5 -- .../profiles/arch/loong/package.use.mask | 36 ++------ .../profiles/arch/loong/use.mask | 4 + .../profiles/arch/mips/package.use.mask | 8 ++ .../profiles/arch/powerpc/make.defaults | 6 -- .../arch/powerpc/ppc32/package.use.mask | 8 +- .../arch/powerpc/ppc64/package.use.mask | 4 +- .../powerpc/ppc64/package.use.stable.mask | 4 + .../arch/powerpc/ppc64/use.stable.mask | 6 +- .../profiles/arch/powerpc/use.mask | 2 - .../profiles/arch/powerpc/use.stable.mask | 6 +- .../profiles/arch/ppc/package.use.mask | 6 +- .../profiles/arch/riscv/package.use.mask | 6 +- .../profiles/arch/s390/package.use.mask | 18 ++-- .../profiles/arch/sparc/make.defaults | 6 -- .../profiles/arch/sparc/package.use.mask | 10 ++- .../profiles/arch/sparc/use.mask | 2 - .../profiles/arch/sparc/use.stable.mask | 6 +- .../profiles/arch/x86/package.use.mask | 6 +- .../profiles/arch/x86/use.stable.mask | 6 +- .../profiles/base/package.use.mask | 8 +- .../profiles/base/package.use.stable.force | 6 +- .../profiles/base/package.use.stable.mask | 4 +- .../profiles/base/use.stable.force | 6 +- .../profiles/base/use.stable.mask | 6 +- .../profiles/features/musl/package.mask | 5 ++ .../profiles/features/wd40/package.use.mask | 8 ++ .../portage-stable/profiles/license_groups | 4 +- .../profiles/package.deprecated | 7 +- .../portage-stable/profiles/package.mask | 86 ++++++++++++++++--- .../releases/17.0/package.use.stable.mask | 7 +- .../portage-stable/profiles/updates/4Q-2024 | 1 + 52 files changed, 246 insertions(+), 175 deletions(-) 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 a4a0ed427dc..66cd6e9d165 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,14 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Pacho Ramos (2025-01-26) +# Needs unkeyworded net-libs/msgraph +gnome-base/gvfs onedrive + +# Sam James (2025-01-14) +# Needs dev-python/numpy and dev-python/scipy which aren't keyworded here +dev-cpp/benchmark tools + # Sam James (2025-01-10) # Many unkeyworded dependencies like parts of TL (bug #947788) dev-perl/Template-Toolkit gd latex vim-syntax 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 51a4a4f192c..814bd5ba41a 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 @@ -17,18 +17,18 @@ #--- END OF EXAMPLES --- +# Matt Jolly (2025-01-11) +# We can bootstrap with mrustc on amd64. +dev-lang/rust -mrustc-bootstrap + # Michał Górny (2024-12-24) # OpenMP offloading is supported on 64-bit architectures only. llvm-core/clang-runtime -offload -# Alfred Wingate <2024-12-16) +# Alfred Wingate (2024-12-16) # Only available on amd64. media-video/handbrake -qsv -# Viorel Munteanu (2024-11-30) -# Dependency dev-python/asyncssh is keyworded here. -net-misc/dropbear -test-async - # Sv. Lockal (2024-11-30) # Masked in base profile, supported on this arch dev-debug/gdb -rocm 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 d5b2e443091..c3caa1362c0 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 @@ -17,6 +17,10 @@ #--- END OF EXAMPLES --- +# Matt Jolly (2025-01-11) +# Stable-mask until mrustc is stabilised +dev-lang/rust mrustc-bootstrap + # Ionen Wolkens (2024-09-27) # dev-qt/qtremoteobjects:6 has not been stabilized yet. dev-python/pyqt6 remoteobjects 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 29ee34a8639..b4645f63174 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 @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Paul Zander (2023-11-17) # ROCm/HIP is not suitable for stabilization. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/make.defaults index 02cf9e76f0d..a701cf86fa5 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/make.defaults +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/make.defaults @@ -25,9 +25,3 @@ VIDEO_CARDS="exynos fbdev omap" # Michał Górny (2017-03-14) # Unhide the ARM-specific USE_EXPANDs. USE_EXPAND_HIDDEN="-CPU_FLAGS_ARM" - -# Sam James (2025-01-05) -# Temporary USE until the global default catches up. dev-lang/ada-bootstrap -# starts with sys-devel/gcc:14 so ADA_TARGET needs to be >= that. This -# entry can be dropped once the global one is >= gcc_14. -ADA_TARGET="gcc_14" 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 e1fe33c51ce..85408fcd3be 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-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + # Sam James (2025-01-04) # kde-plasma/kde-cli-tools not keyworded here x11-misc/xdg-utils plasma # Sam James (2024-12-17) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada # Andreas Sturmlechner (2024-12-10) # Depends on kde-plasma/kdesu-gui which is not keyworded here. @@ -59,7 +63,8 @@ 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 +<=app-office/libreoffice-24.2.7.2 qt6 +>=app-office/libreoffice-24.2.7.2-r1 kde # Nowa Ammerlaan (2024-06-01) # qtnetworkauth, qtremoteobjects and qthttpserver not yet keyworded here diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.mask index e33a92c846c..edfc08209a8 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.mask @@ -7,8 +7,6 @@ # Sam James (2025-01-05) # Older targets don't have an old enough dev-lang/ada-bootstrap available ada_target_gnat_2021 -ada_target_gcc_12 -ada_target_gcc_13 # Sam James (2024-06-13) # Needs as-yet-unkeyworded KF6 (bug #934215) diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.stable.mask index dceaf51d1fc..3837abbd180 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Sam James (2022-01-16) # net-libs/gnome-online-accounts is not marked stable on arm yet diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/make.defaults index e7b9c1371a6..2bf1c06cab6 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/make.defaults +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/make.defaults @@ -20,12 +20,6 @@ LIBDIR_arm64="lib64" # Defaults for video drivers VIDEO_CARDS="fbdev" -# Sam James (2025-01-05) -# Temporary USE until the global default catches up. dev-lang/ada-bootstrap -# starts with sys-devel/gcc:14 so ADA_TARGET needs to be >= that. This -# entry can be dropped once the global one is >= gcc_14. -ADA_TARGET="gcc_14" - # Mart Raudsepp (2018-06-05) # Enable USE=libtirpc by default, to ease dependency resolution during # the stabilization of glibc-2.26. Bug 657148 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 569d47c60d5..718fb400f48 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 @@ -12,7 +12,7 @@ dev-python/qtpy remoteobjects # Sam James (2024-12-17) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada # Alexey Shvetsov (2024-11-21) # sci-libs/caffe2 is not keyworded on arm64 @@ -390,11 +390,6 @@ media-video/mplayer -sdl media-video/mpv -sdl >=x11-libs/wxGTK-3 -sdl -# Jan Vesely (2018-06-15) -# Mesa clover only works on r600 or radeonsi GPUs. The corresponding -# video_cards useflags are not available on arm -media-libs/mesa opencl - # Mart Raudsepp (2018-05-30) # app-text/pandoc not keyworded yet app-emulation/xen-tools doc diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.mask index 885dee42dbc..7e6739b8e04 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.mask @@ -7,8 +7,6 @@ # Sam James (2025-01-05) # Older targets don't have an old enough dev-lang/ada-bootstrap available ada_target_gnat_2021 -ada_target_gcc_12 -ada_target_gcc_13 # Paul Zander (2024-03-28) # dev-libs/optix works on arm64 @@ -80,10 +78,6 @@ cpu_flags_arm_neon -cpu_flags_arm_vfpv4 -cpu_flags_arm_vfp-d32 -# Michał Górny (2018-07-09) -# No OpenCL provider is available on arm64. -opencl - # Mart Raudsepp (2018-02-13) # net-libs/libsmi not tested on arm64 yet smi diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.stable.mask index 66df8d469d1..ec37d9bdcf5 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/arm64/use.stable.mask @@ -1,8 +1,9 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask + +# New entries go on top. +# Please use the same syntax as in use.mask. # Matt Turner (2024-05-10) # x11-drivers/xf86-video-vmware is not stable yet 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 84edf90cc72..bd928db11c2 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 @@ -1,14 +1,10 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Michał Górny (2024-12-24) # OpenMP offloading is supported on 64-bit architectures only. llvm-core/clang-runtime offload -# Viorel Munteanu (2024-11-30) -# Missing keywords on dev-python/asyncssh. -net-misc/dropbear test-async - # Sv. Lockal (2024-11-30) # Only available for amd64. dev-debug/gdb rocm diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa1.1/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa1.1/package.use.mask index 5ec523e8927..767f8914c64 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa1.1/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa1.1/package.use.mask @@ -3,4 +3,4 @@ # Sam James (2025-01-01) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa2.0/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa2.0/package.use.mask index 5ec523e8927..767f8914c64 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa2.0/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/hppa2.0/package.use.mask @@ -3,4 +3,4 @@ # Sam James (2025-01-01) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/make.defaults index 3330405919e..dc318979637 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/make.defaults +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/make.defaults @@ -10,12 +10,6 @@ CXXFLAGS="${CFLAGS}" FEATURES="sandbox sfperms strict" -# Sam James (2025-01-05) -# Temporary USE until the global default catches up. dev-lang/ada-bootstrap -# starts with sys-devel/gcc:14 so ADA_TARGET needs to be >= that. This -# entry can be dropped once the global one is >= gcc_14. -ADA_TARGET="gcc_14" - # Michał Górny (2014-07-01) # Set ABI & DEFAULT_ABI consistently with ${ARCH}, to make ebuild # checks simpler. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.mask index 39addcecad6..e7ef6e29762 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/package.mask @@ -4,8 +4,3 @@ # Sam James (2023-03-28) # Needs explicit porting to each platform (bug 894078#c6) dev-python/py-cpuinfo - -# Quote from : -# "Compilation fails with: #error You need to define CycleTimer for -# your OS and CPU" -dev-cpp/benchmark 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 55300cd4e25..d97b9aa2f14 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,17 @@ # NOTE: When masking a USE flag due to missing keywords, please file a keyword # request bug for the hppa arch. +# Sam James (2025-01-14) +# dev-cpp/benchmark isn't (yet) keyworded here, although >=1.9.1 should +# work fine with patching as the ebuild does. +dev-libs/re2 benchmark + +# Sam James (2025-01-14) +# libpfm: needs unkeyworded dev-libs/libpfm but I don't think HPPA has +# any performance counters anyway. +# tools: needs dev-python/numpy and dev-python/scipy which aren't keyworded here +dev-cpp/benchmark libpfm tools + # Sam James (2025-01-10) # Many unkeyworded dependencies like parts of TL (bug #947788) dev-perl/Template-Toolkit gd latex vim-syntax diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.mask index ab4e4a87102..36be9cd9cdf 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.mask @@ -10,8 +10,6 @@ # Sam James (2025-01-05) # Older targets don't have an old enough dev-lang/ada-bootstrap available ada_target_gnat_2021 -ada_target_gcc_12 -ada_target_gcc_13 # Sam James (2023-09-11) # wayland hasn't been tested on hppa diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.stable.mask index 3d3e6d11f69..a3999f0a7fe 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/hppa/use.stable.mask @@ -1,8 +1,9 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask + +# New entries go on top. +# Please use the same syntax as in use.mask. # matoro (2024-07-16) # dev-lang/ruby now unstabled on hppa diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.mask index 33806bb6258..ec60751587d 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/package.mask @@ -1,11 +1,6 @@ # Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# WANG Xuerui (2023-09-10) -# Has correctness issues on loong (failing test_encode_long_neg_conversion), -# pending debug. -dev-python/ujson - # WANG Xuerui (2022-12-05) # sys-boot/gnu-efi applications that need porting (sbsigntools & refind) or # is abandoned upstream (elilo) 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 75f7aec1640..67d0b332482 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,15 @@ # Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. netcdf not keyworded +dev-build/meson test-full + +# WANG Xuerui (2025-01-16) +# tests require qtwebengine which is unavailable +dev-python/qtconsole test +dev-python/qtpy test + # WANG Xuerui (2025-01-12) # Vulkan works on loong. gui-libs/gtk -vulkan @@ -215,10 +224,6 @@ sys-cluster/openmpi openmpi_fabrics_knem openmpi_rm_pbs # fails to build with 6.3.x kernel sys-cluster/knem modules -# Matt Turner (2023-05-30) -# sys-apps/dbus-broker is not keyworded -app-accessibility/at-spi2-core dbus-broker - # Mike Gilbert (2023-05-27) # Newer sd-boot does not use gnuefi. >=sys-apps/systemd-254 -boot -ukify @@ -246,24 +251,10 @@ net-nds/openldap kerberos # further investigation. net-vpn/openconnect test -# WANG Xuerui (2022-12-06) -# dev-python/pyside2 not keyworded yet -dev-python/qtpy pyside2 -dev-python/qtconsole test - # WANG Xuerui (2022-12-05) # (2022-12-05) -# sys-boot/gnu-efi upstream hasn't merged the loong port yet -sys-apps/fwupd uefi - -# WANG Xuerui (2022-12-05) -# The loong port of sys-boot/grub:2 isn't upstreamed yet. -dev-util/ostree grub -sys-libs/efivar test - # WANG Xuerui (2022-12-05) # sci-libs/adolc fails to build on loong for now. dev-cpp/eigen test @@ -303,11 +294,6 @@ net-analyzer/rrdtool rados # Boost.Context has had support for loong since 1.79.0. dev-libs/boost -context -# WANG Xuerui (2022-12-02) -# dev-qt/qtlocation:5 fails to compile with gcc-13 for now. -dev-python/pyqt5 location -dev-python/qtpy test - # WANG Xuerui (2022-12-01) # Mask GRUB2 platforms not applicable to loong. sys-boot/grub:2 grub_platforms_coreboot grub_platforms_efi-32 grub_platforms_ieee1275 grub_platforms_multiboot grub_platforms_pc grub_platforms_qemu grub_platforms_uboot grub_platforms_xen grub_platforms_xen-pvh @@ -367,10 +353,6 @@ sys-block/fio -io-uring -zbc # from libxcrypt for a world without libcrypt.so.1 sys-libs/libxcrypt compat -# WANG Xuerui (2022-04-18) -# Catalyst has support for assembling bootloader on this arch -dev-util/catalyst -system-bootloader - # The below masks are liberally taken from riscv, which has similar # limitations. diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/use.mask index 298b46c94c5..f36bad135e0 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/loong/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/loong/use.mask @@ -1,6 +1,10 @@ # Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# WANG Xuerui (2025-01-24) +# dev-util/sysprof-capture is keyworded on loong +-sysprof + # WANG Xuerui (2025-01-12) # net-misc/dropbox is closed-source and unavailable on loong dropbox diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/mips/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/mips/package.use.mask index 1aa09c8746e..7f9c65aac21 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/mips/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/mips/package.use.mask @@ -1,6 +1,14 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + +# Pacho Ramos (2025-01-26) +# Needs unkeyworded net-libs/msgraph +gnome-base/gvfs onedrive + # Sam James (2025-01-10) # Many unkeyworded dependencies like parts of TL (bug #947788) dev-perl/Template-Toolkit gd latex vim-syntax diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/make.defaults index f5392d8be42..13092cf1ed3 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/make.defaults +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/make.defaults @@ -4,12 +4,6 @@ # All extra USE/etc should be specified in sub-profiles. # DO NOT POLLUTE USE ON THIS PROFILE. -# Sam James (2025-01-05) -# Temporary USE until the global default catches up. dev-lang/ada-bootstrap -# starts with sys-devel/gcc:14 so ADA_TARGET needs to be >= that. This -# entry can be dropped once the global one is >= gcc_14. -ADA_TARGET="gcc_14" - # Georgy Yakovlev (2019-08-30) # Unhide PPC specific USE_EXPANDs. USE_EXPAND_HIDDEN="-CPU_FLAGS_PPC" 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 0ae14a15d59..942157ba7b7 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 @@ -1,9 +1,13 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Pacho Ramos (2025-01-26) +# Needs unkeyworded net-libs/msgraph +gnome-base/gvfs onedrive + # Sam James (2024-12-17) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada # Ionen Wolkens (2024-12-02) # net-wireless/neard is not keyworded here. 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 a0a349ea075..d12a85711db 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,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Michał Górny (2024-12-24) @@ -7,7 +7,7 @@ llvm-core/clang-runtime -offload # Sam James (2024-12-17) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada # David Roman (2024-10-04) # dev-libs/libunibreak is not keyworded diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.stable.mask index 151441b4a4b..3c1f55daae6 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/package.use.stable.mask @@ -17,6 +17,10 @@ #--- END OF EXAMPLES --- +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not stable here. +dev-build/meson test-full + # Sam James (2025-01-04) # kde-plasma/kde-cli-tools not marked stable here x11-misc/xdg-utils plasma diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.stable.mask index 1d065e2da02..9bb63a5c3d6 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/ppc64/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Sam James (2024-03-07) # dev-lang/php:8.2 is not marked stable here yet (bug #920701) diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.mask index 0a6d66483c1..13667aa34e2 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.mask @@ -7,8 +7,6 @@ # Sam James (2025-01-05) # Older targets don't have an old enough dev-lang/ada-bootstrap available ada_target_gnat_2021 -ada_target_gcc_12 -ada_target_gcc_13 # matoro (2022-09-29) # dev-util/google-perftools is supported here diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.stable.mask index cf5a25e06e1..c078717efd1 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/powerpc/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Matt Turner (2018-04-25) # Dropped stable keywords diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/ppc/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/ppc/package.use.mask index b77ede00e41..4cfea6fc21a 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/ppc/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/ppc/package.use.mask @@ -1,6 +1,10 @@ -# Copyright 2023-2024 Gentoo Authors +# Copyright 2023-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + # Paul Zander (2024-11-04) # media-libs/libavif is not keyworded media-libs/opencv avif 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 afa3fa29cba..5227b633551 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 +# Copyright 2019-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. netcdf not keyworded +dev-build/meson test-full + # Alexey Shvetsov (2024-11-21) # sci-libs/caffe2 is not keyworded on arm64 sci-chemistry/gromacs nnpot diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/s390/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/s390/package.use.mask index a2adedbccf2..bc1bc060764 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/s390/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/s390/package.use.mask @@ -1,6 +1,18 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + +# Sam James (2025-01-14) +# dev-libs/libpfm is not yet keyworded here +dev-cpp/benchmark libpfm + # Sam James (2025-01-10) # Many unkeyworded dependencies like parts of TL (bug #947788) dev-perl/Template-Toolkit gd latex vim-syntax @@ -45,10 +57,6 @@ dev-lang/python jit # media-libs/libraw is not keyworded media-libs/imlib2 raw -# Viorel Munteanu (2024-04-06) -# sys-libs/nss_wrapper unavailable for tests -net-misc/dropbear test - # Sam James (2024-03-27) # No rust-bin available for profiler virtual/rust profiler diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/make.defaults b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/make.defaults index d3f218aa267..9fcf0a8a58c 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/make.defaults +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/make.defaults @@ -42,9 +42,3 @@ VIDEO_CARDS="fbdev mga r128 radeon" # Enable USE=libtirpc by default, to ease dependency resolution during # the stabilization of glibc-2.26. Bug 657148 USE="libtirpc" - -# Sam James (2025-01-05) -# Temporary USE until the global default catches up. dev-lang/ada-bootstrap -# starts with sys-devel/gcc:14 so ADA_TARGET needs to be >= that. This -# entry can be dropped once the global one is >= gcc_14. -ADA_TARGET="gcc_14" 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 82cb8c7de29..2ecf67dd984 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-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + +# Pacho Ramos (2025-01-26) +# Needs unkeyworded net-libs/msgraph +gnome-base/gvfs onedrive + # Sam James (2025-01-10) # Many unkeyworded dependencies like parts of TL (bug #947788) dev-perl/Template-Toolkit gd latex vim-syntax @@ -12,7 +20,7 @@ dev-build/cmake gui # Sam James (2024-12-17) # dev-lang/ada-bootstrap exists here ->=sys-devel/gcc-14 -ada +>=sys-devel/gcc-11 -ada # Matt Jolly (2024-12-08) # dev-vcs/mercurial is not keyworded on sparc diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.mask index ba46a802cac..8f8e9221f8f 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.mask @@ -7,8 +7,6 @@ # Sam James (2025-01-05) # Older targets don't have an old enough dev-lang/ada-bootstrap available ada_target_gnat_2021 -ada_target_gcc_12 -ada_target_gcc_13 # matoro (2024-06-11) # Extensive use of unaligned access, no plans to fix, #636552 diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.stable.mask index 79cf2319f1f..7b9862d055e 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/sparc/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Sam James (2024-03-07) # dev-lang/php:8.2 is not marked stable here yet (bug #920701) 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 ba16b35f2df..36087928dcd 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 @@ -1,6 +1,10 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Dependencies e.g. bindgen not keyworded +dev-build/meson test-full + # Nowa Ammerlaan (2024-12-20) # qtremoteobjects and qthttpserver not yet keyworded here dev-python/pyside6 httpserver remoteobjects diff --git a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/use.stable.mask index 5deb6e10b6c..faa26490acb 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/arch/x86/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/arch/x86/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Paul Zander (2024-02-14) # sci-libs/atlas is not stable diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.mask index 219b112edc3..d7c3876f5fa 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.mask @@ -3,14 +3,14 @@ # New entries go on top. +# Matt Jolly (2025-01-11) +# mrustc currenly only works on amd64. +dev-lang/rust mrustc-bootstrap + # Volkmar W. Pogatzki (2025-01-09) # No suitable versions of dev-libs/protobuf available. =dev-java/protobuf-java-4.29.3 system-protoc -# Volkmar W. Pogatzki (2025-01-04) -# No suitable versions of dev-libs/protobuf available. -=dev-java/protobuf-java-4.29.1 system-protoc - # Andreas Sturmlechner (2025-01-03) # Blocking cleanup of kde-apps/kdegraphics-mobipocket:5 kde-frameworks/kfilemetadata:5 mobi diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.force b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.force index 90c98d1e2a4..99d1bdee75d 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.force +++ b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.force @@ -1,8 +1,8 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in package.use.force +# New entries go on top. +# Please use the same syntax as in package.use.force. ## Kent Fredric (2019-07-11) # The absense of these features require dev-perl/GD, which currently diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.mask index 7fc6ea29259..b918228c0dd 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/base/package.use.stable.mask @@ -1,8 +1,8 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in package.use.mask +# New entries go on top. +# Please use the same syntax as in package.use.mask. # Volkmar W. Pogatzki (2025-01-04) # dev-libs/protobuf-28.3 is not yet marked stable. diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.force b/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.force index 98f4a6f00e4..a5ef319d34c 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.force +++ b/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.force @@ -1,5 +1,5 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.force +# New entries go on top. +# Please use the same syntax as in use.force. diff --git a/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.mask index d01d4174094..f2bbf0a0a13 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/base/use.stable.mask @@ -1,8 +1,8 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in use.mask +# New entries go on top. +# Please use the same syntax as in use.mask. # Hans de Graaff (2024-12-26) # Currently in testing and not ready to go stable yet. diff --git a/sdk_container/src/third_party/portage-stable/profiles/features/musl/package.mask b/sdk_container/src/third_party/portage-stable/profiles/features/musl/package.mask index 473b5f22aa5..c4d4892c0c6 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/features/musl/package.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/features/musl/package.mask @@ -1,6 +1,10 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Arthur Zamarin (2025-01-25) +# depends on vscode/vscodium, which are glibc binary package +kde-misc/krunner-vscodeprojects + # Sam James (2025-01-10) # These packages are only relevant on musl systems. -sys-libs/argp-standalone @@ -111,6 +115,7 @@ dev-ada/ada_libfswatch dev-ada/gnatsymbolize dev-ada/AdaSAT dev-ada/lal-refactor +dev-ada/prettier-ada # Sergey Popov (2024-03-05) # games-strategy/seven-kingdoms does not build on musl, diff --git a/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.use.mask b/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.use.mask index b9bc220cfc3..4a46c53b5f2 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.use.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/features/wd40/package.use.mask @@ -1,6 +1,14 @@ # Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Eli Schwartz (2025-01-26) +# Tests the ability to compile rust projects +dev-build/meson test-full + +# Viorel Munteanu (2025-01-24) +# Requires dev-python/asyncssh. +net-misc/dropbear test-async + # Sam James (2025-01-04) # ptp-helper is written in Rust media-libs/gstreamer ptp diff --git a/sdk_container/src/third_party/portage-stable/profiles/license_groups b/sdk_container/src/third_party/portage-stable/profiles/license_groups index db32bd75ce9..0f36cdbdf27 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/license_groups +++ b/sdk_container/src/third_party/portage-stable/profiles/license_groups @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Please report bugs or other requests at bugs.gentoo.org and assign to @@ -34,7 +34,7 @@ OSI-APPROVED-FREE 0BSD AFL-3.0 AGPL-3 AGPL-3+ Apache-1.1 Apache-2.0 APL-1.0 APSL # Licenses in this list should NOT appear directly or indirectly in # @FSF-APPROVED or @OSI-APPROVED. # Note: Licenses for fonts should be included in @MISC-FREE-DOCS. -MISC-FREE AIFFWriter.m Allegro alternate AMPAS BEER-WARE boehm-gc BSD-1 BSD-2-with-patent BSD-with-attribution BSD-with-disclosure buddy bufexplorer.vim BZIP2 CAOSL CDDL-1.1 CDDL-Schily coldspringharbor CPL-0.5 Crypt-IDEA curl DES docbook dom4j DUMB-0.9.3 ElementTree Emacs ErlPL-1.1 FastCGI feh File-MMagic Flashpix FLEX flexmock FLTK freetts FVWM gd gsm HTML-Tidy iASL icu IDPL imagemagick Info-ZIP inner-net Interbase-1.0 ipadic Ispell JasPer2.0 JDOM JOVE Khronos-CLHPP LambdaMOO LIBGLOSS libmng libpng libpng2 libtiff LLGPL-2.1 LPPL-1.0 LPPL-1.3 lsof matplotlib Mini-XML minpack MIT-with-advertising mm mpich2 NCSA-AMD NCSA-HDF netcat NEWLIB ngrep NPSL-0.95 Old-MIT openafs-krb5-a Openwall otter par PCRE perforce photopc PHP-2.02 pngcrush pngnq Princeton psutils rc rdisc regexp-UofT repoze RSA RtMidi rwpng sash scanlogd sdlsasteroids Sendmail Sendmail-Open-Source SMAIL Snd Spencer-99 SSLeay symlinks Sympow-BSD tablelist tcltk tcp_wrappers_license TeX TeX-other-free TextMate-bundle the-Click-license Time-Format Time-modules tm-align torque-2.5 Toyoda trio UCAR-Unidata unicode URT VTK w3m wm2 xbatt xboing XC Xdebug xtrs ZSH +MISC-FREE AIFFWriter.m Allegro alternate AMPAS BEER-WARE boehm-gc BSD-1 BSD-2-with-patent BSD-with-attribution BSD-with-disclosure buddy bufexplorer.vim BZIP2 CAOSL CDDL-1.1 CDDL-Schily coldspringharbor CPL-0.5 Crypt-IDEA curl DES docbook dom4j DUMB-0.9.3 ElementTree Emacs ErlPL-1.1 FastCGI feh File-MMagic Flashpix FLEX flexmock FLTK freetts FVWM gd gsm HTML-Tidy iASL icu IDPL imagemagick Info-ZIP inner-net ipadic Ispell JasPer2.0 JDOM JOVE Khronos-CLHPP LambdaMOO LIBGLOSS libmng libpng libpng2 libtiff LLGPL-2.1 LPPL-1.0 LPPL-1.3 lsof matplotlib Mini-XML minpack MIT-with-advertising mm mpich2 NCSA-AMD NCSA-HDF netcat NEWLIB ngrep NPSL-0.95 Old-MIT openafs-krb5-a Openwall otter par PCRE perforce photopc PHP-2.02 pngcrush pngnq Princeton psutils rc rdisc regexp-UofT repoze RSA RtMidi rwpng sash scanlogd sdlsasteroids Sendmail Sendmail-Open-Source SMAIL Snd Spencer-99 SSLeay symlinks Sympow-BSD tablelist tcltk tcp_wrappers_license TeX TeX-other-free TextMate-bundle the-Click-license Time-Format Time-modules tm-align torque-2.5 Toyoda trio UCAR-Unidata unicode URT VTK w3m wm2 xbatt xboing XC Xdebug xtrs ZSH # Metaset for all free software FREE-SOFTWARE @FSF-APPROVED @OSI-APPROVED-FREE @MISC-FREE diff --git a/sdk_container/src/third_party/portage-stable/profiles/package.deprecated b/sdk_container/src/third_party/portage-stable/profiles/package.deprecated index fde639005f5..313b8b83b43 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/package.deprecated +++ b/sdk_container/src/third_party/portage-stable/profiles/package.deprecated @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # This file specifies packages that are considered deprecated (but not @@ -17,11 +17,6 @@ #--- END OF EXAMPLES --- -# Volkmar W. Pogatzki (2024-12-16) -# Bug #946526. There is a newer version in dev-java/stringprep-2.2 pending for -# stabilization. Then dev-java/saslprep should be last-rited. -dev-java/saslprep - # Michał Górny (2024-06-15) # Stop-gap compatibility package. Upstreams really need to move away # from the removed cgi module rather than rely on this. 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 6be9a2f091b..05cd13ce24d 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,82 @@ #--- END OF EXAMPLES --- +# Anthony G. Basile (2025-01-25) +# Bug 909889. Needs PEP517 build. Very low user base +# Remove 2025-02-24. +app-portage/grs + + +# Arthur Zamarin (2025-01-24) +# EAPI=7, uses deprecated Go eclasses, fails to compile, installation +# blocked by current versions of docker (which provides the features). +# Removal on 2025-02-23. Bugs #948656, #844577, #694898, #678982. +app-containers/docker-proxy + +# Arthur Zamarin (2025-01-24) +# EAPI=7, uses depcreated Go eclasses, fails to compile. burrow itself +# has exporter built in since version 1.3.4, which can be used instead. +# Removal on 2025-02-23. Bugs #948655, #844613, #679086. +app-metrics/burrow_exporter + +# Arthur Zamarin (2025-01-24) +# EAPI=7, uses deprecated Go eclasses, upstream repo is archived. +# gom is a go dependency manager which doesn't work with modern +# Go tools, and is redundent to standard `go install` commands. +# go-colortext has only gom as reverse dependency. +# Removal on 2025-02-23. Bugs #948653, #844655, #844664, #922697. +dev-go/go-colortext +dev-go/gom + +# Andreas Sturmlechner (2025-01-23) +# Last release from 12 years ago, git master still defaults to Qt4. +# Plenty of other options in ::gentoo. Bug #947741, removal on 2025-02-22. +app-editors/juffed + +# Nowa Ammerlaan (2025-01-23) +# Sypder-5 requires Qt5, and there are several dead +# plugins that have not been migrated to Spyder-6. +# Removal on 2025-02-23 + (2025-01-23) +# CVE-2025-23050, bug #948573; Removal on 2025-02-22. +dev-qt/qtbluetooth:5 + +# Andreas Sturmlechner (2025-01-23) +# Qt5 packages without any revdeps. +dev-qt/pixeltool +dev-qt/qdbus +dev-qt/qdbusviewer +dev-qt/qdoc +dev-qt/qtplugininfo +dev-qt/qtquicktimeline:5 +dev-qt/qtserialbus:5 +dev-qt/qtvirtualkeyboard:5 +dev-qt/qtwebview:5 + +# Andreas Sturmlechner (2025-01-23) +# Unmaintained in Gentoo, last release from 2022 needs Qt5WebEngine. +# Bug #926655. Removal on 2025-02-22. +app-text/bibletime + +# Volkmar W. Pogatzki (2025-01-20) +# Unused Java library. Removal on 2025-02-19. +dev-java/saslprep + +# Zac Medico (2025-01-18) +# Ebuild is difficult to maintain. No revdeps. +# Removal on 2025-02-17. Bug #896044 +sys-cluster/k3s + +# Michał Górny (2025-01-18) +# Superseded by dev-python/terminaltables3, the only revdep switched +# over. +# Removal on 2025-02-17. Bug #948333. +dev-python/terminaltables + # Andreas Sturmlechner (2025-01-11) # Last release from 2012, dead upstream for 7 years, no Gentoo maintainer. # Depends on dev-qt/qtwebengine:5, removed from almost every other distro. @@ -214,12 +290,6 @@ net-p2p/bitcoin-qt net-p2p/bitcoind virtual/bitcoin-leveldb -# Mats Lidell (2024-12-25) -# Packages used by XEmacs 21.4, now removed from tree. Not needed with -# XEmacs 21.5. Removal on 2025-01-24. -app-xemacs/latin-unity -app-xemacs/mule-ucs - # Michał Górny (2024-12-05) # 6.12.2 does not boot for me. =sys-kernel/gentoo-kernel-6.12.2 @@ -339,10 +409,6 @@ app-emulation/virtualbox-kvm # Pretest versions, masked for testing. (2024-09-10) -# Breaks libstdc++ with a casing issue: https://gcc.gnu.org/PR116657 -=sys-libs/timezone-data-2024b - # Fabian Groffen (2024-09-02) # exim_tinydb utility crashes due to invalid free() (used in startup script) =mail-mta/exim-4.98 diff --git a/sdk_container/src/third_party/portage-stable/profiles/releases/17.0/package.use.stable.mask b/sdk_container/src/third_party/portage-stable/profiles/releases/17.0/package.use.stable.mask index 1f4a6f6c548..1eafbe784be 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/releases/17.0/package.use.stable.mask +++ b/sdk_container/src/third_party/portage-stable/profiles/releases/17.0/package.use.stable.mask @@ -1,6 +1,5 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# This file requires eapi 5 or later. New entries go on top. -# Please use the same syntax as in package.use.mask - +# New entries go on top. +# Please use the same syntax as in package.use.mask. diff --git a/sdk_container/src/third_party/portage-stable/profiles/updates/4Q-2024 b/sdk_container/src/third_party/portage-stable/profiles/updates/4Q-2024 index 819daf818b2..4613d02bafb 100644 --- a/sdk_container/src/third_party/portage-stable/profiles/updates/4Q-2024 +++ b/sdk_container/src/third_party/portage-stable/profiles/updates/4Q-2024 @@ -84,3 +84,4 @@ move dev-ml/llvm-ocaml dev-ml/llvm move dev-python/clang-python dev-python/clang slotmove kde-frameworks/kapidox 5 0 move dev-python/publicsuffix dev-python/publicsuffix2 +move dev-util/imediff2 dev-util/imediff From b3233d6d28725b6b39499a914125a1ec7bad61a4 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:09 +0000 Subject: [PATCH 067/145] sys-apps/config-site: Sync with Gentoo It's from Gentoo commit e4603a6b7bb2d6d8cd436b8811a66d080083d694. --- .../sys-apps/config-site/Manifest | 1 + .../sys-apps/config-site/config-site-0.ebuild | 13 ++++++--- .../config-site/config-site-99999999.ebuild | 29 +++++++++++++++++++ .../sys-apps/config-site/files/config.site.in | 10 ------- .../sys-apps/config-site/metadata.xml | 4 +++ 5 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/config-site/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-99999999.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/config-site/files/config.site.in diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/Manifest new file mode 100644 index 00000000000..5b17284d57a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/Manifest @@ -0,0 +1 @@ +DIST config-site-0.tar.bz2 6588 BLAKE2B 98ad7836316d68fc27e1dc18b419d088e2047f3ebbbb2b7e8a0ab6de4c66c3ae438504146398e697a246ae09804cdcc229701ce2ba52de469cf8e78798fedaa8 SHA512 0e02848dc3176a0963b99d8d785e3a0150917156d9db897d665ede2ddcd8dfacd334b0c761975671c161f79107622226caf2fc422e1c34fa28b83ec78a1ec93a diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-0.ebuild index 8389fd2cd44..c829b6ca517 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-0.ebuild @@ -1,21 +1,26 @@ -# Copyright 2023 Gentoo Authors +# Copyright 2023-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="config.site to load dropins from config.site.d" HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base" -S=${WORKDIR} +if [[ ${PV} == 99999999 ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/config-site.git" + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/config-site.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +fi LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" RDEPEND="! config.site || die + config.site.in > config.site || die } src_install() { diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-99999999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-99999999.ebuild new file mode 100644 index 00000000000..684dc2b292a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/config-site-99999999.ebuild @@ -0,0 +1,29 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="config.site to load dropins from config.site.d" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base" +if [[ ${PV} == 99999999 ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/config-site.git" + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/config-site.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" + +RDEPEND="! config.site || die +} + +src_install() { + insinto /usr/share + doins config.site +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/files/config.site.in b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/files/config.site.in deleted file mode 100644 index 1e732cf28aa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/files/config.site.in +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -for script in "@datarootdir@/config.site.d"/*.conf; do - test -f "${script}" || continue - test -r "${script}" || continue - echo "${0##*/}: loading site script ${script}" - . "${script}" || break -done -unset script diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/metadata.xml index 65e1fc82d85..762976366bb 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/config-site/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/sys-apps/config-site/metadata.xml @@ -4,4 +4,8 @@ base-system@gentoo.org + + proj/config-site + gentoo/config-site + From e9b025fb18345c15eedfc7b7b1e18bb786418f94 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:09 +0000 Subject: [PATCH 068/145] sys-apps/coreutils: Sync with Gentoo It's from Gentoo commit f37abbd3838e8661dbf83efafab121e27ed04bef. --- .../sys-apps/coreutils/Manifest | 3 + .../sys-apps/coreutils/coreutils-9.6.ebuild | 307 ++++++++++++++++++ .../sys-apps/coreutils/coreutils-9999.ebuild | 8 +- 3 files changed, 315 insertions(+), 3 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9.6.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/Manifest index 83daeb11649..11435b471ed 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/Manifest @@ -4,3 +4,6 @@ DIST coreutils-9.4.tar.xz.sig 833 BLAKE2B 870f7eb28e8851f41954820c7f4f4b43a965e6 DIST coreutils-9.5-patches.tar.xz 5912 BLAKE2B 873fbe1a60f8f8034b3d35796146765ce388952d649c32dc81ca0e4c2823c9f2f00b69bc5cb3af686434867459b6dc378fb9a6d59563d28b87c3ee1eceeedbb3 SHA512 4b4ad356615d046b8d67ea35b789f887a787ab01ece3234f6344518aef33cd30ca364fef5d85e11acfdb24003114c16ffdab82922fb135d5425fbcd541064a76 DIST coreutils-9.5.tar.xz 6007136 BLAKE2B 6fd3a77697c9e85f31415c6ad66559faf18acc7d346677a89d4a999c2027886551e78842a7283e7b3b44fe8ef2fde04ba2f88df32a7844d5f69d45bcb7a04b6f SHA512 2ca0deac4dc10a80fd0c6fd131252e99d457fd03b7bd626a6bc74fe5a0529c0a3d48ce1f5da1d3b3a7a150a1ce44f0fbb6b68a6ac543dfd5baa3e71f5d65401c DIST coreutils-9.5.tar.xz.sig 833 BLAKE2B 37c29984bceee0ff3bffde76712f71dbb118c228e328dc230d5c53c37da12f5ec2130e0123b97fda4a561f556c3be307fdbe1f0c21279db2c84030818386f626 SHA512 029997e0f4ee64e561853cff7c8a124f58cc891598595b44c4a46f9813b4b71c9d677464bc8a26d294e9971832f4b87c23777fea4fac6e8e30f06ad93b9957d5 +DIST coreutils-9.6-patches.tar.xz 5904 BLAKE2B 1abe214914007804362b9d7c1a7c39f07d74c51857e84484179f11bb8fa512356ee97c811ef62469aaa52db5cc90f2f7587c2dc57ed130ebbfdacc59755dcb90 SHA512 5a609b21da7c78e41184e5d7bca87da4f868975635b6e8aa4bd8f4d18c98a2fabd5b7e8ad6bf7780ca77f6d532bfa5cb1ed618e4bc32617ba2977d4b8a885b9f +DIST coreutils-9.6.tar.xz 6134764 BLAKE2B 4070d3d272851d3e9c326df9c05ce67797d86852e7f5c26e545f987f444295f2cfca24e8569514d7b5edf8fd50318d07cb20dea4a4ce8c65b34bea0c5a9177be SHA512 398391d7f9d77e6117b750abb8711eebdd9cd2549e7846cab26884fb2dd522b6bcfb8bf7fef35a12683e213ada7f89b817bf615628628d42aee3fa3102647b28 +DIST coreutils-9.6.tar.xz.sig 833 BLAKE2B a9ea9773746d21b526e69ca2ff7637f3dcef4a921da943f281c4d16fed2d8f9eff92353e1ceafbbc8cfe4b9b23bf123bf64dcd79ff598759373c50739a5046c6 SHA512 a8e578b5e1d053b49e3e2c5dc94431d17c6a14662f459b2174cea23865ccca32e5ae5c13fedb0a8345d25269a9b98cb7f463a897c9663f9f9bcaf61e5c781378 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9.6.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9.6.ebuild new file mode 100644 index 00000000000..6630d91c84d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9.6.ebuild @@ -0,0 +1,307 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Try to keep an eye on Fedora's packaging: https://src.fedoraproject.org/rpms/coreutils +# The upstream coreutils maintainers also maintain the package in Fedora and may +# backport fixes which we want to pick up. +# +# Also recommend subscribing to the coreutils and bug-coreutils MLs. + +PYTHON_COMPAT=( python3_{10..13} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/coreutils.asc +inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig + +MY_PATCH="${PN}-9.6-patches" +DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)" +HOMEPAGE="https://www.gnu.org/software/coreutils/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/git/coreutils.git" + inherit git-r3 +elif [[ ${PV} == *_p* ]] ; then + # Note: could put this in devspace, but if it's gone, we don't want + # it in tree anyway. It's just for testing. + MY_SNAPSHOT="$(ver_cut 1-2).185-541b02" + SRC_URI="https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz -> ${P}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz.sig -> ${P}.tar.xz.sig )" + S="${WORKDIR}"/${PN}-${MY_SNAPSHOT} +else + SRC_URI=" + mirror://gnu/${PN}/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" +fi + +SRC_URI+=" !vanilla? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH}.tar.xz )" + +LICENSE="GPL-3+" +SLOT="0" +IUSE="acl caps gmp hostname kill multicall nls +openssl selinux +split-usr static test vanilla xattr" +RESTRICT="!test? ( test )" + +LIB_DEPEND=" + acl? ( sys-apps/acl[static-libs] ) + caps? ( sys-libs/libcap ) + gmp? ( dev-libs/gmp:=[static-libs] ) + openssl? ( dev-libs/openssl:=[static-libs] ) + xattr? ( sys-apps/attr[static-libs] ) +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs]} ) + selinux? ( sys-libs/libselinux ) + nls? ( virtual/libintl ) +" +DEPEND=" + ${RDEPEND} + static? ( ${LIB_DEPEND} ) +" +BDEPEND=" + app-arch/xz-utils + dev-lang/perl + test? ( + dev-debug/strace + dev-lang/perl + dev-perl/Expect + ${PYTHON_DEPS} + ) + verify-sig? ( sec-keys/openpgp-keys-coreutils ) +" +RDEPEND+=" + hostname? ( !sys-apps/net-tools[hostname] ) + kill? ( + !sys-apps/util-linux[kill] + !sys-process/procps[kill] + ) + !9.4?), we may want to wire up USE=systemd: + # still experimental at the moment, but: + # https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=85edb4afbd119fb69a0d53e1beb71f46c9525dd0 + local myconf=( + --with-packager="Gentoo" + --with-packager-version="${PVR} (p${PATCH_VER:-0})" + --with-packager-bug-reports="https://bugs.gentoo.org/" + # kill/uptime - procps + # groups/su - shadow + # hostname - net-tools + --enable-install-program="arch,$(usev hostname),$(usev kill)" + --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime" + $(usev !caps --disable-libcap) + $(use_enable nls) + $(use_enable acl) + $(use_enable multicall single-binary) + $(use_enable xattr) + $(use_with gmp libgmp) + $(use_with openssl) + ) + + if use gmp ; then + myconf+=( --with-libgmp-prefix="${ESYSROOT}"/usr ) + fi + + if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then + # bug #311569 + export fu_cv_sys_stat_statfs2_bsize=yes + # bug #416629 + export gl_cv_func_realpath_works=yes + fi + + # bug #409919 + export gl_cv_func_mknod_works=yes + + if use static ; then + append-ldflags -static + # bug #321821 + sed -i '/elf_sys=yes/s:yes:no:' configure || die + fi + + if ! use selinux ; then + # bug #301782 + export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no + fi + + econf "${myconf[@]}" +} + +src_test() { + # Non-root tests will fail if the full path isn't + # accessible to non-root users + chmod -R go-w "${WORKDIR}" || die + chmod a+rx "${WORKDIR}" || die + + # coreutils tests like to do `mount` and such with temp dirs, + # so make sure: + # - /etc/mtab is writable (bug #265725) + # - /dev/loop* can be mounted (bug #269758) + mkdir -p "${T}"/mount-wrappers || die + mkwrap() { + local w ww + for w in "${@}" ; do + ww="${T}/mount-wrappers/${w}" + cat <<-EOF > "${ww}" + #!${EPREFIX}/bin/sh + exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P ${w}) "\$@" + EOF + chmod a+rx "${ww}" || die + done + } + mkwrap mount umount + + addwrite /dev/full + + #local -x RUN_EXPENSIVE_TESTS="yes" + #local -x COREUTILS_GROUPS="portage wheel" + local -x PATH="${T}/mount-wrappers:${PATH}" + local -x gl_public_submodule_commit= + + local xfail_tests=( + # bug #629660 + # Commented out again in 9.6 as it XPASSes on linux-6.12.10 + # with sandbox-2.43 on tmpfs. Let's see if it lasts.. + #tests/dd/no-allocate.sh + + # bug #675802 + tests/env/env-S + tests/env/env-S.pl + + # bug #413621 and bug #548250 + tests/du/long-from-unreadable.sh + tests/ls/removed-directory + tests/ls/removed-directory.sh + tests/ls/stat-free-symlinks + tests/ls/stat-free-symlinks.sh + tests/rm/deep-2 + tests/rm/deep-2.sh + + # We have a patch which fixes this (bug #259876) + #tests/touch/not-owner + #tests/touch/not-owner.sh + ) + + # This test is flaky (bug #910640). + cat > tests/tty/tty-eof.pl <<-EOF || die + #!/usr/bin/perl + exit 77; + EOF + + # We set DISABLE_HARD_ERRORS because some of the tests hard error-out + # because of sandbox. They're skipped above but DISABLE_HARD_ERRORS is needed + # to downgrade them to FAIL. + emake -k check \ + VERBOSE=yes \ + DISABLE_HARD_ERRORS=yes \ + XFAIL_TESTS="${xfail_tests[*]}" +} + +src_install() { + default + + insinto /etc + newins src/dircolors.hin DIR_COLORS + + if use split-usr ; then + cd "${ED}"/usr/bin || die + dodir /bin + + # Move critical binaries into /bin (required by FHS) + local fhs="cat chgrp chmod chown cp date dd df echo false ln ls + mkdir mknod mv pwd rm rmdir stty sync true uname" + mv ${fhs} ../../bin/ || die "Could not move FHS bins!" + + if use hostname ; then + mv hostname ../../bin/ || die + fi + + if use kill ; then + mv kill ../../bin/ || die + fi + + # Move critical binaries into /bin (common scripts) + # (Why are these required for booting?) + local com="basename chroot cut dir dirname du env expr head mkfifo + mktemp readlink seq sleep sort tail touch tr tty vdir wc yes" + mv ${com} ../../bin/ || die "Could not move common bins!" + + # Create a symlink for uname in /usr/bin/ since autotools require it. + # (Other than uname, we need to figure out why we are + # creating symlinks for these in /usr/bin instead of leaving + # the files there in the first place...) + local x + for x in ${com} uname ; do + dosym ../../bin/${x} /usr/bin/${x} + done + fi +} + +pkg_postinst() { + ewarn "Make sure you run 'hash -r' in your active shells." + ewarn "You should also re-source your shell settings for LS_COLORS" + ewarn " changes, such as: source /etc/profile" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9999.ebuild index 49d49c30839..6630d91c84d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/coreutils/coreutils-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ PYTHON_COMPAT=( python3_{10..13} ) VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/coreutils.asc inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig -MY_PATCH="${PN}-9.5-patches" +MY_PATCH="${PN}-9.6-patches" DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)" HOMEPAGE="https://www.gnu.org/software/coreutils/" @@ -223,7 +223,9 @@ src_test() { local xfail_tests=( # bug #629660 - tests/dd/no-allocate.sh + # Commented out again in 9.6 as it XPASSes on linux-6.12.10 + # with sandbox-2.43 on tmpfs. Let's see if it lasts.. + #tests/dd/no-allocate.sh # bug #675802 tests/env/env-S From bb41dda3c37578aa50f6bddd121be376f51fdb4f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:10 +0000 Subject: [PATCH 069/145] sys-apps/diffutils: Sync with Gentoo It's from Gentoo commit 863606e6820b046146129c7ede84d1c73f198e41. --- .../sys-apps/diffutils/Manifest | 2 + .../diffutils/diffutils-3.10_p20250103.ebuild | 58 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/diffutils/diffutils-3.10_p20250103.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/Manifest index cae233d525b..245d881f551 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/Manifest @@ -1,2 +1,4 @@ +DIST diffutils-3.10.242-d65b.tar.xz 1924516 BLAKE2B 3d4a2928b0c9462d1cd570d31b5d8ba32f3c3db23c2f96aca53c55a5d0738ee38ebd412138247313e7dc540284c2243ab49bffd23ed7eb320cef39118f195a2a SHA512 ad27490d59e77f5f6ca4d3a7d88d0ccbc1727aeded2427fd3bf7d5ecf478f182ae24938dec30f0eba9524cae771aac732ad26193a9a3f5356ab204152fa35423 +DIST diffutils-3.10.242-d65b.tar.xz.sig 833 BLAKE2B 2a7c70105d2d88edca9d771a21d39fba78ed25213fb922a48eae1e37d3eb2c07cce5ac24713cfdb336e1edd0def6f31aa79bac84ecc5a7d4ea80b4094cfccb26 SHA512 8a0564e14131c01aa93163a026fe9f87a2bebf4d9354b757233a1af81d7e276fb2e0dbc15e0d95ba89315a33d9751badd641755c901daa531d05547f4bcc9fb0 DIST diffutils-3.10.tar.xz 1624240 BLAKE2B 24a90162b3d876e6378243f19a85a1f1bb4cdfe98d130dee684740a902f2987509d5830dd32df4e26678b468b96960f6f9785ffb922e828cb8b4acce0d8587f6 SHA512 219d2c815a120690c6589846271e43aee5c96c61a7ee4abbef97dfcdb3d6416652ed494b417de0ab6688c4322540d48be63b5e617beb6d20530b5d55d723ccbb DIST diffutils-3.10.tar.xz.sig 833 BLAKE2B 06650838d6a3327fda6b2ab09693170ec18b730b1f5981c8f3e2180b2c8a553307ae93199e4be0532a534a8a3f95e4a7b4fccbbd9e5f8d1b1cedd0816b0aac90 SHA512 91aa1fcfca224454e292540ea7813f4a0eb348f06a4374017326d524949775359fc833de597cc201c97f357eb6c675800828a6e3332572376f3554f1f2e1aca1 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/diffutils-3.10_p20250103.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/diffutils-3.10_p20250103.ebuild new file mode 100644 index 00000000000..069dd2e3134 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/diffutils/diffutils-3.10_p20250103.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/diffutils.asc +inherit verify-sig + +DESCRIPTION="Tools to make diffs and compare files" +HOMEPAGE="https://www.gnu.org/software/diffutils/" + +if [[ ${PV} == *_p* ]] ; then + # Subscribe to the 'platform-testers' ML to find these. + # Useful to test on our especially more niche arches and report issues upstream. + MY_COMMIT="242-d65b" + MY_P=${PN}-$(ver_cut 1-2).${MY_COMMIT} + SRC_URI="https://meyering.net/diff/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://meyering.net/diff/${MY_P}.tar.xz.sig )" + S="${WORKDIR}"/${MY_P} +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="nls" + +BDEPEND=" + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-diffutils ) +" + +src_prepare() { + default + + # Needed because of ${P}-diff-D-option-regression.patch + #touch man/diff.1 || die +} + +src_configure() { + # Disable automagic dependency over libsigsegv; see bug #312351. + export ac_cv_libsigsegv=no + + # required for >=glibc-2.26, bug #653914 + use elibc_glibc && export gl_cv_func_getopt_gnu=yes + + local myeconfargs=( + # Interferes with F_S (sets F_S=2) + --disable-gcc-warnings + --with-packager="Gentoo" + --with-packager-version="${PVR}" + --with-packager-bug-reports="https://bugs.gentoo.org/" + $(use_enable nls) + ) + econf "${myeconfargs[@]}" +} From 0c6b117e68f41ecc72402038aae4b9e59d848d2f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:12 +0000 Subject: [PATCH 070/145] sys-apps/file: Sync with Gentoo It's from Gentoo commit fb3be78483b48dd6ec8895fdb328133744919122. --- .../sys-apps/file/file-5.46-r1.ebuild | 188 ----------------- .../sys-apps/file/file-5.46.ebuild | 189 ------------------ 2 files changed, 377 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46-r1.ebuild deleted file mode 100644 index 592b6a25c65..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46-r1.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{10..13} ) - -inherit distutils-r1 toolchain-funcs multilib-minimal - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://github.com/glensc/file.git" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc - inherit libtool verify-sig - SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz" - SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )" - - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - - BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )" -fi - -DESCRIPTION="Identify a file's format by scanning binary data for patterns" -HOMEPAGE="https://www.darwinsys.com/file/" - -LICENSE="BSD-2" -SLOT="0" -IUSE="bzip2 lzip lzma python seccomp static-libs zlib zstd" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -DEPEND=" - bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) - lzip? ( app-arch/lzlib ) - lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) - seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) -" -RDEPEND=" - ${DEPEND} - python? ( - ${PYTHON_DEPS} - !dev-python/python-magic - ) - seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] ) -" -BDEPEND+=" - python? ( - ${PYTHON_DEPS} - ${DISTUTILS_DEPS} - ) -" - -# https://bugs.gentoo.org/898676 -QA_CONFIG_IMPL_DECL_SKIP=( makedev ) - -PATCHES=( - "${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet - "${FILESDIR}/file-5.45-seccomp-sandbox.patch" - "${FILESDIR}/file-5.46-zip.patch" -) - -src_prepare() { - default - - if [[ ${PV} == 9999 ]] ; then - eautoreconf - else - elibtoolize - fi - - # Don't let python README kill main README, bug #60043 - mv python/README.md python/README.python.md || die - - # bug #662090 - sed -i 's@README.md@README.python.md@' python/setup.py || die -} - -multilib_src_configure() { - local myeconfargs=( - --enable-fsect-man5 - $(use_enable bzip2 bzlib) - $(multilib_native_use_enable lzip lzlib) - $(use_enable lzma xzlib) - $(use_enable seccomp libseccomp) - $(use_enable static-libs static) - $(use_enable zlib) - $(use_enable zstd zstdlib) - ) - - econf "${myeconfargs[@]}" -} - -build_src_configure() { - local myeconfargs=( - --disable-shared - --disable-libseccomp - --disable-bzlib - --disable-xzlib - --disable-zlib - ) - - econf_build "${myeconfargs[@]}" -} - -need_build_file() { - # When cross-compiling, we need to build up our own file - # because people often don't keep matching host/target - # file versions, bug #362941 - tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}" -} - -src_configure() { - local ECONF_SOURCE="${S}" - - if need_build_file ; then - mkdir -p "${WORKDIR}"/build || die - cd "${WORKDIR}"/build || die - build_src_configure - fi - - multilib-minimal_src_configure -} - -multilib_src_compile() { - if multilib_is_native_abi ; then - emake - else - # bug #586444 - emake -C src magic.h - emake -C src libmagic.la - fi -} - -src_compile() { - if need_build_file ; then - # bug #586444 - emake -C "${WORKDIR}"/build/src magic.h - emake -C "${WORKDIR}"/build/src file - local -x PATH="${WORKDIR}/build/src:${PATH}" - fi - - multilib-minimal_src_compile - - if use python ; then - cd python || die - distutils-r1_src_compile - fi -} - -src_test() { - multilib-minimal_src_test - - if use python ; then - cd python || die - distutils-r1_src_test - fi -} - -python_test() { - eunittest -} - -multilib_src_install() { - if multilib_is_native_abi ; then - default - else - emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}" - fi -} - -multilib_src_install_all() { - dodoc ChangeLog MAINT # README - - # Required for `file -C` - insinto /usr/share/misc/magic - doins -r magic/Magdir/* - - if use python ; then - cd python || die - distutils-r1_src_install - fi - - find "${ED}" -type f -name "*.la" -delete || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46.ebuild deleted file mode 100644 index 782ba5774cc..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/file/file-5.46.ebuild +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -DISTUTILS_OPTIONAL=1 -PYTHON_COMPAT=( python3_{10..13} ) - -inherit distutils-r1 toolchain-funcs multilib-minimal - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://github.com/glensc/file.git" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc - inherit autotools verify-sig - SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz" - SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )" - - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" - - BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )" -fi - -DESCRIPTION="Identify a file's format by scanning binary data for patterns" -HOMEPAGE="https://www.darwinsys.com/file/" - -LICENSE="BSD-2" -SLOT="0" -IUSE="bzip2 lzip lzma python seccomp static-libs zlib zstd" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -DEPEND=" - bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] ) - lzip? ( app-arch/lzlib ) - lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) - seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] ) - zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) -" -RDEPEND=" - ${DEPEND} - python? ( - ${PYTHON_DEPS} - !dev-python/python-magic - ) - seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] ) -" -BDEPEND+=" - python? ( - ${PYTHON_DEPS} - ${DISTUTILS_DEPS} - ) -" - -# https://bugs.gentoo.org/898676 -QA_CONFIG_IMPL_DECL_SKIP=( makedev ) - -PATCHES=( - "${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet - "${FILESDIR}/file-5.45-seccomp-sandbox.patch" -) - -src_prepare() { - default - - #if [[ ${PV} == 9999 ]] ; then - # eautoreconf - #else - # elibtoolize - #fi - # Just for file-5.45-32-bit-time_t-deux.patch, drop in 5.46 - eautoreconf - - # Don't let python README kill main README, bug #60043 - mv python/README.md python/README.python.md || die - - # bug #662090 - sed -i 's@README.md@README.python.md@' python/setup.py || die -} - -multilib_src_configure() { - local myeconfargs=( - --enable-fsect-man5 - $(use_enable bzip2 bzlib) - $(multilib_native_use_enable lzip lzlib) - $(use_enable lzma xzlib) - $(use_enable seccomp libseccomp) - $(use_enable static-libs static) - $(use_enable zlib) - $(use_enable zstd zstdlib) - ) - - econf "${myeconfargs[@]}" -} - -build_src_configure() { - local myeconfargs=( - --disable-shared - --disable-libseccomp - --disable-bzlib - --disable-xzlib - --disable-zlib - ) - - econf_build "${myeconfargs[@]}" -} - -need_build_file() { - # When cross-compiling, we need to build up our own file - # because people often don't keep matching host/target - # file versions, bug #362941 - tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}" -} - -src_configure() { - local ECONF_SOURCE="${S}" - - if need_build_file ; then - mkdir -p "${WORKDIR}"/build || die - cd "${WORKDIR}"/build || die - build_src_configure - fi - - multilib-minimal_src_configure -} - -multilib_src_compile() { - if multilib_is_native_abi ; then - emake - else - # bug #586444 - emake -C src magic.h - emake -C src libmagic.la - fi -} - -src_compile() { - if need_build_file ; then - # bug #586444 - emake -C "${WORKDIR}"/build/src magic.h - emake -C "${WORKDIR}"/build/src file - local -x PATH="${WORKDIR}/build/src:${PATH}" - fi - - multilib-minimal_src_compile - - if use python ; then - cd python || die - distutils-r1_src_compile - fi -} - -src_test() { - multilib-minimal_src_test - - if use python ; then - cd python || die - distutils-r1_src_test - fi -} - -python_test() { - eunittest -} - -multilib_src_install() { - if multilib_is_native_abi ; then - default - else - emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}" - fi -} - -multilib_src_install_all() { - dodoc ChangeLog MAINT # README - - # Required for `file -C` - insinto /usr/share/misc/magic - doins -r magic/Magdir/* - - if use python ; then - cd python || die - distutils-r1_src_install - fi - - find "${ED}" -type f -name "*.la" -delete || die -} From c48cb5e443e4ca9d1c9c6df2539d8f0e30fed318 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:12 +0000 Subject: [PATCH 071/145] sys-apps/gawk: Sync with Gentoo It's from Gentoo commit dceae59e55864f85d1dca1463f5a4cf912ff7e9d. --- .../portage-stable/sys-apps/gawk/Manifest | 4 - .../gawk/files/gawk-5.3.0-str2wstr.patch | 193 ------------------ .../sys-apps/gawk/gawk-5.2.2.ebuild | 139 ------------- .../sys-apps/gawk/gawk-5.3.0-r1.ebuild | 140 ------------- 4 files changed, 476 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/gawk/files/gawk-5.3.0-str2wstr.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.3.0-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest index a80da9eb313..279ee1c97f6 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/Manifest @@ -1,6 +1,2 @@ -DIST gawk-5.2.2.tar.xz 3402872 BLAKE2B 49dd69d3e2414867d60fe42b74b39bc6858114aeeb9305ade7bfd64f1933b3c93d59d127362b614cb4b73e29279ed3b4ea9fa0da94fce98ca9925980d17b5d0c SHA512 90611e4daba7226d5ce8230843bf479dc71c0101740c005d851ef7c5b935b6cd4c42089b858abc1619adc05ed25fc7234f993690a76d2ea0b8e61bcbb7dc5a58 -DIST gawk-5.2.2.tar.xz.sig 488 BLAKE2B ad737580d7eeb556187a3eeb269decb484398ca91b0fbf08da7f78bba92328ca2fb566b00f8e880fb7c5f0f956e49f8ab9fddc73209902c420666d5413e8a467 SHA512 563911c3771feddf64810ef2480705fd470c90380c0e258940cedeef3f15d594ef657ddab267a6d958321333d466b77c9b83be2392549c959245324950fb32ed -DIST gawk-5.3.0.tar.xz 3436180 BLAKE2B 1bab754626a51679e4d6fe4552bc965f402a51d176eab30686bf19c74085fd15507b51514c3c46d38f68d3e98da4326c138411abe12e4d8793cec617b2533f3c SHA512 c274a62c7420e7b7769b8ed94db40024bd5917ff49bd50a77ad6df1f16ecf116968aaf85da94015479466bf5570b370b6fdd197f95212ae0c3509dfcb7d9e35a -DIST gawk-5.3.0.tar.xz.sig 488 BLAKE2B 9d35eca94424cc39bb52b0b790e0db0b9ee51099c40da0a8be7bc60450d227735ba51dcfc10a08f6765d2037054cb9324f0fba100ea2ad08cf56dac1e2c11ac0 SHA512 b0fd75375bee6ca113bb99b07a868729bb90a50d06bc4ff124603594cd9ba564433f69a26e8d01c30f4e4fbfb70ecad2ffa14ed93142b9a1aab2e38ae71b7903 DIST gawk-5.3.1.tar.xz 3510032 BLAKE2B be9132324344c0b052e954e004a942ff7c6b14b86b73cda491d7a33485f60341be4d8da1a06d1d7a27445b9b39a528bcce3eee9c2a3f8756de21bdc57a33f54d SHA512 c6b4c50ce565e6355ca162955072471e37541c51855c0011e834243a7390db8811344b0c974335844770e408e1f63d72d0d81459a081c392e0245c726019eaff DIST gawk-5.3.1.tar.xz.sig 488 BLAKE2B 2abafbb965912a194d047bed3ac1ef33a2b44dce0bc4b1a83a6ca3e2ecf676da0ad8333bb3817f0f32c7d67ab8662dc6086c9e1d6f2185a93d786390197fc643 SHA512 3e13b1bd598b7d4c715c802dcc9db298aeab12721620692f9dd76d3941fdfd87381f660c93be5cc04b6cd7378a6464b9033c93419dfcb514dcc33da8d0d9f502 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/files/gawk-5.3.0-str2wstr.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/files/gawk-5.3.0-str2wstr.patch deleted file mode 100644 index 078ba8b1c74..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/files/gawk-5.3.0-str2wstr.patch +++ /dev/null @@ -1,193 +0,0 @@ -https://bugs.gentoo.org/921503 -https://lists.gnu.org/archive/html/bug-gawk/2024-01/msg00013.html -https://git.savannah.gnu.org/cgit/gawk.git/commit/?h=gawk-5.3-stable&id=e05040b5d81b5a0e809fc56df2a7c3d654c77e1d - -From e05040b5d81b5a0e809fc56df2a7c3d654c77e1d Mon Sep 17 00:00:00 2001 -From: "Arnold D. Robbins" -Date: Sun, 28 Jan 2024 20:24:09 +0200 -Subject: Bug fix in str2wstr. - ---- - node.c | 26 ++++++++++++++------------ - pc/Makefile.tst | 6 ++++++ - test/Makefile.am | 5 ++++- - test/Makefile.in | 10 +++++++++- - test/Maketests | 5 +++++ - test/match4.awk | 1 + - test/match4.ok | 1 + - 10 files changed, 56 insertions(+), 14 deletions(-) - create mode 100644 test/match4.awk - create mode 100644 test/match4.ok - -diff --git a/node.c b/node.c -index de12f05..5aac5e8 100644 ---- a/node.c -+++ b/node.c -@@ -816,6 +816,20 @@ str2wstr(NODE *n, size_t **ptr) - assert((n->flags & (STRING|STRCUR)) != 0); - - /* -+ * For use by do_match, create and fill in an array. -+ * For each byte `i' in n->stptr (the original string), -+ * a[i] is equal to `j', where `j' is the corresponding wchar_t -+ * in the converted wide string. -+ * -+ * This is needed even for Nnull_string or Null_field. -+ * -+ * Create the array. -+ */ -+ if (ptr != NULL) { -+ ezalloc(*ptr, size_t *, sizeof(size_t) * (n->stlen + 1), "str2wstr"); -+ } -+ -+ /* - * Don't convert global null string or global null field - * variables to a wide string. They are both zero-length anyway. - * This also avoids future double-free errors while releasing -@@ -848,18 +862,6 @@ str2wstr(NODE *n, size_t **ptr) - emalloc(n->wstptr, wchar_t *, sizeof(wchar_t) * (n->stlen + 1), "str2wstr"); - wsp = n->wstptr; - -- /* -- * For use by do_match, create and fill in an array. -- * For each byte `i' in n->stptr (the original string), -- * a[i] is equal to `j', where `j' is the corresponding wchar_t -- * in the converted wide string. -- * -- * Create the array. -- */ -- if (ptr != NULL) { -- ezalloc(*ptr, size_t *, sizeof(size_t) * (n->stlen + 1), "str2wstr"); -- } -- - sp = n->stptr; - src_count = n->stlen; - memset(& mbs, 0, sizeof(mbs)); -diff --git a/pc/Makefile.tst b/pc/Makefile.tst -index daf3c56..9ab61c7 100644 ---- a/pc/Makefile.tst -+++ b/pc/Makefile.tst -@@ -180,6 +180,7 @@ BASIC_TESTS = \ - substr swaplns synerr1 synerr2 synerr3 tailrecurse tradanch \ - trailbs tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs uplus wideidx wideidx2 widesub widesub2 widesub3 \ -+ match4 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag - - UNIX_TESTS = \ -@@ -2602,6 +2603,11 @@ widesub3: - AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -+match4: -+ @echo $@ -+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ -+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -+ - widesub4: - @echo $@ $(ZOS_FAIL) - @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=ENU_USA.1252; export GAWKLOCALE; \ -diff --git a/test/Makefile.am b/test/Makefile.am -index a876b3a..e1e1f3f 100644 ---- a/test/Makefile.am -+++ b/test/Makefile.am -@@ -1,7 +1,7 @@ - # - # test/Makefile.am --- automake input file for gawk - # --# Copyright (C) 1988-2023 the Free Software Foundation, Inc. -+# Copyright (C) 1988-2024 the Free Software Foundation, Inc. - # - # This file is part of GAWK, the GNU implementation of the - # AWK Programming Language. -@@ -763,6 +763,8 @@ EXTRA_DIST = \ - match3.awk \ - match3.in \ - match3.ok \ -+ match4.awk \ -+ match4.ok \ - math.awk \ - math.ok \ - mbfw1.awk \ -@@ -1544,6 +1546,7 @@ BASIC_TESTS = \ - substr swaplns synerr1 synerr2 synerr3 tailrecurse tradanch \ - trailbs tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs uplus wideidx wideidx2 widesub widesub2 widesub3 \ -+ match4 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag - - UNIX_TESTS = \ -diff --git a/test/Makefile.in b/test/Makefile.in -index 1ef143f..681a85b 100644 ---- a/test/Makefile.in -+++ b/test/Makefile.in -@@ -17,7 +17,7 @@ - # - # test/Makefile.am --- automake input file for gawk - # --# Copyright (C) 1988-2023 the Free Software Foundation, Inc. -+# Copyright (C) 1988-2024 the Free Software Foundation, Inc. - # - # This file is part of GAWK, the GNU implementation of the - # AWK Programming Language. -@@ -1027,6 +1027,8 @@ EXTRA_DIST = \ - match3.awk \ - match3.in \ - match3.ok \ -+ match4.awk \ -+ match4.ok \ - math.awk \ - math.ok \ - mbfw1.awk \ -@@ -1808,6 +1810,7 @@ BASIC_TESTS = \ - substr swaplns synerr1 synerr2 synerr3 tailrecurse tradanch \ - trailbs tweakfld uninit2 uninit3 uninit4 uninit5 uninitialized \ - unterm uparrfs uplus wideidx wideidx2 widesub widesub2 widesub3 \ -+ match4 \ - widesub4 wjposer1 zero2 zeroe0 zeroflag - - UNIX_TESTS = \ -@@ -4414,6 +4417,11 @@ widesub3: - AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -+match4: -+ @echo $@ -+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ -+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -+ - widesub4: - @echo $@ $(ZOS_FAIL) - @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \ -diff --git a/test/Maketests b/test/Maketests -index bac220f..9a00140 100644 ---- a/test/Maketests -+++ b/test/Maketests -@@ -1288,6 +1288,11 @@ widesub3: - AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - -+match4: -+ @echo $@ -+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ -+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -+ - widesub4: - @echo $@ $(ZOS_FAIL) - @-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \ -diff --git a/test/match4.awk b/test/match4.awk -new file mode 100644 -index 0000000..e50150a ---- /dev/null -+++ b/test/match4.awk -@@ -0,0 +1 @@ -+BEGIN { print match (m, /a?/) } -diff --git a/test/match4.ok b/test/match4.ok -new file mode 100644 -index 0000000..d00491f ---- /dev/null -+++ b/test/match4.ok -@@ -0,0 +1 @@ -+1 --- -cgit v1.1 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.2.ebuild deleted file mode 100644 index a3fff916f02..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.2.2.ebuild +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -#GAWK_IS_BETA=yes - -DESCRIPTION="GNU awk pattern-matching language" -HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html" - -if [[ ${GAWK_IS_BETA} == yes || ${PV} == *_beta* ]] ; then - if [[ ${PV} == *_beta* ]] ; then - # Beta versioning is sometimes for the release prior, e.g. - # 5.2.1_beta is labelled upstream as 5.2.0b. - MY_PV=${PV/_beta/b} - MY_PV=$(ver_cut 1-2 ${MY_PV}).$(($(ver_cut 3 ${MY_PV}) - 1))$(ver_cut 4- ${MY_PV}) - MY_P=${PN}-${MY_PV} - - S="${WORKDIR}"/${MY_P} - else - MY_P=${P} - fi - - SRC_URI="https://www.skeeve.com/gawk/${MY_P}.tar.gz" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gawk.asc - inherit verify-sig - - SRC_URI="mirror://gnu/gawk/${P}.tar.xz" - SRC_URI+=" verify-sig? ( mirror://gnu/gawk/${P}.tar.xz.sig )" - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-3+" -SLOT="0" -# While tempting to enable mpfr by default as e.g. Fedora do, as of 5.2.x, -# MPFR support is "on parole" and may be removed: -# https://www.gnu.org/software/gawk/manual/html_node/MPFR-On-Parole.html. -IUSE="mpfr pma nls readline" - -RDEPEND=" - mpfr? ( - dev-libs/gmp:= - dev-libs/mpfr:= - ) - readline? ( sys-libs/readline:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - >=sys-apps/texinfo-6.7 - >=sys-devel/bison-3.5.4 - nls? ( sys-devel/gettext ) -" - -if [[ ${GAWK_IS_BETA} != yes ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-gawk )" -fi - -src_prepare() { - default - - # Use symlinks rather than hardlinks, and disable version links - sed -i \ - -e '/^LN =/s:=.*:= $(LN_S):' \ - -e '/install-exec-hook:/s|$|\nfoo:|' \ - Makefile.in doc/Makefile.in || die - - # bug #413327 - sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in || die - - # Fix standards conflict on Solaris - if [[ ${CHOST} == *-solaris* ]] ; then - sed -i \ - -e '/\<_XOPEN_SOURCE\>/s/1$/600/' \ - -e '/\<_XOPEN_SOURCE_EXTENDED\>/s/1//' \ - extension/inplace.c || die - fi -} - -src_configure() { - # Avoid automagic dependency on libsigsegv - export ac_cv_libsigsegv=no - - # README says gawk may not work properly if built with non-Bison. - # We already BDEPEND on Bison, so just unset YACC rather than - # guessing if we need to do yacc.bison or bison -y. - unset YACC - - local myeconfargs=( - --cache-file="${S}"/config.cache - --libexec='$(libdir)/misc' - $(use_with mpfr) - $(use_enable nls) - $(use_enable pma) - $(use_with readline) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - # Automatic dodocs barfs - rm -rf README_d || die - - default - - # Install headers - insinto /usr/include/awk - doins *.h - rm "${ED}"/usr/include/awk/config.h || die -} - -pkg_postinst() { - # Symlink creation here as the links do not belong to gawk, but to any awk - if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then - eselect awk update ifunset - else - local l - for l in "${EROOT}"/usr/share/man/man1/gawk.1* "${EROOT}"/usr/bin/gawk ; do - if [[ -e ${l} ]] && ! [[ -e ${l/gawk/awk} ]] ; then - ln -s "${l##*/}" "${l/gawk/awk}" || die - fi - done - - if ! [[ -e ${EROOT}/bin/awk ]] ; then - # /bin might not exist yet (stage1) - [[ -d "${EROOT}/bin" ]] || mkdir "${EROOT}/bin" || die - - ln -s "../usr/bin/gawk" "${EROOT}/bin/awk" || die - fi - fi -} - -pkg_postrm() { - if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then - eselect awk update ifunset - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.3.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.3.0-r1.ebuild deleted file mode 100644 index f877fcf7080..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/gawk/gawk-5.3.0-r1.ebuild +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -#GAWK_IS_BETA=yes - -DESCRIPTION="GNU awk pattern-matching language" -HOMEPAGE="https://www.gnu.org/software/gawk/gawk.html" - -if [[ ${GAWK_IS_BETA} == yes || ${PV} == *_beta* ]] ; then - if [[ ${PV} == *_beta* ]] ; then - # Beta versioning is sometimes for the release prior, e.g. - # 5.2.1_beta is labelled upstream as 5.2.0b. - MY_PV=${PV/_beta/b} - MY_PV=$(ver_cut 1-2 ${MY_PV}).$(($(ver_cut 3 ${MY_PV}) - 1))$(ver_cut 4- ${MY_PV}) - MY_P=${PN}-${MY_PV} - - S="${WORKDIR}"/${MY_P} - else - MY_P=${P} - fi - - SRC_URI="https://www.skeeve.com/gawk/${MY_P}.tar.gz" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gawk.asc - inherit verify-sig - - SRC_URI="mirror://gnu/gawk/${P}.tar.xz" - SRC_URI+=" verify-sig? ( mirror://gnu/gawk/${P}.tar.xz.sig )" - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-3+" -SLOT="0" -# While tempting to enable mpfr by default as e.g. Fedora do, as of 5.2.x, -# MPFR support is "on parole" and may be removed: -# https://www.gnu.org/software/gawk/manual/html_node/MPFR-On-Parole.html. -IUSE="mpfr pma nls readline" - -RDEPEND=" - mpfr? ( - dev-libs/gmp:= - dev-libs/mpfr:= - ) - readline? ( sys-libs/readline:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - >=sys-apps/texinfo-7.1 - >=sys-devel/bison-3.5.4 - nls? ( sys-devel/gettext ) -" - -if [[ ${GAWK_IS_BETA} != yes ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-gawk )" -fi - -PATCHES=( - "${FILESDIR}"/${P}-str2wstr.patch -) - -src_prepare() { - default - - # Use symlinks rather than hardlinks, and disable version links - sed -i \ - -e '/^LN =/s:=.*:= $(LN_S):' \ - -e '/install-exec-hook:/s|$|\nfoo:|' \ - Makefile.in doc/Makefile.in || die - - # bug #413327 - sed -i '/^pty1:$/s|$|\n_pty1:|' test/Makefile.in || die - - # Fix standards conflict on Solaris - if [[ ${CHOST} == *-solaris* ]] ; then - sed -i \ - -e '/\<_XOPEN_SOURCE\>/s/1$/600/' \ - -e '/\<_XOPEN_SOURCE_EXTENDED\>/s/1//' \ - extension/inplace.c || die - fi -} - -src_configure() { - # README says gawk may not work properly if built with non-Bison. - # We already BDEPEND on Bison, so just unset YACC rather than - # guessing if we need to do yacc.bison or bison -y. - unset YACC - - local myeconfargs=( - --cache-file="${S}"/config.cache - --libexec='$(libdir)/misc' - $(use_with mpfr) - $(use_enable nls) - $(use_enable pma) - $(use_with readline) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - # Automatic dodocs barfs - rm -rf README_d || die - - default - - # Install headers - insinto /usr/include/awk - doins *.h - rm "${ED}"/usr/include/awk/config.h || die -} - -pkg_postinst() { - # Symlink creation here as the links do not belong to gawk, but to any awk - if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then - eselect awk update ifunset - else - local l - for l in "${EROOT}"/usr/share/man/man1/gawk.1* "${EROOT}"/usr/bin/gawk ; do - if [[ -e ${l} ]] && ! [[ -e ${l/gawk/awk} ]] ; then - ln -s "${l##*/}" "${l/gawk/awk}" || die - fi - done - - if ! [[ -e ${EROOT}/bin/awk ]] ; then - # /bin might not exist yet (stage1) - [[ -d "${EROOT}/bin" ]] || mkdir "${EROOT}/bin" || die - - ln -s "../usr/bin/gawk" "${EROOT}/bin/awk" || die - fi - fi -} - -pkg_postrm() { - if has_version app-admin/eselect && has_version app-eselect/eselect-awk ; then - eselect awk update ifunset - fi -} From a41aa903874d257d592164e0f22145594b3e1797 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:18 +0000 Subject: [PATCH 072/145] sys-apps/hwdata: Sync with Gentoo It's from Gentoo commit ca69c9e90c7390bfe3b6019a1ed6628b9ea33781. --- .../portage-stable/sys-apps/hwdata/Manifest | 1 + .../sys-apps/hwdata/hwdata-0.391.ebuild | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/hwdata/hwdata-0.391.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/Manifest index 0bf19c72635..2492122caa8 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/Manifest @@ -1,2 +1,3 @@ DIST hwdata-0.383.tar.gz 2430035 BLAKE2B 7f53f08fa6df5d4dd2eb5a92b419914a0fd04a74285d5af0d879fe9b30b768f24c526225b3d700201a53eccabee49ae84958bb6605bc0265483bdf1801dfbffc SHA512 9a11e0d8cc6788c6a54c87956afb19853f5214c1d2deb77cc7c6155687a9621b83d54533a8e475decad82aaad84581ee410d16b7db20e666f62a003a76a62618 DIST hwdata-0.390.tar.gz 2473831 BLAKE2B 45a8d5468d82dd3b3f42e290183bdd1dbd2e23ec926f780a54b21484263b7d9ea789b10fd9d6f1b9e741d160823b4816e6b6a470e0930dbc830c7a820ae514de SHA512 c9cbe0e41001a0d61b164d6544e57d66be7b4230434d2c395d182f41f96e6c3831e443c933f5a29bd0a2fefabbfc232a9efa772d04b89972da5d4d2eb7882443 +DIST hwdata-0.391.tar.gz 2479872 BLAKE2B 478d60635f338770751bf4b437f33ba0666b4c3d70d9c726c8e124c44e6d6f5a96ba96b63ae64a151732ca7607676aaccefc7a61c89cee584696b699b3234019 SHA512 9b831a7546ac6ca457b92bf438ba84d6487980b15a304af78ba8738cc456e02a62b1d19a849573ed596c85a3fbbc88ca305e5e4c665f27e8d75454be41d708f0 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/hwdata-0.391.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/hwdata-0.391.ebuild new file mode 100644 index 00000000000..145dcd2debb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/hwdata/hwdata-0.391.ebuild @@ -0,0 +1,28 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo + +DESCRIPTION="Hardware identification and configuration data" +HOMEPAGE="https://github.com/vcrhonek/hwdata" +SRC_URI="https://github.com/vcrhonek/hwdata/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" + +RESTRICT="test" + +src_configure() { + # configure is not compatible with econf + local conf=( + ./configure + --prefix="${EPREFIX}/usr" + --libdir="${EPREFIX}/lib" + --datadir="${EPREFIX}/usr/share" + ) + + edo "${conf[@]}" +} From 41b35cb2674023c6b48338567e4b0867fd781b6c Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:20 +0000 Subject: [PATCH 073/145] sys-apps/iproute2: Sync with Gentoo It's from Gentoo commit cf27e90a7f70efe0db02ca750d1bda2cc33df660. --- .../portage-stable/sys-apps/iproute2/iproute2-6.12.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.12.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.12.0.ebuild index 73c7a16e2e2..5be256ec1b7 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.12.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/iproute2/iproute2-6.12.0.ebuild @@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 else SRC_URI="https://www.kernel.org/pub/linux/utils/net/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="kernel routing and traffic control utilities" From ba97c4dcbf3090ff95047757dc15424ba7ae6d3d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:26 +0000 Subject: [PATCH 074/145] sys-apps/kbd: Sync with Gentoo It's from Gentoo commit ebd45ba8dd610e181d9dd8afd3381d3e356c705c. --- .../third_party/portage-stable/sys-apps/kbd/kbd-2.7.1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/kbd/kbd-2.7.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/kbd/kbd-2.7.1.ebuild index 8031a429399..4219f7a4a04 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/kbd/kbd-2.7.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/kbd/kbd-2.7.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,7 +12,7 @@ if [[ ${PV} == 9999 ]] ; then else if [[ $(ver_cut 3) -lt 90 ]] ; then SRC_URI="https://www.kernel.org/pub/linux/utils/kbd/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86" else inherit autotools SRC_URI="https://github.com/legionus/kbd/archive/v${PV}.tar.gz -> ${P}.tar.gz" From 67eae63821659a6a17331614e3734891b48cac99 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:32 +0000 Subject: [PATCH 075/145] sys-apps/man-db: Sync with Gentoo It's from Gentoo commit 48d9015d9113cb4bf41dcecc4fbd7f1726379c71. --- .../portage-stable/sys-apps/man-db/man-db-2.13.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/man-db/man-db-2.13.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/man-db/man-db-2.13.0.ebuild index a6b4e57973d..4fc694bf9e0 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/man-db/man-db-2.13.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/man-db/man-db-2.13.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,7 +14,7 @@ else inherit libtool # TODO: Change tarballs to gitlab too...? SRC_URI="mirror://nongnu/${PN}/${P}.tar.xz" - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi LICENSE="GPL-3" From 74317ce9ecc96c48b4b234e7f7fcc49f6add9738 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:32 +0000 Subject: [PATCH 076/145] sys-apps/man-pages: Sync with Gentoo It's from Gentoo commit 437cbd3fbfaff2577b7cb98e6494afc85f336922. --- .../sys-apps/man-pages/Manifest | 2 + .../sys-apps/man-pages/man-pages-6.10.ebuild | 145 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/man-pages/man-pages-6.10.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/Manifest index 5d3a2e730e3..92588e499c2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/Manifest @@ -1,4 +1,6 @@ DIST man-pages-6.05.01.tar.xz 2194472 BLAKE2B edc40828bc9c75f655a8352f10c214d68b64f90815cc947f65d49794e0b588b103cae28b3644e41bedd8caaa6cef3c77b02525d8c2ccc91ccf887a10b2f2c32a SHA512 ad3f6dc28bb83824faf8c855a5db8983dc0f5ac3b5702624033ed320a6f39a7f1f0845acf0bc62a0a10cdfe42eb66ba9596e2796ba2683cfb29e480710da3d70 DIST man-pages-6.06.tar.sign 833 BLAKE2B 7198f7a024731fcaeb97c131ff02611cefc60cf26fa8bac013c82d90f1f9dcd39230adc6ad94c97488c7a8d844b0bb31db6fea2528d84084dec54454a073f3c1 SHA512 21304778df56f079c8b3ff38cf42453697a2b155964069bf6837b9c89b32c3a80eef9cfd0c2f9e3feeee12889cb4e6dd1d4ef1fae75cc646fed84289c5862578 DIST man-pages-6.06.tar.xz 2166012 BLAKE2B 49c022204f8ce82fafd6f34a590a310beb6618d884290123a755efd38a71c974aa2e49d729655fcf82df0b96db8f782c1b2eac5174b319b6a383740e715fa11a SHA512 c50b5a47cff5172e46752b61af4dd9f54ee0be88ab69bcc5914bd8ce5ddfaf7358143bea9f69bd6a45f0420eb5eb4596c2200109b23fe98a5221dd01e4a8ea15 +DIST man-pages-6.10.tar.sign 833 BLAKE2B 039863e6bcdc7c522ebd7b516c8c0c797dc6838dea59129da3830fa88cc19916c9e67a05bda03d05b5dda17c034bbc9035a9f98d53cde618b74f177e0e90e268 SHA512 484d9d32f9e0e26fb31251d7ca357854b240f5ea19fe8a0816706fa9671d72346eed2fb65735f45d08694fad34164e429e8f561c5a56c194e92d096535726db8 +DIST man-pages-6.10.tar.xz 1878432 BLAKE2B 8f4e46616692aef9aafafb7c48353478ba5d7143710401e6c0987bcb9e6a2847c5955d50dcf9e98a288b9e052b4df9d0dae3b40648b53b8e39a7b382bfefe051 SHA512 8e42a950504f6fb77c4121627a40fe9486bf66520ed363eb852eaa75a428184b2d4312936dd7fdf4463109e23aa4550dffe344a31d93afb6774f6fadf41949ee DIST man-pages-gentoo-2.tar.bz2 5141 BLAKE2B c5c7956ab47c8a473e258b1902d5d19d9eb2e9d01786e907d9c3ba691c2a506834ed96cd1f54e8d8415e65d4fea0056659537f0faffe68fcbed33aa728a5e61e SHA512 6e6524b8ad6f1b8c9b147665ee32af49e05603dac61d433acd6b4f1164adef27cd542898f272b07d8659725013dac59c7f34a858968cc054a4785c945e14a770 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/man-pages-6.10.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/man-pages-6.10.ebuild new file mode 100644 index 00000000000..1eb43be993f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/man-pages/man-pages-6.10.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Maintenance notes: +# - Upstream are very friendly, do approach them if have any questions; +# +# - It's considered fine (and somewhat encouraged) for us to make snapshots +# if we want specific fixes, perhaps aligned with newer kernels, glibc, etc. +# Just generate it with 'make dist'. We can set DISTVERSION if we want a vanity +# name or if the comit hash is too long; +# +# - If we do use a snapshot, *don't* grab it directly from git and use it +# raw in the ebuild. Use 'make dist' as above; +# +# - Sometimes there's no dist tarball available post-release and upstream +# encourage distros to make their own. Set MAN_PAGES_GENTOO_DIST to 1 if none is +# available, 0 otherwise. +MAN_PAGES_GENTOO_DIST=0 +GENTOO_PATCH=2 + +DESCRIPTION="A somewhat comprehensive collection of Linux man pages" +HOMEPAGE="https://www.kernel.org/doc/man-pages/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git" + inherit git-r3 +elif [[ ${PV} == *_rc* ]] ; then + MY_P=${PN}-${PV/_/-} + + SRC_URI="https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/snapshot/${MY_P}.tar.gz" + S="${WORKDIR}"/${MY_P} +else + if [[ ${MAN_PAGES_GENTOO_DIST} -eq 1 ]] ; then + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-gentoo.tar.xz" + else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/alejandro-colomar.asc + inherit verify-sig + + SRC_URI=" + https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.xz + https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.xz + verify-sig? ( + https://www.kernel.org/pub/linux/docs/man-pages/Archive/${P}.tar.sign + https://www.kernel.org/pub/linux/docs/man-pages/${P}.tar.sign + ) + " + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-alejandro-colomar )" + fi + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" +fi + +SRC_URI+=" + mirror://gentoo/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2 + https://dev.gentoo.org/~cardoe/files/man-pages-gentoo-${GENTOO_PATCH}.tar.bz2 +" + +LICENSE="man-pages GPL-2+ BSD" +SLOT="0" +# Keep the following in sync with app-i18n/man-pages-l10n +MY_L10N=( cs da de el es fi fr hu id it mk nb nl pl pt-BR ro sr sv uk vi ) +IUSE="l10n_ja l10n_ru l10n_zh-CN ${MY_L10N[@]/#/l10n_}" +RESTRICT="binchecks" + +BDEPEND+=" + app-alternatives/bc +" +# Block packages that used to install colliding man pages: +# bug #341953, bug #548900, bug #612640, bug #617462 +RDEPEND=" + virtual/man + !(tar -xf -)) + assert "Unpack failed" + + unpack man-pages-gentoo-${GENTOO_PATCH}.tar.bz2 + else + default + fi +} + +src_prepare() { + default + + # passwd.5 installed by sys-apps/shadow, bug #776787 + rm man5/passwd.5 || die +} + +src_compile() { :; } + +src_test() { + # We don't use the 'check' target right now because of known errors + # https://lore.kernel.org/linux-man/0dfd5319-2d22-a8ad-f085-d635eb6d0678@gmail.com/T/#t + emake lint-man-tbl +} + +src_install() { + emake install prefix="${EPREFIX}"/usr DESTDIR="${D}" + dodoc README Changes* + + # Override with Gentoo specific or additional Gentoo pages + cd "${WORKDIR}"/man-pages-gentoo || die + doman */* + dodoc README.Gentoo +} + +pkg_postinst() { + for ver in ${REPLACING_VERSIONS} ; do + if ver_test ${ver} -lt 5.13-r2 ; then + # Avoid ACCEPT_LICENSE issues for users by default + # bug #871636 + ewarn "This version of ${PN} no longer depends on sys-apps/man-pages-posix!" + ewarn "Please install sys-apps/man-pages-posix yourself if needed." + break + fi + done +} From baa82178ee9dacf7f7cde100087a0502e50a75fc Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:36 +0000 Subject: [PATCH 077/145] sys-apps/pcsc-lite: Sync with Gentoo It's from Gentoo commit f163d0baac0cf41eb70b0a5915707febeb0124a0. --- .../portage-stable/sys-apps/pcsc-lite/pcsc-lite-2.3.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pcsc-lite/pcsc-lite-2.3.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pcsc-lite/pcsc-lite-2.3.0.ebuild index 63b9981055c..0eba5b37d47 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pcsc-lite/pcsc-lite-2.3.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pcsc-lite/pcsc-lite-2.3.0.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://pcsclite.apdu.fr/files/${P}.tar.xz" # upstream. LICENSE="BSD GPL-3+ BSD-2 ISC GPL-2" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" # This is called libusb so that it doesn't fool people in thinking that # it is _required_ for USB support. Otherwise they'll disable udev and # that's going to be worse. From 25948b5c9d9444957708f26cc0724280aae6533d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:36 +0000 Subject: [PATCH 078/145] sys-apps/pkgcore: Sync with Gentoo It's from Gentoo commit f763858782402f53dfc34aac6ea7edec7b170009. --- .../src/third_party/portage-stable/sys-apps/pkgcore/Manifest | 2 +- .../{pkgcore-0.12.27.ebuild => pkgcore-0.12.29.ebuild} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/{pkgcore-0.12.27.ebuild => pkgcore-0.12.29.ebuild} (87%) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/Manifest index a210297bce5..65e173ab2c4 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/Manifest @@ -1,2 +1,2 @@ -DIST pkgcore-0.12.27.tar.gz 636436 BLAKE2B a03b795eb685b552659b6110a9a19e6915320f3bcc87a4c5343a9ae16b82ebea46b538d8606ff10fa1f1c46f85117aeec240247e98aaccc00b0c67996bd2421a SHA512 99e8e125fbb086a98f6c2f494624e63d47d2f594f952eb5e540eba355161eecaeb55ffc3f2df951cdfcd9cb5b1720411c58e2ab4f3299a63eeafa44eed6f7912 DIST pkgcore-0.12.28.tar.gz 636701 BLAKE2B 5bb80f42b7de8ca39ee7379fae6ea3a1e2a3fec5f799f72a8a0425a4185c85968756778daf244d048ef7028bb8a71e45d6bd913843c5eb3a218a5daa78d198a6 SHA512 0e3c8c174826acc41edc4625fd4c2ae0759d5de015768110d06fac87be9ac2f1f4feefc48880735834474ec89b96e3c245d0619ea6986ec0c7323a9dc106f40e +DIST pkgcore-0.12.29.tar.gz 642382 BLAKE2B c080cb63db3163c9581eb9ae047dcf00212664234767e6e581664167d3e98c74ccee8abb78b2e4d268634443a3c6e6e583568080a1631b6d8ca3a567d047aa83 SHA512 a72ce837add96f2e6fc2f6612dff5e9a7b6bd9c18c382b46584754a0d87b6e582760028cb9538515e4b7177d0130a879b3e88f36c4d55dd19fd873438865b60b diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.27.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.29.ebuild similarity index 87% rename from sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.27.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.29.ebuild index 61fa4936aaf..76e39b2520c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.27.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pkgcore/pkgcore-0.12.29.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,7 +12,7 @@ if [[ ${PV} == *9999 ]] ; then https://github.com/pkgcore/pkgcore.git" inherit git-r3 else - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" inherit pypi fi From a8a13278833117c8019db98b7b1f33054bd3d380 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:36 +0000 Subject: [PATCH 079/145] sys-apps/portage: Sync with Gentoo It's from Gentoo commit 03f41049a0fe0632eabd8cddaaca898e45943201. --- .../portage-stable/sys-apps/portage/Manifest | 1 + .../sys-apps/portage/portage-3.0.67.ebuild | 231 ++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/portage/portage-3.0.67.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/portage/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/portage/Manifest index add26cb02f0..b45cb339c12 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/portage/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/portage/Manifest @@ -1,2 +1,3 @@ DIST portage-3.0.65.tar.bz2 1193321 BLAKE2B 4734b0a2b17cf0cdbd0bedac9efa6cecb5799460e1faa8b8ab137fa017e17d47d6d5da6382e75322f21d4be77a31acffbacd753c70b43b011613cc5a6332bc96 SHA512 c864bcb3bef11916128852a5f50b161d82529d7316ec970703a9ec948c46a51148419ef1dfde2906f72347dd41d0eebd49f5a1769a228d97145f5517c34dbff8 DIST portage-3.0.66.1.tar.bz2 1198196 BLAKE2B 8dbd1bc17c1a9a3530425efa31a27efba39e1ef5f5457b4084875c64f7128453139aea447c25a642c124438e88ef484a43b1838cbd8c03748017571dd18f9921 SHA512 fcd3d4d3dcfdb67cbcdb0f4854860f073b4a9d41dadc97a3e6f890e3c75091aceec5622e97495741622b5c390309f05dec35b9e951d7ee7a78e28a9b3ed2939d +DIST portage-3.0.67.tar.bz2 1196776 BLAKE2B 4a9056d388b012a0fa343d6fc50c9c3b455cb3a4d356210accf86c4ff4434a2d8cb4d23c3f58f3e23ab8bb4a4e9ee244bd1ec1203d5f72fa6f0e0a2caa92e757 SHA512 e725a471dcadaac771aa7f910524232e237efbb944d3e175825ad659b5190d631a91d4c188089c278a79b4709d4a8d6a6e53c55524c4b1c8d1c43580506e0d1c diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/portage/portage-3.0.67.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/portage/portage-3.0.67.ebuild new file mode 100644 index 00000000000..e1afb04b085 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/portage/portage-3.0.67.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy3 python3_{10..13} ) +PYTHON_REQ_USE='bzip2(+),threads(+)' +TMPFILES_OPTIONAL=1 + +inherit meson linux-info python-r1 tmpfiles + +DESCRIPTION="The package management and distribution system for Gentoo" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/portage.git + https://github.com/gentoo/portage.git + " + inherit git-r3 +else + SRC_URI="https://gitweb.gentoo.org/proj/portage.git/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="apidoc build doc gentoo-dev +ipc +native-extensions +rsync-verify selinux test xattr" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${PYTHON_DEPS} + >=app-arch/tar-1.27 + >=dev-build/meson-1.3.0-r1 + >=sys-apps/sed-4.0.5 + sys-devel/patch + !build? ( $(python_gen_impl_dep 'ssl(+)') ) + apidoc? ( + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-epytext[${PYTHON_USEDEP}] + ) + doc? ( + ~app-text/docbook-xml-dtd-4.4 + app-text/xmlto + ) + test? ( + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-vcs/git + ) +" +# Require sandbox-2.2 for bug #288863. +# For whirlpool hash, require python[ssl] (bug #425046). +RDEPEND=" + ${PYTHON_DEPS} + acct-user/portage + >=app-arch/tar-1.27 + app-arch/zstd + >=app-misc/pax-utils-0.1.17 + dev-lang/python-exec:2 + >=sys-apps/baselayout-2.9 + >=sys-apps/findutils-4.9 + !build? ( + >=app-admin/eselect-1.2 + app-portage/getuto + >=app-shells/bash-5.0:0 + >=sec-keys/openpgp-keys-gentoo-release-20240703 + >=sys-apps/sed-4.0.5 + rsync-verify? ( + >=app-crypt/gnupg-2.2.4-r2[ssl(-)] + >=app-portage/gemato-14.5[${PYTHON_USEDEP}] + ) + ) + elibc_glibc? ( >=sys-apps/sandbox-2.2 ) + elibc_musl? ( >=sys-apps/sandbox-2.2 ) + kernel_linux? ( sys-apps/util-linux ) + selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] ) + xattr? ( kernel_linux? ( + >=sys-apps/install-xattr-0.3 + ) ) +" +# coreutils-6.4 rdep is for date format in emerge-webrsync #164532 +# NOTE: FEATURES=installsources requires debugedit and rsync +PDEPEND=" + !build? ( + >=net-misc/rsync-2.6.4 + >=sys-apps/coreutils-6.4 + >=sys-apps/file-5.44-r3 + ) +" + +pkg_pretend() { + local CONFIG_CHECK="~IPC_NS ~PID_NS ~NET_NS ~UTS_NS" + + check_extra_config +} + +src_prepare() { + default + + if use prefix-guest; then + sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \ + -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \ + -e "s|^\(sync-uri = \).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \ + -i cnf/repos.conf || die "sed failed" + fi +} + +src_configure() { + local code_only=false + python_foreach_impl my_src_configure +} + +my_src_configure() { + local emesonargs=( + -Dcode-only=${code_only} + -Deprefix="${EPREFIX}" + -Dportage-bindir="${EPREFIX}/usr/lib/portage/${EPYTHON}" + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" + $(meson_use doc) + $(meson_use apidoc) + $(meson_use gentoo-dev) + $(meson_use ipc) + $(meson_use xattr) + ) + + if use native-extensions && [[ "${EPYTHON}" != "pypy3" ]] ; then + emesonargs+=( -Dnative-extensions=true ) + else + emesonargs+=( -Dnative-extensions=false ) + fi + + if use build; then + emesonargs+=( -Drsync-verify=false ) + else + emesonargs+=( $(meson_use rsync-verify) ) + fi + + meson_src_configure + code_only=true +} + +src_compile() { + python_foreach_impl meson_src_compile +} + +src_test() { + local EPYTEST_XDIST=1 + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + python_foreach_impl epytest +} + +src_install() { + python_foreach_impl my_src_install + dotmpfiles "${FILESDIR}"/portage-{ccache,tmpdir}.conf + + local scripts + mapfile -t scripts < <(awk '/^#!.*python/ {print FILENAME} {nextfile}' "${ED}"/usr/{bin,sbin}/* || die) + python_replicate_script "${scripts[@]}" +} + +my_src_install() { + local pydirs=( + "${D}$(python_get_sitedir)" + "${ED}/usr/lib/portage/${EPYTHON}" + ) + + meson_src_install + python_fix_shebang "${pydirs[@]}" + python_optimize "${pydirs[@]}" +} + +pkg_preinst() { + if ! use build && [[ -z ${ROOT} ]]; then + python_setup + local sitedir=$(python_get_sitedir) + [[ -d ${D}${sitedir} ]] || die "${D}${sitedir}: No such directory" + env -u DISTDIR \ + -u PORTAGE_OVERRIDE_EPREFIX \ + -u PORTAGE_REPOSITORIES \ + -u PORTDIR \ + -u PORTDIR_OVERLAY \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + ED="${ED}" \ + "${PYTHON}" -m portage._compat_upgrade.default_locations || die + + env -u BINPKG_COMPRESS -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + ED="${ED}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_compression || die + + env -u FEATURES -u PORTAGE_REPOSITORIES \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + ED="${ED}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_multi_instance || die + + env -u BINPKG_FORMAT \ + PYTHONPATH="${D}${sitedir}${PYTHONPATH:+:${PYTHONPATH}}" \ + ED="${ED}" \ + "${PYTHON}" -m portage._compat_upgrade.binpkg_format || die + fi + + # elog dir must exist to avoid logrotate error for bug #415911. + # This code runs in preinst in order to bypass the mapping of + # portage:portage to root:root which happens after src_install. + keepdir /var/log/portage/elog + # This is allowed to fail if the user/group are invalid for prefix users. + if chown portage:portage "${ED}"/var/log/portage{,/elog} 2>/dev/null ; then + chmod g+s,ug+rwx "${ED}"/var/log/portage{,/elog} + fi + + if has_version "<${CATEGORY}/${PN}-2.3.77"; then + elog "The emerge --autounmask option is now disabled by default, except for" + elog "portions of behavior which are controlled by the --autounmask-use and" + elog "--autounmask-license options. For backward compatibility, previous" + elog "behavior of --autounmask=y and --autounmask=n is entirely preserved." + elog "Users can get the old behavior simply by adding --autounmask to the" + elog "make.conf EMERGE_DEFAULT_OPTS variable. For the rationale for this" + elog "change, see https://bugs.gentoo.org/658648." + fi +} + +pkg_postinst() { + # Warn about obsolete "enotice" script, bug #867010 + local bashrc=${EROOT}/etc/portage/profile/profile.bashrc + if [[ -e ${bashrc} ]] && grep -q enotice "${bashrc}"; then + eerror "Obsolete 'enotice' script detected!" + eerror "Please remove this from ${bashrc} to avoid problems." + eerror "See bug 867010 for more details." + fi +} From 4aa00bda0b851ed855f25ad5ee83e1089b233f38 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:36 +0000 Subject: [PATCH 080/145] sys-apps/pv: Sync with Gentoo It's from Gentoo commit f0b72e1a53f9d38310bad0c7dfd0d257ae3d97d5. --- .../portage-stable/sys-apps/pv/Manifest | 8 +-- .../sys-apps/pv/pv-1.8.12.ebuild | 61 ------------------- .../sys-apps/pv/pv-1.9.15.ebuild | 2 +- .../pv/{pv-1.9.24.ebuild => pv-1.9.27.ebuild} | 2 +- .../sys-apps/pv/pv-1.9.7.ebuild | 61 ------------------- 5 files changed, 4 insertions(+), 130 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.8.12.ebuild rename sdk_container/src/third_party/portage-stable/sys-apps/pv/{pv-1.9.24.ebuild => pv-1.9.27.ebuild} (97%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.7.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pv/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/pv/Manifest index f411012ecde..7cd163fac27 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pv/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pv/Manifest @@ -1,12 +1,8 @@ -DIST pv-1.8.12.tar.gz 328897 BLAKE2B 0de9376b6fd07e81229d281f7f1b7d64de27d4ed71dfed15a86b77e841a3fc066c8aeb4b4a6d15b2dbe8bc0fc9a439464cefd0f34e378c12adda41d856332029 SHA512 d3b912f424fd14e4819a04f2c2492b8e24f52ded55c47bcc924c5ef3f0f27c6f50e43fb0188551ea2d415e2c9aef3a58f13bfd11e1d2bf0bb3cba34a88ffea40 -DIST pv-1.8.12.tar.gz.asc 691 BLAKE2B eef421c6ed950e6330f341d3b9c6f5223d9f7ea2030bccf8d41c48f4a11ea49dda5ba67ec2d7b7abed0dba79720ba26b3360aab57132e9e100af8700fe6f13f1 SHA512 453fedbaf70b1e2d837096427832c15d504c63fc67f3214bb263d7069d756ccf45f933cccdd7309f50a05493b84a7ca7bdeb8c03bcafd1c412a4889b98a11d10 DIST pv-1.9.0.tar.gz 369918 BLAKE2B 802dafdd2e354887d8ca73f42787e86941081aaf62cafc7032ee2fdd299683c1e8a764c4262c5ec7596bd6221d59435ce7b340614783cc72f241735a460e5013 SHA512 1085387fdf645ab14b4b83b006dbc09018e2e3cb89a585cc6b9d5c03e947ffd84d300fb0698bb8e4dfc918aa25f9453897a394791a6aa9caefa278e21b9acf35 DIST pv-1.9.0.tar.gz.asc 691 BLAKE2B 86b99c718935afdbbf2419b1363a385d1ca8afe81bc7fabea8b4b48dbe1c439a7cd4bb93a106608cb6916f9503fc0f32253867771f9b78feb24f5218d2f49f8f SHA512 d8fe557b690aa828a3a2af9b74397d00ab1b00b444890220b79991aa5161ec8cc5ca3701b37950ec07bc3382f6cbc1578bf6b2be1966c34313827c1eeaa79fc7 DIST pv-1.9.15.tar.gz 401271 BLAKE2B 062bc326eae9b3f8a17eb3a453f5b5e5081eece1b7d7601aabe7ea6ffb6d4fff62ad1896b66990a54b7c6cd6baf080d0efefa4039947d88386c779e6e9ec7a90 SHA512 9a5174b3523e20f186689553e5004df35e38da9462a8f7376b6efce186e854ed8ef139c9e2d10944c20e478e5cfe80a7b67786d5e909ed1a9e40c9ca9fde474c DIST pv-1.9.15.tar.gz.asc 691 BLAKE2B e29a55fc7a78b39135d1c53decdeb6ec553443dcceedb5886522e6c4914aa354d05754cc7ddbefc4a5b930a9d75d82b33827fd7ef070fcb45dcd512d882b4d98 SHA512 571302a27539e5cfd5179827f1a1881499febba99207461d750c3934f3dad21e5c396fd8db7179e170ce5ab2239f5332517c63e2c43160428a86f875ae29a34a -DIST pv-1.9.24.tar.gz 414962 BLAKE2B 61d64bbc4b357ff303207313f9dd8fcccaea71ba74ec8a16c4e53327a606184fdf02ba1cc95111c25bf27630a2280363ead50f5cab70b6aaf12acf24339ce9ae SHA512 7e72793388a11bd161cc53ef2733a12f6df97a8051bea7f7e576551b0864d8f256773fc4873e31f920612f9cab1679a84eb3b90badde8820f694a2caa78f8e5a -DIST pv-1.9.24.tar.gz.asc 691 BLAKE2B 8b14af62a3331ff60cb90d9ffe835b57fbad287f225f1bcd32618de4d31e57a4dc75050f154e5242ca72ccb2cb16c44234b0106b2a6f1f7be1fd06fe6816b441 SHA512 b133a9b0805fce64840480bdf498d2134fa6ed471f3c906fff3cae1e38d9cc7714a3b1f03bd728d683eb65e1725530a846ce2761d955b6e6652e6e28207b4c49 DIST pv-1.9.25.tar.gz 415059 BLAKE2B 6c364a63de5ea70651da21d9c6703703cfaa6c528d83f981e8b135884cfec84b4c8d8a8340f4f3722c000ed5a98ef203a7443d400c7937f7488ac90209d8b45f SHA512 78e68185e9555410dca4816f9e293e49738345a84b4eaaa6aca8d076270ce74ba5fd7f2895bfcb0ddaf1ca6e61708c66a5387cecce84ab80818486510f567d40 DIST pv-1.9.25.tar.gz.asc 691 BLAKE2B 9b7b134badf9b7d92cbc1eb18808b723dc370c801200ae223eea33837af05e8c358aa5a19af72b75d5c975dbb5418772a528e8cc29fa2ca5e4a7756b76e69787 SHA512 72370c191c87268384e11cf4b206435048fa8010723cc7b19b8d4e7115b43d84eaf5368cd254da73fbadf73faba5852c6283897553b80a4bd47b3be56baa7623 -DIST pv-1.9.7.tar.gz 381407 BLAKE2B 2f026d187264900ac24c644c66e0a6ed14b097e76eab8795f6549bce9362e13ebeef476e2dbd0e4ddcfaf4fed251ad8fee74de199807b4bd0b1251b7e8cee7dd SHA512 3a5fcc18ea2fb1566cb68b6b6b8638a489d42f7f38fd1ddcf60898809ade5dbe618ba3ef91b2dd246b2bfcbbc0b5b088f3c5a1b384741e88336fe55c514fb396 -DIST pv-1.9.7.tar.gz.asc 691 BLAKE2B 46cdbb0a3357727476d57bfc9394f1ddfdcae46bcc92c0d6f87050543a8fcf23664b24b562f5d847cb3c69d73d35435fc9b16ddfce0c026ae67822ff6fc74307 SHA512 f27e0eba60292a7171d11e3cdc35dc7a10d7088223f3ed216fa2659093ce8552e9a301172af23c8845cd3e284e21c036557a8cd565c1efc46bfef70acdc85259 +DIST pv-1.9.27.tar.gz 415403 BLAKE2B 12be077145725912cbd21a160adf7302859d443bc57c7c03b517c251814ace66852b5bd5d701a5570bf18f10db1cd606b549b26a0595d8599b46cae5eaa53725 SHA512 04b66d4ce96f6570d8cb3441bb2e421f9a7767e75d716fac033d51947834a56dd226fc02820ea3b7ac4c8276fa69fed0335d9c103af29e64b38e59bf49f1fab7 +DIST pv-1.9.27.tar.gz.asc 691 BLAKE2B 7ac1d445892aca207e1ef5163f806cad484d95a649b4ee21fcaa7f97c220e290383a7a30aadc5d5b5d86e86a951f47d99993baf4bc7b39b11de2e11887f74a03 SHA512 76df89e07d28947b84097274457eece164f384a6047c481c4e41fcef91417e4496967186ec1674d433601cfdf209e43e3ecd86a16ac7f9a45610d05642d09b65 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.8.12.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.8.12.ebuild deleted file mode 100644 index 2fe16ca8af8..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.8.12.ebuild +++ /dev/null @@ -1,61 +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/pv.asc -inherit linux-info toolchain-funcs verify-sig - -DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe" -HOMEPAGE="https://www.ivarch.com/programs/pv.shtml https://codeberg.org/a-j-wood/pv" - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://codeberg.org/a-j-wood/pv" - inherit autotools git-r3 -else - SRC_URI=" - https://www.ivarch.com/programs/sources/${P}.tar.gz - verify-sig? ( https://www.ivarch.com/programs/sources/${P}.tar.gz.txt -> ${P}.tar.gz.asc ) - " - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -fi - -LICENSE="GPL-3+" -SLOT="0" -IUSE="debug nls" - -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-pv )" - -pkg_setup() { - if use kernel_linux; then - CONFIG_CHECK="~SYSVIPC" - ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option." - linux-info_pkg_setup - fi -} - -src_prepare() { - default - - # Valgrind isn't reliable within sandbox. - cat <<-EOF > tests/run-valgrind.sh || die - #!/bin/sh - exit 77 - EOF - chmod +x tests/run-valgrind.sh || Die - - [[ ${PV} == 9999 ]] && eautoreconf -} - -src_configure() { - tc-export AR - - econf \ - $(use_enable debug debugging) \ - $(use_enable nls) -} - -src_test() { - emake -Onone check -} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.15.ebuild index 71fecd452d1..0785504fbd9 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.15.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.15.ebuild @@ -18,7 +18,7 @@ else verify-sig? ( https://www.ivarch.com/programs/sources/${P}.tar.gz.txt -> ${P}.tar.gz.asc ) " - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" fi LICENSE="GPL-3+" diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.24.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.27.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.24.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.27.ebuild index f1565df2a2b..e8f8898b054 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.24.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.27.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.7.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.7.ebuild deleted file mode 100644 index 89cf567ffe1..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-apps/pv/pv-1.9.7.ebuild +++ /dev/null @@ -1,61 +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/pv.asc -inherit linux-info toolchain-funcs verify-sig - -DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe" -HOMEPAGE="https://www.ivarch.com/programs/pv.shtml https://codeberg.org/a-j-wood/pv" - -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://codeberg.org/a-j-wood/pv" - inherit autotools git-r3 -else - SRC_URI=" - https://www.ivarch.com/programs/sources/${P}.tar.gz - verify-sig? ( https://www.ivarch.com/programs/sources/${P}.tar.gz.txt -> ${P}.tar.gz.asc ) - " - - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" -fi - -LICENSE="GPL-3+" -SLOT="0" -IUSE="debug nls" - -BDEPEND="verify-sig? ( sec-keys/openpgp-keys-pv )" - -pkg_setup() { - if use kernel_linux; then - CONFIG_CHECK="~SYSVIPC" - ERROR_SYSVIPC="You will need to enable CONFIG_SYSVIPC in your kernel to use the --remote option." - linux-info_pkg_setup - fi -} - -src_prepare() { - default - - # Valgrind isn't reliable within sandbox. - cat <<-EOF > tests/run-valgrind.sh || die - #!/bin/sh - exit 77 - EOF - chmod +x tests/run-valgrind.sh || Die - - [[ ${PV} == 9999 ]] && eautoreconf -} - -src_configure() { - tc-export AR - - econf \ - $(use_enable debug debugging) \ - $(use_enable nls) -} - -src_test() { - emake -Onone check -} From 13a5b14b22ab30565e00a77ae9d904d7db901a27 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:37 +0000 Subject: [PATCH 081/145] sys-apps/sandbox: Sync with Gentoo It's from Gentoo commit 7467518eee363710a7035c15c9238eb532d3b053. --- .../portage-stable/sys-apps/sandbox/Manifest | 1 + ...dbox-2.9999.ebuild => sandbox-2.43.ebuild} | 1 - .../sys-apps/sandbox/sandbox-9999.ebuild | 80 +++++++++++++++++++ 3 files changed, 81 insertions(+), 1 deletion(-) rename sdk_container/src/third_party/portage-stable/sys-apps/sandbox/{sandbox-2.9999.ebuild => sandbox-2.43.ebuild} (98%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-9999.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/Manifest index 98e4743d346..7ab3077e760 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/Manifest @@ -2,3 +2,4 @@ DIST sandbox-2.39.tar.xz 462796 BLAKE2B 330c6f896eba6ff2a38eb8a5d1ff9b242d0e42ab DIST sandbox-2.40.tar.xz 465824 BLAKE2B 1e7e8b1c69807d493d5ca242d746b07aa669e18f9aab60cbfd7fe66500ac6822f8b9236077c370ec7e580c8c056f2ccc7825017cd015fca4497e967dcb93cc82 SHA512 e734f380943cc573847f48789a6ad724a3a3fe1017cb7e4bffcd75d2f758d85e937511bbc2eccd0224301b56bc0dd38c92fbaf2d268132be4985f5a768593bdc DIST sandbox-2.41.tar.xz 468180 BLAKE2B cb00ec8605b9b51ce559a9e9baa68d757e17900abbe9fff890ddbabcc001e47d72a0e7a693104a6594d3d86bc9afebc6945ed3ec101fd67bfe8a855de3ef010f SHA512 ac787ecc61a625717a66fef663f34ddc855c144226f80e1593033f06ccd9dbd526ffbd032a7b142404a0a5a5aea4b813c9258e9c2202c2e9b0574aa35aae3ef8 DIST sandbox-2.42.tar.xz 468676 BLAKE2B c4a17c9c6c1644bf27565eab8d76b37689f2a1ca2083d30d65deffd76449f69f68dd4d56ebb19236ca3111996c037fa4e1e5d034dc942349b93ba7c4c68f6248 SHA512 05076394cec77a6443ccc9ba31209fac32c57497210b817e71d10ffc75388673de75de8be6a86ee2f798a285e02ed1af8f134a988eceb6824a3e94bd5be4fc62 +DIST sandbox-2.43.tar.xz 468420 BLAKE2B c407f7c853d53297d4b0b64f1f3e0a6a26402c32990d7a02f6b2d5aec2b73716a0bb9a931371b87917a5390fb3f80b739e9d2884aec07aa6a1679c32926872ab SHA512 aff9bcbc0a26d4d0df2a469e1978051b9cdd2ce67786c90f857576ddfce20eefa78bfdf6c611fa3f60f0cb0247398c4cf6e4413fed0e4f2eb3bfe11e8a5b6e3e diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.43.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.9999.ebuild rename to sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.43.ebuild index bf0e493e800..42636c70dce 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-2.43.ebuild @@ -9,7 +9,6 @@ if [[ ${PV} == *9999 ]]; then inherit autotools git-r3 EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/sandbox.git https://github.com/gentoo/sandbox.git" - EGIT_BRANCH="stable-2.x" else SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-9999.ebuild new file mode 100644 index 00000000000..42636c70dce --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/sandbox/sandbox-9999.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit flag-o-matic multilib-minimal multiprocessing + +if [[ ${PV} == *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/sandbox.git + https://github.com/gentoo/sandbox.git" +else + SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +DESCRIPTION="sandbox'd LD_PRELOAD hack" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Sandbox" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+nnp" + +# pax-utils lower bound for bug #265376 +DEPEND=">=app-misc/pax-utils-0.1.19" +# Avoid folks installing with older file, bug #889046. We still need the +# >= dep in Portage but this is a safety net if people do partial upgrades. +RDEPEND="! Date: Mon, 27 Jan 2025 07:10:41 +0000 Subject: [PATCH 082/145] sys-apps/usbutils: Sync with Gentoo It's from Gentoo commit aa27f6d2926caf2a51063a82eec9697f14cf3808. --- .../portage-stable/sys-apps/usbutils/usbutils-018.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-018.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-018.ebuild index acbd3eed669..f988cd0b84c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-018.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/usbutils/usbutils-018.ebuild @@ -15,7 +15,7 @@ SRC_URI="https://www.kernel.org/pub/linux/utils/usb/${PN}/${P}.tar.xz" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="python" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" From 07d5023aec8488b3893f10c24b682d7d85563a16 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:41 +0000 Subject: [PATCH 083/145] sys-apps/util-linux: Sync with Gentoo It's from Gentoo commit 4b9ac6d92bc8416e965b1a83ef91d3790f6f7649. --- .../sys-apps/util-linux/Manifest | 2 + .../util-linux/util-linux-2.40.4.ebuild | 454 ++++++++++++++++++ .../util-linux/util-linux-9999.ebuild | 270 +++++------ 3 files changed, 584 insertions(+), 142 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-2.40.4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/Manifest index efc08ebc008..fbf955f1c6d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/Manifest @@ -1,2 +1,4 @@ DIST util-linux-2.40.2.tar.sign 833 BLAKE2B 10aae23d25c1364bac0034d6862df5738c7a405d52198fba1e4e9173a1b2ba9f3d994dacb881d920c3339c0f1018c7dd1c97c7752bdf0e8e634f54235c2b3f5c SHA512 e4ace52333df0c8dd7c8ffc3b813020615c456e06a6978e06c8183ec29896be5af7c25f59e65fc2c2849750d8d7b43043775b8504d6d01f626f1adf296493ce1 DIST util-linux-2.40.2.tar.xz 8854820 BLAKE2B 8306d651f27db6665e91a937c9f1970938fec5b069636fea3c2688afddebd1a3424f0b0802a034eab049cf7692dd435cf93e82aa5f4a40cc8064d60b4ca59535 SHA512 ffe20b915a518a150401d429b0338bc7022190e4ca0ef91a6d9eea345db8c1e11ad01784163b8fcf978506f3f5cad473f29d5d4ef93a4c66a5ae0ebd9fb0c8f2 +DIST util-linux-2.40.4.tar.sign 833 BLAKE2B 7ed5fe555bc5fe11e99081190e73d0784e91bed78e17af358287c0df6c920a224f8d33428a5f139d8503b12379e93a96619bf4b8e3eec0da757e950c78ad12fe SHA512 1ed2f8710a702e313d690c9c071c7a151df1cef7527a08ab4d1eda7a293239cf00392a78b21125df09f0af7249b473b1a51b92bb8e0494608db437c7ee4e0473 +DIST util-linux-2.40.4.tar.xz 8848216 BLAKE2B 37c095d0ab97d54dd5a35160dd4d7d3ac683c19c799d57dac3a2e850a824160470e8654fbc77752cad9a9b1198cd1aa6594e8fa66f498c653c8a9f34ef0203e8 SHA512 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-2.40.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-2.40.4.ebuild new file mode 100644 index 00000000000..10ecc03207c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-2.40.4.ebuild @@ -0,0 +1,454 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ + pam python-r1 multilib-minimal multiprocessing systemd tmpfiles + +MY_PV="${PV/_/-}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="Various useful Linux utilities" +HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/util-linux/util-linux" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" + inherit autotools git-r3 +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc + inherit verify-sig + + if [[ ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos" + fi + + SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.sign )" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain" +SLOT="0" +IUSE="audit build caps +cramfs cryptsetup fdformat +hardlink kill +logger magic ncurses nls pam python +readline rtas selinux slang static-libs +su +suid systemd test tty-helpers udev unicode uuidd" + +# Most lib deps here are related to programs rather than our libs, +# so we rarely need to specify ${MULTILIB_USEDEP}. +RDEPEND=" + virtual/libcrypt:= + audit? ( >=sys-process/audit-2.6:= ) + caps? ( sys-libs/libcap-ng ) + cramfs? ( sys-libs/zlib:= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.1.0 ) + hardlink? ( dev-libs/libpcre2:= ) + ncurses? ( + sys-libs/ncurses:=[unicode(+)?] + magic? ( sys-apps/file:0= ) + ) + nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:0= ) + rtas? ( sys-libs/librtas ) + selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) + slang? ( sys-libs/slang ) + !build? ( + systemd? ( sys-apps/systemd ) + udev? ( virtual/libudev:= ) + ) +" +BDEPEND=" + virtual/pkgconfig + nls? ( + app-text/po4a + sys-devel/gettext + ) + test? ( app-alternatives/bc ) +" +DEPEND=" + ${RDEPEND} + virtual/os-headers + acct-group/root +" +RDEPEND+=" + hardlink? ( !app-arch/hardlink ) + logger? ( !>=app-admin/sysklogd-2.0[logger] ) + kill? ( + !sys-apps/coreutils[kill] + !sys-process/procps[kill] + ) + su? ( + !=sys-apps/shadow-4.7-r2[su] + ) + uuidd? ( + acct-user/uuidd + systemd? ( virtual/tmpfiles ) + ) + !net-wireless/rfkill +" + +if [[ ${PV} == 9999 ]] ; then + # Required for man-page generation + BDEPEND+=" dev-ruby/asciidoctor" +else + BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-karelzak-20230517 )" +fi + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )" +RESTRICT="!test? ( test )" + +pkg_pretend() { + if use su && ! use suid ; then + elog "su will be installed as suid despite USE=-suid (bug #832092)" + elog "To use su without suid, see e.g. Portage's suidctl feature." + fi +} + +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + return + fi + + # Upstream sign the decompressed .tar + if use verify-sig; then + einfo "Unpacking ${MY_P}.tar.xz ..." + verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ + < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) + assert "Unpack failed" + else + default + fi +} + +src_prepare() { + default + + if use test ; then + # Known-failing tests + local known_failing_tests=( + # Subtest 'options-maximum-size-8192' fails + hardlink/options + + # Fails in sandbox + # re ioctl_ns: https://github.com/util-linux/util-linux/issues/2967 + lsns/ioctl_ns + lsfd/mkfds-inotify + lsfd/mkfds-symlink + lsfd/mkfds-rw-character-device + # Fails with network-sandbox at least in nspawn + lsfd/option-inet + utmp/last-ipv6 + + # Flaky + rename/subdir + + # Permission issues on /dev/random + lsfd/mkfds-eventpoll + lsfd/column-xmode + ) + + # debug prints confuse the tests which look for a diff + # in output + if has_version "=app-shells/bash-5.3_alpha*" ; then + known_failing_tests+=( + lsfd/column-ainodeclass + lsfd/mkfds-netlink-protocol + lsfd/column-type + lsfd/mkfds-eventfd + lsfd/mkfds-signalfd + lsfd/mkfds-mqueue + lsfd/mkfds-tcp6 + lsfd/mkfds-tcp + lsfd/filter-floating-point-nums + lsfd/mkfds-unix-stream-requiring-sockdiag + lsfd/mkfds-unix-dgram + lsfd/mkfds-directory + lsfd/mkfds-pty + lsfd/mkfds-pipe-no-fork + lsfd/mkfds-unix-stream + lsfd/mkfds-ro-regular-file + lsfd/mkfds-timerfd + lsfd/mkfds-udp + lsfd/mkfds-udp6 + ) + fi + + local known_failing_test + for known_failing_test in "${known_failing_tests[@]}" ; do + einfo "Removing known-failing test: ${known_failing_test}" + rm tests/ts/${known_failing_test} || die + done + fi + + if [[ ${PV} == 9999 ]] ; then + po/update-potfiles + eautoreconf + else + elibtoolize + fi +} + +python_configure() { + local myeconfargs=( + "${commonargs[@]}" + --disable-all-programs + --disable-bash-completion + --without-systemdsystemunitdir + --with-python + --enable-libblkid + --enable-libmount + --enable-pylibmount + ) + + mkdir "${BUILD_DIR}" || die + pushd "${BUILD_DIR}" >/dev/null || die + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + popd >/dev/null || die +} + +multilib_src_configure() { + # The scanf test in a run-time test which fails while cross-compiling. + # Blindly assume a POSIX setup since we require libmount, and libmount + # itself fails when the scanf test fails. bug #531856 + tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms + + # bug #485486 + export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) + # bug #545042 + export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) + + # Undo bad ncurses handling by upstream. Fall back to pkg-config. + # bug #601530 + export NCURSES6_CONFIG=false NCURSES5_CONFIG=false + export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false + + # Avoid automagic dependency on ppc* + export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) + + # configure args shared by python and non-python builds + local commonargs=( + --localstatedir="${EPREFIX}/var" + --runstatedir="${EPREFIX}/run" + --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" + ) + + local myeconfargs=( + "${commonargs[@]}" + --with-bashcompletiondir="$(get_bashcompdir)" + --without-python + $(multilib_native_use_enable suid makeinstall-chown) + $(multilib_native_use_enable suid makeinstall-setuid) + $(multilib_native_use_with readline) + $(multilib_native_use_with slang) + $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') + $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') + $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') + $(multilib_native_use_with audit) + $(tc-has-tls || echo --disable-tls) + $(use_enable nls) + $(use_enable nls poman) + $(use_enable unicode widechar) + $(use_enable static-libs static) + $(use_with ncurses tinfo) + $(use_with selinux) + $(multilib_native_use_enable uuidd) + + # TODO: Wire this up (bug #931118) + --without-econf + + # TODO: Wire this up (bug #931297) + # TODO: investigate build failure w/ 2.40.1_rc1 + --disable-liblastlog2 + --disable-pam-lastlog2 + ) + + if use build ; then + myeconfargs+=( + --without-systemd + --without-udev + ) + else + myeconfargs+=( + $(multilib_native_use_with systemd) + $(multilib_native_use_with udev) + ) + fi + + if multilib_is_native_abi ; then + myeconfargs+=( + --disable-chfn-chsh + --disable-login + --disable-newgrp + --disable-nologin + --disable-pylibmount + --disable-raw + --disable-vipw + --enable-agetty + --enable-bash-completion + --enable-line + --enable-partx + --enable-rename + --enable-rfkill + --enable-schedutils + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d + $(use_enable caps setpriv) + $(use_enable cramfs) + $(use_enable fdformat) + $(use_enable hardlink) + $(use_enable kill) + $(use_enable logger) + $(use_enable ncurses pg) + $(use_enable su) + $(use_enable tty-helpers mesg) + $(use_enable tty-helpers wall) + $(use_enable tty-helpers write) + $(use_with cryptsetup) + ) + if [[ ${PV} == *9999 ]] ; then + myeconfargs+=( --enable-asciidoc ) + else + # Upstream is shipping pre-generated man-pages for releases + myeconfargs+=( --disable-asciidoc ) + fi + else + myeconfargs+=( + --disable-all-programs + --disable-asciidoc + --disable-bash-completion + --without-systemdsystemunitdir + --disable-poman + + # build libraries + --enable-libuuid + --enable-libblkid + --enable-libsmartcols + --enable-libfdisk + --enable-libmount + + # Support uuidd for non-native libuuid + $(use_enable uuidd libuuid-force-uuidd) + ) + fi + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if multilib_is_native_abi && use python ; then + python_foreach_impl python_configure + fi +} + +src_configure() { + append-lfs-flags + multilib-minimal_src_configure +} + +python_compile() { + pushd "${BUILD_DIR}" >/dev/null || die + emake all + popd >/dev/null || die +} + +multilib_src_compile() { + emake all + + if multilib_is_native_abi && use python ; then + python_foreach_impl python_compile + fi +} + +python_test() { + pushd "${BUILD_DIR}" >/dev/null || die + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + popd >/dev/null || die +} + +multilib_src_test() { + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + if multilib_is_native_abi && use python ; then + python_foreach_impl python_test + fi +} + +python_install() { + pushd "${BUILD_DIR}" >/dev/null || die + emake DESTDIR="${D}" install + python_optimize + popd >/dev/null || die +} + +multilib_src_install() { + if multilib_is_native_abi && use python ; then + python_foreach_impl python_install + fi + + # This needs to be called AFTER python_install call, bug #689190 + # XXX: -j1 as temporary workaround for bug #931301 + emake DESTDIR="${D}" install -j1 +} + +multilib_src_install_all() { + dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} + + dosym hexdump /usr/bin/hd + newman - hd.1 <<< '.so man1/hexdump.1' + + # e2fsprogs-libs didn't install .la files, and .pc work fine + find "${ED}" -name "*.la" -delete || die + + if use pam ; then + # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt + newpamd "${FILESDIR}/runuser.pamd" runuser + newpamd "${FILESDIR}/runuser-l.pamd" runuser-l + + newpamd "${FILESDIR}/su-l.pamd" su-l + fi + + if use su && ! use suid ; then + # Always force suid su, even when USE=-suid, as su is useless + # for the overwhelming-majority case without suid. + # Users who wish to truly have a no-suid su can strip it out + # via e.g. Portage's suidctl or some other hook. + # See bug #832092 + fperms u+s /bin/su + fi + + if use uuidd; then + newinitd "${FILESDIR}/uuidd.initd" uuidd + fi + + # Note: + # Bash completion for "runuser" command is provided by same file which + # would also provide bash completion for "su" command. However, we don't + # use "su" command from this package. + # This triggers a known QA warning which we ignore for now to magically + # keep bash completion for "su" command which shadow package does not + # provide. + + local ver=$(tools/git-version-gen .tarballversion) + local major=$(ver_cut 1 ${ver}) + local minor=$(ver_cut 2 ${ver}) + local release=$(ver_cut 3 ${ver}) + export QA_PKGCONFIG_VERSION="${major}.${minor}.${release:-0}" +} + +pkg_postinst() { + if ! use tty-helpers ; then + elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." + fi + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "The agetty util now clears the terminal by default. You" + elog "might want to add --noclear to your /etc/inittab lines." + fi + + if use systemd && use uuidd; then + tmpfiles_process uuidd-tmpfiles.conf + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-9999.ebuild index 199d340e51a..2d18de7bfe9 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/util-linux/util-linux-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,8 +6,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..13} ) TMPFILES_OPTIONAL=1 -inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ - pam python-r1 multilib-minimal multiprocessing systemd tmpfiles +inherit pam python-r1 meson-multilib tmpfiles toolchain-funcs MY_PV="${PV/_/-}" MY_P="${PN}-${MY_PV}" @@ -17,7 +16,7 @@ HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/ if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" - inherit autotools git-r3 + inherit git-r3 else VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc inherit verify-sig @@ -141,6 +140,15 @@ src_prepare() { lsfd/mkfds-inotify lsfd/mkfds-symlink lsfd/mkfds-rw-character-device + lsns/filter + findmnt/df-options + findmnt/target + findmnt/outputs + findmnt/filterQ + findmnt/filter + misc/mountpoint + lsblk/lsblk + lslocks/lslocks # Fails with network-sandbox at least in nspawn lsfd/option-inet utmp/last-ipv6 @@ -151,6 +159,14 @@ src_prepare() { # Permission issues on /dev/random lsfd/mkfds-eventpoll lsfd/column-xmode + + # bashism + kill/decode + + # Format changes? + lslogins/checkuser + misc/swaplabel + misc/setarch ) # debug prints confuse the tests which look for a diff @@ -188,175 +204,148 @@ src_prepare() { if [[ ${PV} == 9999 ]] ; then po/update-potfiles - eautoreconf - else - elibtoolize fi } python_configure() { - local myeconfargs=( - "${commonargs[@]}" - --disable-all-programs - --disable-bash-completion - --without-systemdsystemunitdir - --with-python - --enable-libblkid - --enable-libmount - --enable-pylibmount + local emesonargs=( + -Dauto_features=disabled + -Dbuild-python=enabled + -Dpython="${EPYTHON}" + + # XXX: The 'check' target doesn't get created with + # -Dauto_features=disabled, but there's no Python-specific + # tests anyway, so it's not a big deal. + # See https://github.com/util-linux/util-linux/pull/3351 for + # an incomplete fix. + #$(meson_use test program-tests) + + -Dbuild-libblkid=enabled + -Dbuild-libmount=enabled ) mkdir "${BUILD_DIR}" || die pushd "${BUILD_DIR}" >/dev/null || die - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + meson_src_configure popd >/dev/null || die } multilib_src_configure() { - # The scanf test in a run-time test which fails while cross-compiling. - # Blindly assume a POSIX setup since we require libmount, and libmount - # itself fails when the scanf test fails. bug #531856 - tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms - - # bug #485486 - export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) - # bug #545042 - export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) - - # Undo bad ncurses handling by upstream. Fall back to pkg-config. - # bug #601530 - export NCURSES6_CONFIG=false NCURSES5_CONFIG=false - export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false - - # Avoid automagic dependency on ppc* - export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) - - # configure args shared by python and non-python builds - local commonargs=( - --localstatedir="${EPREFIX}/var" - --runstatedir="${EPREFIX}/run" - --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" - ) + local emesonargs=( + -Dbuild-python=disabled + -Dfs-search-path-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" + -Duse-tls=$(tc-has-tls && echo true || echo false) - local myeconfargs=( - "${commonargs[@]}" - --with-bashcompletiondir="$(get_bashcompdir)" - --without-python - $(multilib_native_use_enable suid makeinstall-chown) - $(multilib_native_use_enable suid makeinstall-setuid) - $(multilib_native_use_with readline) - $(multilib_native_use_with slang) - $(multilib_native_usex ncurses "$(use_with magic libmagic)" '--without-libmagic') - $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') - $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') - $(multilib_native_use_with audit) - $(tc-has-tls || echo --disable-tls) - $(use_enable nls) - $(use_enable nls poman) - $(use_enable unicode widechar) - $(use_enable static-libs static) - $(use_with ncurses tinfo) - $(use_with selinux) - $(multilib_native_use_enable uuidd) + $(meson_use test program-tests) + + $(meson_native_use_feature audit) + $(meson_native_use_feature readline) + $(meson_native_use_feature slang) + $(meson_native_use_feature magic) + $(meson_feature unicode widechar) + $(meson_native_use_feature uuidd build-uuidd) + + $(meson_feature nls) + $(meson_feature selinux) + $(meson_feature ncurses tinfo) + -Ddefault_library=$(multilib_native_usex static-libs both shared) # TODO: Wire this up (bug #931118) - --without-econf + -Deconf=disabled # TODO: Wire this up (bug #931297) - # TODO: investigate build failure w/ 2.40.1_rc1 - --disable-liblastlog2 - --disable-pam-lastlog2 + -Dbuild-liblastlog2=disabled + -Dbuild-pam-lastlog2=disabled + + # Provided by sys-apps/shadow + -Dbuild-chfn-chsh=disabled + -Dbuild-login=disabled + -Dbuild-newgrp=disabled + -Dbuild-nologin=disabled + -Dbuild-vipw=disabled + + -Dbuild-pylibmount=disabled + -Dbuild-raw=disabled + + $(meson_native_enabled build-agetty) + $(meson_native_enabled build-bash-completion) + $(meson_native_enabled build-line) + $(meson_native_enabled build-partx) + $(meson_native_enabled build-rename) + $(meson_native_enabled build-rfkill) + $(meson_native_enabled build-schedutils) + + $(meson_native_use_feature caps build-setpriv) + $(meson_native_use_feature cramfs build-cramfs) + $(meson_native_use_feature fdformat build-fdformat) + $(meson_native_use_feature hardlink build-hardlink) + $(meson_native_use_feature kill build-kill) + $(meson_native_use_feature logger build-logger) + $(meson_native_use_feature ncurses build-pg) + $(meson_native_use_feature su build-su) + $(meson_native_use_feature tty-helpers build-mesg) + $(meson_native_use_feature tty-helpers build-wall) + $(meson_native_use_feature tty-helpers build-write) + $(meson_native_use_feature cryptsetup) + + # Libraries + -Dbuild-libuuid=enabled + -Dbuild-libblkid=enabled + -Dbuild-libsmartcols=enabled + -Dbuild-libfdisk=enabled + -Dbuild-libmount=enabled + + # TODO: Support uuidd for non-native libuuid (do we want this still?) + #$(use_enable uuidd libuuid-force-uuidd) ) + # TODO: udev (which seems to be controlled by just the systemd option right now?) if use build ; then - myeconfargs+=( - --without-systemd - --without-udev + emesonargs+=( + -Dsystemd=disabled ) else - myeconfargs+=( - $(multilib_native_use_with systemd) - $(multilib_native_use_with udev) + emesonargs+=( + $(meson_native_use_feature systemd) ) fi - if multilib_is_native_abi ; then - myeconfargs+=( - --disable-chfn-chsh - --disable-login - --disable-newgrp - --disable-nologin - --disable-pylibmount - --disable-raw - --disable-vipw - --enable-agetty - --enable-bash-completion - --enable-line - --enable-partx - --enable-rename - --enable-rfkill - --enable-schedutils - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - --with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d - $(use_enable caps setpriv) - $(use_enable cramfs) - $(use_enable fdformat) - $(use_enable hardlink) - $(use_enable kill) - $(use_enable logger) - $(use_enable ncurses pg) - $(use_enable su) - $(use_enable tty-helpers mesg) - $(use_enable tty-helpers wall) - $(use_enable tty-helpers write) - $(use_with cryptsetup) - ) - if [[ ${PV} == *9999 ]] ; then - myeconfargs+=( --enable-asciidoc ) - else - # Upstream is shipping pre-generated man-pages for releases - myeconfargs+=( --disable-asciidoc ) - fi - else - myeconfargs+=( - --disable-all-programs - --disable-asciidoc - --disable-bash-completion - --without-systemdsystemunitdir - --disable-poman - - # build libraries - --enable-libuuid - --enable-libblkid - --enable-libsmartcols - --enable-libfdisk - --enable-libmount - - # Support uuidd for non-native libuuid - $(use_enable uuidd libuuid-force-uuidd) + local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local + cat >> ${native_file} <<-EOF || die + [binaries] + asciidoctor='asciidoctor-falseified' + EOF + # TODO: Verify this does the right thing for releases (may need to + # manually install). + if [[ ${PV} != *9999 ]] ; then + # Upstream is shipping pre-generated man-pages for releases + emesonargs+=( + --native-file "${native_file}" ) fi - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + # TODO: check pam automagic (bug #485486, bug #545042) + #export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) + #export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) + # + # TODO: check librtas automagic to avoid automagic dependency on ppc* + #export ac_cv_lib_rtas_rtas_get_sysparm=$(usex rtas) + + meson_src_configure if multilib_is_native_abi && use python ; then python_foreach_impl python_configure fi } -src_configure() { - append-lfs-flags - multilib-minimal_src_configure -} - python_compile() { pushd "${BUILD_DIR}" >/dev/null || die - emake all + meson_src_compile popd >/dev/null || die } multilib_src_compile() { - emake all + meson_src_compile if multilib_is_native_abi && use python ; then python_foreach_impl python_compile @@ -365,12 +354,14 @@ multilib_src_compile() { python_test() { pushd "${BUILD_DIR}" >/dev/null || die - emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + # XXX: See python_configure + #eninja check popd >/dev/null || die } multilib_src_test() { - emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + eninja check + if multilib_is_native_abi && use python ; then python_foreach_impl python_test fi @@ -378,7 +369,7 @@ multilib_src_test() { python_install() { pushd "${BUILD_DIR}" >/dev/null || die - emake DESTDIR="${D}" install + meson_src_install python_optimize popd >/dev/null || die } @@ -388,9 +379,7 @@ multilib_src_install() { python_foreach_impl python_install fi - # This needs to be called AFTER python_install call, bug #689190 - # XXX: -j1 as temporary workaround for bug #931301 - emake DESTDIR="${D}" install -j1 + meson_src_install } multilib_src_install_all() { @@ -399,9 +388,6 @@ multilib_src_install_all() { dosym hexdump /usr/bin/hd newman - hd.1 <<< '.so man1/hexdump.1' - # e2fsprogs-libs didn't install .la files, and .pc work fine - find "${ED}" -name "*.la" -delete || die - if use pam ; then # See https://github.com/util-linux/util-linux/blob/master/Documentation/PAM-configuration.txt newpamd "${FILESDIR}/runuser.pamd" runuser From 9a5201f4e9ca888ae294251b850bc064afb07f42 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:43 +0000 Subject: [PATCH 084/145] sys-apps/zram-generator: Sync with Gentoo It's from Gentoo commit 6793472cfe0b763f8ab545d5acc3e24b0abf83e6. --- .../sys-apps/zram-generator/zram-generator-1.2.1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/zram-generator/zram-generator-1.2.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/zram-generator/zram-generator-1.2.1.ebuild index c119e09b883..64656538fbf 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/zram-generator/zram-generator-1.2.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/zram-generator/zram-generator-1.2.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -66,7 +66,7 @@ LICENSE="Apache-2.0" # Dependent crate licenses LICENSE+=" MIT Unicode-3.0" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" +KEYWORDS="amd64 ~arm64 ~ppc64 ~riscv" IUSE="+man" # TODO: Permission issue on 'test_cases' RESTRICT="test" From f9dbe1c2e7daf19c22668e5291c68c868234a66e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:43 +0000 Subject: [PATCH 085/145] sys-auth/sssd: Sync with Gentoo It's from Gentoo commit d1fdd7f8fb5061422e69212c81d6f46d8035cff2. --- ...ssd-2.9.6-conditional-python-install.patch | 16 + .../sys-auth/sssd/sssd-2.10.1.ebuild | 39 +- .../sys-auth/sssd/sssd-2.9.6-r1.ebuild | 340 ++++++++++++++++++ 3 files changed, 383 insertions(+), 12 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-auth/sssd/files/sssd-2.9.6-conditional-python-install.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.9.6-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-auth/sssd/files/sssd-2.9.6-conditional-python-install.patch b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/files/sssd-2.9.6-conditional-python-install.patch new file mode 100644 index 00000000000..ff479dee7f5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/files/sssd-2.9.6-conditional-python-install.patch @@ -0,0 +1,16 @@ +diff '--color=auto' -Naur a/Makefile.am b/Makefile.am +--- a/Makefile.am 2024-12-05 12:16:16.000000000 +0000 ++++ b/Makefile.am 2025-01-14 12:31:45.831435116 +0000 +@@ -21,7 +21,11 @@ + endif + + SUBDIRS += . src/tests/cwrap src/tests/intg src/tests/test_CA \ +- src/tests/test_ECC_CA src/tools/analyzer ++ src/tests/test_ECC_CA ++ ++if BUILD_PYTHON_BINDINGS ++SUBDIRS += src/tools/analyzer ++endif + + # Some old versions of automake don't define builddir + builddir ?= . diff --git a/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.10.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.10.1.ebuild index 471fd5425c7..3f04d442515 100644 --- a/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.10.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.10.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,8 +23,8 @@ fi LICENSE="GPL-3" SLOT="0" -IUSE="doc +netlink nfsv4 nls passkey samba selinux systemd systemtap test" -REQUIRED_USE=" ( ${PYTHON_REQUIRED_USE} ) " +IUSE="doc +netlink nfsv4 nls passkey python samba selinux systemd systemtap test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" RESTRICT="!test? ( test )" DEPEND=" @@ -54,11 +54,13 @@ DEPEND=" nfsv4? ( >=net-fs/nfs-utils-2.3.1-r2 ) nls? ( >=sys-devel/gettext-0.18 ) passkey? ( dev-libs/libfido2:= ) - ${PYTHON_DEPS} - systemd? ( - $(python_gen_cond_dep ' - dev-python/python-systemd[${PYTHON_USEDEP}] - ') + python? ( + ${PYTHON_DEPS} + systemd? ( + $(python_gen_cond_dep ' + dev-python/python-systemd[${PYTHON_USEDEP}] + ') + ) ) samba? ( >=net-fs/samba-4.10.2[winbind] ) selinux? ( @@ -75,6 +77,8 @@ RDEPEND="${DEPEND} acct-group/sssd passkey? ( sys-apps/pcsc-lite[policykit] ) selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )" +DEPEND+=" + sys-apps/shadow" BDEPEND=" acct-user/sssd acct-group/sssd @@ -102,6 +106,7 @@ CONFIG_CHECK="~KEYS" PATCHES=( "${FILESDIR}/${PN}-2.8.2-krb5_pw_locked.patch" + "${FILESDIR}/${PN}-2.9.6-conditional-python-install.patch" "${FILESDIR}/${PN}-2.10.0_beta2-fix-systemd-systemconfdir.patch" ) @@ -250,11 +255,12 @@ multilib_src_configure() { --with-subid $(use_enable systemtap) --without-python2-bindings - $(multilib_native_with python3-bindings) + $(multilib_native_use_with python python3-bindings) # Annoyingly configure requires that you pick systemd XOR sysv --with-initscript=$(usex systemd systemd sysv) --with-sssd-user=sssd - CPPFLAGS="${CPPFLAGS} -I/usr/include/samba-4.0" + KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config + CPPFLAGS="${CPPFLAGS} -I${ESYSROOT}/usr/include/samba-4.0" ) use systemd && myconf+=( @@ -305,8 +311,10 @@ multilib_src_test() { multilib_src_install() { if multilib_is_native_abi; then emake -j1 DESTDIR="${D}" install - python_fix_shebang "${ED}" - python_optimize + if use python; then + python_fix_shebang "${ED}" + python_optimize + fi else # easier than playing with automake... dopammod .libs/pam_sss.so @@ -362,8 +370,15 @@ multilib_src_install_all() { pkg_postinst() { tmpfiles_process sssd-tmpfiles.conf + echo elog "You must set up sssd.conf (default installed into /etc/sssd)" elog "and (optionally) configuration in /etc/pam.d in order to use SSSD" elog "features." + echo optfeature "Kerberos keytab renew (see krb5_renew_interval)" app-crypt/adcli + + if ! use python; then + echo + ewarn "sssctl analyze will not work because the python USE flag is disabled." + fi } diff --git a/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.9.6-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.9.6-r1.ebuild new file mode 100644 index 00000000000..faf744ba4ed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-auth/sssd/sssd-2.9.6-r1.ebuild @@ -0,0 +1,340 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PLOCALES="ca de es fr ja ko pt_BR ru sv tr uk" +PLOCALES_BIN="${PLOCALES} bg cs eu fi hu id it ka nb nl pl pt tg zh_TW zh_CN" +PLOCALE_BACKUP="sv" +PYTHON_COMPAT=( python3_{10..12} ) + +inherit autotools linux-info multilib-minimal optfeature plocale \ + python-single-r1 pam systemd toolchain-funcs + +DESCRIPTION="System Security Services Daemon provides access to identity and authentication" +HOMEPAGE="https://github.com/SSSD/sssd" +if [[ ${PV} != 9999 ]]; then + SRC_URI="https://github.com/SSSD/sssd/releases/download/${PV}/${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +else + inherit git-r3 + EGIT_REPO_URI="https://github.com/SSSD/sssd.git" + EGIT_BRANCH="master" +fi + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl doc +netlink nfsv4 nls passkey python samba selinux systemd systemtap test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +DEPEND=" + >=app-crypt/mit-krb5-1.19.1[${MULTILIB_USEDEP}] + app-crypt/p11-kit + >=dev-libs/ding-libs-0.2 + >=dev-libs/cyrus-sasl-2.1.25-r3[kerberos] + dev-libs/jansson:= + dev-libs/libpcre2:= + dev-libs/libunistring:=[${MULTILIB_USEDEP}] + >=dev-libs/popt-1.16 + >=dev-libs/openssl-1.0.2:= + >=net-dns/bind-tools-9.9[gssapi] + >=net-dns/c-ares-1.10.0-r1:=[${MULTILIB_USEDEP}] + >=net-nds/openldap-2.4.30:=[sasl,experimental] + >=sys-apps/dbus-1.6 + >=sys-apps/keyutils-1.5:= + >=sys-libs/pam-0-r1[${MULTILIB_USEDEP}] + >=sys-libs/talloc-2.0.7 + >=sys-libs/tdb-1.2.9 + >=sys-libs/tevent-0.9.16 + virtual/ldb:= + virtual/libintl + acl? ( net-fs/cifs-utils[acl] ) + netlink? ( dev-libs/libnl:3 ) + nfsv4? ( >=net-fs/nfs-utils-2.3.1-r2 ) + nls? ( >=sys-devel/gettext-0.18 ) + passkey? ( dev-libs/libfido2:= ) + python? ( + ${PYTHON_DEPS} + systemd? ( + $(python_gen_cond_dep ' + dev-python/python-systemd[${PYTHON_USEDEP}] + ') + ) + ) + samba? ( >=net-fs/samba-4.10.2[winbind] ) + selinux? ( + >=sys-libs/libselinux-2.1.9 + >=sys-libs/libsemanage-2.1 + ) + systemd? ( + sys-apps/systemd:= + sys-apps/util-linux + ) + systemtap? ( dev-debug/systemtap )" +RDEPEND="${DEPEND} + passkey? ( sys-apps/pcsc-lite[policykit] ) + selinux? ( >=sec-policy/selinux-sssd-2.20120725-r9 )" +DEPEND+=" + sys-apps/shadow" +BDEPEND=" + virtual/pkgconfig + app-text/docbook-xml-dtd:4.4 + >=dev-libs/libxslt-1.1.26 + ${PYTHON_DEPS} + doc? ( app-text/doxygen ) + nls? ( sys-devel/gettext + app-text/po4a ) + test? ( + dev-libs/check + dev-libs/softhsm:2 + dev-util/cmocka + net-libs/gnutls[pkcs11,tools] + sys-libs/libfaketime + sys-libs/nss_wrapper + sys-libs/pam_wrapper + sys-libs/uid_wrapper + ) +" + +CONFIG_CHECK="~KEYS" + +PATCHES=( + "${FILESDIR}/${PN}-2.8.2-krb5_pw_locked.patch" + "${FILESDIR}/${PN}-2.9.6-conditional-python-install.patch" +) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/ipa_hbac.h + /usr/include/sss_idmap.h + /usr/include/sss_nss_idmap.h + # --with-ifp + /usr/include/sss_sifp.h + /usr/include/sss_sifp_dbus.h + # from 1.15.3 + /usr/include/sss_certmap.h +) + +pkg_setup() { + linux-info_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + default + + plocale_get_locales > src/man/po/LINGUAS || die + + sed -i \ + -e "/_langs]/ s/ .*//" \ + src/man/po/po4a.cfg \ + || die + enable_locale() { + local locale=${1} + + sed -i \ + -e "/_langs]/ s/$/ ${locale}/" \ + src/man/po/po4a.cfg \ + || die + } + + plocale_for_each_locale enable_locale + + PLOCALES="${PLOCALES_BIN}" + plocale_get_locales > po/LINGUAS || die + + sed -i \ + -e 's:/var/run:/run:' \ + src/examples/logrotate \ + || die + + # disable flaky test, see https://github.com/SSSD/sssd/issues/5631 + sed -i \ + -e '/^\s*pam-srv-tests[ \\]*$/d' \ + Makefile.am \ + || die + + eautoreconf + + multilib_copy_sources +} + +src_configure() { + local native_dbus_cflags=$($(tc-getPKG_CONFIG) --cflags dbus-1 || die) + + # Workaround for bug #938302 + if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then + export DTRACE="${BROOT}"/usr/bin/stap-dtrace + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=() + + myconf+=( + --libexecdir="${EPREFIX}"/usr/libexec + --localstatedir="${EPREFIX}"/var + --runstatedir="${EPREFIX}"/run + --sbindir="${EPREFIX}"/usr/sbin + --with-pid-path="${EPREFIX}"/run + --with-plugin-path="${EPREFIX}"/usr/$(get_libdir)/sssd + --enable-pammoddir="${EPREFIX}$(getpam_mod_dir)" + --with-ldb-lib-dir="${EPREFIX}"/usr/$(get_libdir)/samba/ldb + --with-db-path="${EPREFIX}"/var/lib/sss/db + --with-gpo-cache-path="${EPREFIX}"/var/lib/sss/gpo_cache + --with-pubconf-path="${EPREFIX}"/var/lib/sss/pubconf + --with-pipe-path="${EPREFIX}"/var/lib/sss/pipes + --with-mcache-path="${EPREFIX}"/var/lib/sss/mc + --with-secrets-db-path="${EPREFIX}"/var/lib/sss/secrets + --with-log-path="${EPREFIX}"/var/log/sssd + --with-kcm + --enable-kcm-renewal + --with-os=gentoo + --disable-rpath + --disable-static + # Valgrind is only used for tests + --disable-valgrind + $(use_with samba) + --with-smb-idmap-interface-version=6 + $(multilib_native_use_enable acl cifs-idmap-plugin) + $(multilib_native_use_with selinux) + $(multilib_native_use_with selinux semanage) + --enable-krb5-locator-plugin + $(use_enable samba pac-responder) + $(multilib_native_use_with nfsv4 nfsv4-idmapd-plugin) + $(use_enable nls) + $(multilib_native_use_with netlink libnl) + --with-manpages + --with-sudo + $(multilib_native_with autofs) + $(multilib_native_with ssh) + --without-oidc-child + $(multilib_native_with passkey) + --with-subid + $(use_enable systemtap) + --without-python2-bindings + $(multilib_native_use_with python python3-bindings) + # Annoyingly configure requires that you pick systemd XOR sysv + --with-initscript=$(usex systemd systemd sysv) + KRB5_CONFIG="${ESYSROOT}"/usr/bin/krb5-config + # Needed for Samba 4.21 + CPPFLAGS="${CPPFLAGS} -I${ESYSROOT}/usr/include/samba-4.0" + ) + + use systemd && myconf+=( + --with-systemdunitdir=$(systemd_get_systemunitdir) + ) + + if ! multilib_is_native_abi; then + # work-around all the libraries that are used for CLI and server + myconf+=( + {POPT,TALLOC,TDB,TEVENT,LDB}_{CFLAGS,LIBS}=' ' + # ldb headers are fine since native needs it + # ldb lib fails... but it does not seem to bother + {DHASH,UNISTRING,INI_CONFIG_V{0,1,1_1,1_3}}_{CFLAGS,LIBS}=' ' + {PCRE,CARES,SYSTEMD_LOGIN,SASL,DBUS,CRYPTO,P11_KIT}_{CFLAGS,LIBS}=' ' + {NDR_NBT,SAMBA_UTIL,SMBCLIENT,NDR_KRB5PAC,JANSSON}_{CFLAGS,LIBS}=' ' + + # use native include path for dbus (needed for build) + DBUS_CFLAGS="${native_dbus_cflags}" + + # non-pkgconfig checks + ac_cv_lib_ldap_ldap_search=yes + --without-kcm + --without-manpages + ) + fi + + econf "${myconf[@]}" +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + use doc && emake docs + else + emake libnss_sss.la pam_sss.la pam_sss_gss.la + emake sssd_krb5_locator_plugin.la + use samba && emake sssd_pac_plugin.la + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + local -x CK_TIMEOUT_MULTIPLIER=10 + emake check VERBOSE=yes + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake -j1 DESTDIR="${D}" install + if use python; then + python_fix_shebang "${ED}" + python_optimize + fi + else + # easier than playing with automake... + dopammod .libs/pam_sss.so + dopammod .libs/pam_sss_gss.so + + into / + dolib.so .libs/libnss_sss.so* + + exeinto /usr/$(get_libdir)/krb5/plugins/libkrb5 + doexe .libs/sssd_krb5_locator_plugin.so + + if use samba; then + exeinto /usr/$(get_libdir)/krb5/plugins/authdata + doexe .libs/sssd_pac_plugin.so + fi + fi +} + +multilib_src_install_all() { + einstalldocs + + insinto /etc/sssd + insopts -m600 + doins src/examples/sssd-example.conf + + insinto /etc/logrotate.d + insopts -m644 + newins src/examples/logrotate sssd + + newconfd "${FILESDIR}"/sssd.conf sssd + + keepdir /var/lib/sss/db + keepdir /var/lib/sss/deskprofile + keepdir /var/lib/sss/gpo_cache + keepdir /var/lib/sss/keytabs + keepdir /var/lib/sss/mc + keepdir /var/lib/sss/pipes/private + keepdir /var/lib/sss/pubconf/krb5.include.d + keepdir /var/lib/sss/secrets + keepdir /var/log/sssd + + # strip empty dirs + if ! use doc; then + rm -r "${ED}"/usr/share/doc/"${PF}"/doc || die + rm -r "${ED}"/usr/share/doc/"${PF}"/{hbac,idmap,nss_idmap}_doc || die + fi + + rm -r "${ED}"/run || die + find "${ED}" -type f -name '*.la' -delete || die +} + +pkg_postinst() { + elog "You must set up sssd.conf (default installed into /etc/sssd)" + elog "and (optionally) configuration in /etc/pam.d in order to use SSSD" + elog "features." + echo + optfeature "Kerberos keytab renew (see krb5_renew_interval)" app-crypt/adcli + + if ! use python; then + echo + ewarn "sssctl analyze will not work because the python USE flag is disabled." + fi +} From 0a4ddae29fcb26e0d52ca83cda6f52eaf1b4e7ad Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:52 +0000 Subject: [PATCH 086/145] sys-devel/gcc: Sync with Gentoo It's from Gentoo commit a29609acadd782c9ded64a22aeb49f060abb405a. --- .../portage-stable/sys-devel/gcc/Manifest | 27 ++++---- .../sys-devel/gcc/gcc-12.4.1_p20241226.ebuild | 65 ------------------- ...102.ebuild => gcc-12.4.1_p20250116.ebuild} | 0 ...109.ebuild => gcc-12.4.1_p20250123.ebuild} | 0 ...103.ebuild => gcc-13.3.1_p20250117.ebuild} | 0 ...227.ebuild => gcc-13.3.1_p20250124.ebuild} | 2 +- .../sys-devel/gcc/gcc-14.2.1_p20241228.ebuild | 54 --------------- ...104.ebuild => gcc-14.2.1_p20250118.ebuild} | 0 ...111.ebuild => gcc-14.2.1_p20250125.ebuild} | 0 .../gcc/gcc-15.0.0_pre20241222.ebuild | 53 --------------- .../gcc/gcc-15.0.0_pre20241229.ebuild | 53 --------------- ...build => gcc-15.0.0_pre20250112-r3.ebuild} | 2 +- ...5.ebuild => gcc-15.0.1_pre20250119.ebuild} | 2 +- ...1.ebuild => gcc-15.0.1_pre20250126.ebuild} | 2 +- 14 files changed, 15 insertions(+), 245 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20241226.ebuild rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-12.4.1_p20250102.ebuild => gcc-12.4.1_p20250116.ebuild} (100%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-12.4.1_p20250109.ebuild => gcc-12.4.1_p20250123.ebuild} (100%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-13.3.1_p20250103.ebuild => gcc-13.3.1_p20250117.ebuild} (100%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-13.3.1_p20241227.ebuild => gcc-13.3.1_p20250124.ebuild} (97%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20241228.ebuild rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-14.2.1_p20250104.ebuild => gcc-14.2.1_p20250118.ebuild} (100%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-14.2.1_p20250111.ebuild => gcc-14.2.1_p20250125.ebuild} (100%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241222.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241229.ebuild rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-15.0.0_pre20250112.ebuild => gcc-15.0.0_pre20250112-r3.ebuild} (98%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-15.0.0_pre20250105.ebuild => gcc-15.0.1_pre20250119.ebuild} (98%) rename sdk_container/src/third_party/portage-stable/sys-devel/gcc/{gcc-15.0.0_pre20250112-r1.ebuild => gcc-15.0.1_pre20250126.ebuild} (98%) 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 67daed5ba2d..a9feafe03bf 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 @@ -5,36 +5,31 @@ DIST gcc-11.4.0-musl-patches-2.tar.xz 4308 BLAKE2B a2335e155fc57816fed822a648e0e DIST gcc-11.5.0-patches-1.tar.xz 13664 BLAKE2B 64fd9c2d074aca58ecd8c0035ccf2d2b84d83b93b46367f3e068a95651a094a07b9aad7635bb9c7d2e5ea20dc5957bc19217ca32cbd6cf6f0344f4a3d943a60a SHA512 55828751008575fe89760a224477ee9e5132c0780fbe232e0b80b16ecd9854f85ae54bdcd216ae04de67f3a8b417ee2aad4f8bf9d9df5318613d3efb55bd92df DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e2cac92a13cc7e285d08191dd4a117f41a8faac2359c0e2a16f954c7fef354dda9df8c63bff1c5cefda82602c SHA512 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8 DIST gcc-12-20241219.tar.xz 79920016 BLAKE2B 71044352515f33eaf0bcc64cc6eacdecb8b7b1dbca6d8836b629f76e60320f5090178ff37b6804fbda0913c0f55afca37588647974fd72e9961edd338ccf6ffb SHA512 e0c08366f392083feb1ae242242e9bd335681234808ed44d4e75afe157be2814bef321d2327186d217f38bbb6176706e1258228904d31fdb3bb37c8e245dacb0 -DIST gcc-12-20241226.tar.xz 79919556 BLAKE2B 774bc4a98e3fc8b6bb9e95ec12aff8e51f546b490953ccf3801f19673973320249fc5163a2b0c1d0eb6929df810f751a59efe29f148c16671707169d6a5388ed SHA512 d8654ebb456c40ae71de2a64dd118497830c92f09041d36da60ac57c10e617f6e62fba9c514f91359b1ce6de8f702809c23deafddf48aa090529deb902b377e6 -DIST gcc-12-20250102.tar.xz 79905420 BLAKE2B 8669137f30b7df547d2aa9d944e0896060d0af159e9a9fec4405a714645b702862928d93d632afb9f3e7a43fd0432bf73f934775c5c5abc836f4c56c7370822c SHA512 67a4f53ba143b57e34c4eb6516e51c3ea12b24cf13b1cfaeff61b675fffb49e61a7697e4877788639cc441a4affa4a9cd2526817037ea37b6eeacabd6068d8c4 -DIST gcc-12-20250109.tar.xz 79908584 BLAKE2B 0266d02c49d4a9f7dab4a8dd857d849987457990880a578fc809dc2e23c2a8313e088697de565f9f7423996b8cd5a2270eee7fcf13522b452009c544e63b2e7a SHA512 f3030cb604f2c934804fd439f6ad9bdbc036c0cef0387b754c48137ef122af21c4c093ffad7136d4384ed7de2406aea1dfeedc5d64273115b7a9d9e8fa1fb6ed +DIST gcc-12-20250116.tar.xz 79921816 BLAKE2B b4c2ee7fb76b15834b5637d157c39cbdedca4b458d767eaa5b7275ef835db5f2f44437a7242dcccb1c57a706cdb7788cecc42bfb99795b8ed0ccf589c24296f5 SHA512 271f31a7d213da38f197fe8124030780b334dd84b62d09e58757c722232c3465d2344e0664be6c62f0b5187f604e5af01fffa262a6b4f5b27a0199693e563ac4 +DIST gcc-12-20250123.tar.xz 79912136 BLAKE2B f143da3aaa36020b99c0da4b4951743f90fcbcdf93af325bd76878944187005e80b11657b85ab0cf014434acf5431a45cb29effb9a8e3922092ec5dee6606b51 SHA512 1b9dba666d9538171f935334c5a7106499758f26422a497c748c4ea90983e77bfaaecdb8a96099e1a43c0722e15d34a3c0f549e531cb56ea3a990e71f0b2135b DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62 DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec DIST gcc-12.4.0-patches-2.tar.xz 14876 BLAKE2B 6bf5abbb2abba4b9fe9fa153ac4112fe5f563e97cd4e1b885ccd0d88abf1124fa91f20d6be972e2242410447be73bca60014785f8551b8087ed0d4cc3e868225 SHA512 dfd5f02d4c1076fad4ee998b2f620171dd3eb65a1160312def9dae89b18327a06db853f569e0e3c049e5ab06c61488bb6faecec52bafe737fddeb43628c54a1f DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853 DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8e0b6780cd31c9eace2965c53115205bf64e8247b833a4375c1e3ad2d94820b5bdc97a4689be95d8ab55a676afa689 SHA512 10fe009dc3b8872b24350e4fb999f71b848bd5a03e48e8292f76e6eca3dbdef8383a3b13b813aada983ebdbe3ecab1642961b3210cd1e0063a86655a44493017 -DIST gcc-13-20241227.tar.xz 84505012 BLAKE2B 204b9191d7dc6aae9a37df3de09593448e1582e3dd434007849b6229d6b474ad5a3423050bc7a1dfb812e62b8e42fb154d1da28f38f6c32c700f4db8da780019 SHA512 28e9f884a4599ff516ac28c77a929db04e20ee6dbdcee42560ed950cfc022d958a310c9ed598b3f119433ee9a20868bc0e69e12053f3e1dd977df2cfe9a16f47 -DIST gcc-13-20250103.tar.xz 84510800 BLAKE2B 0a2b0c5ca27cdb3ccb8be502b3d6adee43203d3042af50120f57305c7ad354a459466ea96dca049e76c8c772cbb324fce47475d981ac7c47b9263b48bab31c92 SHA512 3d18b065db3dd9f6ad543f37d4b02e7de9ad5f6c65344e3ce87a99fec15b1850a196f69d8d707b0b51b9bf09726757926792bf5d6de807037fbf5686c8c53ee5 +DIST gcc-13-20250117.tar.xz 84520416 BLAKE2B 3ce98ce1a17ec5a733e3cb8eab0a6084d5e32b225213f0af6f3ff699552d162514a0d6eb6e2805b07d5f97229a92a15f67958dc2ccc82e9d937b8af688a9528b SHA512 121f176f2d9779e33245ddc4048f1ca683311cf20c240e8e76ad6fea892a2e968876b838cc1d90cba06184a9cf4b4408b78dcbabc27368e0cadf1d8de749eed2 +DIST gcc-13-20250124.tar.xz 84528596 BLAKE2B db8c45b1babd48158644899fe1a3e263eee6e716bc117be95f53aa30e00bf4a87b6de7c852e558887001cea53fbaaea4fe176f8a2361cf122cd05c36c7a0ae8f SHA512 d5d32c66d22a1fb2fca1db1c473125003ef204c68711459eb358374259efb924ea160c363b7b1c81659cc6bf154de499949c02e9adde1ddb4dcb2f2ebbb27e42 DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69 DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2 DIST gcc-13.3.0-patches-2.tar.xz 44440 BLAKE2B ebde73f6c3cd1a5fdc5bbce36414a59dda0925cba9d422d3689fc9c14fece44ee2391982a674411aa99bf47ffd49200f3ce51cc908beb8298adfff78e709a84c SHA512 eb56e0d7e69b5c3cca21f4cbff21c1204cf64ede7e66d689f45cf5ff37de8a59f24eb1f4b30d9c4222fd4126654fe4ffc146851f504761014995553c1202e8fd DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4c0db77709ec7d761ad535df30042f5deb8488ba7c508de3673e4b0f2af1de8d17476f39cd47b745ddccec6a9e4470 SHA512 91fe1e1d1f8e8fad64930a2eadf942a542bd42f841fceb49f475bccac00f04692b8cd38821ea9ee05f78b5c51001d8bd39df5f71f3a3d89aab8980019cea9be8 -DIST gcc-14-20241228.tar.xz 88192616 BLAKE2B 9f64852ad59b3f41ab3064f353ec29a513f08343421dc16d48df362ef210567243d653857c4932f558c2b9ed8b572112767bc7a914efc18ad14dd1da2a9f0825 SHA512 d5476a3adef59fbc492ec066ffc1eebe8cbed57c370e775dceaae97dc915cf5efc618c05423794da9cae19ca0614bdf6aacd29dba5a1dc487edc2ddd746b1310 -DIST gcc-14-20250104.tar.xz 88191884 BLAKE2B 781fb456b6e7a602503e5a56f8c0de4c677d23c24e14300c7a12a6a48adfac075baacd8dfd198f44d5bd43f9f13eae3fd189fbf915f487d20c7f2ec4b79e7272 SHA512 c55b8d4f27c8c37244ce95f18efae4be8b0eee71465c5b167dd4efed919e1933d9bef24b1753b7b37ba2b791126829478b25416fd22b1abda14e83bd8bffaeb4 -DIST gcc-14-20250111.tar.xz 88197416 BLAKE2B c17d7274c1f3a2e8e55677ff3750f5b7736f56ae70a35eb9407f2ab5710294e1523c0d11bab69cc3bbbd7d16b39bfd0f1068eba38cb284b5933de5bc3a1636f9 SHA512 2acaab2f905934e819545a8f1561a28feaa609cd39452123ec805d59bda230c5447b26f9ec847fabfa41a658a95a3857555b17f81949f359401bf3449f41b871 +DIST gcc-14-20250118.tar.xz 88214804 BLAKE2B dd35140f0565d419eee272f70e668a8614cfc8f6b7d352a1df8ba2408c6533711e024ca1a7b5e309421138e21d63c5b7f8b581d50b0680abf3dfd6002004bd14 SHA512 692fc50fec856c6cc5a0576d1caa59fd8b5ec298e36daaf5855ea0f922ed134fff346f73e38e47673b692cf03606a66f82e6bdb46e5d7729c370299645a2a093 +DIST gcc-14-20250125.tar.xz 88214960 BLAKE2B c8f89803928db5c0374751b10a7d0bcaacfaa425f2b869fac96d35173afa9adf24d6969cdbfe20eea7425b97c23c14dbfda94bd72f447e530632e33719cd9916 SHA512 8d61d0002de3738ef51bbf0338d849121eb009a2908314511da0f79914f73bb5d1f8b1cc06b932188a3814f3bd6a61d0911da942ccc2352d8e2844f9f10ad039 DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25 DIST gcc-14.2.0-patches-7.tar.xz 14244 BLAKE2B 11236e91e1fe83fec8ffaa40ec0cdd4b52a00a951e9aa9a7a0a932b234b8f1a9603333a7ccf55859f4ef53dd4d8ad1fd5c1d2514b6e45fce5b86bb58622a0ecc SHA512 5a4d86d943e31fa068b5a784c0132bd83c23243dcb3cf972557a42e004469a415e1b3185f31b1bb36f916594d475f266a2fda031a414e4a15e0bbfe471269eee -DIST gcc-15-20241222.tar.xz 90484776 BLAKE2B 8889a11be56a47a9cff26573e9e6fcaa2d7b92b7a5c4509503cbcd38eb03f23a009879bcbd5de33b8c993a34c25b3c5aafb6c9506ff5335f05a572523a41fc52 SHA512 5f571cb073e4c9d10154d135a4fc50986d956417af69c9735e39d9fd49f5cf460a5847ea095b61511917ed0a69197e9afb338c2c8c5b3e7b68673828a3d0d95f -DIST gcc-15-20241229.tar.xz 90519116 BLAKE2B 8d20c82a17754d6debed19b3aeabdc37453a0f3cac6fb5df5dc6e939775fe3124255f02749b47a8c860cefe29b08adf079f10a8d545ee1b037cb4bbf78e25019 SHA512 b82e74028e663bec02765eaad6c10ef9caef006f391c2bc2531e38a31c1a6b5442927659301d890ff70cdb737aef03f7f9a34cb853a29436a6f9794d78d52f0a -DIST gcc-15-20250105.tar.xz 90492968 BLAKE2B b99a18f65eb274a2a62af378fd5d384383d9787ba82a6c71dec82265339a1fae1ae041f50081133a8bd7774efcd18498980acfcf543d056c30551f2dc07be949 SHA512 24928dfc38889a97248caa3252005f477695f849edca1265b4f153ba7e901da7a8b5731497f92aeeb212fd50d35aff30b07557e16898e22bd4a2ae8a014740aa DIST gcc-15-20250112.tar.xz 90584884 BLAKE2B 35200ad43eaca0b97d330d22abb517ee5f8d196b83d40650e5a2e39b5a847b2c686108d15edf998df511992930bf3464b7e63d4562c17a6330a22a693b795122 SHA512 cd2b282eb7cd352fb326df692b653572319edc179ae6dec0c96ead858da4a85134098e128afa9dd76ff691262fd3cfce176c38420a78f56121b039a2a297f63e +DIST gcc-15-20250119.tar.xz 90709176 BLAKE2B da815cd472c0bb4101fb65fac73e93d8da8981c268880222501deb48f03865824773f93ae182ec60465e2b122a1503936dc10337b9b87dfdd15cde5e18641026 SHA512 9f3bb4ff5b04fe84ec3ce5342a29ca1d98f1988c0b3703c63b3f5bd5d58d035ed7c676cdf6bf730f5399a7b461e2929f28494f9ca4a87a6783c6e30114d2c838 +DIST gcc-15-20250126.tar.xz 90895328 BLAKE2B 472b5c0ad2da8525a40530089f02bcdf6b8b3d3e31c1f5f86339d624c3a461ab24d35d815554513ba6dbe807f8f3a7f9e123f63ec0fe33796bee9e6da411deab SHA512 e55a19e07bd10b6c5f4a639d0fe548495297a4a1efe4c2cd4e891f27a2962bd929baeaf312b4f3a9e0a51b105e470de37a717fd8161ff75759aaa6b48c937d8a DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de -DIST gcc-15.0.0-patches-34.tar.xz 30468 BLAKE2B cabe6a1831d2c9397838853a9a09482591ff9f4ffbc2304099f535b45eadb1cd61f0bd06ca016333c0e537a4481b52d4fbab4463364b49625f999645b1711846 SHA512 3a737d05991b6349eb585ae2861dba5426d11bb3cc46d33af46e8ecb95c842075eb739c858df22e4aa0fa9e3041d415aecf2141382fe9f14809fec4db48a448f -DIST gcc-15.0.0-patches-35.tar.xz 29968 BLAKE2B f662a1768f8766395ae8ad810fa74d4e0965d5cf33e0a2e65e352df1784768f4bd78ac35aa0295981a5c0f93b7041f973edec66bc1ec31fdac50226cbcde9f85 SHA512 9195a42910c47f81cf418dbe0f38e8a00c832e83942c6915fb0b196594c1bc2f0fde6a8b8f62169004190d69831c8981417ad16efd5b8f1dad33d8bf9c262230 -DIST gcc-15.0.0-patches-36.tar.xz 27604 BLAKE2B bc7b7a1a7a906d257f524e04d88004c749c9957b567ea15029141d20ace4d1d62ea953063388e7c59fd64e7641c8d7f2b0ebbd3fb2b342f75de880a934cbe45b SHA512 eddb5d2de413849296e9a637b92b225e4a9f0034ec5db121755a570d02b1ca460c946df9e71e6803e6ad801873f1a5df63273ef527cc32d3800d31eeb2e6e56b -DIST gcc-15.0.0-patches-37.tar.xz 24652 BLAKE2B 9a5f112ffaddf64d161d2ad2229a2ae04445a69d0f5b9ac3c5ab657aaa84fe1bd33fe4b426bfbaba2315faa0e2518f6b6b979d3201e33bb236ce78ec615ce828 SHA512 9be294bc4f79b0e54b946e0a117d81c6a4f15ddfc3d0497cf15ddef038a52c3548a6e31452824e41a7326b0a96d969b4e60b744c6f02ffd42401c604b3d592db -DIST gcc-15.0.0-patches-38.tar.xz 26648 BLAKE2B 87b9cb72886d59091d82969651b54d590dbf7a1ae63bcf127a1753b41bc6165126434a494da8526894fffcf2039884c08f0982481ba563c704911e6ddfe6dfe2 SHA512 b41cad4ec4031ae64ac00e3960a386538a55422d36db0f66bad337dd02b28edb900b9782e0d5a9e6a8083ed80ca5d1d0774bc56899958f4f5df5d0126cdc0160 +DIST gcc-15.0.0-patches-41.tar.xz 33308 BLAKE2B d95b2798837a40380d06818fb047b7a5ea2e5a20de12a760b168c4dbb39c7af6b45621034d17250754f6dbc83dacdd7a75ff41c505b158bcf2090eca678d5f05 SHA512 203bedbab8e5d139ac3421e6347a2aecba48f5757ea524241feff7154eb918dad0c7f9f7505bf9041ab67b7c57170f5ea26f8160af3b268aec2b9a1113325733 +DIST gcc-15.0.0-patches-42.tar.xz 26904 BLAKE2B 21fad98bfa977cb359dfeecec5b35d4470429acf103f99e3519a34f87926225e83257f23eb2983adf68d2a8a3089f7769dedfde7302ef9f55c30b59bba47d1bb SHA512 3ede6bf4c908a179b4b9bf8d281385a6ecf64be481479c88ad0b250b6c93050ff76dd2cf6fc9b12bf8b503a123cad2b8c418abc4ab233524d7bd78e1d9f31009 +DIST gcc-15.0.0-patches-43.tar.xz 25892 BLAKE2B 1d0dbbe277179aefaab20e03bf152ded962c69fe4b3afcdcf7211a71327149977109fe0e8b2bc198ee16a59ab2569d2b698f216712eaa65c2cdb6de209aa1ffb SHA512 ddf3e6d2876c4d567830de91b39acedda280d739f7948ec02d04b409be10d8e1bb41a510d1b5f78b26e79de18aa2b281f9ce2182088b6b514f2f46389af8c22e 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_p20241226.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20241226.ebuild deleted file mode 100644 index e358f3fa935..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20241226.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_PATCH_DEV="sam" -TOOLCHAIN_HAS_TESTS=1 -PATCH_GCC_VER="12.4.0" -PATCH_VER="2" -MUSL_VER="1" -MUSL_GCC_VER="12.4.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 ~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_p20250102.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250116.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250102.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250116.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250109.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250123.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250109.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.4.1_p20250123.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250103.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250117.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250103.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250117.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20241227.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250124.ebuild similarity index 97% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20241227.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250124.ebuild index 9267c223d8b..ac245b9b417 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20241227.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.3.1_p20250124.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20241228.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20241228.ebuild deleted file mode 100644 index 151da1ada0b..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20241228.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_PATCH_DEV="sam" -TOOLCHAIN_HAS_TESTS=1 -PATCH_GCC_VER="14.2.0" -PATCH_VER="7" -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 ~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_p20250104.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250118.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250104.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250118.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250111.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250125.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250111.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-14.2.1_p20250125.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241222.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241222.ebuild deleted file mode 100644 index 89b89fda41e..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241222.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_PATCH_DEV="sam" -TOOLCHAIN_HAS_TESTS=1 -PATCH_GCC_VER="15.0.0" -PATCH_VER="34" -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 ~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_pre20241229.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241229.ebuild deleted file mode 100644 index 4583651aefa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20241229.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -TOOLCHAIN_PATCH_DEV="sam" -TOOLCHAIN_HAS_TESTS=1 -PATCH_GCC_VER="15.0.0" -PATCH_VER="35" -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 ~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_pre20250112.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild index 2cf508700da..e5348afa3ea 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r3.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="37" +PATCH_VER="41" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250105.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250105.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild index 412f864e9df..f6214051280 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250105.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250119.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="36" +PATCH_VER="42" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild similarity index 98% rename from sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild index 155183970e7..bd26365ddc1 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.0_pre20250112-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-15.0.1_pre20250126.ebuild @@ -6,7 +6,7 @@ EAPI=8 TOOLCHAIN_PATCH_DEV="sam" TOOLCHAIN_HAS_TESTS=1 PATCH_GCC_VER="15.0.0" -PATCH_VER="38" +PATCH_VER="43" MUSL_VER="2" MUSL_GCC_VER="15.0.0" PYTHON_COMPAT=( python3_{10..12} ) From 647fca6583be161f29204ad037e5ac24fc4e1859 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:53 +0000 Subject: [PATCH 087/145] sys-devel/gcc-config: Sync with Gentoo It's from Gentoo commit 441e3a94ca3c03af5da861b936b01a81bf24ddb0. --- .../sys-devel/gcc-config/gcc-config-2.12.1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.12.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.12.1.ebuild index 7574d6b5745..5b4fa1e4954 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.12.1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.12.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -8,7 +8,7 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 else SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi DESCRIPTION="Utility to manage compilers" From af5eeb07dbfc86402162a5286822529965de071e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:53 +0000 Subject: [PATCH 088/145] sys-devel/gettext: Sync with Gentoo It's from Gentoo commit 9b38d2c8dfd83c1503ba4ef1b9a5bd48c13871ff. --- .../portage-stable/sys-devel/gettext/gettext-0.22.4-r1.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.22.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.22.4-r1.ebuild index 09b548183e3..ccf20a7219e 100644 --- a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.22.4-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.22.4-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Note: Keep version bumps in sync with dev-libs/libintl. @@ -22,7 +22,7 @@ else mirror://gnu/${PN}/${P}.tar.xz verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) " - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi # Only libasprintf is under the LGPL (and libintl is in a sep package), From 08d7e8b95d452d4cc988909d18f95afa90b392d5 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:55 +0000 Subject: [PATCH 089/145] sys-devel/patch: Sync with Gentoo It's from Gentoo commit 6220e4690c566f46fcda310d89b8ec787a5e5652. --- .../sys-devel/patch/patch-2.7.6-r4.ebuild | 49 ----------- .../sys-devel/patch/patch-2.7.6-r5.ebuild | 84 ------------------- 2 files changed, 133 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r5.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild deleted file mode 100644 index da75e4be075..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/patch.asc -inherit flag-o-matic verify-sig - -DESCRIPTION="Utility to apply diffs to files" -HOMEPAGE="https://www.gnu.org/software/patch/patch.html" -SRC_URI="mirror://gnu/patch/${P}.tar.xz" -SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )" - -LICENSE="GPL-3+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="static test xattr" -RESTRICT="!test? ( test )" - -RDEPEND="xattr? ( sys-apps/attr )" -DEPEND="${RDEPEND}" -BDEPEND="test? ( sys-apps/ed ) - verify-sig? ( sec-keys/openpgp-keys-patch )" - -PATCHES=( - "${FILESDIR}"/${P}-fix-test-suite.patch - "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch - "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch - "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch - "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch -) - -src_configure() { - use static && append-ldflags -static - - local myeconfargs=( - $(use_enable xattr) - ) - # Do not let $ED mess up the search for `ed` 470210. - ac_cv_path_ED=$(type -P ed) \ - econf "${myeconfargs[@]}" -} diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r5.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r5.ebuild deleted file mode 100644 index b2b7026140c..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r5.ebuild +++ /dev/null @@ -1,84 +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/patch.asc -inherit flag-o-matic verify-sig - -DESCRIPTION="Utility to apply diffs to files" -HOMEPAGE="https://www.gnu.org/software/patch/patch.html" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://git.savannah.gnu.org/git/patch.git" - inherit git-r3 -else - SRC_URI="mirror://gnu/patch/${P}.tar.xz" - SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )" - - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -fi - -LICENSE="GPL-3+" -SLOT="0" -IUSE="static test xattr" -RESTRICT="!test? ( test )" - -RDEPEND="xattr? ( sys-apps/attr )" -DEPEND="${RDEPEND}" -BDEPEND=" - test? ( sys-apps/ed ) - verify-sig? ( sec-keys/openpgp-keys-patch ) -" - -PATCHES=( - "${FILESDIR}"/${P}-fix-test-suite.patch - "${FILESDIR}"/${PN}-2.7.6-fix-error-handling-with-git-style-patches.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6951.patch - "${FILESDIR}"/${PN}-2.7.6-allow-input-files-to-be-missing-for-ed-style-patches.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-6952.patch - "${FILESDIR}"/${PN}-2.7.6-Do-not-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINITY.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix1.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2018-1000156-fix2.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13636.patch - "${FILESDIR}"/${PN}-2.7.6-CVE-2019-13638.patch - "${FILESDIR}"/${PN}-2.7.6-Avoid-invalid-memory-access-in-context-format-diffs.patch -) - -src_unpack() { - if [[ ${PV} == 9999 ]] ; then - git-r3_src_unpack - - cd "${S}" || die - ./bootstrap || die - elif use verify-sig ; then - verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} - fi - - default -} - -src_configure() { - use static && append-ldflags -static - - local myeconfargs=( - $(use_enable xattr) - # rename to gpatch for better BSD compatibility - --program-prefix=g - ) - # Do not let $ED mess up the search for `ed` 470210. - ac_cv_path_ED=$(type -P ed) \ - econf "${myeconfargs[@]}" -} - -src_test() { - emake check gl_public_submodule_commit= -} - -src_install() { - default - - # symlink to the standard name - dosym gpatch /usr/bin/patch - dosym gpatch.1 /usr/share/man/man1/patch.1 -} From 73825a0a55cf5c99b74b762c8fe04386d11e994b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:57 +0000 Subject: [PATCH 090/145] sys-fs/btrfs-progs: Sync with Gentoo It's from Gentoo commit 63c85b514517675857be0d5416f2f432ff0f04ea. --- .../sys-fs/btrfs-progs/Manifest | 8 - .../btrfs-progs/btrfs-progs-6.10.1.ebuild | 188 ------------------ .../btrfs-progs/btrfs-progs-6.10.ebuild | 188 ------------------ .../btrfs-progs/btrfs-progs-6.11.ebuild | 188 ------------------ .../btrfs-progs/btrfs-progs-6.9.2.ebuild | 188 ------------------ 5 files changed, 760 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.11.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/Manifest index 374dde7eb99..06b1e86b205 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/Manifest @@ -1,10 +1,2 @@ -DIST btrfs-progs-v6.10.1.tar.sign 566 BLAKE2B dc18c0048716e422475c6630c26c74e09b3595fb8c5c1a1826464eb837d16edfe7d5fa1f418631ae4d380b24bc3fb91fa79ba1e9b1d42a2534838558362ddc18 SHA512 a8a1805ab22feda9f0535841d44120200e48d6d3762ae98f3323be09c9bd7905ff69f21066a8de1fe5cb34a3113879b73ae030a74ccc74737f06dafb32093375 -DIST btrfs-progs-v6.10.1.tar.xz 2670604 BLAKE2B 7a2631b8462bb02be0936861a42b868907bd4f4e365293f9c95744b963e769b81248ba0a290fca517d689ff9f93d8709cc37e217264b2dac1469a47349f97e8c SHA512 cd10747d1f5f9377abfdf209b517791d3eb13b417c0be65fd5c0c044b01063125b4176c178345387bb3deda7a3a379953f31d46d7834854455a5dbfbf967aa97 -DIST btrfs-progs-v6.10.tar.sign 566 BLAKE2B 493260b4854616eabce943135b4990de4a724ad00f8cba43e9d864e5c67e5896890831d17c742456d422ed15267a753c4eaf18ac30a4c7c3da0b254b01becf8b SHA512 62d9721702eec6eec2c0e51eee4624324c4604d3bc76016cde1ade0572c22b46ede71fcb3d9e4ca14ea0196e84116ce4ef9222b399f8bbdf8e5259c18f3a82e8 -DIST btrfs-progs-v6.10.tar.xz 2669760 BLAKE2B 24b66cc6f7118da817e9abca69e8de9a9496de1ec4eb6800fa8f6b13b677e37a553d90562a38618a63b68b71457ab10ff72541dd3e0c169a1fe05509fd62402c SHA512 aa5af67f3816dcd1a128b69bc6f4bd83423c6c2289e3dd3abe2a07bdccb6b7d5e49426a5a0ece643709c23cdcb0908ca52b271f058fee3a3d810cdfcb9c36639 -DIST btrfs-progs-v6.11.tar.sign 566 BLAKE2B 15db44b5db3265eff9d5195ad4842cef5d001c46e1170f219784fca8d049756dccbc1bd95f20fc343fbdf1078c610a166921c043828cdc5f64c0f465323ca0e4 SHA512 a2fdd9100ad3ddd30cb923a72a2b4f70634277e5fbbf0d2cf912c00dc876dad6cd2c24e624f41dbb83aabdda4e3c08aea9c0ae39084bb3481700491df3d47fd5 -DIST btrfs-progs-v6.11.tar.xz 2695752 BLAKE2B 6dec219394e39a821f29858eddf1d501537d3cebad2dc83f0cea6d88d0b0e94c4fe2e660a48a27942ccfb6f3ac0630d5930f44e083168de65b60af36e895b2af SHA512 fad3c7e908e2020a3983f9737a7e87367023e2ad35aea14197e2bfa71c1e0435bc3da3f7e6ef463de47c033323163f8b1b7933013042c6fcea673d0f4723ade1 DIST btrfs-progs-v6.12.tar.sign 566 BLAKE2B 3a32b52522acd9e2fcf34cbf90d91ca2491ae1b34142320b987084a60c9f6c13100fcfb554f877c0f659b60415234550c05d980c633015cd8d083df18521187a SHA512 86396dad38f15c19eb4b641632deb99073829896001b71fbdfaa3ebd11468e8b89ed324e563ec9db837c9095501227824f97085347dca4204cbaecceed9da7d3 DIST btrfs-progs-v6.12.tar.xz 2705336 BLAKE2B d1569ec7b2079a43ac370c3a7e9f1b37a06545675753490f16d6a7bb52281f76df39f924c96569a1c75daa8a998f251c5219e2f09a54cb94c42cba1db3cf43ca SHA512 57da37f460a33b5f5232a5c8e67eb5976fb13483a1437112bd433b179bc0e497a1aadfe24705eb4fb4e0a98d2a33fd3c46808b3ca161421475442a70b964c446 -DIST btrfs-progs-v6.9.2.tar.sign 566 BLAKE2B 4cd95496d355444c7d3e582a7e6c05fbb55683008b1585a26f38aef6cceb1afd5e80c9611518d6bd92dc1167798d4012c4bcab2f9bda752c459d94cfa6f3c477 SHA512 3fb04e1894e231abde388a39d2f0c90f43c1a1494622c2158fab9b94bb340e064404bcf96e24d913c60aaf5e06ade42fbb91a479949109b329682bb089f66bf2 -DIST btrfs-progs-v6.9.2.tar.xz 2661684 BLAKE2B 38ab189ac8271ba8d68b74e82569159c671cca1cb946f56ccab28b6b206cb6ee5b330d83afc3536b7e0d7399da3fb01e368809c1ef4a64b843ea88796ebd28bd SHA512 1df9d5456d07a035c38c17795996a4fc621eeaa244ef54383d4387205826d2a6e971910e55031d20bb1baf23193efa7439e110312ffd8471f07aaf8c0baca20a diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.1.ebuild deleted file mode 100644 index 89de2ab69fa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.1.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2008-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-python/btrfsutil - -PYTHON_COMPAT=( python3_{10..13} ) -inherit bash-completion-r1 python-any-r1 udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" - WANT_LIBTOOL="none" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dsterba.asc - inherit verify-sig - - MY_PV="v${PV/_/-}" - MY_P="${PN}-${MY_PV}" - SRC_URI=" - https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.xz - verify-sig? ( https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.sign ) - " - S="${WORKDIR}"/${PN}-${MY_PV} - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" - fi -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.readthedocs.io/en/latest/" - -LICENSE="GPL-2" -SLOT="0/0" # libbtrfs soname -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 )" - -# Tries to mount repaired filesystems -RESTRICT="test" - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:=[static-libs(+)?] - sys-libs/zlib:= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - udev? ( virtual/libudev:= ) - zstd? ( app-arch/zstd:= ) -" -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd[static-libs(+)] ) - ) -" -BDEPEND=" - virtual/pkgconfig - man? ( - $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]') - ) -" - -python_check_deps() { - python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" -} - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -else - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-dsterba )" -fi - -pkg_setup() { - : # Prevent python-any-r1_python_setup -} - -if [[ ${PV} != 9999 ]]; then - src_unpack() { - # Upstream sign the decompressed .tar - if use verify-sig; then - einfo "Unpacking ${MY_P}.tar.xz ..." - verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ - < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) - assert "Unpack failed" - else - default - fi - } -fi - -src_prepare() { - default - - if [[ ${PV} == 9999 ]]; then - local AT_M4DIR=config - eautoreconf - - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - - --enable-lzo - $(use_enable experimental) - --disable-python - $(use_enable convert) - $(use_enable man documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable static-libs static) - $(use_enable udev libudev) - $(use_enable zstd) - - # Could support libgcrypt, libsodium, libkcapi, openssl, botan - --with-crypto=builtin - --with-convert=ext2$(usev reiserfs ',reiserfs') - ) - - export EXTRA_PYTHON_CFLAGS="${CFLAGS}" - export EXTRA_PYTHON_LDFLAGS="${LDFLAGS}" - - if use man; then - python_setup - fi - - # bash as a temporary workaround for https://github.com/kdave/btrfs-progs/pull/721 - CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_test() { - emake V=1 -j1 -C tests test -} - -src_install() { - local makeargs=( - $(usev static install-static) - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - if use experimental; then - exeinto /sbin - doexe btrfs-corrupt-block - fi - - newbashcomp btrfs-completion btrfs -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.ebuild deleted file mode 100644 index 757755270ab..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.10.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2008-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-python/btrfsutil - -PYTHON_COMPAT=( python3_{10..13} ) -inherit bash-completion-r1 python-any-r1 udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" - WANT_LIBTOOL="none" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dsterba.asc - inherit verify-sig - - MY_PV="v${PV/_/-}" - MY_P="${PN}-${MY_PV}" - SRC_URI=" - https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.xz - verify-sig? ( https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.sign ) - " - S="${WORKDIR}"/${PN}-${MY_PV} - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" - fi -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.readthedocs.io/en/latest/" - -LICENSE="GPL-2" -SLOT="0/0" # libbtrfs soname -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 )" - -# Tries to mount repaired filesystems -RESTRICT="test" - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:=[static-libs(+)?] - sys-libs/zlib:= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - udev? ( virtual/libudev:= ) - zstd? ( app-arch/zstd:= ) -" -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd[static-libs(+)] ) - ) -" -BDEPEND=" - virtual/pkgconfig - man? ( - $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]') - ) -" - -python_check_deps() { - python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" -} - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -else - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-dsterba )" -fi - -pkg_setup() { - : # Prevent python-any-r1_python_setup -} - -if [[ ${PV} != 9999 ]]; then - src_unpack() { - # Upstream sign the decompressed .tar - if use verify-sig; then - einfo "Unpacking ${MY_P}.tar.xz ..." - verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ - < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) - assert "Unpack failed" - else - default - fi - } -fi - -src_prepare() { - default - - if [[ ${PV} == 9999 ]]; then - local AT_M4DIR=config - eautoreconf - - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - - --enable-lzo - $(use_enable experimental) - --disable-python - $(use_enable convert) - $(use_enable man documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable static-libs static) - $(use_enable udev libudev) - $(use_enable zstd) - - # Could support libgcrypt, libsodium, libkcapi, openssl, botan - --with-crypto=builtin - --with-convert=ext2$(usev reiserfs ',reiserfs') - ) - - export EXTRA_PYTHON_CFLAGS="${CFLAGS}" - export EXTRA_PYTHON_LDFLAGS="${LDFLAGS}" - - if use man; then - python_setup - fi - - # bash as a temporary workaround for https://github.com/kdave/btrfs-progs/pull/721 - CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_test() { - emake V=1 -j1 -C tests test -} - -src_install() { - local makeargs=( - $(usev static install-static) - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - if use experimental; then - exeinto /sbin - doexe btrfs-corrupt-block - fi - - newbashcomp btrfs-completion btrfs -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.11.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.11.ebuild deleted file mode 100644 index 89de2ab69fa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.11.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2008-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-python/btrfsutil - -PYTHON_COMPAT=( python3_{10..13} ) -inherit bash-completion-r1 python-any-r1 udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" - WANT_LIBTOOL="none" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dsterba.asc - inherit verify-sig - - MY_PV="v${PV/_/-}" - MY_P="${PN}-${MY_PV}" - SRC_URI=" - https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.xz - verify-sig? ( https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.sign ) - " - S="${WORKDIR}"/${PN}-${MY_PV} - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" - fi -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.readthedocs.io/en/latest/" - -LICENSE="GPL-2" -SLOT="0/0" # libbtrfs soname -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 )" - -# Tries to mount repaired filesystems -RESTRICT="test" - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:=[static-libs(+)?] - sys-libs/zlib:= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - udev? ( virtual/libudev:= ) - zstd? ( app-arch/zstd:= ) -" -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd[static-libs(+)] ) - ) -" -BDEPEND=" - virtual/pkgconfig - man? ( - $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]') - ) -" - -python_check_deps() { - python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" -} - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -else - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-dsterba )" -fi - -pkg_setup() { - : # Prevent python-any-r1_python_setup -} - -if [[ ${PV} != 9999 ]]; then - src_unpack() { - # Upstream sign the decompressed .tar - if use verify-sig; then - einfo "Unpacking ${MY_P}.tar.xz ..." - verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ - < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) - assert "Unpack failed" - else - default - fi - } -fi - -src_prepare() { - default - - if [[ ${PV} == 9999 ]]; then - local AT_M4DIR=config - eautoreconf - - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - - --enable-lzo - $(use_enable experimental) - --disable-python - $(use_enable convert) - $(use_enable man documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable static-libs static) - $(use_enable udev libudev) - $(use_enable zstd) - - # Could support libgcrypt, libsodium, libkcapi, openssl, botan - --with-crypto=builtin - --with-convert=ext2$(usev reiserfs ',reiserfs') - ) - - export EXTRA_PYTHON_CFLAGS="${CFLAGS}" - export EXTRA_PYTHON_LDFLAGS="${LDFLAGS}" - - if use man; then - python_setup - fi - - # bash as a temporary workaround for https://github.com/kdave/btrfs-progs/pull/721 - CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_test() { - emake V=1 -j1 -C tests test -} - -src_install() { - local makeargs=( - $(usev static install-static) - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - if use experimental; then - exeinto /sbin - doexe btrfs-corrupt-block - fi - - newbashcomp btrfs-completion btrfs -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} 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 deleted file mode 100644 index 89de2ab69fa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/btrfs-progs/btrfs-progs-6.9.2.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 2008-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Please bump with dev-python/btrfsutil - -PYTHON_COMPAT=( python3_{10..13} ) -inherit bash-completion-r1 python-any-r1 udev - -if [[ ${PV} == 9999 ]]; then - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" - WANT_LIBTOOL="none" - inherit autotools git-r3 -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dsterba.asc - inherit verify-sig - - MY_PV="v${PV/_/-}" - MY_P="${PN}-${MY_PV}" - SRC_URI=" - https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.xz - verify-sig? ( https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/${PN}/${MY_P}.tar.sign ) - " - S="${WORKDIR}"/${PN}-${MY_PV} - - if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86" - fi -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.readthedocs.io/en/latest/" - -LICENSE="GPL-2" -SLOT="0/0" # libbtrfs soname -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 )" - -# Tries to mount repaired filesystems -RESTRICT="test" - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:=[static-libs(+)?] - sys-libs/zlib:= - convert? ( - sys-fs/e2fsprogs:= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - udev? ( virtual/libudev:= ) - zstd? ( app-arch/zstd:= ) -" -DEPEND=" - ${RDEPEND} - >=sys-kernel/linux-headers-5.10 - convert? ( sys-apps/acl ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd[static-libs(+)] ) - ) -" -BDEPEND=" - virtual/pkgconfig - man? ( - $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]') - ) -" - -python_check_deps() { - python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && - python_has_version "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" -} - -if [[ ${PV} == 9999 ]]; then - BDEPEND+=" sys-devel/gnuconfig" -else - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-dsterba )" -fi - -pkg_setup() { - : # Prevent python-any-r1_python_setup -} - -if [[ ${PV} != 9999 ]]; then - src_unpack() { - # Upstream sign the decompressed .tar - if use verify-sig; then - einfo "Unpacking ${MY_P}.tar.xz ..." - verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \ - < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -xf -)) - assert "Unpack failed" - else - default - fi - } -fi - -src_prepare() { - default - - if [[ ${PV} == 9999 ]]; then - local AT_M4DIR=config - eautoreconf - - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${BROOT}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - - --enable-lzo - $(use_enable experimental) - --disable-python - $(use_enable convert) - $(use_enable man documentation) - $(use_enable elibc_glibc backtrace) - $(use_enable static-libs static) - $(use_enable udev libudev) - $(use_enable zstd) - - # Could support libgcrypt, libsodium, libkcapi, openssl, botan - --with-crypto=builtin - --with-convert=ext2$(usev reiserfs ',reiserfs') - ) - - export EXTRA_PYTHON_CFLAGS="${CFLAGS}" - export EXTRA_PYTHON_LDFLAGS="${LDFLAGS}" - - if use man; then - python_setup - fi - - # bash as a temporary workaround for https://github.com/kdave/btrfs-progs/pull/721 - CONFIG_SHELL="${BROOT}"/bin/bash econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_test() { - emake V=1 -j1 -C tests test -} - -src_install() { - local makeargs=( - $(usev static install-static) - ) - - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - - if use experimental; then - exeinto /sbin - doexe btrfs-corrupt-block - fi - - newbashcomp btrfs-completion btrfs -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} From 1c39f3e56292a884b7e4afdb5d6bf37275c83f44 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:57 +0000 Subject: [PATCH 091/145] sys-fs/cryptsetup: Sync with Gentoo It's from Gentoo commit eb263e2bbb3934be6971395706ca5cafe9552661. --- .../portage-stable/sys-fs/cryptsetup/Manifest | 4 - .../sys-fs/cryptsetup/cryptsetup-2.6.1.ebuild | 148 ----------------- .../sys-fs/cryptsetup/cryptsetup-2.7.2.ebuild | 149 ------------------ .../sys-fs/cryptsetup/cryptsetup-2.7.3.ebuild | 149 ------------------ .../sys-fs/cryptsetup/cryptsetup-2.7.4.ebuild | 149 ------------------ .../cryptsetup/cryptsetup-2.7.5-r1.ebuild | 2 +- 6 files changed, 1 insertion(+), 600 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.6.1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.2.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.3.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/Manifest index 9bbd8064cf1..a39f73cf854 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/Manifest @@ -1,5 +1 @@ -DIST cryptsetup-2.6.1.tar.xz 11402380 BLAKE2B efd7a64d89d863876de68ff3e89d8c94ad5eca6a8d2236c52c234fbe51e9d9ee303a0c7fe7dac7df10e0062003b9c0aeddc8dc342582106c157ab2d1e742155e SHA512 0cbddbf33cbac2b834ed7e2dd47a9fc787131031a1c729f373f5c974600a838097e9cc0555f13719fc79c384a2a34b404f94ba4cc2f35f0bb1d70aef2233fd18 -DIST cryptsetup-2.7.2.tar.xz 11637316 BLAKE2B 466d7818cf8b6e23f802291ccad205d09f128572c21a85d6ca8e518d2198e49c9d95066c58560ffcb7df5a483aa27592b0e931db1e4daeabd102db9a5543da20 SHA512 06f42f443b91d1f8af8af999dfedd4051ecb12ba5ef291cf2b44b6a5676e2c5cf1e686e19687f5cb6b1fd524dfc1a208cd25a3798367a480d80eac954aa8d6d4 -DIST cryptsetup-2.7.3.tar.xz 11689300 BLAKE2B 6de2c5eb4a0e1108eedb9c81c69ef70696b166ee592641927a0f8e11e566d644e0f7db3436b0446d5df33b3fab55af9592b869bb54d5fa94e67c5003404bc9b8 SHA512 08cff21873aeb7cc5b2561abf5d33cdf0fa814eeaabf6a01f858461726ea9faeef651357da33bce7b347ca2f12d6d02bccdb279893f3749cb781ce1fe5c1571c -DIST cryptsetup-2.7.4.tar.xz 11695292 BLAKE2B a7e9397342482e83a21177699aedbd7a59c2f841512cdf9c8fdcec34d8d448056b2aca89cceae55e8d01654cf5a6ea260ec44879fc7b7fd15fe613c0ad95bc6a SHA512 3cc601ab1c4d5fd282f990529d7cb95f59c8aa9beb0ebd11de7ebf78cb35c352bcb8c945a2033cb6c53540b37156fdf2824070d431c752f9f7b029e4ec930c21 DIST cryptsetup-2.7.5.tar.xz 11697476 BLAKE2B 7df7b53f74cbf1a009d2804b8d85c9fea27be994bb4171e1ded70e3666635fd8f265819321bee0d1977548626029ebf75b87225a68cb38b3b79910f991c813dd SHA512 13eca93cdb00a143d2ca60b6f66ede5adc4072ca0c4bfebd8454a3541e69d269fcdb4afc97ad799e87a999b2bd46c1f31fa924a3d616d72a3337970b1e718d55 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.6.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.6.1.ebuild deleted file mode 100644 index 12b1d328736..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.6.1.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit linux-info tmpfiles - -DESCRIPTION="Tool to setup encrypted devices with dm-crypt" -HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup" -SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz" -S="${WORKDIR}"/${P/_/-} - -LICENSE="GPL-2+" -SLOT="0/12" # libcryptsetup.so version -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" -# we don't support nss since it doesn't allow cryptsetup to be built statically -# and it's missing ripemd160 support so it can't provide full backward compatibility -IUSE="${CRYPTO_BACKENDS} +argon2 fips nls pwquality ssh static static-libs test +udev urandom" -RESTRICT="!test? ( test )" -# bug #496612, bug #832711, bug #843863 -REQUIRED_USE=" - ^^ ( ${CRYPTO_BACKENDS//+/} ) - static? ( !gcrypt !ssh !udev !fips ) - fips? ( !kernel !nettle ) -" - -LIB_DEPEND=" - dev-libs/json-c:=[static-libs(+)] - dev-libs/popt[static-libs(+)] - >=sys-apps/util-linux-2.31-r1[static-libs(+)] - argon2? ( app-crypt/argon2:=[static-libs(+)] ) - gcrypt? ( - dev-libs/libgcrypt:0=[static-libs(+)] - dev-libs/libgpg-error[static-libs(+)] - ) - nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) - openssl? ( dev-libs/openssl:0=[static-libs(+)] ) - pwquality? ( dev-libs/libpwquality[static-libs(+)] ) - ssh? ( net-libs/libssh[static-libs(+)] ) - sys-fs/lvm2[static-libs(+)] -" -# We have to always depend on ${LIB_DEPEND} rather than put behind -# !static? () because we provide a shared library which links against -# these other packages. bug #414665 -RDEPEND=" - static-libs? ( ${LIB_DEPEND} ) - ${LIB_DEPEND//\[static-libs\([+-]\)\]} - udev? ( virtual/libudev:= ) -" -DEPEND=" - ${RDEPEND} - static? ( ${LIB_DEPEND} ) -" -# vim-core needed for xxd in tests -BDEPEND=" - virtual/pkgconfig - test? ( app-editors/vim-core ) -" - -pkg_setup() { - local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" - local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n" - local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n" - check_extra_config -} - -src_prepare() { - default - - sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die -} - -src_configure() { - local myeconfargs=( - --disable-internal-argon2 - --disable-asciidoc - --enable-shared - --sbindir="${EPREFIX}"/sbin - # for later use - --with-default-luks-format=LUKS2 - --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d" - --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) - $(use_enable argon2 libargon2) - $(use_enable nls) - $(use_enable pwquality) - $(use_enable !static external-tokens) - $(use_enable static static-cryptsetup) - $(use_enable static-libs static) - $(use_enable udev) - $(use_enable !urandom dev-random) - $(use_enable ssh ssh-token) - $(usev !argon2 '--with-luks2-pbkdf=pbkdf2') - $(use_enable fips) - ) - - econf "${myeconfargs[@]}" -} - -src_test() { - if [[ ! -e /dev/mapper/control ]] ; then - ewarn "No /dev/mapper/control found -- skipping tests" - return 0 - fi - - local p - for p in /dev/mapper /dev/loop* ; do - addwrite ${p} - done - - default -} - -src_install() { - default - - if use static ; then - mv "${ED}"/sbin/cryptsetup{.static,} || die - mv "${ED}"/sbin/veritysetup{.static,} || die - mv "${ED}"/sbin/integritysetup{.static,} || die - - if use ssh ; then - mv "${ED}"/sbin/cryptsetup-ssh{.static,} || die - fi - fi - - find "${ED}" -type f -name "*.la" -delete || die - - dodoc docs/v*ReleaseNotes - - newconfd "${FILESDIR}"/2.4.3-dmcrypt.confd dmcrypt - newinitd "${FILESDIR}"/2.4.3-dmcrypt.rc dmcrypt -} - -pkg_postinst() { - tmpfiles_process cryptsetup.conf - - if use kernel ; then - ewarn "Note that kernel backend is very slow for this type of operation" - ewarn "and is provided mainly for embedded systems wanting to avoid" - ewarn "userspace crypto libraries." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.2.ebuild deleted file mode 100644 index 10ac2ba5d83..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.2.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# TODO: meson -inherit linux-info tmpfiles - -DESCRIPTION="Tool to setup encrypted devices with dm-crypt" -HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup" -SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz" -S="${WORKDIR}"/${P/_/-} - -LICENSE="GPL-2+" -SLOT="0/12" # libcryptsetup.so version -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" -# we don't support nss since it doesn't allow cryptsetup to be built statically -# and it's missing ripemd160 support so it can't provide full backward compatibility -IUSE="${CRYPTO_BACKENDS} +argon2 fips nls pwquality ssh static static-libs test +udev urandom" -RESTRICT="!test? ( test )" -# bug #496612, bug #832711, bug #843863 -REQUIRED_USE=" - ^^ ( ${CRYPTO_BACKENDS//+/} ) - static? ( !gcrypt !ssh !udev !fips ) - fips? ( !kernel !nettle ) -" - -LIB_DEPEND=" - dev-libs/json-c:=[static-libs(+)] - dev-libs/popt[static-libs(+)] - >=sys-apps/util-linux-2.31-r1[static-libs(+)] - argon2? ( app-crypt/argon2:=[static-libs(+)] ) - gcrypt? ( - dev-libs/libgcrypt:0=[static-libs(+)] - dev-libs/libgpg-error[static-libs(+)] - ) - nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) - openssl? ( dev-libs/openssl:0=[static-libs(+)] ) - pwquality? ( dev-libs/libpwquality[static-libs(+)] ) - ssh? ( net-libs/libssh[static-libs(+)] ) - sys-fs/lvm2[static-libs(+)] -" -# We have to always depend on ${LIB_DEPEND} rather than put behind -# !static? () because we provide a shared library which links against -# these other packages. bug #414665 -RDEPEND=" - static-libs? ( ${LIB_DEPEND} ) - ${LIB_DEPEND//\[static-libs\([+-]\)\]} - udev? ( virtual/libudev:= ) -" -DEPEND=" - ${RDEPEND} - static? ( ${LIB_DEPEND} ) -" -# vim-core needed for xxd in tests -BDEPEND=" - virtual/pkgconfig - test? ( app-editors/vim-core ) -" - -pkg_setup() { - local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" - local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n" - local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n" - check_extra_config -} - -src_prepare() { - default - - sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die -} - -src_configure() { - local myeconfargs=( - --disable-internal-argon2 - --disable-asciidoc - --enable-shared - --sbindir="${EPREFIX}"/sbin - # for later use - --with-default-luks-format=LUKS2 - --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d" - --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) - $(use_enable argon2 libargon2) - $(use_enable nls) - $(use_enable pwquality) - $(use_enable !static external-tokens) - $(use_enable static static-cryptsetup) - $(use_enable static-libs static) - $(use_enable udev) - $(use_enable !urandom dev-random) - $(use_enable ssh ssh-token) - $(usev !argon2 '--with-luks2-pbkdf=pbkdf2') - $(use_enable fips) - ) - - econf "${myeconfargs[@]}" -} - -src_test() { - if [[ ! -e /dev/mapper/control ]] ; then - ewarn "No /dev/mapper/control found -- skipping tests" - return 0 - fi - - local p - for p in /dev/mapper /dev/loop* ; do - addwrite ${p} - done - - default -} - -src_install() { - default - - if use static ; then - mv "${ED}"/sbin/cryptsetup{.static,} || die - mv "${ED}"/sbin/veritysetup{.static,} || die - mv "${ED}"/sbin/integritysetup{.static,} || die - - if use ssh ; then - mv "${ED}"/sbin/cryptsetup-ssh{.static,} || die - fi - fi - - find "${ED}" -type f -name "*.la" -delete || die - - dodoc docs/v*ReleaseNotes - - newconfd "${FILESDIR}"/2.4.3-dmcrypt.confd dmcrypt - newinitd "${FILESDIR}"/2.4.3-dmcrypt.rc dmcrypt -} - -pkg_postinst() { - tmpfiles_process cryptsetup.conf - - if use kernel ; then - ewarn "Note that kernel backend is very slow for this type of operation" - ewarn "and is provided mainly for embedded systems wanting to avoid" - ewarn "userspace crypto libraries." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.3.ebuild deleted file mode 100644 index 729d59ff8f6..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.3.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# TODO: meson -inherit linux-info tmpfiles - -DESCRIPTION="Tool to setup encrypted devices with dm-crypt" -HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup" -SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz" -S="${WORKDIR}"/${P/_/-} - -LICENSE="GPL-2+" -SLOT="0/12" # libcryptsetup.so version -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi - -CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" -# we don't support nss since it doesn't allow cryptsetup to be built statically -# and it's missing ripemd160 support so it can't provide full backward compatibility -IUSE="${CRYPTO_BACKENDS} +argon2 fips nls pwquality ssh static static-libs test +udev urandom" -RESTRICT="!test? ( test )" -# bug #496612, bug #832711, bug #843863 -REQUIRED_USE=" - ^^ ( ${CRYPTO_BACKENDS//+/} ) - static? ( !ssh !udev !fips ) - fips? ( !kernel !nettle ) -" - -LIB_DEPEND=" - dev-libs/json-c:=[static-libs(+)] - dev-libs/popt[static-libs(+)] - >=sys-apps/util-linux-2.31-r1[static-libs(+)] - argon2? ( app-crypt/argon2:=[static-libs(+)] ) - gcrypt? ( - dev-libs/libgcrypt:0=[static-libs(+)] - dev-libs/libgpg-error[static-libs(+)] - ) - nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) - openssl? ( dev-libs/openssl:0=[static-libs(+)] ) - pwquality? ( dev-libs/libpwquality[static-libs(+)] ) - ssh? ( net-libs/libssh[static-libs(+)] ) - sys-fs/lvm2[static-libs(+)] -" -# We have to always depend on ${LIB_DEPEND} rather than put behind -# !static? () because we provide a shared library which links against -# these other packages. bug #414665 -RDEPEND=" - static-libs? ( ${LIB_DEPEND} ) - ${LIB_DEPEND//\[static-libs\([+-]\)\]} - udev? ( virtual/libudev:= ) -" -DEPEND=" - ${RDEPEND} - static? ( ${LIB_DEPEND} ) -" -# vim-core needed for xxd in tests -BDEPEND=" - virtual/pkgconfig - test? ( app-editors/vim-core ) -" - -pkg_setup() { - local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" - local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n" - local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n" - check_extra_config -} - -src_prepare() { - default - - sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die -} - -src_configure() { - local myeconfargs=( - --disable-internal-argon2 - --disable-asciidoc - --enable-shared - --sbindir="${EPREFIX}"/sbin - # for later use - --with-default-luks-format=LUKS2 - --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d" - --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) - $(use_enable argon2 libargon2) - $(use_enable nls) - $(use_enable pwquality) - $(use_enable !static external-tokens) - $(use_enable static static-cryptsetup) - $(use_enable static-libs static) - $(use_enable udev) - $(use_enable !urandom dev-random) - $(use_enable ssh ssh-token) - $(usev !argon2 '--with-luks2-pbkdf=pbkdf2') - $(use_enable fips) - ) - - econf "${myeconfargs[@]}" -} - -src_test() { - if [[ ! -e /dev/mapper/control ]] ; then - ewarn "No /dev/mapper/control found -- skipping tests" - return 0 - fi - - local p - for p in /dev/mapper /dev/loop* ; do - addwrite ${p} - done - - default -} - -src_install() { - default - - if use static ; then - mv "${ED}"/sbin/cryptsetup{.static,} || die - mv "${ED}"/sbin/veritysetup{.static,} || die - mv "${ED}"/sbin/integritysetup{.static,} || die - - if use ssh ; then - mv "${ED}"/sbin/cryptsetup-ssh{.static,} || die - fi - fi - - find "${ED}" -type f -name "*.la" -delete || die - - dodoc docs/v*ReleaseNotes - - newconfd "${FILESDIR}"/2.4.3-dmcrypt.confd dmcrypt - newinitd "${FILESDIR}"/2.4.3-dmcrypt.rc dmcrypt -} - -pkg_postinst() { - tmpfiles_process cryptsetup.conf - - if use kernel ; then - ewarn "Note that kernel backend is very slow for this type of operation" - ewarn "and is provided mainly for embedded systems wanting to avoid" - ewarn "userspace crypto libraries." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.4.ebuild deleted file mode 100644 index 729d59ff8f6..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.4.ebuild +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# TODO: meson -inherit linux-info tmpfiles - -DESCRIPTION="Tool to setup encrypted devices with dm-crypt" -HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup" -SRC_URI="https://www.kernel.org/pub/linux/utils/${PN}/v$(ver_cut 1-2)/${P/_/-}.tar.xz" -S="${WORKDIR}"/${P/_/-} - -LICENSE="GPL-2+" -SLOT="0/12" # libcryptsetup.so version -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -fi - -CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" -# we don't support nss since it doesn't allow cryptsetup to be built statically -# and it's missing ripemd160 support so it can't provide full backward compatibility -IUSE="${CRYPTO_BACKENDS} +argon2 fips nls pwquality ssh static static-libs test +udev urandom" -RESTRICT="!test? ( test )" -# bug #496612, bug #832711, bug #843863 -REQUIRED_USE=" - ^^ ( ${CRYPTO_BACKENDS//+/} ) - static? ( !ssh !udev !fips ) - fips? ( !kernel !nettle ) -" - -LIB_DEPEND=" - dev-libs/json-c:=[static-libs(+)] - dev-libs/popt[static-libs(+)] - >=sys-apps/util-linux-2.31-r1[static-libs(+)] - argon2? ( app-crypt/argon2:=[static-libs(+)] ) - gcrypt? ( - dev-libs/libgcrypt:0=[static-libs(+)] - dev-libs/libgpg-error[static-libs(+)] - ) - nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] ) - openssl? ( dev-libs/openssl:0=[static-libs(+)] ) - pwquality? ( dev-libs/libpwquality[static-libs(+)] ) - ssh? ( net-libs/libssh[static-libs(+)] ) - sys-fs/lvm2[static-libs(+)] -" -# We have to always depend on ${LIB_DEPEND} rather than put behind -# !static? () because we provide a shared library which links against -# these other packages. bug #414665 -RDEPEND=" - static-libs? ( ${LIB_DEPEND} ) - ${LIB_DEPEND//\[static-libs\([+-]\)\]} - udev? ( virtual/libudev:= ) -" -DEPEND=" - ${RDEPEND} - static? ( ${LIB_DEPEND} ) -" -# vim-core needed for xxd in tests -BDEPEND=" - virtual/pkgconfig - test? ( app-editors/vim-core ) -" - -pkg_setup() { - local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC ~CRYPTO_SHA256" - local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_SHA256="CONFIG_CRYPTO_SHA256:\tis not set (required for cryptsetup)\n" - local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n" - local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n" - check_extra_config -} - -src_prepare() { - default - - sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die -} - -src_configure() { - local myeconfargs=( - --disable-internal-argon2 - --disable-asciidoc - --enable-shared - --sbindir="${EPREFIX}"/sbin - # for later use - --with-default-luks-format=LUKS2 - --with-tmpfilesdir="${EPREFIX}/usr/lib/tmpfiles.d" - --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done) - $(use_enable argon2 libargon2) - $(use_enable nls) - $(use_enable pwquality) - $(use_enable !static external-tokens) - $(use_enable static static-cryptsetup) - $(use_enable static-libs static) - $(use_enable udev) - $(use_enable !urandom dev-random) - $(use_enable ssh ssh-token) - $(usev !argon2 '--with-luks2-pbkdf=pbkdf2') - $(use_enable fips) - ) - - econf "${myeconfargs[@]}" -} - -src_test() { - if [[ ! -e /dev/mapper/control ]] ; then - ewarn "No /dev/mapper/control found -- skipping tests" - return 0 - fi - - local p - for p in /dev/mapper /dev/loop* ; do - addwrite ${p} - done - - default -} - -src_install() { - default - - if use static ; then - mv "${ED}"/sbin/cryptsetup{.static,} || die - mv "${ED}"/sbin/veritysetup{.static,} || die - mv "${ED}"/sbin/integritysetup{.static,} || die - - if use ssh ; then - mv "${ED}"/sbin/cryptsetup-ssh{.static,} || die - fi - fi - - find "${ED}" -type f -name "*.la" -delete || die - - dodoc docs/v*ReleaseNotes - - newconfd "${FILESDIR}"/2.4.3-dmcrypt.confd dmcrypt - newinitd "${FILESDIR}"/2.4.3-dmcrypt.rc dmcrypt -} - -pkg_postinst() { - tmpfiles_process cryptsetup.conf - - if use kernel ; then - ewarn "Note that kernel backend is very slow for this type of operation" - ewarn "and is provided mainly for embedded systems wanting to avoid" - ewarn "userspace crypto libraries." - fi -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.5-r1.ebuild index f2c5d6b2330..010d7b023ed 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.5-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/cryptsetup/cryptsetup-2.7.5-r1.ebuild @@ -14,7 +14,7 @@ S="${WORKDIR}"/${P/_/-} LICENSE="GPL-2+" SLOT="0/12" # libcryptsetup.so version if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi CRYPTO_BACKENDS="gcrypt kernel nettle +openssl" From 7051118700bf45a3acc79af604339f87d1ef1a4e Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:10:59 +0000 Subject: [PATCH 092/145] sys-fs/e2fsprogs: Sync with Gentoo It's from Gentoo commit b61ffcd8b3c7c7b979eba18e831bcc2ca87b00aa. --- .../portage-stable/sys-fs/e2fsprogs/Manifest | 1 - .../e2fsprogs/e2fsprogs-1.47.0-r3.ebuild | 170 ------------------ .../e2fsprogs-1.47.0-parallel-make.patch | 68 ------- 3 files changed, 239 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r3.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/files/e2fsprogs-1.47.0-parallel-make.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/Manifest index 9708bb8bc50..018dda262a2 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/Manifest @@ -1,3 +1,2 @@ -DIST e2fsprogs-1.47.0.tar.xz 7059372 BLAKE2B 84f58b05a9f0e14e1a66c6e5171ff23b022f51c4e9a02d4d6d1d26c91909f3c7ec9c9f0462663a4457b4479043774502b8891f691e58a61f4ef6bf9ba33f33aa SHA512 0e6d64c565b455becb84166b6a5c7090724bac5cfe69098657a31bf0481b4e2cace3de1363121b7d84820fbae85b7c83ac5f2a2b02bb36280f0e3ae83a934cec DIST e2fsprogs-1.47.1.tar.xz 7271444 BLAKE2B 67924c38a6b688e0db5ee77b0e11a8b34ec602a729d48516668e9fdf7f36964c8a9369295f0313bfacdc8e5f3f5a27d79a8d99a1aca3b4fe0ced98a4db4884ea SHA512 2ac51f7654a44adf3ee5a5e32cecd7f129e423bdf3074c60b22a7acdba131e7dd0bb2964c107a06ae133f51836272be166f5da1f996f67ceb6c22e2636117beb DIST e2fsprogs-1.47.2.tar.xz 7299932 BLAKE2B 20f93b53c18396dbbf8a9564fd80181e391120554bd63a76c90c88d32616596fb7cf8e1252417b835ef3918ecf3211aebdd7a75daebee11bcb6e7b0f9bd88053 SHA512 a32632e072e535bf164503cf9992a4da7ea971e80f8f84ead4e7bc8899a92c27e4670bdebef1de0187596672e44af7b96078888e0cd4eefa3e3f551344d434d8 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r3.ebuild deleted file mode 100644 index 3450bc2f586..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r3.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic multilib-minimal systemd toolchain-funcs udev - -DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities" -HOMEPAGE="http://e2fsprogs.sourceforge.net/" -SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${P}.tar.xz" - -LICENSE="GPL-2 BSD" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -IUSE="cron fuse nls static-libs test +tools" -RESTRICT="!test? ( test )" - -RDEPEND=" - !sys-libs/${PN}-libs - cron? ( sys-fs/lvm2[lvm] ) - fuse? ( sys-fs/fuse:0 ) - nls? ( virtual/libintl ) - tools? ( sys-apps/util-linux ) -" -# For testing lib/ext2fs, lib/support/libsupport.a is required, which -# unconditionally includes '' from sys-apps/util-linux. -DEPEND=" - ${RDEPEND} - test? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) -" -BDEPEND=" - sys-apps/texinfo - virtual/pkgconfig - nls? ( sys-devel/gettext ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/ext2fs/ext2_types.h -) - -PATCHES=( - "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch # bug #516854 - # We can drop this metadata patch after 6 months or so to let initramfses - # upgrade. See bug #904093 and bug #904048. - "${FILESDIR}"/${PN}-1.47.0-disable-metadata_csum_seed-and-orphan_file-by-default.patch - - "${FILESDIR}"/e2fsprogs-1.47.0-parallel-make.patch - - # Upstream patches (can usually removed with next version bump) -) - -src_prepare() { - default - - cp doc/RelNotes/v${PV}.txt ChangeLog || die "Failed to copy Release Notes" - - # Get rid of doc -- we don't use them. This also prevents a sandbox - # violation due to mktexfmt invocation - rm -r doc || die "Failed to remove doc dir" - - # Prevent included intl cruft from building, bug #81096 - sed -i -r \ - -e 's:@LIBINTL@:@LTLIBINTL@:' \ - MCONFIG.in || die 'intl cruft' -} - -multilib_src_configure() { - # Keep the package from doing silly things, bug #261411 - export VARTEXFONTS="${T}/fonts" - - # needed for >=musl-1.2.4, bug 908892 - use elibc_musl && append-cflags -D_FILE_OFFSET_BITS=64 - - local myeconfargs=( - --with-root-prefix="${EPREFIX}" - $(use_with cron crond-dir "${EPREFIX}/etc/cron.d") - --with-systemd-unit-dir="$(systemd_get_systemunitdir)" - --with-udev-rules-dir="${EPREFIX}$(get_udevdir)/rules.d" - --enable-symlink-install - --enable-elf-shlibs - $(tc-has-tls || echo --disable-tls) - $(multilib_native_use_enable fuse fuse2fs) - $(use_enable nls) - $(multilib_native_use_enable tools e2initrd-helper) - --disable-fsck - --disable-uuidd - --disable-lto - --with-pthread - --enable-largefile - ) - - # We use blkid/uuid from util-linux now - if use kernel_linux ; then - export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes - myeconfargs+=( --disable-lib{blkid,uuid} ) - fi - - ac_cv_path_LDCONFIG=: \ - ECONF_SOURCE="${S}" \ - CC="$(tc-getCC)" \ - BUILD_CC="$(tc-getBUILD_CC)" \ - BUILD_LD="$(tc-getBUILD_LD)" \ - econf "${myeconfargs[@]}" - - if grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then - eerror "INTL sanity check failed, aborting build." - eerror "Please post your ${S}/config.log file as an" - eerror "attachment to https://bugs.gentoo.org/81096" - die "Preventing included intl cruft from building" - fi -} - -multilib_src_compile() { - if multilib_is_native_abi && use tools ; then - emake V=1 - else - emake -C lib/et V=1 - emake -C lib/ss V=1 - emake -C lib/ext2fs V=1 - emake -C lib/e2p V=1 - fi -} - -multilib_src_test() { - if multilib_is_native_abi && use tools ; then - emake V=1 check - else - # Required by lib/ext2fs's check target - emake -C lib/support V=1 - - # For non-native, there's no binaries to test. Just libraries. - emake -C lib/et V=1 check - emake -C lib/ss V=1 check - emake -C lib/ext2fs V=1 check - emake -C lib/e2p V=1 check - fi -} - -multilib_src_install() { - if multilib_is_native_abi && use tools ; then - emake STRIP=':' V=1 DESTDIR="${D}" install - else - emake -C lib/et V=1 DESTDIR="${D}" install - emake -C lib/ss V=1 DESTDIR="${D}" install - emake -C lib/ext2fs V=1 DESTDIR="${D}" install - emake -C lib/e2p V=1 DESTDIR="${D}" install - fi - - # configure doesn't have an option to disable static libs - if ! use static-libs ; then - find "${ED}" -name '*.a' -delete || die - fi -} - -multilib_src_install_all() { - einstalldocs - - if use tools ; then - insinto /etc - doins "${FILESDIR}"/e2fsck.conf - fi -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/files/e2fsprogs-1.47.0-parallel-make.patch b/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/files/e2fsprogs-1.47.0-parallel-make.patch deleted file mode 100644 index 3396aa467db..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/e2fsprogs/files/e2fsprogs-1.47.0-parallel-make.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 711ed1823c7676533d5f6d5e4d1558a792d43837 Mon Sep 17 00:00:00 2001 -From: David Seifert -Date: Tue, 25 Apr 2023 21:53:19 +0200 -Subject: [PATCH] Add missing Makefile dependencies - -* With very high -j parallelism, we get failures in Gentoo: - - In file included from lib/ext2fs/blknum.c:15: - lib/ext2fs/ext2fs.h:105:10: fatal error: ext2fs/ext2_err.h: No such file or directory - 105 | #include - | ^~~~~~~~~~~~~~~~~~~ - compilation terminated. - In file included from lib/ext2fs/fallocate.c:19: - lib/ext2fs/ext2fs.h:105:10: fatal error: ext2fs/ext2_err.h: No such file or directory - 105 | #include - | ^~~~~~~~~~~~~~~~~~~ - -Bug: https://bugs.gentoo.org/806875#c17 -Signed-off-by: David Seifert ---- - lib/ext2fs/Makefile.in | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in -index 798ff609..2c4e0277 100644 ---- a/lib/ext2fs/Makefile.in -+++ b/lib/ext2fs/Makefile.in -@@ -731,6 +731,12 @@ blkmap64_rb.o: $(srcdir)/blkmap64_rb.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ - $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h $(srcdir)/rbtree.h \ - $(srcdir)/compiler.h -+blknum.o: $(srcdir)/blknum.c $(top_builddir)/lib/config.h \ -+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ -+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \ -+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \ -+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ -+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h - block.o: $(srcdir)/block.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ -@@ -842,6 +848,12 @@ extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \ - $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \ - $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ - $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/e2image.h -+fallocate.o: $(srcdir)/fallocate.c $(top_builddir)/lib/config.h \ -+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ -+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \ -+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \ -+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ -+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h - fileio.o: $(srcdir)/fileio.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \ -@@ -1049,6 +1061,12 @@ openfs.o: $(srcdir)/openfs.c $(top_builddir)/lib/config.h \ - $(srcdir)/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ - $(srcdir)/ext2_ext_attr.h $(srcdir)/hashmap.h $(srcdir)/bitops.h \ - $(srcdir)/e2image.h -+orphan.o: $(srcdir)/orphan.c $(top_builddir)/lib/config.h \ -+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \ -+ $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \ -+ $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \ -+ $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \ -+ $(srcdir)/hashmap.h $(srcdir)/bitops.h $(srcdir)/bmap64.h - progress.o: $(srcdir)/progress.c $(top_builddir)/lib/config.h \ - $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2fs.h \ - $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_fs.h \ --- -2.40.0 From acb7ec20d18f9ac38843a86068ec8777dfe97389 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:03 +0000 Subject: [PATCH 093/145] sys-fs/mtools: Sync with Gentoo It's from Gentoo commit 9eeb4393a497e7aa2abed469192fc8ad576ae65e. --- .../portage-stable/sys-fs/mtools/Manifest | 5 +- .../sys-fs/mtools/mtools-4.0.42.ebuild | 53 ------------------ .../sys-fs/mtools/mtools-4.0.43.ebuild | 53 ------------------ .../sys-fs/mtools/mtools-4.0.45.ebuild | 54 ------------------- .../sys-fs/mtools/mtools-4.0.46.ebuild | 2 +- ...ols-4.0.44.ebuild => mtools-4.0.47.ebuild} | 4 +- 6 files changed, 4 insertions(+), 167 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.42.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.43.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.45.ebuild rename sdk_container/src/third_party/portage-stable/sys-fs/mtools/{mtools-4.0.44.ebuild => mtools-4.0.47.ebuild} (87%) diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/Manifest index 327d9221fb6..ed942f8b770 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/Manifest @@ -1,5 +1,2 @@ -DIST mtools-4.0.42.tar.bz2 441506 BLAKE2B 07afec0aea49427ec71ae8ddde9c1dceb33b2533e9acbde3564b0715efce784b5ea8c2122ff588f84e42435abb73ac9912520fd654a078bf0336e62f35f3ce2a SHA512 fd8d56d2dea9ce5e2b311b29ebdd4d89ec7baaf5f2fbfdc85019d480eff4d198ebf0e591c0f28ee1e39d8b81d49d7d4e9ed94b0e94e5b02ce9bbc03632124811 -DIST mtools-4.0.43.tar.bz2 443673 BLAKE2B d000839bbb6bc647eb5a32b08b40b1350cd0a85fd564f0705ecbfe20f8f4ef21bf2d59cd0ccd7a159c829c019c6c2f3cbdef82ff3f4a9e8828cc13d44ddabd1d SHA512 b70e483688124a653dd333ab127494dab12d413809680a4846dc4ae5c166a0b9938a2ab290e518c1f1a5b18ed96d2c2a29d92d61b16b772a4ab5e495379fe410 -DIST mtools-4.0.44.tar.lz 389267 BLAKE2B 1a6a9d257fc07cf27280a535feac873d27690fb02114b293e31d7c8441de6bbdbd57a13f4ba62ce5a5093cd45683776dd8e61ac822b1d3d44eb98cd21f7b9088 SHA512 8977f43b1cd25a0d1052f9f8f140d73d432bd49a7a4737d0b743a9f8ccec5aff6bbbdc07455011ecc49038b1b1dfd6908dda8c46d06389b1511875f9bc654f84 -DIST mtools-4.0.45.tar.lz 389733 BLAKE2B bb23b310fea5d10e5f0c0ed543e0f8cbac9ba4177128419b6e05fb4a06896a64ddccb27c932eb41c339a0167706e729c2f209837874fe4ac4d165a534802031c SHA512 dd5869fee6f376deab2beb3d5168045a6abc7bbfdea35a274369420c99771ee89477629364a8c677dfba56e0df5c7d2760b6cbfba2d425a89a7b8c21f2b6e538 DIST mtools-4.0.46.tar.lz 391300 BLAKE2B 997e766b215aebefb23d57f357ea0b95db62a7e3b40712597c38aa11c0f9c47dc43b0b6a34bfa2b976ec8298ed221c5d7d81e9f16dbeb0a4812e3a6cbff16a16 SHA512 1af737cc4793a2e6afe14b5595f085f8aa29e58bf4d8ba89454c7b9a10041a0ebe06fd50b525332c38805c7a9b014fc4379ae1cc259da7626974c6b6a061e727 +DIST mtools-4.0.47.tar.lz 391656 BLAKE2B 52fdfdaaea09cf3809b0432237b1491be9c2869fe839e951f11178970ebbc82d9dc4bc6446015e50f44098171493c4d4d191d23c03a0b83819b1dd66934493f1 SHA512 7d3db137a121f5fa54b1b2565048a3be5ac197f25240da037c8200232a0282b1541eb220359e6759e96e77836d2babc0b5a9894c91c5ba7b87b9acc5d1458c81 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.42.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.42.ebuild deleted file mode 100644 index 7ced3a0a590..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.42.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic - -DESCRIPTION="Utilities to access MS-DOS disks from Unix without mounting them" -HOMEPAGE="https://www.gnu.org/software/mtools/ https://savannah.gnu.org/projects/mtools" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86 ~x64-macos ~x64-solaris" -IUSE="gui" - -RDEPEND=" - virtual/libiconv - gui? ( - x11-libs/libICE - x11-libs/libXau - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXt - ) -" -DEPEND="${RDEPEND}" - -src_configure() { - if ! use elibc_glibc && ! use elibc_musl ; then - # bug #447688 - append-libs "-liconv" - fi - - local myeconfargs=( - --sysconfdir="${EPREFIX}"/etc/mtools - $(use_with gui x) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - local -a DOCS=( README* Release.notes ) - - default - - insinto /etc/mtools - doins mtools.conf - - # Default is fine - sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.43.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.43.ebuild deleted file mode 100644 index 525c9a7b8aa..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.43.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic - -DESCRIPTION="Utilities to access MS-DOS disks from Unix without mounting them" -HOMEPAGE="https://www.gnu.org/software/mtools/ https://savannah.gnu.org/projects/mtools" -SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86 ~x64-macos ~x64-solaris" -IUSE="gui" - -RDEPEND=" - virtual/libiconv - gui? ( - x11-libs/libICE - x11-libs/libXau - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXt - ) -" -DEPEND="${RDEPEND}" - -src_configure() { - if ! use elibc_glibc && ! use elibc_musl ; then - # bug #447688 - append-libs "-liconv" - fi - - local myeconfargs=( - --sysconfdir="${EPREFIX}"/etc/mtools - $(use_with gui x) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - local -a DOCS=( README* Release.notes ) - - default - - insinto /etc/mtools - doins mtools.conf - - # Default is fine - sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.45.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.45.ebuild deleted file mode 100644 index ada3bde4563..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.45.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic unpacker - -DESCRIPTION="Utilities to access MS-DOS disks from Unix without mounting them" -HOMEPAGE="https://www.gnu.org/software/mtools/ https://savannah.gnu.org/projects/mtools" -SRC_URI="mirror://gnu/${PN}/${P}.tar.lz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86 ~x64-macos ~x64-solaris" -IUSE="gui" - -RDEPEND=" - virtual/libiconv - gui? ( - x11-libs/libICE - x11-libs/libXau - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXt - ) -" -DEPEND="${RDEPEND}" -BDEPEND="$(unpacker_src_uri_depends)" - -src_configure() { - if ! use elibc_glibc && ! use elibc_musl ; then - # bug #447688 - append-libs "-liconv" - fi - - local myeconfargs=( - --sysconfdir="${EPREFIX}"/etc/mtools - $(use_with gui x) - ) - - econf "${myeconfargs[@]}" -} - -src_install() { - local -a DOCS=( README* Release.notes ) - - default - - insinto /etc/mtools - doins mtools.conf - - # Default is fine - sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die -} diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.46.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.46.ebuild index 1ec590ada76..712eeed318c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.46.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.46.ebuild @@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.lz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86 ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86 ~x64-macos ~x64-solaris" IUSE="gui" RDEPEND=" diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.44.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.47.ebuild similarity index 87% rename from sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.44.ebuild rename to sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.47.ebuild index ada3bde4563..00ad3bb1d91 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.44.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-fs/mtools/mtools-4.0.47.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.lz" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv sparc x86 ~x64-macos ~x64-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-macos ~x64-solaris" IUSE="gui" RDEPEND=" From af814292d543aba2542990150453e5d9cf428953 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:06 +0000 Subject: [PATCH 094/145] sys-fs/zfs: Sync with Gentoo It's from Gentoo commit 7898fc0138811dde948b55f0f233b3752a787028. --- .../portage-stable/sys-fs/zfs/Manifest | 12 +- .../sys-fs/zfs/zfs-2.1.15.ebuild | 311 ------------------ ...{zfs-2.3.0_rc5.ebuild => zfs-2.3.0.ebuild} | 0 .../sys-fs/zfs/zfs-2.3.0_rc1.ebuild | 309 ----------------- .../sys-fs/zfs/zfs-2.3.0_rc3.ebuild | 308 ----------------- .../sys-fs/zfs/zfs-2.3.0_rc4.ebuild | 308 ----------------- 6 files changed, 2 insertions(+), 1246 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.1.15.ebuild rename sdk_container/src/third_party/portage-stable/sys-fs/zfs/{zfs-2.3.0_rc5.ebuild => zfs-2.3.0.ebuild} (100%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc3.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/Manifest b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/Manifest index f77da13e37a..e2d6085d8a5 100644 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/Manifest @@ -1,5 +1,3 @@ -DIST zfs-2.1.15.tar.gz 35209038 BLAKE2B 61f9e14c54d43d1c51269917bb3ffde0530166126ea0467103ff1171dffc537315fd21c270d12f73d677e121b8094af39dd0a1fe3f80986bb42dc16d627dff52 SHA512 24096f2a6ecb3cc51f3d2f11cc69ad134d6fc33667007277c50cf798be2b19b6ddfa9be6923ca53d8b09f0bebae14c44d74811ec776e5aaf4ea0e810844c1f3d -DIST zfs-2.1.15.tar.gz.asc 836 BLAKE2B 897c05a8870cd0418493b42fe854ef5b28f9a31513ac262a25631089defa59190808b51bd31e43412b01171bcac0dff0608d417dfdacfeee0b0f067e0627d48f SHA512 a6c5a9d214070a220716075455eb1cb85a53fb20b5fe4319f112cde0653a25f87b66d0f0bcf0ca641e3ac38239759cb9df6ed7f4700056a2732cc8c1ccd9ce05 DIST zfs-2.1.16.tar.gz 35187215 BLAKE2B 8bb90903f3747589fff94a810584de54d7f598b0aa9d0b364cc679779d401a9a76f6914cbfbdd007e2066f02230ed4cac4f3735830ea70eb3bcc449af8229c5d SHA512 68e62015e44eeb997166418bf769afa3e96c037a9282dcfd08a8f01d935fa48076483158f628d70b0aed258427510996d4c4ee7d2644ff561163c76f776635d2 DIST zfs-2.1.16.tar.gz.asc 836 BLAKE2B b46614399ca63d9c88216c55bb2177cc0c28f4da2cb6be3ee361efca994309abff46fdf6ad6b0bad448c44e9e84ee40e2183d1b482e04844317f14744bab5c1f SHA512 d2d94a4e3ffe182e86fa3319cb9661688125f378ffa1e5768ee89033f796a1f52f877c382588fb1f434686e30bc4e65e3f08ceac0dd3dd7f8f751ba6182c3317 DIST zfs-2.2.5.tar.gz 33896824 BLAKE2B ec73c866bf931e4af63a35b3e61e1254d681d21aadba304ea95c147a3911c3d92db686591147036848ceae1683f31f6f81e04a24df6cb11a91a8abaed179567f SHA512 8e288620ce78fb235fa0c9929fc97150987a64091a8a5209209f1e0975d4d6213b8b307e32b3c89d934e83dc8468a1998b797fcdff5bbbbd023f07674877b0c6 @@ -8,11 +6,5 @@ DIST zfs-2.2.6.tar.gz 33900138 BLAKE2B 0bbe36df779aaf19460a75725af9c9b13e64e77a6 DIST zfs-2.2.6.tar.gz.asc 836 BLAKE2B db66f3e2e629ab8a344a8e0c2609bcbb98d69d110fc9e064760ee0c5c25cd67421a71764c4b65d7005e8ff66167bf24beb4be2560a47318eabffa888c1539f26 SHA512 d09f343b3acc3a81e96c069072cfb16d0b490ee77562f50e14524faf05560f9e1d1325ec4bc1760c86ed29186d5860d59646d4ea07385ee3b28d879f2374b9b4 DIST zfs-2.2.7.tar.gz 33852602 BLAKE2B 31a066d5d543e3328d1afd065a8da4f9b4c52433d585cdbb41936900fd1453431585c6bc4b6e6d9a497a03e79969bae883e17cf4677099686feb3e32577d2777 SHA512 6493faa8e31d9c042c4e8f748d32cb9243212fdf4e0341c19568b47bcf302e60beb89940b80374610b71e1dca1ca5813f3efaddbf1a2453ceabb38381165b271 DIST zfs-2.2.7.tar.gz.asc 836 BLAKE2B e8fc5e04f5b37a22c741bda46b4573e0cebe85da051c73cf3c5fc267de3c313399b235fc346ca06f4c22d37d2500044a26adb3ea241a65fbcf8760d0ef880039 SHA512 8d22a64c920c2a983429688a340f4ae281decdd30e465591e6b40af9f3016b8f168f4e8ea460600c832a2f46b383ff307986649a645585fb25c34fdfda75ad6e -DIST zfs-2.3.0-rc1.tar.gz 33887119 BLAKE2B dd4e159bef6de216cc51c1dd22620e6edb5b7503d95402022d0b9439471fe432181b1e5df2142e63cdac812a74b62657a96573b3bf48ad78bd6fd885a5f8913e SHA512 fe7de046dd48dbb67545726482a501788a1d5601e6e9a17deeb29047946689d9c8deb95f72b2b47c26a205a3c94fa1f0123437479a06b1376b9dac3dd6faf463 -DIST zfs-2.3.0-rc1.tar.gz.asc 195 BLAKE2B f70e6223e94a3f79d6d685b2b06254fba845d79768c82b7a3fedb865b6e6c97499c497def0f4c3e4a2869fed88b0965650ae88d5eb72c0ffaed43c4479d3bf96 SHA512 26b395feaf03e2be20b75ef64e573aa98a0706c46a1eb57503925731bf0cb9bf7fef8a2cdcf163233bccd7da9f5aedc0cae73f0183f39e0f13dcf315b4a5d809 -DIST zfs-2.3.0-rc3.tar.gz 33897910 BLAKE2B 518e2c56130a71d4c35f27328184e882815e2ca5b0524e660e174176bee4fdc554e4d1c8264d71f84b6c9641c08088f96a5c35adb5ef6f21b814ccadf093a256 SHA512 1ac53d3a006580f4a32fa33dddd6600d8abac401ed9fc86a2950a8241e0a9dc4a8954a32c44b28b10f22ba7c5cbd8871d9f21c13ccc291c366e9745e83431723 -DIST zfs-2.3.0-rc3.tar.gz.asc 195 BLAKE2B 34685869cb8d4f911b3ce0a5098411ce4cb346310564b7ad5fbe9cfc50a3bbe7665c8daa36384b2d5f3ee1dad4b98d6d5bad5a6b8e2f45da35354428853f748d SHA512 1f32119b24c703dd5dbdcce63ddc97cd24f2052522cf1f2f9a4228691d0db7c136262d98b38f2d795a4edfce1d25b423c5bc4f65dbc008bd12f64acc24f3406e -DIST zfs-2.3.0-rc4.tar.gz 33899889 BLAKE2B 97aabe9c020ab496e6fe621ecb34fd33b70b786664aee0ebdc1d9d8b0d8027bb092354451c882bf0a2954967414420b33b081a7302a4805dcf2e04a584b81463 SHA512 77bb0b8f9d8995edfc7ebb298c6b0a0834e89cd58410d8d4bc4e7f04ce04e26d486e9d0ce23dd22e74cff8e9a9e827ca9d3549885045265f8b17638e68f35f0f -DIST zfs-2.3.0-rc4.tar.gz.asc 195 BLAKE2B 8c1b104c7cf88bc0415d13e4b4d7f21ec5d35722b09e977aa240d842cad36f51d1ae84fbb03d51e3408b7c1a427d56658b90e53109d1e3c6921ae772c256f122 SHA512 a0e74bbcc1062c7196e6e67c77175456ae995159b22c788c5f4c3026dfde662cfb396677b3aa46628576504bc38f374a191dec4ccd55c2b41685be408067b9ee -DIST zfs-2.3.0-rc5.tar.gz 33907372 BLAKE2B 271e6f7e554e3b94d26edac2c53b12f1217013884fd74b3906107c34a4a8ffbfcee75295d05f50f4a13ba0f9368d7e2a8c86dae75bb73191d136ac9c3b92c375 SHA512 ea69909f70f2a5d4b2e3b6e5be61d224504f8936045372bb2d63279e2a051e53812b093fafcad09083925201b9ba940e9327f9d68d1754bf914b4cea5aa5090b -DIST zfs-2.3.0-rc5.tar.gz.asc 195 BLAKE2B 9abacfa95552837cac092a9e207cf56e4224dc24c1015c289a49d19f4173bcc1781b6b118bd89b4c4c89060ace5955447aaa96228266bcc77232fdf5c0037e20 SHA512 76c5dc000440b0a90e3bcb0ef0de61153ea80f2d9e1798475a25234be407f061448dbfc7b94813debda696caf323539e08b43651c7eeff507dc395d2c770ffc7 +DIST zfs-2.3.0.tar.gz 34029599 BLAKE2B b9fb7913f95dd0c8aec703961ecc0413aa51df889f15b1541ff8fcd7146ba485947fab83deb062bdffcdeab17a2465b7551c7eba3ec55c62c21aba58846c0da5 SHA512 f0bb1c6e28b325765be809dbc5d38ba294daa38b54eafd7d129cf6081fb209b200580437019faeed3614bbb0687d6583698a9282f3275905a1f5a8314a66cf0b +DIST zfs-2.3.0.tar.gz.asc 836 BLAKE2B 9d1bd03dc6e5699236bca4c2b20a0a8b46e88d90ea58f7171d087c555da85d6af88acc5990f828ba455f9fbe24c90800c1edf74cd3f865b528730ffef8a931b8 SHA512 ba9a8e8b248de7383c8d33b84b0d70de026b8f3e6a1c82557b74ac274b28e559435541fbdfe816f6b80ce5098b3cac34af69cd53877f1f50fa6a846fa92a5dd0 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.1.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.1.15.ebuild deleted file mode 100644 index aae1320cead..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.1.15.ebuild +++ /dev/null @@ -1,311 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript - -DESCRIPTION="Userland utilities for ZFS Linux kernel module" -HOMEPAGE="https://github.com/openzfs/zfs" - -if [[ ${PV} == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc - inherit verify-sig - - MY_P="${P/_rc/-rc}" - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" - SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" - S="${WORKDIR}/${P%_rc?}" - - if [[ ${PV} != *_rc* ]]; then - KEYWORDS="amd64 arm64 ppc64 ~riscv ~sparc" - fi -fi - -LICENSE="BSD-2 CDDL MIT" -# just libzfs soname major for now. -# 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" - -DEPEND=" - net-libs/libtirpc:= - sys-apps/util-linux - sys-libs/zlib - virtual/libudev:= - dev-libs/openssl:0= - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') - ) -" - -BDEPEND="app-alternatives/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - ${DISTUTILS_DEPS} - || ( - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/distlib[${PYTHON_USEDEP}] - ) - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND="${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) - !prefix? ( virtual/udev ) - sys-fs/udev-init-scripts - app-alternatives/awk - dist-kernel? ( virtual/dist-kernel:= ) - rootfs? ( - app-alternatives/cpio - app-misc/pax-utils - ) - selinux? ( sec-policy/selinux-zfs ) - test-suite? ( - app-shells/ksh - sys-apps/kmod[tools] - sys-apps/util-linux - app-alternatives/bc - sys-block/parted - sys-fs/lsscsi - sys-fs/mdadm - sys-process/procps - ) -" - -# PDEPEND in this form is needed to trick portage suggest -# enabling dist-kernel if only 1 package have it set, without suggesting to disable -PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )" - -REQUIRED_USE=" - !minimal? ( ${PYTHON_REQUIRED_USE} ) - python? ( !minimal ) - test-suite? ( !minimal ) -" - -RESTRICT="test" - -PATCHES=( - # bug #854333 - "${FILESDIR}"/2.1.5-r2-dracut-non-root.patch - - "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch -) - -pkg_pretend() { - use rootfs || return 0 - - if has_version virtual/dist-kernel && ! use dist-kernel; then - ewarn "You have virtual/dist-kernel installed, but" - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" - ewarn "It's recommended to globally enable dist-kernel USE flag" - ewarn "to auto-trigger initrd rebuilds with kernel updates" - fi -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if ! linux_config_exists; then - ewarn "Cannot check the linux kernel configuration." - else - if use test-suite; then - if linux_chkconfig_present BLK_DEV_LOOP; then - eerror "The ZFS test suite requires loop device support enabled." - eerror "Please enable it:" - eerror " CONFIG_BLK_DEV_LOOP=y" - eerror "in /usr/src/linux/.config or" - eerror " Device Drivers --->" - 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 - - # 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 - - # All the same issue: - # Segfaults w/ GCC 12 and 'zfs send' - # bug #856373 - # https://github.com/openzfs/zfs/issues/13620 - # https://github.com/openzfs/zfs/issues/13605 - append-flags -fno-tree-vectorize - - 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) - --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-2.3.0_rc5.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0.ebuild similarity index 100% rename from sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc5.ebuild rename to sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc1.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc1.ebuild deleted file mode 100644 index f0e4486cb2e..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc1.ebuild +++ /dev/null @@ -1,309 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript - -DESCRIPTION="Userland utilities for ZFS Linux kernel module" -HOMEPAGE="https://github.com/openzfs/zfs" - -if [[ ${PV} == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc - inherit verify-sig - - MY_P="${P/_rc/-rc}" - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" - SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" - S="${WORKDIR}/${MY_P}" - - if [[ ${PV} != *_rc* ]]; then - KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc" - fi -fi - -LICENSE="BSD-2 CDDL MIT" -# just libzfs soname major for now. -# 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 unwind" - -DEPEND=" - dev-libs/openssl:= - net-libs/libtirpc:= - sys-apps/util-linux - sys-libs/zlib - virtual/libudev:= - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') - ) - unwind? ( sys-libs/libunwind:= ) -" - -BDEPEND=" - app-alternatives/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - ${DISTUTILS_DEPS} - || ( - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/distlib[${PYTHON_USEDEP}] - ) - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND=" - ${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) - !prefix? ( virtual/udev ) - app-alternatives/awk - sys-fs/udev-init-scripts - dist-kernel? ( virtual/dist-kernel:= ) - rootfs? ( - app-alternatives/cpio - app-misc/pax-utils - ) - selinux? ( sec-policy/selinux-zfs ) - test-suite? ( - app-shells/ksh - sys-apps/kmod[tools] - sys-apps/util-linux - app-alternatives/bc - sys-block/parted - sys-fs/lsscsi - sys-fs/mdadm - sys-process/procps - ) -" - -# PDEPEND in this form is needed to trick portage suggest -# enabling dist-kernel if only 1 package have it set, without suggesting to disable -PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )" - -REQUIRED_USE=" - !minimal? ( ${PYTHON_REQUIRED_USE} ) - python? ( !minimal ) - test-suite? ( !minimal ) -" - -RESTRICT="test" - -PATCHES=( - "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch - "${FILESDIR}"/2.2.3-musl.patch -) - -pkg_pretend() { - use rootfs || return 0 - - if has_version virtual/dist-kernel && ! use dist-kernel; then - ewarn "You have virtual/dist-kernel installed, but" - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" - ewarn "It's recommended to globally enable dist-kernel USE flag" - ewarn "to auto-trigger initrd rebuilds with kernel updates" - fi -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if ! linux_config_exists; then - ewarn "Cannot check the linux kernel configuration." - else - if use test-suite; then - if linux_chkconfig_present BLK_DEV_LOOP; then - eerror "The ZFS test suite requires loop device support enabled." - eerror "Please enable it:" - eerror " CONFIG_BLK_DEV_LOOP=y" - eerror "in /usr/src/linux/.config or" - eerror " Device Drivers --->" - 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-2.3.0_rc3.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc3.ebuild deleted file mode 100644 index 53bc008f513..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc3.ebuild +++ /dev/null @@ -1,308 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript - -DESCRIPTION="Userland utilities for ZFS Linux kernel module" -HOMEPAGE="https://github.com/openzfs/zfs" - -if [[ ${PV} == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc - inherit verify-sig - - MY_P="${P/_rc/-rc}" - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" - SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" - S="${WORKDIR}/${MY_P}" - - if [[ ${PV} != *_rc* ]]; then - KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc" - fi -fi - -LICENSE="BSD-2 CDDL MIT" -# just libzfs soname major for now. -# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. -# see libsoversion_check() below as well -SLOT="0/6" -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs selinux test-suite unwind" - -DEPEND=" - dev-libs/openssl:= - net-libs/libtirpc:= - sys-apps/util-linux - sys-libs/zlib - virtual/libudev:= - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') - ) - unwind? ( sys-libs/libunwind:= ) -" - -BDEPEND=" - app-alternatives/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - ${DISTUTILS_DEPS} - || ( - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/distlib[${PYTHON_USEDEP}] - ) - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND=" - ${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) - !prefix? ( virtual/udev ) - app-alternatives/awk - sys-fs/udev-init-scripts - dist-kernel? ( virtual/dist-kernel:= ) - rootfs? ( - app-alternatives/cpio - app-misc/pax-utils - ) - selinux? ( sec-policy/selinux-zfs ) - test-suite? ( - app-shells/ksh - sys-apps/kmod[tools] - sys-apps/util-linux - app-alternatives/bc - sys-block/parted - sys-fs/lsscsi - sys-fs/mdadm - sys-process/procps - ) -" - -# PDEPEND in this form is needed to trick portage suggest -# enabling dist-kernel if only 1 package have it set, without suggesting to disable -PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )" - -REQUIRED_USE=" - !minimal? ( ${PYTHON_REQUIRED_USE} ) - python? ( !minimal ) - test-suite? ( !minimal ) -" - -RESTRICT="test" - -PATCHES=( - "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch -) - -pkg_pretend() { - use rootfs || return 0 - - if has_version virtual/dist-kernel && ! use dist-kernel; then - ewarn "You have virtual/dist-kernel installed, but" - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" - ewarn "It's recommended to globally enable dist-kernel USE flag" - ewarn "to auto-trigger initrd rebuilds with kernel updates" - fi -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if ! linux_config_exists; then - ewarn "Cannot check the linux kernel configuration." - else - if use test-suite; then - if linux_chkconfig_present BLK_DEV_LOOP; then - eerror "The ZFS test suite requires loop device support enabled." - eerror "Please enable it:" - eerror " CONFIG_BLK_DEV_LOOP=y" - eerror "in /usr/src/linux/.config or" - eerror " Device Drivers --->" - 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-2.3.0_rc4.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc4.ebuild deleted file mode 100644 index 53bc008f513..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs/zfs-2.3.0_rc4.ebuild +++ /dev/null @@ -1,308 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_OPTIONAL=1 -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) - -inherit autotools bash-completion-r1 dist-kernel-utils distutils-r1 flag-o-matic linux-info pam systemd udev usr-ldscript - -DESCRIPTION="Userland utilities for ZFS Linux kernel module" -HOMEPAGE="https://github.com/openzfs/zfs" - -if [[ ${PV} == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/openzfs/zfs.git" -else - VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc - inherit verify-sig - - MY_P="${P/_rc/-rc}" - SRC_URI="https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz" - SRC_URI+=" verify-sig? ( https://github.com/openzfs/${PN}/releases/download/${MY_P}/${MY_P}.tar.gz.asc )" - S="${WORKDIR}/${MY_P}" - - if [[ ${PV} != *_rc* ]]; then - KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~sparc" - fi -fi - -LICENSE="BSD-2 CDDL MIT" -# just libzfs soname major for now. -# possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. -# see libsoversion_check() below as well -SLOT="0/6" -IUSE="custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs selinux test-suite unwind" - -DEPEND=" - dev-libs/openssl:= - net-libs/libtirpc:= - sys-apps/util-linux - sys-libs/zlib - virtual/libudev:= - !minimal? ( ${PYTHON_DEPS} ) - pam? ( sys-libs/pam ) - python? ( - $(python_gen_cond_dep 'dev-python/cffi[${PYTHON_USEDEP}]' 'python*') - ) - unwind? ( sys-libs/libunwind:= ) -" - -BDEPEND=" - app-alternatives/awk - virtual/pkgconfig - nls? ( sys-devel/gettext ) - python? ( - ${DISTUTILS_DEPS} - || ( - dev-python/packaging[${PYTHON_USEDEP}] - dev-python/distlib[${PYTHON_USEDEP}] - ) - ) -" - -if [[ ${PV} != "9999" ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" -fi - -# awk is used for some scripts, completions, and the Dracut module -RDEPEND=" - ${DEPEND} - !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV}:= ) - !prefix? ( virtual/udev ) - app-alternatives/awk - sys-fs/udev-init-scripts - dist-kernel? ( virtual/dist-kernel:= ) - rootfs? ( - app-alternatives/cpio - app-misc/pax-utils - ) - selinux? ( sec-policy/selinux-zfs ) - test-suite? ( - app-shells/ksh - sys-apps/kmod[tools] - sys-apps/util-linux - app-alternatives/bc - sys-block/parted - sys-fs/lsscsi - sys-fs/mdadm - sys-process/procps - ) -" - -# PDEPEND in this form is needed to trick portage suggest -# enabling dist-kernel if only 1 package have it set, without suggesting to disable -PDEPEND="dist-kernel? ( ~sys-fs/zfs-kmod-${PV}[dist-kernel] )" - -REQUIRED_USE=" - !minimal? ( ${PYTHON_REQUIRED_USE} ) - python? ( !minimal ) - test-suite? ( !minimal ) -" - -RESTRICT="test" - -PATCHES=( - "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch -) - -pkg_pretend() { - use rootfs || return 0 - - if has_version virtual/dist-kernel && ! use dist-kernel; then - ewarn "You have virtual/dist-kernel installed, but" - ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}" - ewarn "It's recommended to globally enable dist-kernel USE flag" - ewarn "to auto-trigger initrd rebuilds with kernel updates" - fi -} - -pkg_setup() { - if use kernel_linux; then - linux-info_pkg_setup - - if ! linux_config_exists; then - ewarn "Cannot check the linux kernel configuration." - else - if use test-suite; then - if linux_chkconfig_present BLK_DEV_LOOP; then - eerror "The ZFS test suite requires loop device support enabled." - eerror "Please enable it:" - eerror " CONFIG_BLK_DEV_LOOP=y" - eerror "in /usr/src/linux/.config or" - eerror " Device Drivers --->" - 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 -} From 4f79665355853c814a148a20a3db1c13e690ee03 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:06 +0000 Subject: [PATCH 095/145] sys-fs/zfs-kmod: Sync with Gentoo It's from Gentoo commit 84e972ca237eff9cfd59bad0d7882e28a9fed072. --- .../portage-stable/sys-fs/zfs-kmod/Manifest | 12 +- .../sys-fs/zfs-kmod/zfs-kmod-2.1.15.ebuild | 167 -------------- ...2.3.0_rc5.ebuild => zfs-kmod-2.3.0.ebuild} | 0 .../sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc1.ebuild | 207 ------------------ .../sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc3.ebuild | 207 ------------------ .../sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc4.ebuild | 207 ------------------ 6 files changed, 2 insertions(+), 798 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.1.15.ebuild rename sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/{zfs-kmod-2.3.0_rc5.ebuild => zfs-kmod-2.3.0.ebuild} (100%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc3.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.3.0_rc4.ebuild 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 f77da13e37a..e2d6085d8a5 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 @@ -1,5 +1,3 @@ -DIST zfs-2.1.15.tar.gz 35209038 BLAKE2B 61f9e14c54d43d1c51269917bb3ffde0530166126ea0467103ff1171dffc537315fd21c270d12f73d677e121b8094af39dd0a1fe3f80986bb42dc16d627dff52 SHA512 24096f2a6ecb3cc51f3d2f11cc69ad134d6fc33667007277c50cf798be2b19b6ddfa9be6923ca53d8b09f0bebae14c44d74811ec776e5aaf4ea0e810844c1f3d -DIST zfs-2.1.15.tar.gz.asc 836 BLAKE2B 897c05a8870cd0418493b42fe854ef5b28f9a31513ac262a25631089defa59190808b51bd31e43412b01171bcac0dff0608d417dfdacfeee0b0f067e0627d48f SHA512 a6c5a9d214070a220716075455eb1cb85a53fb20b5fe4319f112cde0653a25f87b66d0f0bcf0ca641e3ac38239759cb9df6ed7f4700056a2732cc8c1ccd9ce05 DIST zfs-2.1.16.tar.gz 35187215 BLAKE2B 8bb90903f3747589fff94a810584de54d7f598b0aa9d0b364cc679779d401a9a76f6914cbfbdd007e2066f02230ed4cac4f3735830ea70eb3bcc449af8229c5d SHA512 68e62015e44eeb997166418bf769afa3e96c037a9282dcfd08a8f01d935fa48076483158f628d70b0aed258427510996d4c4ee7d2644ff561163c76f776635d2 DIST zfs-2.1.16.tar.gz.asc 836 BLAKE2B b46614399ca63d9c88216c55bb2177cc0c28f4da2cb6be3ee361efca994309abff46fdf6ad6b0bad448c44e9e84ee40e2183d1b482e04844317f14744bab5c1f SHA512 d2d94a4e3ffe182e86fa3319cb9661688125f378ffa1e5768ee89033f796a1f52f877c382588fb1f434686e30bc4e65e3f08ceac0dd3dd7f8f751ba6182c3317 DIST zfs-2.2.5.tar.gz 33896824 BLAKE2B ec73c866bf931e4af63a35b3e61e1254d681d21aadba304ea95c147a3911c3d92db686591147036848ceae1683f31f6f81e04a24df6cb11a91a8abaed179567f SHA512 8e288620ce78fb235fa0c9929fc97150987a64091a8a5209209f1e0975d4d6213b8b307e32b3c89d934e83dc8468a1998b797fcdff5bbbbd023f07674877b0c6 @@ -8,11 +6,5 @@ DIST zfs-2.2.6.tar.gz 33900138 BLAKE2B 0bbe36df779aaf19460a75725af9c9b13e64e77a6 DIST zfs-2.2.6.tar.gz.asc 836 BLAKE2B db66f3e2e629ab8a344a8e0c2609bcbb98d69d110fc9e064760ee0c5c25cd67421a71764c4b65d7005e8ff66167bf24beb4be2560a47318eabffa888c1539f26 SHA512 d09f343b3acc3a81e96c069072cfb16d0b490ee77562f50e14524faf05560f9e1d1325ec4bc1760c86ed29186d5860d59646d4ea07385ee3b28d879f2374b9b4 DIST zfs-2.2.7.tar.gz 33852602 BLAKE2B 31a066d5d543e3328d1afd065a8da4f9b4c52433d585cdbb41936900fd1453431585c6bc4b6e6d9a497a03e79969bae883e17cf4677099686feb3e32577d2777 SHA512 6493faa8e31d9c042c4e8f748d32cb9243212fdf4e0341c19568b47bcf302e60beb89940b80374610b71e1dca1ca5813f3efaddbf1a2453ceabb38381165b271 DIST zfs-2.2.7.tar.gz.asc 836 BLAKE2B e8fc5e04f5b37a22c741bda46b4573e0cebe85da051c73cf3c5fc267de3c313399b235fc346ca06f4c22d37d2500044a26adb3ea241a65fbcf8760d0ef880039 SHA512 8d22a64c920c2a983429688a340f4ae281decdd30e465591e6b40af9f3016b8f168f4e8ea460600c832a2f46b383ff307986649a645585fb25c34fdfda75ad6e -DIST zfs-2.3.0-rc1.tar.gz 33887119 BLAKE2B dd4e159bef6de216cc51c1dd22620e6edb5b7503d95402022d0b9439471fe432181b1e5df2142e63cdac812a74b62657a96573b3bf48ad78bd6fd885a5f8913e SHA512 fe7de046dd48dbb67545726482a501788a1d5601e6e9a17deeb29047946689d9c8deb95f72b2b47c26a205a3c94fa1f0123437479a06b1376b9dac3dd6faf463 -DIST zfs-2.3.0-rc1.tar.gz.asc 195 BLAKE2B f70e6223e94a3f79d6d685b2b06254fba845d79768c82b7a3fedb865b6e6c97499c497def0f4c3e4a2869fed88b0965650ae88d5eb72c0ffaed43c4479d3bf96 SHA512 26b395feaf03e2be20b75ef64e573aa98a0706c46a1eb57503925731bf0cb9bf7fef8a2cdcf163233bccd7da9f5aedc0cae73f0183f39e0f13dcf315b4a5d809 -DIST zfs-2.3.0-rc3.tar.gz 33897910 BLAKE2B 518e2c56130a71d4c35f27328184e882815e2ca5b0524e660e174176bee4fdc554e4d1c8264d71f84b6c9641c08088f96a5c35adb5ef6f21b814ccadf093a256 SHA512 1ac53d3a006580f4a32fa33dddd6600d8abac401ed9fc86a2950a8241e0a9dc4a8954a32c44b28b10f22ba7c5cbd8871d9f21c13ccc291c366e9745e83431723 -DIST zfs-2.3.0-rc3.tar.gz.asc 195 BLAKE2B 34685869cb8d4f911b3ce0a5098411ce4cb346310564b7ad5fbe9cfc50a3bbe7665c8daa36384b2d5f3ee1dad4b98d6d5bad5a6b8e2f45da35354428853f748d SHA512 1f32119b24c703dd5dbdcce63ddc97cd24f2052522cf1f2f9a4228691d0db7c136262d98b38f2d795a4edfce1d25b423c5bc4f65dbc008bd12f64acc24f3406e -DIST zfs-2.3.0-rc4.tar.gz 33899889 BLAKE2B 97aabe9c020ab496e6fe621ecb34fd33b70b786664aee0ebdc1d9d8b0d8027bb092354451c882bf0a2954967414420b33b081a7302a4805dcf2e04a584b81463 SHA512 77bb0b8f9d8995edfc7ebb298c6b0a0834e89cd58410d8d4bc4e7f04ce04e26d486e9d0ce23dd22e74cff8e9a9e827ca9d3549885045265f8b17638e68f35f0f -DIST zfs-2.3.0-rc4.tar.gz.asc 195 BLAKE2B 8c1b104c7cf88bc0415d13e4b4d7f21ec5d35722b09e977aa240d842cad36f51d1ae84fbb03d51e3408b7c1a427d56658b90e53109d1e3c6921ae772c256f122 SHA512 a0e74bbcc1062c7196e6e67c77175456ae995159b22c788c5f4c3026dfde662cfb396677b3aa46628576504bc38f374a191dec4ccd55c2b41685be408067b9ee -DIST zfs-2.3.0-rc5.tar.gz 33907372 BLAKE2B 271e6f7e554e3b94d26edac2c53b12f1217013884fd74b3906107c34a4a8ffbfcee75295d05f50f4a13ba0f9368d7e2a8c86dae75bb73191d136ac9c3b92c375 SHA512 ea69909f70f2a5d4b2e3b6e5be61d224504f8936045372bb2d63279e2a051e53812b093fafcad09083925201b9ba940e9327f9d68d1754bf914b4cea5aa5090b -DIST zfs-2.3.0-rc5.tar.gz.asc 195 BLAKE2B 9abacfa95552837cac092a9e207cf56e4224dc24c1015c289a49d19f4173bcc1781b6b118bd89b4c4c89060ace5955447aaa96228266bcc77232fdf5c0037e20 SHA512 76c5dc000440b0a90e3bcb0ef0de61153ea80f2d9e1798475a25234be407f061448dbfc7b94813debda696caf323539e08b43651c7eeff507dc395d2c770ffc7 +DIST zfs-2.3.0.tar.gz 34029599 BLAKE2B b9fb7913f95dd0c8aec703961ecc0413aa51df889f15b1541ff8fcd7146ba485947fab83deb062bdffcdeab17a2465b7551c7eba3ec55c62c21aba58846c0da5 SHA512 f0bb1c6e28b325765be809dbc5d38ba294daa38b54eafd7d129cf6081fb209b200580437019faeed3614bbb0687d6583698a9282f3275905a1f5a8314a66cf0b +DIST zfs-2.3.0.tar.gz.asc 836 BLAKE2B 9d1bd03dc6e5699236bca4c2b20a0a8b46e88d90ea58f7171d087c555da85d6af88acc5990f828ba455f9fbe24c90800c1edf74cd3f865b528730ffef8a931b8 SHA512 ba9a8e8b248de7383c8d33b84b0d70de026b8f3e6a1c82557b74ac274b28e559435541fbdfe816f6b80ce5098b3cac34af69cd53877f1f50fa6a846fa92a5dd0 diff --git a/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.1.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.1.15.ebuild deleted file mode 100644 index e449fc9b7e0..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-fs/zfs-kmod/zfs-kmod-2.1.15.ebuild +++ /dev/null @@ -1,167 +0,0 @@ -# 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.7 -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-${PV%_rc?}" - - 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 ppc64 ~riscv ~sparc" - fi -fi - -LICENSE="CDDL MIT debug? ( GPL-2+ )" -SLOT="0/${PVR}" -IUSE="custom-cflags debug +rootfs" -RESTRICT="test" - -BDEPEND=" - dev-lang/perl - app-alternatives/awk -" - -if [[ ${PV} != 9999 ]] ; then - BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )" - - IUSE+=" +dist-kernel-cap" - RDEPEND=" - dist-kernel-cap? ( dist-kernel? ( - 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? ( - 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? ( - 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? ( - Date: Mon, 27 Jan 2025 07:11:08 +0000 Subject: [PATCH 096/145] sys-libs/efivar: Sync with Gentoo It's from Gentoo commit d38da339ac2db2f5d517da00d06014682ca3cb8d. --- .../portage-stable/sys-libs/efivar/efivar-39-r1.ebuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39-r1.ebuild index 0966070ca6d..b3ccf47c6b8 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/efivar/efivar-39-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2014-2024 Gentoo Authors +# Copyright 2014-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -36,11 +36,13 @@ src_prepare() { } src_configure() { + tc-export_build_env + unset CROSS_COMPILE export COMPILER=$(tc-getCC) export HOSTCC=$(tc-getBUILD_CC) - - tc-ld-disable-gold + export HOST_CFLAGS=${BUILD_CFLAGS} + export HOST_LDFLAGS=${BUILD_LDFLAGS} export PREFIX="${EPREFIX}/usr" export LIBDIR="${EPREFIX}/usr/$(get_libdir)" From 3dab58d6fd3536ef738dab0703b9448c8aa8b649 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:09 +0000 Subject: [PATCH 097/145] sys-libs/libcap-ng: Sync with Gentoo It's from Gentoo commit 952318d9086090123e22a7949456653c5bd09d42. --- .../sys-libs/libcap-ng/Manifest | 1 - .../files/libcap-ng-0.8.4-slibtool.patch | 32 ------ .../files/libcap-ng-0.8.4-swig.patch | 31 ------ .../libcap-ng/libcap-ng-0.8.4-r1.ebuild | 103 ------------------ 4 files changed, 167 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest index 43578be7119..f16d6aed051 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/Manifest @@ -1,2 +1 @@ -DIST libcap-ng-0.8.4.tar.gz 453749 BLAKE2B 523480281cfa544e77e30932968b4b18424286dbced06bb4645d536cf19d4cc0f7c73de82006ffc329aa7ef208e0cf8e3379f1b20e1e8e4e90e422ed736f6c44 SHA512 f4f3499d592e8583c2bdb8d700981a7930bd545f0889bc02f49acecf17e3bc600b100cd4f64e9326e5bac0a07a02a1ac4b7e83e919563066665a3d67cbe6871e DIST libcap-ng-0.8.5.tar.gz 460149 BLAKE2B ce0fc4ebceaa66d6f888f8b752e501bed7513d45231425054340016a6215ce52f0cd81b3a4a54c7c9ec0b623965002d66316c6c37844f0bd132b186ff7c6a41f SHA512 89fb86454847f354c012411ecdc7e17f07bb40d7e9719ca0b93ea81c436113685bbbb5c1b9cb1b7ac92d216c105c687285304135beb156aedd55ab1c61e4f269 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch deleted file mode 100644 index d69f986875e..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-slibtool.patch +++ /dev/null @@ -1,32 +0,0 @@ -https://github.com/stevegrubb/libcap-ng/commit/75fe3714a8da28f0e2939c4402527782014401dd -https://github.com/stevegrubb/libcap-ng/pull/52 - -From b7d21b473badb349bc0d6246b3804a8a2d329f36 Mon Sep 17 00:00:00 2001 -From: orbea -Date: Wed, 3 Apr 2024 17:32:04 -0700 -Subject: [PATCH] utils: link using libcap-ng.la - -When linking internal dependencies that were linked using $(LIBTOOL) the -ideal method is to use the generated libtool archive (.la) file. This -fixes the build with slibtool which doesn't find -lcap-ng during the -build and explicitly requires the .la file to be used. - -Gentoo Issue: https://bugs.gentoo.org/928450 -Signed-off-by: orbea ---- - utils/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/utils/Makefile.am b/utils/Makefile.am -index f430454..97aa021 100644 ---- a/utils/Makefile.am -+++ b/utils/Makefile.am -@@ -25,7 +25,7 @@ CONFIG_CLEAN_FILES = *.loT *.rej *.orig - AUTOMAKE_OPTIONS = no-dependencies - EXTRA_DIST = $(man_MANS) - AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/src --LIBS = -L${top_builddir}/src -lcap-ng -+LDADD = ${top_builddir}/src/libcap-ng.la - AM_CFLAGS = -W -Wall -Wshadow ${WFLAGS} -Wundef -D_GNU_SOURCE - bin_PROGRAMS = pscap netcap filecap captest - man_MANS = pscap.8 netcap.8 filecap.8 captest.8 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch deleted file mode 100644 index 4b3f41a580a..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/files/libcap-ng-0.8.4-swig.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://bugs.gentoo.org/921305 -https://github.com/stevegrubb/libcap-ng/issues/48 -https://github.com/stevegrubb/libcap-ng/commit/30453b6553948cd05c438f9f509013e3bb84f25b - -From 30453b6553948cd05c438f9f509013e3bb84f25b Mon Sep 17 00:00:00 2001 -From: Steve Grubb -Date: Thu, 4 Jan 2024 15:06:29 -0500 -Subject: [PATCH] Remove python global exception handler since its deprecated - ---- - bindings/src/capng_swig.i | 7 ------- - 2 files changed, 1 insertion(+), 7 deletions(-) - -diff --git a/bindings/src/capng_swig.i b/bindings/src/capng_swig.i -index fcdaf18..fa85e13 100644 ---- a/bindings/src/capng_swig.i -+++ b/bindings/src/capng_swig.i -@@ -30,13 +30,6 @@ - - %varargs(16, signed capability = 0) capng_updatev; - --%except(python) { -- $action -- if (result < 0) { -- PyErr_SetFromErrno(PyExc_OSError); -- return NULL; -- } --} - #endif - - %define __signed__ diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild deleted file mode 100644 index 228d595f6de..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libcap-ng/libcap-ng-0.8.4-r1.ebuild +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Keep an eye on Fedora's packaging (https://src.fedoraproject.org/rpms/libcap-ng/tree/rawhide) for patches -# Same maintainer in Fedora as upstream -PYTHON_COMPAT=( python3_{10..12} ) -inherit autotools flag-o-matic out-of-source-utils python-r1 - -DESCRIPTION="POSIX 1003.1e capabilities" -HOMEPAGE="https://people.redhat.com/sgrubb/libcap-ng/" -SRC_URI="https://people.redhat.com/sgrubb/${PN}/${P}.tar.gz" - -LICENSE="GPL-2+ LGPL-2.1+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux" -IUSE="python static-libs" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND="python? ( ${PYTHON_DEPS} )" -DEPEND=" - ${RDEPEND} - sys-kernel/linux-headers -" -BDEPEND="python? ( >=dev-lang/swig-2 )" - -PATCHES=( - "${FILESDIR}"/${P}-swig.patch - # https://bugs.gentoo.org/928450 - "${FILESDIR}"/${P}-slibtool.patch -) - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - use sparc && replace-flags -O? -O0 - - local ECONF_SOURCE="${S}" - - local myconf=( - $(use_enable static-libs static) - --with-capability_header="${ESYSROOT}"/usr/include/linux/capability.h - ) - - local pythonconf=( - --without-python3 - ) - - # Set up python bindings build(s) - if use python ; then - setup_python_flags_configure() { - pythonconf=( - --with-python3 - ) - - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - } - - python_foreach_impl setup_python_flags_configure - else - local BUILD_DIR="${WORKDIR}"/build - run_in_build_dir econf "${pythonconf[@]}" "${myconf[@]}" - fi -} - -src_compile() { - if use python ; then - python_foreach_impl run_in_build_dir emake - else - local BUILD_DIR="${WORKDIR}"/build - emake -C "${BUILD_DIR}" - fi -} - -src_test() { - if [[ "${EUID}" -eq 0 ]] ; then - ewarn "Skipping tests due to root permissions." - return - fi - - if use python ; then - python_foreach_impl run_in_build_dir emake check - else - local BUILD_DIR="${WORKDIR}"/build - emake -C "${BUILD_DIR}" check - fi -} - -src_install() { - if use python ; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - local BUILD_DIR="${WORKDIR}"/build - emake -C "${BUILD_DIR}" DESTDIR="${D}" install - fi - - find "${ED}" -name '*.la' -delete || die -} From 2c3b1f4cd22429f50133b5647363e0a528b6ad7b Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:10 +0000 Subject: [PATCH 098/145] sys-libs/libseccomp: Sync with Gentoo It's from Gentoo commit 6393ca61b44b2dd2940a1f5704787f5ac92251e4. --- .../sys-libs/libseccomp/Manifest | 2 +- .../libseccomp/libseccomp-2.5.5.ebuild | 111 ------------------ ....5.5-r1.ebuild => libseccomp-2.6.0.ebuild} | 40 ++----- .../libseccomp/libseccomp-9999.ebuild | 8 +- 4 files changed, 17 insertions(+), 144 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5.ebuild rename sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/{libseccomp-2.5.5-r1.ebuild => libseccomp-2.6.0.ebuild} (65%) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/Manifest index 4140907f66f..6d14610d136 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/Manifest @@ -1,3 +1,3 @@ DIST libseccomp-2.5.5-loongarch-r1.patch 119822 BLAKE2B 4aa75c1ac87b2ca25cf6be38dfd760879c7255ca8e6cf86be3ac6e354f76cdaf3c8e2f59b646254414ffb0f1ffe6b7c50478f4db895a6ce632db8782c9807e91 SHA512 f7cd768d672a25448b2a3ceda27db52e0d62b5d9ab3eeb906226b6ebc19332c89332e0b870aaf82d4ffcfd642c2deb6029a30ae9a6bd702ebad9fdd40622b582 -DIST libseccomp-2.5.5-loongarch64-20231204.patch.xz 41236 BLAKE2B 7831b28c275771bb675b4b5045e657d96c254e69cee7188a19f4812bc83343e0041772c20be1e7392ec88387726b49f34aa670a906b922dba531a0d35e548b1e SHA512 7870e536d834360dfec446493815b675a305f6bec1b79d0caae6fb546d2f694e77ce52e547bbcdb22cda272272bf3d5a427960b4aa76fb987d06ab035298007d DIST libseccomp-2.5.5.tar.gz 642445 BLAKE2B d770cee1f3e02fbbcd9f25655b360ab38160ad800e2829a67f2b9da62b095a90be99ac851a67344cf95bd6810a6268da4655dc1d37d996e58239c4999eb41998 SHA512 f630e7a7e53a21b7ccb4d3e7b37616b89aeceba916677c8e3032830411d77a14c2d74dcf594cd193b1acc11f52595072e28316dc44300e54083d5d7b314a38da +DIST libseccomp-2.6.0.tar.gz 685655 BLAKE2B 45c4f4dd67db5848bb536613e8929633f95cfbeb8738525381a76631187e7b0fc2c02f1a103579cd0f4135e9c175250fe2d784b85cc85424ec3125b4dafcf11c SHA512 9039478656d9b670af2ff4cb67b6b1fa315821e59d2f82ba6247e988859ddc7e3d15fea159eccca161bf2890828bb62aa6ab4d6b7ff55f27a9d6bd9532eeee1b diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5.ebuild deleted file mode 100644 index a7ba7a3f25c..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5.ebuild +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{10..11} ) -DISTUTILS_OPTIONAL=1 - -inherit distutils-r1 multilib-minimal - -DESCRIPTION="high level interface to Linux seccomp filter" -HOMEPAGE="https://github.com/seccomp/libseccomp" - -if [[ ${PV} == *9999 ]] ; then - EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git" - PRERELEASE="2.6.0" - inherit autotools git-r3 -else - SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz - experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/${PN}-2.5.5-loongarch64-20231204.patch.xz )" - KEYWORDS="-* amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux" -fi - -LICENSE="LGPL-2.1" -SLOT="0" -IUSE="experimental-loong python static-libs test" -RESTRICT="!test? ( test )" - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -# We need newer kernel headers; we don't keep strict control of the exact -# version here, just be safe and pull in the latest stable ones. bug #551248 -DEPEND=">=sys-kernel/linux-headers-5.15 - python? ( ${PYTHON_DEPS} )" -RDEPEND="${DEPEND}" -BDEPEND="${DEPEND} - dev-util/gperf - python? ( dev-python/cython[${PYTHON_USEDEP}] )" - -PATCHES=( - "${FILESDIR}"/libseccomp-python-shared.patch - "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch - "${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch -) - -src_prepare() { - if use experimental-loong; then - PATCHES+=( "${WORKDIR}/${PN}-2.5.5-loongarch64-20231204.patch" ) - fi - - default - - if use experimental-loong; then - # touch generated files to avoid activating maintainer mode - # remove when loong-fix-build.patch is no longer necessary - touch ./aclocal.m4 ./configure ./configure.h.in || die - find . -name Makefile.in -exec touch {} + || die - fi - - if [[ ${PV} == *9999 ]] ; then - sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die - - eautoreconf - fi -} - -multilib_src_configure() { - local myeconfargs=( - $(use_enable static-libs static) - --disable-python - ) - - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -do_python() { - # setup.py reads VERSION_RELEASE from the environment - local -x VERSION_RELEASE=${PRERELEASE-${PV}} - - pushd "${BUILD_DIR}/src/python" >/dev/null || die - "$@" - popd >/dev/null || die -} - -multilib_src_compile() { - emake - - if multilib_is_native_abi && use python ; then - # setup.py expects libseccomp.so to live in "../.libs" - # Copy the python files to the right place for this. - rm -r "${BUILD_DIR}"/src/python || die - cp -r "${S}"/src/python "${BUILD_DIR}"/src/python || die - local -x CPPFLAGS="-I\"${BUILD_DIR}/include\" -I\"${S}/include\" ${CPPFLAGS}" - - do_python distutils-r1_src_compile - fi -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi && use python ; then - do_python distutils-r1_src_install - fi -} - -multilib_src_install_all() { - find "${ED}" -type f -name "${PN}.la" -delete || die - - einstalldocs -} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.6.0.ebuild similarity index 65% rename from sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.6.0.ebuild index 153293b5f8c..cc42ab905df 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.5.5-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-2.6.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 multilib-minimal @@ -16,20 +16,15 @@ HOMEPAGE="https://github.com/seccomp/libseccomp" if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/seccomp/libseccomp.git" PRERELEASE="2.6.0" - AUTOTOOLS_AUTO_DEPEND=yes inherit autotools git-r3 else - AUTOTOOLS_AUTO_DEPEND=no - inherit autotools libtool - SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz - experimental-loong? ( https://github.com/matoro/libseccomp/compare/v${PV}..loongarch-r1.patch - -> ${P}-loongarch-r1.patch )" - KEYWORDS="-* amd64 arm arm64 hppa ~loong ~mips ppc ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux" + SRC_URI="https://github.com/seccomp/libseccomp/releases/download/v${PV}/${P}.tar.gz" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux" fi LICENSE="LGPL-2.1" SLOT="0" -IUSE="experimental-loong python static-libs test" +IUSE="python static-libs test" RESTRICT="!test? ( test )" REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" @@ -43,7 +38,6 @@ RDEPEND="${DEPEND}" BDEPEND=" ${DEPEND} dev-util/gperf - experimental-loong? ( ${AUTOTOOLS_DEPEND} ) python? ( ${DISTUTILS_DEPS} dev-python/cython[${PYTHON_USEDEP}] @@ -51,35 +45,17 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/libseccomp-python-shared.patch + "${FILESDIR}"/libseccomp-2.6.0-python-shared.patch "${FILESDIR}"/libseccomp-2.5.3-skip-valgrind.patch - "${FILESDIR}"/libseccomp-2.5.5-which-hunt.patch - "${FILESDIR}"/libseccomp-2.5.5-arch-syscall-check.patch ) src_prepare() { - if use experimental-loong; then - PATCHES+=( "${DISTDIR}/${P}-loongarch-r1.patch" ) - fi - default if [[ ${PV} == *9999 ]] ; then sed -i -e "s/0.0.0/${PRERELEASE}/" configure.ac || die - fi - if use experimental-loong; then - # touch generated files to avoid activating maintainer mode - # remove when loong-fix-build.patch is no longer necessary - touch ./aclocal.m4 ./configure ./configure.h.in || die - find . -name Makefile.in -exec touch {} + || die - fi - - if [[ ${PV} == *9999 ]] || use experimental-loong; then - rm -f "include/seccomp.h" || die eautoreconf - else - elibtoolize fi } @@ -111,6 +87,10 @@ multilib_src_compile() { fi } +multilib_src_test() { + emake -Onone check +} + multilib_src_install() { emake DESTDIR="${D}" install diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-9999.ebuild index ac4df448383..cc42ab905df 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/libseccomp/libseccomp-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 multilib-minimal @@ -87,6 +87,10 @@ multilib_src_compile() { fi } +multilib_src_test() { + emake -Onone check +} + multilib_src_install() { emake DESTDIR="${D}" install From 96aa879f70b2048e110b99b5959aac7bce992059 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:12 +0000 Subject: [PATCH 099/145] sys-libs/libxcrypt: Sync with Gentoo It's from Gentoo commit 4fcacd39405b473ea6397f51da70ee0822fb4a92. --- .../libxcrypt/libxcrypt-4.4.36-r2.ebuild | 335 ------------------ 1 file changed, 335 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild deleted file mode 100644 index 51436377201..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/libxcrypt/libxcrypt-4.4.36-r2.ebuild +++ /dev/null @@ -1,335 +0,0 @@ -# Copyright 2004-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -# NEED_BOOTSTRAP is for developers to quickly generate a tarball -# for publishing to the tree. -NEED_BOOTSTRAP="no" -inherit multibuild multilib python-any-r1 flag-o-matic toolchain-funcs multilib-minimal - -DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others" -HOMEPAGE="https://github.com/besser82/libxcrypt" -if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then - inherit autotools - SRC_URI="https://github.com/besser82/libxcrypt/releases/download/v${PV}/${P}.tar.xz" -else - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-autotools.tar.xz" -fi - -LICENSE="LGPL-2.1+ public-domain BSD BSD-2" -SLOT="0/1" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="+compat split-usr static-libs +system test headers-only" -REQUIRED_USE="split-usr? ( system )" -RESTRICT="!test? ( test )" - -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - export CTARGET=${CATEGORY/cross-} - fi -fi - -is_cross() { - local enabled_abis=( $(multilib_get_enabled_abis) ) - [[ "${#enabled_abis[@]}" -le 1 ]] && [[ ${CHOST} != ${CTARGET} ]] -} - -DEPEND=" - system? ( - elibc_glibc? ( - ${CATEGORY}/glibc[-crypt(-)] - !${CATEGORY}/glibc[crypt(-)] - ) - elibc_musl? ( - ${CATEGORY}/musl[-crypt(+)] - !${CATEGORY}/musl[crypt(+)] - ) - ) -" -RDEPEND="${DEPEND}" -BDEPEND=" - dev-lang/perl - test? ( $(python_gen_any_dep 'dev-python/passlib[${PYTHON_USEDEP}]') ) -" - -python_check_deps() { - python_has_version "dev-python/passlib[${PYTHON_USEDEP}]" -} - -pkg_pretend() { - if has "distcc" ${FEATURES} ; then - ewarn "Please verify all distcc nodes are using the same versions of GCC (>= 10) and Binutils!" - ewarn "Older/mismatched versions of GCC may lead to a misbehaving library: bug #823179." - - if [[ ${BUILD_TYPE} != "binary" ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]] ; then - die "libxcrypt is known to fail to build or be broken at runtime with < GCC 10 (bug #823179)!" - fi - fi -} - -pkg_setup() { - MULTIBUILD_VARIANTS=( - $(usev compat 'xcrypt_compat') - xcrypt_nocompat - ) - - use test && python-any-r1_pkg_setup -} - -src_prepare() { - default - - # WARNING: Please read on bumping or applying patches! - # - # There are two circular dependencies to be aware of: - # 1) - # if we're bootstrapping configure and makefiles: - # libxcrypt -> automake -> perl -> libxcrypt - # - # mitigation: - # toolchain@ manually runs `make dist` after running autoconf + `./configure` - # and the ebuild uses that. - # (Don't include the pre-generated Perl artefacts.) - # - # solution for future: - # Upstream are working on producing `make dist` tarballs. - # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573 - # - # 2) - # configure *unconditionally* needs Perl at build time to generate - # a list of enabled algorithms based on the set passed to `configure`: - # libxcrypt -> perl -> libxcrypt - # - # mitigation: - # None at the moment. - # - # solution for future: - # Not possible right now. Upstream intend on depending on Perl for further - # configuration options. - # https://github.com/besser82/libxcrypt/issues/134#issuecomment-871833573 - # - # Therefore, on changes (inc. bumps): - # * You must check whether upstream have started providing tarballs with bootstrapped - # auto{conf,make}; - # - # * diff the build system changes! - # - if [[ ${NEED_BOOTSTRAP} == "yes" ]] ; then - # Facilitate our split variant build for compat + non-compat - eapply "${FILESDIR}"/${PN}-4.4.19-multibuild.patch - eautoreconf - fi -} - -src_configure() { - # Avoid possible "illegal instruction" errors with gold - # bug #821496 - tc-ld-disable-gold - - # Doesn't work with LTO: bug #852917. - # https://github.com/besser82/libxcrypt/issues/24 - filter-lto - - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - multibuild_foreach_variant multilib-minimal_src_configure -} - -get_xcprefix() { - if is_cross; then - echo "${EPREFIX}/usr/${CTARGET}" - else - echo "${EPREFIX}" - fi -} - -get_xclibdir() { - printf -- "%s/%s/%s/%s\n" \ - "$(get_xcprefix)" \ - "$(usev !split-usr '/usr')" \ - "$(get_libdir)" \ - "$(usev !system 'xcrypt')" -} - -get_xcincludedir() { - printf -- "%s/usr/include/%s\n" \ - "$(get_xcprefix)" \ - "$(usev !system 'xcrypt')" -} - -get_xcmandir() { - printf -- "%s/usr/share/man\n" \ - "$(get_xcprefix)" -} - -get_xcpkgconfigdir() { - printf -- "%s/usr/%s/pkgconfig\n" \ - "$(get_xcprefix)" \ - "$(get_libdir)" -} - -multilib_src_configure() { - local -a myconf=( - --host=${CTARGET} - --disable-werror - --libdir=$(get_xclibdir) - --with-pkgconfigdir=$(get_xcpkgconfigdir) - --includedir=$(get_xcincludedir) - --mandir="$(get_xcmandir)" - ) - - tc-export PKG_CONFIG - - if is_cross; then - if tc-is-clang; then - export CC="${CTARGET}-clang" - else - export CC="${CTARGET}-gcc" - fi - fi - - case "${MULTIBUILD_ID}" in - xcrypt_compat-*) - myconf+=( - --disable-static - --disable-xcrypt-compat-files - --enable-obsolete-api=yes - ) - ;; - xcrypt_nocompat-*) - myconf+=( - --enable-obsolete-api=no - $(use_enable static-libs static) - ) - ;; - *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; - esac - - if use headers-only; then - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC is sane. - headers_only_flags="CC=$(tc-getBUILD_CC)" - fi - - ECONF_SOURCE="${S}" econf "${myconf[@]}" "${headers_only_flags}" -} - -src_compile() { - use headers-only && return - - multibuild_foreach_variant multilib-minimal_src_compile -} - -multilib_src_test() { - emake check -} - -src_test() { - multibuild_foreach_variant multilib-minimal_src_test -} - -src_install() { - multibuild_foreach_variant multilib-minimal_src_install - - use headers-only || \ - ( - shopt -s failglob || die "failglob failed" - - # Make sure our man pages do not collide with glibc or man-pages. - for manpage in "${D}$(get_xcmandir)"/man3/crypt{,_r}.?*; do - mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \ - || die "mv failed" - done - ) || die "failglob error" - - # Remove useless stuff from installation - find "${ED}"/usr/share/doc/${PF} -type l -delete || die - find "${ED}" -name '*.la' -delete || die - - # workaround broken upstream cross-* --docdir by installing files in proper locations - if is_cross; then - insinto "$(get_xcprefix)"/usr/share - doins -r "${ED}"/usr/share/doc - rm -r "${ED}"/usr/share/doc || die - fi -} - -multilib_src_install() { - if use headers-only; then - emake DESTDIR="${D}" install-nodist_includeHEADERS - return - fi - - emake DESTDIR="${D}" install - - # Don't install the libcrypt.so symlink for the "compat" version - case "${MULTIBUILD_ID}" in - xcrypt_compat-*) - rm "${D}"$(get_xclibdir)/libcrypt$(get_libname) \ - || die "failed to remove extra compat libraries" - ;; - xcrypt_nocompat-*) - if use split-usr; then - ( - if use static-libs; then - # .a files are installed to /$(get_libdir) by default - # Move static libraries to /usr prefix or portage will abort - shopt -s nullglob || die "failglob failed" - static_libs=( "${D}"/$(get_xclibdir)/*.a ) - - if [[ -n ${static_libs[*]} ]]; then - dodir "/usr/$(get_xclibdir)" - mv "${static_libs[@]}" "${ED}/usr/$(get_xclibdir)" \ - || die "Moving static libs failed" - fi - fi - - if use system; then - # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir) - # to allow linker to correctly find shared libraries. - shopt -s failglob || die "failglob failed" - - for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do - lib_file_basename="$(basename "${lib_file}")" - lib_file_target="$(basename "$(readlink -f "${lib_file}")")" - - # We already know we're in split-usr (checked above) - # See bug #843209 (also worth keeping in mind bug #802222 too) - local libdir_no_prefix=$(get_xclibdir) - libdir_no_prefix=${libdir_no_prefix#${EPREFIX}} - libdir_no_prefix=${libdir_no_prefix%/usr} - dosym -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}" - done - - rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed" - fi - ) - fi - ;; - *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; - esac -} - -pkg_preinst() { - # Verify we're not in a bad case like bug #843209 with broken symlinks. - # This can be dropped when, if ever, the split-usr && system && compat case - # is cleaned up in *_src_install. - local broken_symlinks=() - mapfile -d '' broken_symlinks < <( - find "${ED}" -xtype l -print0 - ) - - if [[ ${#broken_symlinks[@]} -gt 0 ]]; then - eerror "Broken symlinks found before merging!" - local symlink target resolved - for symlink in "${broken_symlinks[@]}" ; do - target="$(readlink "${symlink}")" - resolved="$(readlink -f "${symlink}")" - eerror " '${symlink}' -> '${target}' (${resolved})" - done - die "Broken symlinks found! Aborting to avoid damaging system. Please report a bug." - fi -} From 1df80b82b323a223d3eb535a4482e8600bc9400f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:12 +0000 Subject: [PATCH 100/145] sys-libs/ncurses: Sync with Gentoo It's from Gentoo commit 018deb254e510a7278510990e920126b263f3f39. --- .../portage-stable/sys-libs/ncurses/Manifest | 21 + .../ncurses/ncurses-6.5_p20250118.ebuild | 472 +++++++++++++++++ .../ncurses/ncurses-6.5_p20250125.ebuild | 473 ++++++++++++++++++ 3 files changed, 966 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250118.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250125.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/Manifest index 217643be3f7..21079892ca3 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/Manifest @@ -191,6 +191,27 @@ DIST ncurses-6.5-20241102.patch.gz 3571 BLAKE2B 265fabae05675a01039569dab957e8ca DIST ncurses-6.5-20241102.patch.gz.asc 729 BLAKE2B a35bc58064361f8e7527d3af3ef08dcaf8b3e70442d280797b6260458dd8d258d42214c25cb5f329851a88ea8cb32a293a3abd93f64d971a0d3b0ade7e04228d SHA512 9695c1a4cdb66cd8f64880b937dbbe7caa5746b754056359e48118b75deb9d6338f270bb5f252b9e52d6de14278a8435e2d4799e0fbda9ef5b76d5569ea8c6bd DIST ncurses-6.5-20241109.patch.gz 121789 BLAKE2B 3626c3fb1332d12558e53545bb0aec0ad315ffbfb0f64514f30fb15ce21b80b73228feec4569a9545c6115ca59db70f85d99830733ede3958f220627416cfebf SHA512 a15b6ee70ea10bb8a10a70ab9c74f437eceb60a7313a688ad04e0c3a9e097824b642f259c728fc7831d60322b1a0957d19a5fe73cbf68fd21a623ddf9d9c0ef4 DIST ncurses-6.5-20241109.patch.gz.asc 729 BLAKE2B af2c1bd38031bff8e5465340fbd5dbff875939ff62fa4e805d2fdd869a15a25e135aaaca98510ddb308e532f3b58209b4ad0d8e75bc792149972470809a42df4 SHA512 8946e1e84baf9c48129460a83a5ef679b427c0147ca7fd4701aca3fa23b260c8ed8fb08fd2996676f149ffeec4ca960358d7df6a0b7774c4b49b2bb66800237f +DIST ncurses-6.5-20241123.patch.gz 17657 BLAKE2B dac07cc85c7ce3637e20c6a81d7f69943ffb62313080fe607a9e7a972c0c0fc557ec99b3c6a47ce053e6e814e6340c3ee0d8f598b7c33ab3c64fa745470cadac SHA512 aee0de1d2d9216fec03a78260b5c0a973a8191777db383b6a09dfad20a4f8ecf735e14d4129f59b0a9da0bcfb59691ff6c395a55edf3303e2af57f80a1901232 +DIST ncurses-6.5-20241123.patch.gz.asc 729 BLAKE2B 367529435f5e0efc24e34818d59e75a8c41cb10c52d8b8d0679b49e7070bb63ed096076f0f0a951f4f58cf57a6cdb41874991f4913aea1583de9a385a3d8fb5d SHA512 4d751650011e648aea4a1a0c5ab6984021ff8ee305f0beaffc452804b4de8722954069cab08f5f6e46a3164e3b863226d7e745528f742a874b3b086b83251f85 +DIST ncurses-6.5-20241130.patch.gz 142324 BLAKE2B e7f7ba18550db745c9252c8a3b74f77ee0eb93d3bd509f18a5833a4e8b544abb3067558a1c815d12384505c62435c9cbba8e1128ae09587ec91256932fb0b965 SHA512 6a5ce47d47ff5fbed9612c3127056e9302ed340583d23a90b5fb5ca905d98a7d48d61d29698396a66cb5b120423d3bf5ace40c68d029f5ffd24d33ade39f2402 +DIST ncurses-6.5-20241130.patch.gz.asc 729 BLAKE2B 0bbc5c9e6bc6eb37c7c1bcde44abbf7e45d16f287599c2b7dffad37cd751572d3adbd50413c0568942ceb0fb874237fa179c4e2df170f73512f43e598e4bd711 SHA512 ba2c08cd08839c8e5754293165343a7fed537770dd5a7e1712e371d8495c83573ea9e016589c886e080405ac999460abf83c8fa1bd91194a585afb7739c7d8a6 +DIST ncurses-6.5-20241207.patch.gz 115869 BLAKE2B c9016f627ae48e44afcc449308d4abd288067a9bda4a5bcf1d847cf91be9a0f22c376fef964ff5e69291bd46b90f32201d05127d1d7c150f62e75a244a5ee1dc SHA512 f37dcdb95a2698d32e25c840d98c2dae3fd5b734717f753be4ae7ab325b3263b7b84dccf8423a4338b8fed7071fb083f4a74afb68616dde390c37fe8b6251552 +DIST ncurses-6.5-20241207.patch.gz.asc 729 BLAKE2B 3f9345290997bbe68764017651d50493e7cb1d64a33b7ea4d335b7f95ae33586b841496f01746e19fced605ec3cf129dc8b02a20a7e89dc9447296ad0804d6a0 SHA512 c090a8369f12421894c99bd1d72bab1abd18f86c58acfc5341ac1aa6ccc07f9c83425696f54c32bec3d6ec17a2ab2df932fb12dd6c6a5fce4820d3ecd1c71aef +DIST ncurses-6.5-20241214.patch.gz 79375 BLAKE2B 96114d3d195209aa630a61ab6f3e3c071ee4bd04c929f072937c9d7c377974a01c5c45be1540e4f9f37035b8fd68c3c554416513969474ecb5f3d60abc14bdf7 SHA512 bfb873e081ca1aefe5b02d259d679afcb14299dd633c5933a53d3e6e4102dff388209a5d2a09d5d390df08fcfdac79b1eb32d03c3aec461fa78c1f6d0a743243 +DIST ncurses-6.5-20241214.patch.gz.asc 729 BLAKE2B af6a83a690c31b18e3b8a89bfd8adc620397ce5026d8573430a69538ff38e341e82f5f34fd639668f3651e9b0229a2b3af246dd025ca2be85621b9015dbf69e6 SHA512 ceff0eae372a792cbce83151b915fddc4f82c979eddad9dd88df28c87f5ebd6e4bbef6c6e32924dac38e58a3a12da86521f72bd438132c5cb4a9dc157c686787 +DIST ncurses-6.5-20241221.patch.gz 7787 BLAKE2B 7dce1a2770ba3dd7b9f5bc5eb49ad0009cf57db9107b9d19300d532d35dc42894c7952c72ca7a21a31be6378b201d16cbcd2668ce0cbb07c073da9bcf04061b9 SHA512 26d8bdcd4d1d496b3a90668660ddda118ba0ec3571bcadffce65bc6097a9663338f3b026a390d9420c1d844f0b8cef43c717a1542cb1bf91f3e5eb4e332a2edb +DIST ncurses-6.5-20241221.patch.gz.asc 729 BLAKE2B 8bca0aa7b6b6f78518d33602b13b2e0dc83e151c62891abbfbc00aa324b82e9981d2f1d4ebcf2cca7cd7a2c474e33d7cbdc749e5a6e0b8005dac15086547203b SHA512 3ca0cb7f799fa2c9efc9f1ed2c350904a99e085e3d250e55d5198cb40eb2ae58640ba6226a6263996289d3122204a83e681f38e7195de2203cafb68f66a12272 +DIST ncurses-6.5-20241228.patch.gz 129948 BLAKE2B 9366438db329bfef3db29c572171abea3fb5b56a430c9ff09c51b0738429b437fee760be3812e0f93120ae9896bba61f28fdbe29b5cd2d30f2cca19ad29b287f SHA512 292eeaa4ee41eebb2c64129d77b1baf3e64e5c5960008093c9b11a33295bd5ef04bea7b11bd02d38f5f819e7ac8ca5d69a6a114213c849a0e5f0bb94852cce9e +DIST ncurses-6.5-20241228.patch.gz.asc 729 BLAKE2B a32ed7189f0557da6fcdcf4b8cab88f0462906166b71db82cfb14ae137cad9c86a85cf3cb5fb9e6bc1b7d7ecbb24a34d96527b76a466fbea96e4be458a72add4 SHA512 015fee99356fb2bdadb546e67d3773196a442a53ee2abd7dc839b0e6afd569438031249ed4c33920e716b14d928c2198969199eb0270a18cae66411658934bfb +DIST ncurses-6.5-20250104.patch.gz 22099 BLAKE2B 176b9ed65414b55cc2f2bcdcc68c7bbe84dbbe6dd5dbd3071e6a69187932f973e45cfb2aa5714752a1cc66b1317807548fd3d8075ab97d7a648e6527381bdbe7 SHA512 9667b9995eefeb6d6d59b11ca37fa57b5407a36a5e29dade672787645e851f5e0f30f7838ecb368b247e50ab54b1f2ed1fe70ef6df86609fc72e27d259907733 +DIST ncurses-6.5-20250104.patch.gz.asc 729 BLAKE2B a224636d20cddeb11e1c8dfd6fe0908cd53b1d045e9bbeccf9fe29cb59092fbc3f25b7d80106a8a7c8a21d71175f8e01431d04ede5dd10a0a42a13cf58ec6e4a SHA512 aad743612aff3720bcf210539c69d41e7c5a196af79b3129957ddf5eb1201941bd6e1efe41a9a5a0e75c92fe89c12cf43ab78cf5748313b8ed41ba62317c57d5 +DIST ncurses-6.5-20250111.patch.gz 11034 BLAKE2B b9b9b39035e6f5730a39e358faf7b53bf0728e5a6de5e5f9285d72239c0b3e9dc029d5aa6528b60f729aa30d4d76959fc091570382d5e43bdb4738e6b906e29b SHA512 d6c90512348a7b5e5d5d82acef95973539bcf49203481087454cd9cc75f08051697ef2011f96a902f97d5f6eb3f69cee2802bc5dcec8cb58ec97f56b510fdf0c +DIST ncurses-6.5-20250111.patch.gz.asc 729 BLAKE2B d1fdefb370d3f1a0d698e1bc8f4d6d4b2f333f8f4440e61a3d32a5d4dd1667729776330f178399ecb726013cbfa71f8b1fd78ceaf61942c0b97f41f4196146c4 SHA512 ea5d82e01cc95a7141da52400e00da37b36762acb113258151a179d70b08cc58342e9d23cb0fe057fba88bf110f18c500f4b5c769684c57c2be7c5c83d6b01f5 +DIST ncurses-6.5-20250118.patch.gz 405753 BLAKE2B 6aa666a85bf7d1526984ac46cbbeb6103635c4f0fb93426ae06a05a4fa12e345dd052030ec639e23d377fe0a78e0e411d2343755a378ba4b18a3af9e42e5c438 SHA512 e82630a447fb759f1ee1f9b698094e1b18d83f235c970d1c910419de873cf7643b3f58fc279c42b17c2fd34c8ac090b703f735700fcce33c3ec68fee9544f99a +DIST ncurses-6.5-20250118.patch.gz.asc 729 BLAKE2B 22cea1147c6b30e24b2eab79e0f00b9901b45193f391a270799661eb4f45a943d2e0afba4f94f69b6a21a5ed7155636d9f775d29bac7aa4b0248fc2ba90d19d9 SHA512 fba7ea75945879f97294e75bee34e58ff4dbb0d10bf549a8928dbf308fdbdb978b377231a618be444e3a4426acc63a6d5f0f588fca82fda7585ef6af78b602e1 +DIST ncurses-6.5-20250125.patch.gz 11864 BLAKE2B f4fa5b4a9a0c87b11f5d3cc84961a19d3948658481255b65eba1041d3ff9952c4941e6879bdd9b3237087353800398eacf47fd44de114f9c57046a0a3b200da8 SHA512 7e8571cf264dad27136a00d7601b2bbe90c497f2caa8e7379b72547c9c1cf07c4b32e54773c22695c183d4444d2816ec020bafc3cec55ff3fb5d191e956a77c8 +DIST ncurses-6.5-20250125.patch.gz.asc 729 BLAKE2B 53fde87fdfa46107addc6ee523bfbc7db0b12d288882ae9bf85c1e5ffbcb26562809faa3f284cfe1c68665cf666ab50c52abffd42b03d9f82ca98c7fd8e2895e SHA512 6e3b6c009b0b429238dee41639fd2f1535374c7f84c9b432756fe5e22eba38171f2ced867bc28b924ac2d338938bfa840a560ace54d4ffd329e986a0080749b8 DIST ncurses-6.5.tar.gz 3688489 BLAKE2B d0a05c218b5f320ba9abe2f322787baef1d15d764e503c81d49772b54b2927d28ecbeb500c8e514996226b41f69445b4de44ff423cec25b61847307fe61682ec SHA512 fc5a13409d2a530a1325776dcce3a99127ddc2c03999cfeb0065d0eee2d68456274fb1c7b3cc99c1937bc657d0e7fca97016e147f93c7821b5a4a6837db821e8 DIST ncurses-6.5.tar.gz.sig 438 BLAKE2B 5789b47932ec97d3863c7a65306369f0a36cb5b1a35c1e009b5174f50941edceafc22e6f07db3843a096773663a0ca602c0ecb9465e6042d9a78d76ae5008215 SHA512 96ce61a3d529e48e249acecbf4bb9eae2d9f2f67506e92ffa3182f5e98040c38babf0c2c15d92fc5d96e1181e72be1b29fdbff7bee859dfe2ae387f9b8883092 DIST ncurses-6.5_p20241109-patches.tar.xz 63676 BLAKE2B 9981b740fcec18cc794074ccc93ae1dbe175e52449af2bddfd10a6fb1d5dfe9b545bd19fce5e601d2d85008425fd5cd6fc33042d7bcc854363b0642b9c880efe SHA512 076d2d39c46cf9236e5e65472e10182da2dffffa936c7567b11e23323d64f9739bb3818d4fdbdd75a14fd3f5b202dcdb7aaa6813afb5e303f81c094339824162 +DIST ncurses-6.5_p20250118-patches.tar.xz 64188 BLAKE2B 46ac7c8bcfb0ec4fb032ccff4ba0c57d15f925910eb4d108c626aba8fdecefd21660a05cf54a88a4668b50e489ce0a08526f978a0084c66b2105fc4d929fdfe5 SHA512 12ff29d5ec76487f8b368d481fc19d841e8ce6bc216ff614b6d6d543a1fa36020b403432c802665d99b7fb4f08ae863d7ac331e6e2d95ff86c719fdca383c3e2 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250118.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250118.ebuild new file mode 100644 index 00000000000..b3897588998 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250118.ebuild @@ -0,0 +1,472 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream +# provide a configure option for the ABI version. + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc +inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig + +MY_PV="${PV:0:3}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="Console display library" +HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/" +# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net +SRC_URI=" + mirror://gnu/ncurses/${MY_P}.tar.gz + https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz + https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz + verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig ) +" + +GENTOO_PATCH_DEV=sam +GENTOO_PATCH_PV=6.5_p20250118 +GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches + +# Populated below in a loop. Do not add patches manually here. +UPSTREAM_PATCHES=() + +if [[ ${PV} == *_p* ]] ; then + # Sometimes, after releases, there's no megapatch available yet. + # + # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/: + # + # "At times (generally to mark a relatively stable point), I create a rollup + # patch, which consists of all changes from the release through the current date." + # + # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html, + # the patches are considered to be acceptable to use after some testing. They + # are both for development but also bug fixes. + # + # This array should contain a list of all the snapshots since the last + # release if there's no megapatch available yet. + PATCH_DATES=( + 20240504 + 20240511 + 20240518 + 20240519 + 20240525 + 20240601 + 20240608 + 20240615 + 20240622 + 20240629 + 20240706 + 20240713 + 20240720 + 20240727 + 20240810 + 20240817 + 20240824 + 20240831 + 20240914 + 20240922 + 20240928 + 20241006 + 20241019 + 20241026 + 20241102 + 20241109 + 20241123 + 20241130 + 20241207 + 20241214 + 20241221 + 20241228 + 20250104 + 20250111 + + # Latest patch is just _pN = $(ver_cut 4) + $(ver_cut 4) + ) + + if [[ -z ${PATCH_DATES[@]} ]] ; then + SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz" + SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc" + + # If we have a rollup patch, use that instead of the individual ones. + UPSTREAM_PATCHES+=( patch.sh ) + else + # We use a mirror as well because we've had reports of 403 forbidden for some users. + upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-" + upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-" + + # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}) + mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" ) + # Suffix each with .patch.gz + mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" ) + mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" ) + # Repeat for .patch.gz.asc for verify-sig + SRC_URI+=" ${mangled_patches[@]}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )" + + # For all of the URLs, chuck in invisible-island.net too: + SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )" + + UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" ) + + unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig + fi +fi + +SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MIT" +# The subslot reflects the SONAME. +SLOT="0/6" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace" +# In 6.5_p20250118, the C++ examples fail to link, but there's no automated +# testsuite anyway. Controlling building examples isn't really what USE=test +# is for. Just restrict them. +RESTRICT="!test? ( test ) test" + +# TODO: ncurses allows (and we take advantage of this, even) passing +# the SONAME for dlopen() use, so only the header is needed at build time. +# Maybe we should bundle a copy of gpm.h so we can move gpm to PDEPEND +# which would be far nicer UX-wise. +DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" +# Block the older ncurses that installed all files w/SLOT=5, bug #557472 +RDEPEND=" + ${DEPEND} + !<=sys-libs/ncurses-5.9-r4:5 + !& /dev/null \ + || lbuildflags="${dbuildflags}" + + # We can't re-use the multilib BUILD_DIR because we run outside of it. + BUILD_DIR="${WORKDIR}" \ + CC=${BUILD_CC} \ + CXX=${BUILD_CXX} \ + CPP=${BUILD_CPP} \ + CHOST=${CBUILD} \ + CFLAGS=${BUILD_CFLAGS} \ + CXXFLAGS=${BUILD_CXXFLAGS} \ + CPPFLAGS=${BUILD_CPPFLAGS} \ + LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ + do_configure cross --without-shared --with-normal --with-progs --without-ada + fi + multilib-minimal_src_configure +} + +multilib_src_configure() { + if [[ ${ABI} == x86 ]] ; then + # For compatibility with older binaries at slight performance cost. + # bug #616402 + use stack-realign && append-flags -mstackrealign + fi + + local t + for t in "${NCURSES_TARGETS[@]}" ; do + do_configure "${t}" + done +} + +do_configure() { + local target=$1 + shift + + mkdir "${BUILD_DIR}/${target}" || die + cd "${BUILD_DIR}/${target}" || die + + local conf=( + # We need the basic terminfo files in /etc, bug #37026. We will + # add '--with-terminfo-dirs' and then populate /etc/terminfo in + # src_install() ... + --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" + + # Enable installation of .pc files. + --enable-pc-files + # This path is used to control where the .pc files are installed. + --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" + + # Now the rest of the various standard flags. + --with-shared + --enable-fvisibility + # (Originally disabled until bug #245417 is sorted out, but now + # just keeping it off for good, given nobody needed it until now + # (2022) and we're trying to phase out bdb.) + --without-hashed-db + $(use_with ada) + $(use_with cxx) + $(use_with cxx cxx-binding) + --with-cxx-shared + $(use_with debug) + $(use_with profile) + # The configure script uses ldd to parse the linked output which + # is flaky for cross-compiling/multilib/ldd versions/etc... + $(use_with gpm gpm libgpm.so.1) + + # bug #930806 + --disable-setuid-environ + # TODO: Maybe do these for USE=hardened + #--disable-root-access + #--disable-root-environ + + --disable-termcap + --enable-symlinks + --with-manpage-format=normal + --enable-const + --enable-colorfgbg + --enable-hard-tabs + --enable-echo + $(use_enable !ada warnings) + $(use_with debug assertions) + $(use_enable !debug leaks) + $(use_with debug expanded) + $(use_with !debug macros) + $(multilib_native_with progs) + $(use_with test tests) + $(use_with trace) + $(use_with tinfo termlib) + --disable-stripping + --disable-pkg-ldflags + ) + + case ${CHOST} in + *-mingw32*) + conf+=( --enable-term-driver ) + ;; + *) + conf+=( --disable-term-driver ) + ;; + esac + + if [[ ${target} == ncurses*w ]] ; then + conf+=( --enable-widec ) + else + conf+=( --disable-widec ) + fi + if [[ ${target} == ncursest* ]] ; then + conf+=( --with-{pthread,reentrant} ) + else + conf+=( --without-{pthread,reentrant} ) + fi + + # Make sure each variant goes in a unique location. + if [[ ${target} == "ncurses" ]] ; then + # "ncurses" variant goes into "${EPREFIX}"/usr/include + # It is needed on Prefix because the configure script appends + # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr. + conf+=( --enable-overwrite ) + else + conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) + fi + # See comments in src_configure. + if [[ ${target} != "cross" ]] ; then + local cross_path="${WORKDIR}/cross" + [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic" + fi + + ECONF_SOURCE="${S}" econf "${conf[@]}" "$@" +} + +src_compile() { + # See comments in src_configure. + if ! has_version -b "~sys-libs/${P}:0" ; then + BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext) + fi + + multilib-minimal_src_compile +} + +multilib_src_compile() { + local t + for t in "${NCURSES_TARGETS[@]}" ; do + do_compile "${t}" + done +} + +do_compile() { + local target=$1 + shift + + cd "${BUILD_DIR}/${target}" || die + + # A little hack to fix parallel builds ... they break when + # generating sources so if we generate the sources first (in + # non-parallel), we can then build the rest of the package + # in parallel. This is not really a perf hit since the source + # generation is quite small. + emake -j1 sources + + # For some reason, sources depends on pc-files which depends on + # compiled libraries which depends on sources which ... + # Manually delete the pc-files file so the install step will + # create the .pc files we want. + rm -f misc/pc-files || die + emake "$@" +} + +multilib_src_install() { + local target + for target in "${NCURSES_TARGETS[@]}" ; do + emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install + done + + # Move main libraries into /. + if multilib_is_native_abi ; then + gen_usr_ldscript -a \ + "${NCURSES_TARGETS[@]}" \ + $(usex tinfo 'tinfow tinfo' '') + fi + + # Don't delete '*.dll.a', needed for linking, bug #631468 + if ! use static-libs; then + find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die + fi + + # Build fails to create this ... + # -FIXME- + # Ugly hackaround for riscv having two parts libdir (bug #689240) + # Replace this hack with an official solution once we have one... + # -FIXME- + dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \ + /usr/$(get_libdir)/terminfo + + # Remove obsolete libcurses symlink that is created by the build + # system. Technically, this could be also achieved + # via --disable-overwrite but it also moves headers implicitly, + # and we do not want to do this yet. + # bug #836696 + rm "${ED}"/usr/$(get_libdir)/libcurses* || die +} + +multilib_src_install_all() { + local terms=( + # Dumb/simple values that show up when using the in-kernel VT. + ansi console dumb linux + vt{52,100,102,200,220} + # [u]rxvt users used to be pretty common. Probably should drop this + # since upstream is dead and people are moving away from it. + rxvt{,-unicode}{,-256color} + # xterm users are common, as is terminals re-using/spoofing it. + xterm xterm-{,256}color + # screen is common (and reused by tmux). + screen{,-256color} + screen.xterm-256color + ) + if use split-usr ; then + local x + # We need the basic terminfo files in /etc for embedded/recovery, bug #37026 + einfo "Installing basic terminfo files in /etc..." + for x in "${terms[@]}"; do + local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) + local basedir=$(basename "$(dirname "${termfile}")") + + if [[ -n ${termfile} ]] ; then + dodir "/etc/terminfo/${basedir}" + mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die + dosym "../../../../etc/terminfo/${basedir}/${x}" \ + "/usr/share/terminfo/${basedir}/${x}" + fi + done + + echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses + + use minimal && rm -r "${ED}"/usr/share/terminfo* + # Because ncurses5-config --terminfo returns the directory we keep it + # bug #245374 + keepdir /usr/share/terminfo + elif use minimal ; then + # Keep only the basic terminfo files + find "${ED}"/usr/share/terminfo/ \ + \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \ + -type d -empty -delete || die + fi + + cd "${S}" || die + dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc + if use doc ; then + docinto html + dodoc -r doc/html/ + fi +} + +pkg_preinst() { + preserve_old_lib /$(get_libdir)/libncurses.so.5 + preserve_old_lib /$(get_libdir)/libncursesw.so.5 +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/libncurses.so.5 + preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250125.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250125.ebuild new file mode 100644 index 00000000000..65f1eefa867 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/ncurses/ncurses-6.5_p20250125.ebuild @@ -0,0 +1,473 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# sys-libs/ncurses-compat can be bumped with sys-libs/ncurses as upstream +# provide a configure option for the ABI version. + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc +inherit flag-o-matic toolchain-funcs multilib multilib-minimal preserve-libs usr-ldscript verify-sig + +MY_PV="${PV:0:3}" +MY_P="${PN}-${MY_PV}" +DESCRIPTION="Console display library" +HOMEPAGE="https://www.gnu.org/software/ncurses/ https://invisible-island.net/ncurses/" +# Keep invisible-mirror.net here as some users reported 403 forbidden with invisible-island.net +SRC_URI=" + mirror://gnu/ncurses/${MY_P}.tar.gz + https://invisible-island.net/archives/${PN}/${MY_P}.tar.gz + https://invisible-mirror.net/archives/${PN}/${MY_P}.tar.gz + verify-sig? ( mirror://gnu/ncurses/${MY_P}.tar.gz.sig ) +" + +GENTOO_PATCH_DEV=sam +GENTOO_PATCH_PV=6.5_p20250118 +GENTOO_PATCH_NAME=${PN}-${GENTOO_PATCH_PV}-patches + +# Populated below in a loop. Do not add patches manually here. +UPSTREAM_PATCHES=() + +if [[ ${PV} == *_p* ]] ; then + # Sometimes, after releases, there's no megapatch available yet. + # + # From upstream README at e.g. https://invisible-island.net/archives/ncurses/6.3/: + # + # "At times (generally to mark a relatively stable point), I create a rollup + # patch, which consists of all changes from the release through the current date." + # + # Also, from https://lists.gnu.org/archive/html/bug-ncurses/2019-08/msg00039.html, + # the patches are considered to be acceptable to use after some testing. They + # are both for development but also bug fixes. + # + # This array should contain a list of all the snapshots since the last + # release if there's no megapatch available yet. + PATCH_DATES=( + 20240504 + 20240511 + 20240518 + 20240519 + 20240525 + 20240601 + 20240608 + 20240615 + 20240622 + 20240629 + 20240706 + 20240713 + 20240720 + 20240727 + 20240810 + 20240817 + 20240824 + 20240831 + 20240914 + 20240922 + 20240928 + 20241006 + 20241019 + 20241026 + 20241102 + 20241109 + 20241123 + 20241130 + 20241207 + 20241214 + 20241221 + 20241228 + 20250104 + 20250111 + 20250118 + + # Latest patch is just _pN = $(ver_cut 4) + $(ver_cut 4) + ) + + if [[ -z ${PATCH_DATES[@]} ]] ; then + SRC_URI+=" https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz" + SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P/_p/-}.patch.sh.gz.asc" + + # If we have a rollup patch, use that instead of the individual ones. + UPSTREAM_PATCHES+=( patch.sh ) + else + # We use a mirror as well because we've had reports of 403 forbidden for some users. + upstream_url_base="https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}-" + upstream_m_url_base="https://invisible-mirror.net/archives/${PN}/${PV/_p*}/${MY_P}-" + + # Prefix each date with the upstream location (https://invisible-island.net/archives/${PN}/${PV/_p*}/${MY_P}) + mangled_patches=( "${PATCH_DATES[@]/#/${upstream_url_base}}" ) + # Suffix each with .patch.gz + mangled_patches=( "${mangled_patches[@]/%/.patch.gz}" ) + mangled_patches_sig=( "${mangled_patches[@]/%/.asc}" ) + # Repeat for .patch.gz.asc for verify-sig + SRC_URI+=" ${mangled_patches[@]}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]} )" + + # For all of the URLs, chuck in invisible-island.net too: + SRC_URI+=" ${mangled_patches[@]/${upstream_url_base}/${upstream_m_url_base}}" + SRC_URI+=" verify-sig? ( ${mangled_patches_sig[@]/${upstream_url_base}/${upstream_m_url_base}} )" + + UPSTREAM_PATCHES=( "${PATCH_DATES[@]/%/.patch}" ) + + unset upstream_url_base upstream_m_url_base mangled_patches mangled_patches_sig + fi +fi + +SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH_NAME}.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="MIT" +# The subslot reflects the SONAME. +SLOT="0/6" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="ada +cxx debug doc gpm minimal profile split-usr +stack-realign static-libs test tinfo trace" +# In 6.5_p20250118, the C++ examples fail to link, but there's no automated +# testsuite anyway. Controlling building examples isn't really what USE=test +# is for. Just restrict them. +RESTRICT="!test? ( test ) test" + +# TODO: ncurses allows (and we take advantage of this, even) passing +# the SONAME for dlopen() use, so only the header is needed at build time. +# Maybe we should bundle a copy of gpm.h so we can move gpm to PDEPEND +# which would be far nicer UX-wise. +DEPEND="gpm? ( sys-libs/gpm[${MULTILIB_USEDEP}] )" +# Block the older ncurses that installed all files w/SLOT=5, bug #557472 +RDEPEND=" + ${DEPEND} + !<=sys-libs/ncurses-5.9-r4:5 + !& /dev/null \ + || lbuildflags="${dbuildflags}" + + # We can't re-use the multilib BUILD_DIR because we run outside of it. + BUILD_DIR="${WORKDIR}" \ + CC=${BUILD_CC} \ + CXX=${BUILD_CXX} \ + CPP=${BUILD_CPP} \ + CHOST=${CBUILD} \ + CFLAGS=${BUILD_CFLAGS} \ + CXXFLAGS=${BUILD_CXXFLAGS} \ + CPPFLAGS=${BUILD_CPPFLAGS} \ + LDFLAGS="${BUILD_LDFLAGS} ${lbuildflags}" \ + do_configure cross --without-shared --with-normal --with-progs --without-ada + fi + multilib-minimal_src_configure +} + +multilib_src_configure() { + if [[ ${ABI} == x86 ]] ; then + # For compatibility with older binaries at slight performance cost. + # bug #616402 + use stack-realign && append-flags -mstackrealign + fi + + local t + for t in "${NCURSES_TARGETS[@]}" ; do + do_configure "${t}" + done +} + +do_configure() { + local target=$1 + shift + + mkdir "${BUILD_DIR}/${target}" || die + cd "${BUILD_DIR}/${target}" || die + + local conf=( + # We need the basic terminfo files in /etc, bug #37026. We will + # add '--with-terminfo-dirs' and then populate /etc/terminfo in + # src_install() ... + --with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo" + + # Enable installation of .pc files. + --enable-pc-files + # This path is used to control where the .pc files are installed. + --with-pkg-config-libdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig" + + # Now the rest of the various standard flags. + --with-shared + --enable-fvisibility + # (Originally disabled until bug #245417 is sorted out, but now + # just keeping it off for good, given nobody needed it until now + # (2022) and we're trying to phase out bdb.) + --without-hashed-db + $(use_with ada) + $(use_with cxx) + $(use_with cxx cxx-binding) + --with-cxx-shared + $(use_with debug) + $(use_with profile) + # The configure script uses ldd to parse the linked output which + # is flaky for cross-compiling/multilib/ldd versions/etc... + $(use_with gpm gpm libgpm.so.1) + + # bug #930806 + --disable-setuid-environ + # TODO: Maybe do these for USE=hardened + #--disable-root-access + #--disable-root-environ + + --disable-termcap + --enable-symlinks + --with-manpage-format=normal + --enable-const + --enable-colorfgbg + --enable-hard-tabs + --enable-echo + $(use_enable !ada warnings) + $(use_with debug assertions) + $(use_enable !debug leaks) + $(use_with debug expanded) + $(use_with !debug macros) + $(multilib_native_with progs) + $(use_with test tests) + $(use_with trace) + $(use_with tinfo termlib) + --disable-stripping + --disable-pkg-ldflags + ) + + case ${CHOST} in + *-mingw32*) + conf+=( --enable-term-driver ) + ;; + *) + conf+=( --disable-term-driver ) + ;; + esac + + if [[ ${target} == ncurses*w ]] ; then + conf+=( --enable-widec ) + else + conf+=( --disable-widec ) + fi + if [[ ${target} == ncursest* ]] ; then + conf+=( --with-{pthread,reentrant} ) + else + conf+=( --without-{pthread,reentrant} ) + fi + + # Make sure each variant goes in a unique location. + if [[ ${target} == "ncurses" ]] ; then + # "ncurses" variant goes into "${EPREFIX}"/usr/include + # It is needed on Prefix because the configure script appends + # "ncurses" to "${prefix}/include" if "${prefix}" is not /usr. + conf+=( --enable-overwrite ) + else + conf+=( --includedir="${EPREFIX}"/usr/include/${target} ) + fi + # See comments in src_configure. + if [[ ${target} != "cross" ]] ; then + local cross_path="${WORKDIR}/cross" + [[ -d ${cross_path} ]] && export TIC_PATH="${cross_path}/progs/tic" + fi + + ECONF_SOURCE="${S}" econf "${conf[@]}" "$@" +} + +src_compile() { + # See comments in src_configure. + if ! has_version -b "~sys-libs/${P}:0" ; then + BUILD_DIR="${WORKDIR}" do_compile cross -C progs tic$(get_exeext) + fi + + multilib-minimal_src_compile +} + +multilib_src_compile() { + local t + for t in "${NCURSES_TARGETS[@]}" ; do + do_compile "${t}" + done +} + +do_compile() { + local target=$1 + shift + + cd "${BUILD_DIR}/${target}" || die + + # A little hack to fix parallel builds ... they break when + # generating sources so if we generate the sources first (in + # non-parallel), we can then build the rest of the package + # in parallel. This is not really a perf hit since the source + # generation is quite small. + emake -j1 sources + + # For some reason, sources depends on pc-files which depends on + # compiled libraries which depends on sources which ... + # Manually delete the pc-files file so the install step will + # create the .pc files we want. + rm -f misc/pc-files || die + emake "$@" +} + +multilib_src_install() { + local target + for target in "${NCURSES_TARGETS[@]}" ; do + emake -C "${BUILD_DIR}/${target}" DESTDIR="${D}" install + done + + # Move main libraries into /. + if multilib_is_native_abi ; then + gen_usr_ldscript -a \ + "${NCURSES_TARGETS[@]}" \ + $(usex tinfo 'tinfow tinfo' '') + fi + + # Don't delete '*.dll.a', needed for linking, bug #631468 + if ! use static-libs; then + find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die + fi + + # Build fails to create this ... + # -FIXME- + # Ugly hackaround for riscv having two parts libdir (bug #689240) + # Replace this hack with an official solution once we have one... + # -FIXME- + dosym $(sed 's@[^/]\+@..@g' <<< $(get_libdir))/share/terminfo \ + /usr/$(get_libdir)/terminfo + + # Remove obsolete libcurses symlink that is created by the build + # system. Technically, this could be also achieved + # via --disable-overwrite but it also moves headers implicitly, + # and we do not want to do this yet. + # bug #836696 + rm "${ED}"/usr/$(get_libdir)/libcurses* || die +} + +multilib_src_install_all() { + local terms=( + # Dumb/simple values that show up when using the in-kernel VT. + ansi console dumb linux + vt{52,100,102,200,220} + # [u]rxvt users used to be pretty common. Probably should drop this + # since upstream is dead and people are moving away from it. + rxvt{,-unicode}{,-256color} + # xterm users are common, as is terminals re-using/spoofing it. + xterm xterm-{,256}color + # screen is common (and reused by tmux). + screen{,-256color} + screen.xterm-256color + ) + if use split-usr ; then + local x + # We need the basic terminfo files in /etc for embedded/recovery, bug #37026 + einfo "Installing basic terminfo files in /etc..." + for x in "${terms[@]}"; do + local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null) + local basedir=$(basename "$(dirname "${termfile}")") + + if [[ -n ${termfile} ]] ; then + dodir "/etc/terminfo/${basedir}" + mv "${termfile}" "${ED}/etc/terminfo/${basedir}/" || die + dosym "../../../../etc/terminfo/${basedir}/${x}" \ + "/usr/share/terminfo/${basedir}/${x}" + fi + done + + echo "CONFIG_PROTECT_MASK=\"/etc/terminfo\"" | newenvd - 50ncurses + + use minimal && rm -r "${ED}"/usr/share/terminfo* + # Because ncurses5-config --terminfo returns the directory we keep it + # bug #245374 + keepdir /usr/share/terminfo + elif use minimal ; then + # Keep only the basic terminfo files + find "${ED}"/usr/share/terminfo/ \ + \( -type f -o -type l \) ${terms[*]/#/! -name } -delete , \ + -type d -empty -delete || die + fi + + cd "${S}" || die + dodoc ANNOUNCE MANIFEST NEWS README* TO-DO doc/*.doc + if use doc ; then + docinto html + dodoc -r doc/html/ + fi +} + +pkg_preinst() { + preserve_old_lib /$(get_libdir)/libncurses.so.5 + preserve_old_lib /$(get_libdir)/libncursesw.so.5 +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/libncurses.so.5 + preserve_old_lib_notify /$(get_libdir)/libncursesw.so.5 +} From b1b2a76ae6dd558f31c8fb1a6d3697696b735980 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:16 +0000 Subject: [PATCH 101/145] sys-libs/zlib: Sync with Gentoo It's from Gentoo commit 5ff202d5324f48ba662de69887abf53735b23f0d. --- .../portage-stable/sys-libs/zlib/Manifest | 2 - ...configure-fix-AR-RANLIB-NM-detection.patch | 88 --------- .../files/zlib-1.2.13-CVE-2023-45853.patch | 40 ---- ...RWX-segment-warnings-on-sparc-system.patch | 59 ------ ...zlib-1.2.13-use-LDFLAGS-in-configure.patch | 72 -------- .../sys-libs/zlib/zlib-1.3-r4.ebuild | 173 ------------------ 6 files changed, 434 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.3-r4.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/Manifest index 74c4bb0f822..8a869ad0f16 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/Manifest @@ -1,4 +1,2 @@ DIST zlib-1.3.1.tar.xz 1305740 BLAKE2B 42d109223801a493de6d52e7343403d7fc3234a6ca816425fe41ac9c18019b01b93841acd28a235e99f2256a6a17f93624e96b2ddb58d588c8190a6bedb82910 SHA512 1e8e70b362d64a233591906a1f50b59001db04ca14aaffad522198b04680be501736e7d536b4191e2f99767e7001ca486cd802362cca2be05d5d409b83ea732d DIST zlib-1.3.1.tar.xz.asc 235 BLAKE2B b135336ef55a0c4b8e219e760bbe04bad082c405246ce51a2b373c3dfba0b05cb1e6f539363972f4cabd8290be1db1fdb2fc47fb562c6c612a08d9393065f75b SHA512 d181e9772a8139b3b2f3f42b994a65a966101db35eb46b5c84021c5eb0cc3b4511eb5e9172c509483bd9f7015794b15cfca78ed0959bd91e8216dc12c1c6e668 -DIST zlib-1.3.tar.xz 1295740 BLAKE2B 5fe0f32339267348a313f23a21e9588bdb180b7415be303c85f5f169444d019e5f176ef7322f6e64297c360acc2a6041c50e2f66d1860e5c392d8970990f176a SHA512 3868ac4da5842dd36c9dad794930675b9082ce15cbd099ddb79c0f6bd20a24aa8f33a123f378f26fe0ae02d91f31f2994dccaac565cedeaffed7b315e6ded2a2 -DIST zlib-1.3.tar.xz.asc 235 BLAKE2B 5fe6ce952699a19e848d0a6e6c3622f934340068fdcd29afb35c74f3c8ae66d04de644800d10b38c743bb2f4852ba28f1a97313cb0e6e6f9b804cbca5289ebbb SHA512 8f3ce5c21938d6abc7e121d2939648a0ce2dc01a8ab4eb001d44eb159935dd0b4f5b5e371b3ecfc0ceb23689e2cefe002065968908503cde15b1bba08aff9db6 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch deleted file mode 100644 index 1ab5b2f5dc8..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 4232e67ee1440634af8209c7022dfc64cf862819 Mon Sep 17 00:00:00 2001 -From: Adrian Ratiu -Date: Mon, 17 Jan 2022 10:49:58 +0200 -Subject: [PATCH v3] configure: fix AR/RANLIB/NM detection - -Taken from zlib-devel ML: -https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html - -Bug: https://bugs.gentoo.org/831628 - -Scenarios where ${CROSS_PREFIX}ar & co are set but not desired -are possible, for example in ChromiumOS we use the GNU binutils -tools & GCC to build glibc but LLVM/Clang is used for the rest -of the system. - -This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX -tools so they can be set to llvm-ar/ranlib/nm. - -Suggested-by: Manoj Gupta -Signed-off-by: Adrian Ratiu ---- - -Changes in v3: - * Whitespace style fixes - * Fixed top level variable tests (eg -z AR -> -z $AR) - * Review and testing as part of Gentoo PR: - https://github.com/gentoo/gentoo/pull/23888 -Changes in v2: - * Fixed a typo in the "unset NM" case ---- - configure | 38 ++++++++++++++++++++++---------------- - 1 file changed, 22 insertions(+), 16 deletions(-) - -diff --git a/configure b/configure -index e974d1f..045c616 100755 ---- a/configure -+++ b/configure -@@ -46,25 +46,31 @@ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib. - VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h` - - # establish commands for library building --if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then -- AR=${AR-"${CROSS_PREFIX}ar"} -- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log --else -- AR=${AR-"ar"} -- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -+if [ -z "$AR" ]; then -+ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then -+ AR=${AR-"${CROSS_PREFIX}ar"} -+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -+ else -+ AR="ar" -+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log -+ fi - fi - ARFLAGS=${ARFLAGS-"rc"} --if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then -- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} -- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log --else -- RANLIB=${RANLIB-"ranlib"} -+if [ -z "$RANLIB" ]; then -+ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then -+ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"} -+ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log -+ else -+ RANLIB="ranlib" -+ fi - fi --if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then -- NM=${NM-"${CROSS_PREFIX}nm"} -- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log --else -- NM=${NM-"nm"} -+if [ -z "$NM" ]; then -+ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then -+ NM=${NM-"${CROSS_PREFIX}nm"} -+ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log -+ else -+ NM="nm" -+ fi - fi - - # set defaults before processing command line options --- -2.35.0 - diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch deleted file mode 100644 index ecb5acecbb3..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch +++ /dev/null @@ -1,40 +0,0 @@ -https://bugs.gentoo.org/916484 -https://github.com/madler/zlib/pull/843 -https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c - -From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001 -From: Hans Wennborg -Date: Fri, 18 Aug 2023 11:05:33 +0200 -Subject: [PATCH] Reject overflows of zip header fields in minizip. - -This checks the lengths of the file name, extra field, and comment -that would be put in the zip headers, and rejects them if they are -too long. They are each limited to 65535 bytes in length by the zip -format. This also avoids possible buffer overflows if the provided -fields are too long. ---- - contrib/minizip/zip.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c -index 3d3d4cadd..0446109b2 100644 ---- a/contrib/minizip/zip.c -+++ b/contrib/minizip/zip.c -@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c - return ZIP_PARAMERROR; - #endif - -+ // The filename and comment length must fit in 16 bits. -+ if ((filename!=NULL) && (strlen(filename)>0xffff)) -+ return ZIP_PARAMERROR; -+ if ((comment!=NULL) && (strlen(comment)>0xffff)) -+ return ZIP_PARAMERROR; -+ // The extra field length must fit in 16 bits. If the member also requires -+ // a Zip64 extra block, that will also need to fit within that 16-bit -+ // length, but that will be checked for later. -+ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff)) -+ return ZIP_PARAMERROR; -+ - zi = (zip64_internal*)file; - - if (zi->in_opened_file_inzip == 1) diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch deleted file mode 100644 index b5a1b4de2c4..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch +++ /dev/null @@ -1,59 +0,0 @@ -https://bugs.gentoo.org/879883 -https://github.com/madler/zlib/issues/751 - -From 2ad2713e6cb9166dcede9a020f6913b8189ff0c6 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 23 Nov 2022 04:17:16 +0000 -Subject: [PATCH] Revert "Turn off RWX segment warnings on sparc systems." - -This breaks building on sparc with older binutils. - -This reverts commit 29fd715fd0bdaffee21e2d2d37be8c5a6ac67ee4. ---- a/Makefile.in -+++ b/Makefile.in -@@ -22,7 +22,7 @@ CFLAGS=-O - - SFLAGS=-O - LDFLAGS= --TEST_LDFLAGS=$(LDFLAGS) -L. libz.a -+TEST_LDFLAGS=-L. libz.a - LDSHARED=$(CC) - CPP=$(CC) -E - -@@ -288,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS) - - examplesh$(EXE): example.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) - - minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) -- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV) -+ $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) - - example64$(EXE): example64.o $(STATICLIB) - $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS) ---- a/configure -+++ b/configure -@@ -33,10 +33,7 @@ fi - # set command prefix for cross-compilation - if [ -n "${CHOST}" ]; then - uname=${CHOST} -- mname=${CHOST} - CROSS_PREFIX="${CHOST}-" --else -- mname=`(uname -a || echo unknown) 2>/dev/null` - fi - - # destination name for static library -@@ -223,10 +220,6 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then - fi - case "$uname" in - Linux* | linux* | *-linux* | GNU | GNU/* | solaris*) -- case "$mname" in -- *sparc*) -- LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;; -- esac - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;; - *BSD | *bsd* | DragonFly) - LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch deleted file mode 100644 index 9f2b240334e..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.13-use-LDFLAGS-in-configure.patch +++ /dev/null @@ -1,72 +0,0 @@ -https://github.com/madler/zlib/pull/599 - -Rebased version of: - -From 37c9730ba474d274f4cc6a974943eef95087b9f6 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 8 Mar 2022 22:38:47 -0800 -Subject: [PATCH] configure: Pass LDFLAGS to link tests - -LDFLAGS can contain critical flags without which linking wont succeed -therefore ensure that all configure tests involving link time checks are -using LDFLAGS on compiler commandline along with CFLAGS to ensure the -tests perform correctly. Without this some tests may fail resulting in -wrong confgure result, ending in miscompiling the package - -Signed-off-by: Khem Raj ---- a/configure -+++ b/configure -@@ -436,7 +436,7 @@ if test $shared -eq 1; then - echo Checking for shared library support... | tee -a configure.log - # we must test in two steps (cc then ld), required at least on SunOS 4.x - if try $CC -w -c $SFLAGS $test.c && -- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then -+ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then - echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log - elif test -z "$old_cc" -a -z "$old_cflags"; then - echo No shared library support. | tee -a configure.log -@@ -498,7 +498,7 @@ int main(void) { - } - EOF - fi -- if try $CC $CFLAGS -o $test $test.c; then -+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then - sizet=`./$test` - echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log - CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}" -@@ -532,7 +532,7 @@ int main(void) { - return 0; - } - EOF -- if try $CC $CFLAGS -o $test $test.c; then -+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then - echo "Checking for fseeko... Yes." | tee -a configure.log - else - CFLAGS="${CFLAGS} -DNO_FSEEKO" -@@ -549,7 +549,7 @@ cat > $test.c < - int main() { return strlen(strerror(errno)); } - EOF --if try $CC $CFLAGS -o $test $test.c; then -+if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then - echo "Checking for strerror... Yes." | tee -a configure.log - else - CFLAGS="${CFLAGS} -DNO_STRERROR" -@@ -656,7 +656,7 @@ int main() - return (mytest("Hello%d\n", 1)); - } - EOF -- if try $CC $CFLAGS -o $test $test.c; then -+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then - echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log -@@ -746,7 +746,7 @@ int main() - } - EOF - -- if try $CC $CFLAGS -o $test $test.c; then -+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then - echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log - - echo >> configure.log diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.3-r4.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.3-r4.ebuild deleted file mode 100644 index d96a00b393a..00000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.3-r4.ebuild +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Worth keeping an eye on 'develop' branch upstream for possible backports. -AUTOTOOLS_AUTO_DEPEND="no" -VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc -inherit autotools edo multilib-minimal flag-o-matic verify-sig - -DESCRIPTION="Standard (de)compression library" -HOMEPAGE="https://zlib.net/" -SRC_URI=" - https://zlib.net/${P}.tar.xz - https://zlib.net/fossils/${P}.tar.xz - https://zlib.net/current/beta/${P}.tar.xz - https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz - verify-sig? ( - https://zlib.net/${P}.tar.xz.asc - https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc - ) -" - -LICENSE="ZLIB" -SLOT="0/1" # subslot = SONAME -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" -IUSE="minizip static-libs" - -RDEPEND="!sys-libs/zlib-ng[compat]" -DEPEND="${RDEPEND}" -BDEPEND=" - minizip? ( ${AUTOTOOLS_DEPEND} ) - verify-sig? ( sec-keys/openpgp-keys-madler ) -" - -PATCHES=( - # Don't install unexpected & unused crypt.h header (which would clash with other pkgs) - # Pending upstream. bug #658536 - "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch - - # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628 - "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch - - # Respect LDFLAGS during configure tests. Pending upstream - "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch - - # Fix building on sparc with older binutils, we pass it in ebuild instead - "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch - - # CVE-2023-45853 (bug #916484) - "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch -) - -src_prepare() { - default - - if use minizip ; then - cd contrib/minizip || die - eautoreconf - fi - - case ${CHOST} in - *-mingw*|mingw*) - # Uses preconfigured Makefile rather than configure script - multilib_copy_sources - - ;; - esac -} - -multilib_src_configure() { - # We pass manually instead of relying on the configure script/makefile - # because it would pass it even for older binutils. - use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments) - - append-ldflags $(test-flags-CCLD -Wl,--undefined-version) - - case ${CHOST} in - *-mingw*|mingw*) - ;; - - *) - # bug #347167 - local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) - - local myconf=( - --shared - --prefix="${EPREFIX}/usr" - --libdir="${EPREFIX}/usr/$(get_libdir)" - ${uname:+--uname=${uname}} - ) - - # Not an autoconf script, so can't use econf - edo "${S}"/configure "${myconf[@]}" - - ;; - esac - - if use minizip ; then - local minizipdir="contrib/minizip" - mkdir -p "${BUILD_DIR}/${minizipdir}" || die - - cd ${minizipdir} || die - ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static) - fi -} - -multilib_src_compile() { - case ${CHOST} in - *-mingw*|mingw*) - emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- - sed \ - -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \ - -e 's|@exec_prefix@|${prefix}|g' \ - -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \ - -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \ - -e 's|@includedir@|${prefix}/include|g' \ - -e 's|@VERSION@|'${PV}'|g' \ - zlib.pc.in > zlib.pc || die - ;; - - *) - emake - - ;; - esac - - use minizip && emake -C contrib/minizip -} - -multilib_src_install() { - case ${CHOST} in - *-mingw*|mingw*) - emake -f win32/Makefile.gcc install \ - BINARY_PATH="${ED}/usr/bin" \ - LIBRARY_PATH="${ED}/usr/$(get_libdir)" \ - INCLUDE_PATH="${ED}/usr/include" \ - SHARED_MODE=1 - - # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136 - insinto /usr/$(get_libdir)/pkgconfig - doins zlib.pc - - ;; - - *) - emake install DESTDIR="${D}" LDCONFIG=: - - ;; - esac - - if use minizip ; then - emake -C contrib/minizip install DESTDIR="${D}" - - # This might not exist if slibtool is used. - # bug #816756 - rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die - fi - - if ! use static-libs ; then - # bug #419645 - rm "${ED}"/usr/$(get_libdir)/libz.a || die - fi -} - -multilib_src_install_all() { - dodoc FAQ README ChangeLog doc/*.txt - - if use minizip ; then - dodoc contrib/minizip/*.txt - doman contrib/minizip/*.1 - fi -} From d5b083ddfb899b0716aa0dd049d1ccd5568b9132 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:17 +0000 Subject: [PATCH 102/145] sys-process/lsof: Sync with Gentoo It's from Gentoo commit 5919667d383f13ce1827d0867f3629145d7e34e1. --- .../portage-stable/sys-process/lsof/lsof-4.99.4.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.4.ebuild index c9c1e55809f..8e400d1ef0b 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.4.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.4.ebuild @@ -10,7 +10,7 @@ SRC_URI="https://github.com/lsof-org/lsof/releases/download/${PV}/${P}.tar.gz" LICENSE="lsof" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="rpc selinux" RDEPEND=" From a6c18999bb3f3ebb12cf6b7730bbd9b80cf81641 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:47 +0000 Subject: [PATCH 103/145] virtual/perl-Getopt-Long: Sync with Gentoo It's from Gentoo commit fd2cb4efd1228f8efb9babbe04a6119d355ff2db. --- .../virtual/perl-Getopt-Long/perl-Getopt-Long-2.580.0.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/virtual/perl-Getopt-Long/perl-Getopt-Long-2.580.0.ebuild b/sdk_container/src/third_party/portage-stable/virtual/perl-Getopt-Long/perl-Getopt-Long-2.580.0.ebuild index d493ddb8851..d5520a50a87 100644 --- a/sdk_container/src/third_party/portage-stable/virtual/perl-Getopt-Long/perl-Getopt-Long-2.580.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/virtual/perl-Getopt-Long/perl-Getopt-Long-2.580.0.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DESCRIPTION="Virtual for ${PN#perl-}" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" RDEPEND=" ~perl-core/${PN#perl-}-${PV} From 683b8b0ddda0d6c7289989c9c7fc9e929f70eaa4 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 27 Jan 2025 07:11:55 +0000 Subject: [PATCH 104/145] x11-libs/pixman: Sync with Gentoo It's from Gentoo commit 1ceccc64345697c4ae54c843f6dc55f9f38256d7. --- .../portage-stable/x11-libs/pixman/pixman-0.44.2.ebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.44.2.ebuild b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.44.2.ebuild index 7dbb4e17df1..08434b2ec36 100644 --- a/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.44.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/x11-libs/pixman/pixman-0.44.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -14,7 +14,7 @@ inherit ${GIT_ECLASS} meson-multilib multiprocessing toolchain-funcs DESCRIPTION="Low-level pixel manipulation routines" HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/" if [[ ${PV} != 9999* ]]; then - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" SRC_URI="https://www.x.org/releases/individual/lib/${P}.tar.xz" fi From 42ca81f22abb0ed2c29dc37748b1c0883cd61dd3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 13:27:39 +0100 Subject: [PATCH 105/145] app-admin/sudo: Move from overlay, sync with Gentoo and modify It's from Gentoo commit e9492217affdba34c6691244a2ff275b4d65cdb4. We can do the move by applying our modifications in a different way: - Instead of removing dev-lang/perl runtime dependency, we add dev-lang/perl to package.provided for the generic profile. - We remove OpenLDAP schema files and sudo.conf with install mask. - We keep sudoers.d with a post-src_install hook. The move was triggered by a need to handle the missing USE=sudo in newer versions of sys-auth/sssd package, which is dependency of app-admin/sudo. --- .../coreos-overlay/app-admin/sudo/Manifest | 2 - .../coreos-overlay/app-admin/sudo/README.md | 8 - .../coreos/config/env/app-admin/sudo | 14 + .../coreos/targets/generic/package.provided | 3 + .../portage-stable/app-admin/sudo/Manifest | 8 + ...o-1.9.16-allow-disabling-secure-path.patch | 54 ++++ .../app-admin/sudo/metadata.xml | 0 .../app-admin/sudo/sudo-1.9.15_p5-r1.ebuild} | 27 +- .../app-admin/sudo/sudo-1.9.16-r2.ebuild | 296 ++++++++++++++++++ .../app-admin/sudo/sudo-1.9.16_p1-r1.ebuild | 294 +++++++++++++++++ .../app-admin/sudo/sudo-1.9.16_p2-r1.ebuild | 291 +++++++++++++++++ .../app-admin/sudo/sudo-9999.ebuild | 294 +++++++++++++++++ 12 files changed, 1264 insertions(+), 27 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-admin/sudo/Manifest delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-admin/sudo/README.md create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-admin/sudo create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/files/sudo-1.9.16-allow-disabling-secure-path.patch rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-admin/sudo/metadata.xml (100%) rename sdk_container/src/third_party/{coreos-overlay/app-admin/sudo/sudo-1.9.15_p5.ebuild => portage-stable/app-admin/sudo/sudo-1.9.15_p5-r1.ebuild} (92%) create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16-r2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p1-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p2-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-9999.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/Manifest b/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/Manifest deleted file mode 100644 index 90f9f2b10c4..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST sudo-1.9.15p5.tar.gz 5306611 BLAKE2B 73ee598c2a2848d5be24f97492b13eba2f326c514799220e43a1aeafc6692224a7555fb7cc0a96a2720751d3e4d98e752804db589ac3c1476f24e71f5b9bc720 SHA512 ebac69719de2fe7bd587924701bdd24149bf376a68b17ec02f69b2b96d4bb6fa5eb8260a073ec5ea046d3ac69bb5b1c0b9d61709fe6a56f1f66e40817a70b15a -DIST sudo-1.9.15p5.tar.gz.sig 566 BLAKE2B ddd8fed1b3721aafdb32b762834168063c3f0f003ef5d83f1883615320da6fe89b08d72c8e893c8b2bf9fd892a40e47cc77d72672e43b5a24db50e7194d9bc4c SHA512 97480a3d27b546a93e997c3a1e8169904a7625ab8fa6198d0b7e1d2d040f55b2d58462cd08e5cc97c2f1c817b12343e35cdd7db207aee42785f2b95b17c600b0 diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/README.md b/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/README.md deleted file mode 100644 index c90febe8b21..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Flatcar changes -- Remove Perl Runtime Dependency -- Remove OpenLDAP schema files for sudo -``` -insinto /etc/openldap/schema -newins doc/schema.OpenLDAP sudo.schema -``` -- Remove sudo.conf file as it is shipped via baselayout diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-admin/sudo b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-admin/sudo new file mode 100644 index 00000000000..89bd428736b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-admin/sudo @@ -0,0 +1,14 @@ +cros_post_src_install_keep_etc_sudoers_d() { + # Flatcar: Build system installs /etc/sudoers.d, let's make + # sure we keep having it. + # + # Upstream PR: https://github.com/gentoo/gentoo/pull/37397 + keepdir /etc/sudoers.d +} + +# We don't ship OpenLDAP schemas (why?) and we provide sudo.conf +# through baselayout. +sudo_install_mask='/etc/openldap/schema /etc/sudo.conf' +INSTALL_MASK+=" ${sudo_install_mask}" +PKG_INSTALL_MASK+=" ${sudo_install_mask}" +unset sudo_install_mask diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.provided b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.provided index ff38bc4c542..d4a409acb36 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.provided +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.provided @@ -21,3 +21,6 @@ app-misc/editor-wrapper-4 acct-group/named-0-r3 acct-user/named-0-r3 sys-process/psmisc-23.7 + +# Pulled in by app-admin/sudo +dev-lang/perl-5.40.0 diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/Manifest b/sdk_container/src/third_party/portage-stable/app-admin/sudo/Manifest new file mode 100644 index 00000000000..746aebd541c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/Manifest @@ -0,0 +1,8 @@ +DIST sudo-1.9.15p5.tar.gz 5306611 BLAKE2B 73ee598c2a2848d5be24f97492b13eba2f326c514799220e43a1aeafc6692224a7555fb7cc0a96a2720751d3e4d98e752804db589ac3c1476f24e71f5b9bc720 SHA512 ebac69719de2fe7bd587924701bdd24149bf376a68b17ec02f69b2b96d4bb6fa5eb8260a073ec5ea046d3ac69bb5b1c0b9d61709fe6a56f1f66e40817a70b15a +DIST sudo-1.9.15p5.tar.gz.sig 566 BLAKE2B ddd8fed1b3721aafdb32b762834168063c3f0f003ef5d83f1883615320da6fe89b08d72c8e893c8b2bf9fd892a40e47cc77d72672e43b5a24db50e7194d9bc4c SHA512 97480a3d27b546a93e997c3a1e8169904a7625ab8fa6198d0b7e1d2d040f55b2d58462cd08e5cc97c2f1c817b12343e35cdd7db207aee42785f2b95b17c600b0 +DIST sudo-1.9.16.tar.gz 5392026 BLAKE2B 19daa789af3ca2c4832950f0dd6f26a97285fdc155f0d7c18ec1f1accafce9b86f2f5730d3bb0b8e7717c0c55f4079928e03acb3974cb2652c58d4bcb2f74a12 SHA512 1b0254eb5b75422bffd31a2ae8c56cb4e8e2ecc08e2fa687eddb638d4f2de2585fa7621c868c03423e9d636bfb5679a3758d504155dbdfd3eebfbdcbd8b58f7c +DIST sudo-1.9.16.tar.gz.sig 566 BLAKE2B 9eb9fd2db0de5b9ce965c2109a9722e0b5f0793b7c9003123b1540d7cb5b8178043221296fd51c7f0b24ce1b1cda9f196a6d50083da172ca2afcb8f130d8eae1 SHA512 edf066f9ffdf2653468f8b45866a65214f0dff0164318d5f6bd9252f6211e82522161b1b9621798fbc9112253e6940d7137d18e8b42e8c6e5ba52ccac64d99cf +DIST sudo-1.9.16p1.tar.gz 5396038 BLAKE2B 7f973510658e91af54121d8c4c634b26231ef270abac50f658c9ad8a446a7dbbc44cb878561fb8da51e4ec15ebc8873fdaed05be142907f96964ff42c7e4f896 SHA512 3239d16513c431383b6d54cf40690a9b8fcf905d9b8f5a2085679dd5daeaacbd7efb153b41fd672fc634277c3203aaa1dc18e6a6c01799ebc9948763ec93a038 +DIST sudo-1.9.16p1.tar.gz.sig 566 BLAKE2B 0f68bb4a653cfaacf05d6c148f690ae0022035090e6e60df7efde6b25193ac46d12905ca898e5aadb8339ca3f08e27a4408edeb75f26f7e483f136026835aa24 SHA512 96cdd7f646d2fe7eeefce7710ba421be12a9bfd6811284ba8ccb3f7288b328531bbd7215cf0182c13670f2ec7c0ee25dfd6396214ddd61ee4ee153fec19bef7e +DIST sudo-1.9.16p2.tar.gz 5398419 BLAKE2B ef9f1c2cd4044454a808d1dff5f865355e1bd061d1b5c93a005207e28e9b9df7c267cf01358ce60dd2c98f6844b51dab00eac4e7a08bade1d621235c3a4774bf SHA512 1e2ea762671890a03b0ea4b95b3849f2d3a4c301432db8767433e9d80c517efd8b7a68e0bbce1b178aff5857907600f1f5e0d889779cb27e38c2f602395f6f06 +DIST sudo-1.9.16p2.tar.gz.sig 566 BLAKE2B 90f90658a7d6ec3b32f6a726a2cd28e156826a65749a88a2a29d970e97804d2d75de856bc85c9a459233b59e35564c5fbf93aff53ffe42d17d0e94dd23724acd SHA512 7f0e3269c9befada535590b2cfc36f96cd70831b5c030df5b3bf8c7cb3eff296d22193429f940db4a0df849b4d8080e4006086c49869b4bbae663836b2632b49 diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/files/sudo-1.9.16-allow-disabling-secure-path.patch b/sdk_container/src/third_party/portage-stable/app-admin/sudo/files/sudo-1.9.16-allow-disabling-secure-path.patch new file mode 100644 index 00000000000..8fda41a2b73 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/files/sudo-1.9.16-allow-disabling-secure-path.patch @@ -0,0 +1,54 @@ +https://github.com/sudo-project/sudo/commit/131e7e2de02ab53cfefefe93978d7fee4cb8142d + +From 131e7e2de02ab53cfefefe93978d7fee4cb8142d Mon Sep 17 00:00:00 2001 +From: Andy Fiddaman +Date: Tue, 17 Sep 2024 12:49:13 +0000 +Subject: [PATCH] Allow --secure-path-value=no + +This adds support for --with-secure-path-value=no to allow packagers +to ship the sudoers configuration file with the secure path +line commented out if required. +--- a/configure.ac ++++ b/configure.ac +@@ -177,6 +177,7 @@ AC_SUBST([sssd_lib]) + AC_SUBST([nsswitch_conf]) + AC_SUBST([netsvc_conf]) + AC_SUBST([secure_path]) ++AC_SUBST([secure_path_config]) + AC_SUBST([secure_path_status]) + AC_SUBST([editor]) + AC_SUBST([pam_session]) +@@ -230,6 +231,7 @@ sesh_file="$libexecdir/sudo/sesh" + visudo="$sbindir/visudo" + nsswitch_conf=/etc/nsswitch.conf + secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ++secure_path_config= + secure_path_status="disabled" + pam_session=on + pam_login_service=sudo +@@ -1068,9 +1070,11 @@ AC_ARG_WITH(ldap-secret-file, [AS_HELP_STRING([--with-ldap-secret-file], [path t + test -n "$with_ldap_secret_file" && ldap_secret="$with_ldap_secret_file" + SUDO_DEFINE_UNQUOTED(_PATH_LDAP_SECRET, "$ldap_secret", [Path to the ldap.secret file]) + +-AC_ARG_WITH(secure-path-value, [AS_HELP_STRING([--with-secure-path-value], [value of secure_path in the default sudoers file])], ++AC_ARG_WITH(secure-path-value, [AS_HELP_STRING([--with-secure-path-value], [value of secure_path in the default sudoers file, or "no" to comment out by default])], + [case $with_secure_path_value in +- yes|no) AC_MSG_ERROR([must give --secure-path-value an argument.]) ++ yes) AC_MSG_ERROR([must give --with-secure-path-value an argument.]) ++ ;; ++ no) secure_path_config="# " + ;; + *) secure_path="$with_secure_path_value" + ;; +--- a/plugins/sudoers/sudoers.in ++++ b/plugins/sudoers/sudoers.in +@@ -48,7 +48,7 @@ Defaults!@visudo@ env_keep += "SUDO_EDITOR EDITOR VISUAL" + ## Use a hard-coded PATH instead of the user's to find commands. + ## This also helps prevent poorly written scripts from running + ## artbitrary commands under sudo. +-Defaults secure_path="@secure_path@" ++@secure_path_config@Defaults secure_path="@secure_path@" + ## + ## You may wish to keep some of the following environment variables + ## when running commands via sudo. + diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/metadata.xml b/sdk_container/src/third_party/portage-stable/app-admin/sudo/metadata.xml similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-admin/sudo/metadata.xml rename to sdk_container/src/third_party/portage-stable/app-admin/sudo/metadata.xml diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/sudo-1.9.15_p5.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.15_p5-r1.ebuild similarity index 92% rename from sdk_container/src/third_party/coreos-overlay/app-admin/sudo/sudo-1.9.15_p5.ebuild rename to sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.15_p5-r1.ebuild index 376fb5ea529..918c0435412 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/sudo/sudo-1.9.15_p5.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.15_p5-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit pam libtool tmpfiles toolchain-funcs +inherit flag-o-matic pam libtool tmpfiles toolchain-funcs MY_P="${P/_/}" MY_P="${MY_P/beta/b}" @@ -33,7 +33,7 @@ else " if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )" @@ -63,14 +63,13 @@ DEPEND=" selinux? ( sys-libs/libselinux ) skey? ( >=sys-auth/skey-1.1.5-r1 ) ssl? ( dev-libs/openssl:= ) - sssd? ( sys-auth/sssd[sudo] ) + sssd? ( sys-auth/sssd[sudo(+)] ) " -#Flatcar: Remove Perl runtime dependency -# ldap? ( dev-lang/perl ) RDEPEND=" ${DEPEND} >=app-misc/editor-wrapper-3 virtual/editor + ldap? ( dev-lang/perl ) pam? ( sys-auth/pambase ) selinux? ( sec-policy/selinux-sudo ) sendmail? ( virtual/mta ) @@ -145,6 +144,9 @@ src_configure() { # bug #767712 tc-export PKG_CONFIG + # https://github.com/sudo-project/sudo/issues/420 + append-cflags -std=gnu17 + # - audit: somebody got to explain me how I can test this before I # enable it.. - Diego # - plugindir: autoconf code is crappy and does not delay evaluation @@ -179,7 +181,7 @@ src_configure() { $(use_with offensive all-insults) $(use_with pam) $(use_with pam pam-login) - $(use_with secure-path secure-path "${SECURE_PATH}") + "$(use_with secure-path secure-path "${SECURE_PATH}")" $(use_with selinux) $(use_with sendmail) $(use_with skey) @@ -216,8 +218,8 @@ src_install() { doins "${T}"/ldap.conf.sudo fperms 0440 /etc/ldap.conf.sudo - #Flatcar: we don't ship OpenLDAP schemas - + insinto /etc/openldap/schema + newins docs/schema.OpenLDAP sudo.schema fi if use pam ; then @@ -236,15 +238,6 @@ src_install() { # bug #697812 find "${ED}" -type f -name "*.la" -delete || die - - # Flatcar: Remove sudo.conf as it is shipped via baselayout - rm "${ED}/etc/sudo.conf" || die - - # Flatcar: Build system installs /etc/sudoers.d, let's make - # sure we keep having it. - # - # Upstream PR: https://github.com/gentoo/gentoo/pull/37397 - keepdir /etc/sudoers.d } pkg_postinst() { diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16-r2.ebuild new file mode 100644 index 00000000000..2403907f5ce --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16-r2.ebuild @@ -0,0 +1,296 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic pam tmpfiles toolchain-funcs + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" + +if [[ ${PV} == 9999 ]] ; then + inherit mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sudo.ws.asc + inherit verify-sig + + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI=" + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz + verify-sig? ( + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz.sig + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + fi + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )" +fi + +S="${WORKDIR}/${MY_P}" + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" + +DEPEND=" + sys-libs/zlib:= + virtual/libcrypt:= + gcrypt? ( dev-libs/libgcrypt:= ) + ldap? ( + >=net-nds/openldap-2.1.30-r1:= + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap:=[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sys-libs/libselinux ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ssl? ( dev-libs/openssl:= ) + sssd? ( sys-auth/sssd[sudo(+)] ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND+=" + app-alternatives/yacc + virtual/pkgconfig +" + +REQUIRED_USE=" + ?? ( pam skey ) + ?? ( gcrypt ssl ) +" + +MAKEOPTS+=" SAMPLES=" + +PATCHES=( + "${FILESDIR}"/${PN}-1.9.16-allow-disabling-secure-path.patch +) + +src_prepare() { + default + + # eautoreconf temporarily for allow-disabling-secure-path patch + # in 1.9.16; revert to elibtoolize once that is gone. + eautoreconf +} + +set_secure_path() { + # First extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") + + case "${SECURE_PATH}" in + */usr/sbin*) + ;; + *) + SECURE_PATH=$(unset PATH; . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # Then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # Finally, strip gcc paths, bug #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do + [[ ${thisp} == ${e} ]] && continue 2 ; + done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' +} + +src_configure() { + local SECURE_PATH + + set_secure_path + + # bug #767712 + tc-export PKG_CONFIG + + # https://github.com/sudo-project/sudo/issues/420 + append-cflags -std=gnu17 + + # - audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # - plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + local myeconfargs=( + # We set all of the relevant options by ourselves (patched + # into the toolchain) and setting these in the build system + # actually causes a downgrade when using e.g. -D_FORTIFY_SOURCE=3 + # (it'll downgrade to =2). So, this has no functional effect on + # the hardening for users. It's safe. + --disable-hardening + + # requires some python eclass + --disable-python + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with pam) + $(use_with pam pam-login) + $(use_with secure-path) + "$(use_with secure-path secure-path-value "${SECURE_PATH}")" + $(use_with selinux) + $(use_with sendmail) + $(use_with skey) + $(use_with sssd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP.md + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP.md for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins docs/schema.OpenLDAP sudo.schema + fi + + if use pam ; then + pamd_mimic system-auth sudo auth account session + pamd_mimic system-auth sudo-i auth account session + fi + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + # bug #652958 + fperms 0711 /var/db/sudo + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run || die + + # bug #697812 + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + # bug #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the ${ROOT}/etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in ${ROOT}/etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your ${ROOT}/etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo on Prefix, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p1-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p1-r1.ebuild new file mode 100644 index 00000000000..a4c126a9a27 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p1-r1.ebuild @@ -0,0 +1,294 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic pam tmpfiles toolchain-funcs + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" + +if [[ ${PV} == 9999 ]] ; then + inherit autotools mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sudo.ws.asc + inherit libtool verify-sig + + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI=" + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz + verify-sig? ( + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz.sig + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + fi + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )" +fi + +S="${WORKDIR}/${MY_P}" + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" + +DEPEND=" + sys-libs/zlib:= + virtual/libcrypt:= + gcrypt? ( dev-libs/libgcrypt:= ) + ldap? ( + >=net-nds/openldap-2.1.30-r1:= + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap:=[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sys-libs/libselinux ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ssl? ( dev-libs/openssl:= ) + sssd? ( sys-auth/sssd[sudo(+)] ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND+=" + app-alternatives/yacc + virtual/pkgconfig +" + +REQUIRED_USE=" + ?? ( pam skey ) + ?? ( gcrypt ssl ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + else + elibtoolize + fi +} + +set_secure_path() { + # First extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") + + case "${SECURE_PATH}" in + */usr/sbin*) + ;; + *) + SECURE_PATH=$(unset PATH; . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # Then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # Finally, strip gcc paths, bug #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do + [[ ${thisp} == ${e} ]] && continue 2 ; + done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' +} + +src_configure() { + local SECURE_PATH + + set_secure_path + + # bug #767712 + tc-export PKG_CONFIG + + # https://github.com/sudo-project/sudo/issues/420 + append-cflags -std=gnu17 + + # - audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # - plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + local myeconfargs=( + # We set all of the relevant options by ourselves (patched + # into the toolchain) and setting these in the build system + # actually causes a downgrade when using e.g. -D_FORTIFY_SOURCE=3 + # (it'll downgrade to =2). So, this has no functional effect on + # the hardening for users. It's safe. + --disable-hardening + + # requires some python eclass + --disable-python + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with pam) + $(use_with pam pam-login) + $(use_with secure-path) + "$(use_with secure-path secure-path-value "${SECURE_PATH}")" + $(use_with selinux) + $(use_with sendmail) + $(use_with skey) + $(use_with sssd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP.md + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP.md for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins docs/schema.OpenLDAP sudo.schema + fi + + if use pam ; then + pamd_mimic system-auth sudo auth account session + pamd_mimic system-auth sudo-i auth account session + fi + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + # bug #652958 + fperms 0711 /var/db/sudo + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run || die + + # bug #697812 + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + # bug #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the ${ROOT}/etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in ${ROOT}/etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your ${ROOT}/etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo on Prefix, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p2-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p2-r1.ebuild new file mode 100644 index 00000000000..3c7cda14585 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-1.9.16_p2-r1.ebuild @@ -0,0 +1,291 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic pam tmpfiles toolchain-funcs + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" + +if [[ ${PV} == 9999 ]] ; then + inherit autotools mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sudo.ws.asc + inherit libtool verify-sig + + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI=" + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz + verify-sig? ( + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz.sig + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + fi + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )" +fi + +S="${WORKDIR}/${MY_P}" + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" + +DEPEND=" + sys-libs/zlib:= + virtual/libcrypt:= + gcrypt? ( dev-libs/libgcrypt:= ) + ldap? ( + >=net-nds/openldap-2.1.30-r1:= + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap:=[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sys-libs/libselinux ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ssl? ( dev-libs/openssl:= ) + sssd? ( sys-auth/sssd[sudo(+)] ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND+=" + app-alternatives/yacc + virtual/pkgconfig +" + +REQUIRED_USE=" + ?? ( pam skey ) + ?? ( gcrypt ssl ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + else + elibtoolize + fi +} + +set_secure_path() { + # First extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") + + case "${SECURE_PATH}" in + */usr/sbin*) + ;; + *) + SECURE_PATH=$(unset PATH; . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # Then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # Finally, strip gcc paths, bug #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do + [[ ${thisp} == ${e} ]] && continue 2 ; + done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' +} + +src_configure() { + local SECURE_PATH + + set_secure_path + + # bug #767712 + tc-export PKG_CONFIG + + # - audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # - plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + local myeconfargs=( + # We set all of the relevant options by ourselves (patched + # into the toolchain) and setting these in the build system + # actually causes a downgrade when using e.g. -D_FORTIFY_SOURCE=3 + # (it'll downgrade to =2). So, this has no functional effect on + # the hardening for users. It's safe. + --disable-hardening + + # requires some python eclass + --disable-python + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with pam) + $(use_with pam pam-login) + $(use_with secure-path) + "$(use_with secure-path secure-path-value "${SECURE_PATH}")" + $(use_with selinux) + $(use_with sendmail) + $(use_with skey) + $(use_with sssd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP.md + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP.md for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins docs/schema.OpenLDAP sudo.schema + fi + + if use pam ; then + pamd_mimic system-auth sudo auth account session + pamd_mimic system-auth sudo-i auth account session + fi + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + # bug #652958 + fperms 0711 /var/db/sudo + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run || die + + # bug #697812 + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + # bug #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the ${ROOT}/etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in ${ROOT}/etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your ${ROOT}/etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo on Prefix, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff --git a/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-9999.ebuild new file mode 100644 index 00000000000..a4c126a9a27 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-admin/sudo/sudo-9999.ebuild @@ -0,0 +1,294 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic pam tmpfiles toolchain-funcs + +MY_P="${P/_/}" +MY_P="${MY_P/beta/b}" + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" + +if [[ ${PV} == 9999 ]] ; then + inherit autotools mercurial + EHG_REPO_URI="https://www.sudo.ws/repos/sudo" +else + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/sudo.ws.asc + inherit libtool verify-sig + + uri_prefix= + case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; + esac + + SRC_URI=" + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz + verify-sig? ( + https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz.sig + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz.sig + ) + " + + if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + fi + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-sudo )" +fi + +S="${WORKDIR}/${MY_P}" + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +IUSE="gcrypt ldap nls offensive pam sasl +secure-path selinux +sendmail skey ssl sssd" + +DEPEND=" + sys-libs/zlib:= + virtual/libcrypt:= + gcrypt? ( dev-libs/libgcrypt:= ) + ldap? ( + >=net-nds/openldap-2.1.30-r1:= + sasl? ( + dev-libs/cyrus-sasl + net-nds/openldap:=[sasl] + ) + ) + pam? ( sys-libs/pam ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sys-libs/libselinux ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ssl? ( dev-libs/openssl:= ) + sssd? ( sys-auth/sssd[sudo(+)] ) +" +RDEPEND=" + ${DEPEND} + >=app-misc/editor-wrapper-3 + virtual/editor + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + selinux? ( sec-policy/selinux-sudo ) + sendmail? ( virtual/mta ) +" +BDEPEND+=" + app-alternatives/yacc + virtual/pkgconfig +" + +REQUIRED_USE=" + ?? ( pam skey ) + ?? ( gcrypt ssl ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + + if [[ ${PV} == 9999 ]] ; then + eautoreconf + else + elibtoolize + fi +} + +set_secure_path() { + # First extract the default ROOTPATH from build env + SECURE_PATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") + + case "${SECURE_PATH}" in + */usr/sbin*) + ;; + *) + SECURE_PATH=$(unset PATH; . "${EPREFIX}"/etc/profile.env; echo "${PATH}") + ;; + esac + + if [[ -z ${SECURE_PATH} ]] ; then + ewarn " Failed to detect SECURE_PATH, please report this" + fi + + # Then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:${thisp} + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + SECURE_PATH=${newpath#:} + } + cleanpath /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin${SECURE_PATH:+:${SECURE_PATH}} + + # Finally, strip gcc paths, bug #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${SECURE_PATH} ; do + for e ; do + [[ ${thisp} == ${e} ]] && continue 2 ; + done + newpath+=:${thisp} + done + SECURE_PATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' +} + +src_configure() { + local SECURE_PATH + + set_secure_path + + # bug #767712 + tc-export PKG_CONFIG + + # https://github.com/sudo-project/sudo/issues/420 + append-cflags -std=gnu17 + + # - audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # - plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + local myeconfargs=( + # We set all of the relevant options by ourselves (patched + # into the toolchain) and setting these in the build system + # actually causes a downgrade when using e.g. -D_FORTIFY_SOURCE=3 + # (it'll downgrade to =2). So, this has no functional effect on + # the hardening for users. It's safe. + --disable-hardening + + # requires some python eclass + --disable-python + --enable-tmpfiles.d="${EPREFIX}"/usr/lib/tmpfiles.d + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/run/sudo + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable sasl) + $(use_enable ssl openssl) + $(use_with ldap) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with pam) + $(use_with pam pam-login) + $(use_with secure-path) + "$(use_with secure-path secure-path-value "${SECURE_PATH}")" + $(use_with selinux) + $(use_with sendmail) + $(use_with skey) + $(use_with sssd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP.md + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP.md for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + if use sasl ; then + cat <<-EOF >> "${T}"/ldap.conf.sudo + + # SASL directives: use_sasl, sasl_mech, sasl_auth_id + # sasl_secprops, rootuse_sasl, rootsasl_auth_id, krb5_ccname + EOF + fi + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins docs/schema.OpenLDAP sudo.schema + fi + + if use pam ; then + pamd_mimic system-auth sudo auth account session + pamd_mimic system-auth sudo-i auth account session + fi + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + # bug #652958 + fperms 0711 /var/db/sudo + + # Don't install into /run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/run || die + + # bug #697812 + find "${ED}" -type f -name "*.la" -delete || die +} + +pkg_postinst() { + tmpfiles_process sudo.conf + + # bug #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the ${ROOT}/etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in ${ROOT}/etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your ${ROOT}/etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo on Prefix, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} From 4714f57aa4ac8ececf9f854e340671deeb4e6ad7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 13:55:56 +0100 Subject: [PATCH 106/145] overlay profiles: Allow sys-auth/sssd-2.9.6-r1 This revision has fixed an issue of pulling python unconditionally. --- .../profiles/coreos/base/package.accept_keywords | 6 +++++- .../coreos-overlay/profiles/coreos/base/package.mask | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) 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 9f58d6f1c71..4842443a89b 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 @@ -79,7 +79,11 @@ # Keep versions on both arches in sync. =sys-apps/zram-generator-1.1.2-r1 ~arm64 -=sys-auth/sssd-2.9.5 ~arm64 + +# Needed to avoid pulling python into production images. +=sys-auth/sssd-2.9.6-r1 ~amd64 ~arm64 + +# Keep versions on both arches in sync. =sys-boot/mokutil-0.7.2 ** # Enable ipvsadm for arm64. diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask index fa9438a09fb..d09537a81bb 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask @@ -20,6 +20,3 @@ # Pulls in LLVM and clang. >=sys-block/thin-provisioning-tools-1.0.14 - -# Pulls in python into production. ->=sys-auth/sssd-2.9.6 From e888e328b3733a3f6ed19a725fffb173e1315cb3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 16:37:09 +0100 Subject: [PATCH 107/145] app-containers/netavark: Sync with Gentoo It's from Gentoo commit 99f669ca0cf7a32116d0e687e9d3521e4bf665d7. --- .../app-containers/netavark/netavark-1.12.2-r1.ebuild | 2 +- .../portage-stable/app-containers/netavark/netavark-9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild index e0cf15c2ee1..a3660b4bd9d 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-1.12.2-r1.ebuild @@ -24,7 +24,7 @@ LICENSE="Apache-2.0" LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB" SLOT="0" BDEPEND="dev-go/go-md2man - dev-libs/protobuf[protoc]" + dev-libs/protobuf[protoc(+)]" QA_FLAGS_IGNORED=" usr/libexec/podman/${PN}" diff --git a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild index 689cd3e0189..6cfed97bbf3 100644 --- a/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-containers/netavark/netavark-9999.ebuild @@ -24,7 +24,7 @@ LICENSE="Apache-2.0" LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD BSD-2 Boost-1.0 MIT Unicode-DFS-2016 Unlicense ZLIB" SLOT="0" BDEPEND="dev-go/go-md2man - dev-libs/protobuf[protoc]" + dev-libs/protobuf[protoc(+)]" QA_FLAGS_IGNORED=" usr/libexec/podman/${PN}" From 6442e4e6a5b7205ca135708fed6280e585381ab8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:01:33 +0100 Subject: [PATCH 108/145] app-containers/containerd: Sync with Gentoo It's from Gentoo commit f0e39f486df96baf28c1305f481aac7046be1854. --- .../app-containers/containerd/Manifest | 6 +- .../containerd/containerd-1.7.23.ebuild | 86 ------------------- .../containerd/containerd-1.7.6.ebuild | 86 ------------------- ....7.1-r1.ebuild => containerd-2.0.1.ebuild} | 18 ++-- ...d-1.7.2.ebuild => containerd-2.0.2.ebuild} | 18 ++-- .../app-containers/containerd/metadata.xml | 4 - 6 files changed, 24 insertions(+), 194 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.23.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.6.ebuild rename sdk_container/src/third_party/coreos-overlay/app-containers/containerd/{containerd-1.7.1-r1.ebuild => containerd-2.0.1.ebuild} (85%) rename sdk_container/src/third_party/coreos-overlay/app-containers/containerd/{containerd-1.7.2.ebuild => containerd-2.0.2.ebuild} (85%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest index f4c5c7b33d1..237fcc5c6a6 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest @@ -1,4 +1,2 @@ -DIST containerd-1.7.1.tar.gz 9682254 BLAKE2B f168070caf2b76f0be350a98f41bfdbfe6d78344d68821fb92a29f839a6e847d795e5b79436e36f985aa88028ff1c3f44f134cf6bd502ddac22453a457bd952b SHA512 e9b00ba8f4dd1b5b1088060d3822f684611d43b367ddfeb1bee1660140af85f31e9c9bfc600a67e8fc8645a625dc4e1919d9af7291bdeaa607bff7065a4fc945 -DIST containerd-1.7.2.tar.gz 9688701 BLAKE2B d31cd0e96bb2675390cc63d06114e37d532b7c666b3ffc5b0087dfcef8de23559471f08bf8a52b164c5f645faf1b8102ab2ccdd8ec417a1c74336097f0c3a899 SHA512 c0d4c02991b7e9fc341c4ef3df2d93097f5854a51b99596ed95436a79f7a586820bb8bb7c17fc43b5f38d97ea942e59490fbbf6c9710391ef9caae3d34627bc5 -DIST containerd-1.7.23.tar.gz 10192816 BLAKE2B 592e3a1992a637879f1669a660991f811db6f3d11a788c9809277b3fb9639d8b89445cbbca1de16ed45703e8506c8850d9ce68b64d1213817732d008a1847ea6 SHA512 4cb003a6ef2f9fe856665c3b7099e13b23cf07c77ed9a9ed50988d74de1933e3fe9463ae123635230f25cde38cd8a487133b11e20d829a79517c4d7fbe2ce012 -DIST containerd-1.7.6.tar.gz 9714550 BLAKE2B 863df1a8ab0f0fe6ec62893ed64824763c1b5230fe830fa268820ce0d6254c79e1ac62ab1261a74785b86b01dff83ea9109a899857fa47a48f2cf2eaf298fea8 SHA512 8b7e13c6ea544754ba7d53092d143f3fd2224b9bc874a33d8a00b781e719927f1b22ad5cd1e35b7b95e4890e630f4b92308549a970587ccdf9dbb8eb470e2703 +DIST containerd-2.0.1.tar.gz 10423945 BLAKE2B 7f77678557bf649c71475d3ff08a57579b8959ef19a5f8fc1c27b8e8eacea01572d44d3f6dff1f53b72c1b7cf153413a5152391a78b0d5bd624a4c5267381144 SHA512 7875eee0fb274545acb4d62f5bca808105580177db6007e59164fd57830ea3e8ab646b8e227027016bf8dd4816341d38a620bfef48bb0fd83de006b1a91826b7 +DIST containerd-2.0.2.tar.gz 10379986 BLAKE2B aee39f749f056965b899f6525bebe00d46b72b6c437efbd01ed890c5ae9c5d812464bc6d10e32aea20fd0c6df00d98cd30502dd73f9a27b0d8d143a5542976d9 SHA512 86eb24acfa5d4d87ae396f8888e2484693823fad897a29f1a5ada78e2318640927cfcff1e85415bfd6c66f5417e582203eb94976d52e3dd373997e6e2cbae354 diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.23.ebuild b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.23.ebuild deleted file mode 100644 index 0ad8bec3073..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.23.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module systemd -GIT_REVISION=9b2ad7760328148397346d10c7b2004271249db4 - -DESCRIPTION="A daemon to control runC" -HOMEPAGE="https://containerd.io/" -SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" - -DEPEND=" - btrfs? ( sys-fs/btrfs-progs ) - seccomp? ( sys-libs/libseccomp ) -" - -# recommended version of runc is found in script/setup/runc-version -RDEPEND=" - ${DEPEND} - ~app-containers/runc-1.1.14[apparmor?,seccomp?] -" - -BDEPEND=" - dev-go/go-md2man - virtual/pkgconfig -" - -# tests require root or docker -RESTRICT+="test" - -src_prepare() { - default - sed -i \ - -e "s/-s -w//" \ - -e "s/-mod=readonly//" \ - Makefile || die - sed -i \ - -e "s:/usr/local:/usr:" \ - containerd.service || die -} - -src_compile() { - local options=( - $(usev apparmor) - $(usex btrfs "" "no_btrfs") - $(usex cri "" "no_cri") - $(usex device-mapper "" "no_devmapper") - $(usev seccomp) - $(usev selinux) - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" - REVISION="${GIT_REVISION}" - VERSION=v${PV} - ) - - # race condition in man target https://bugs.gentoo.org/765100 - # we need to explicitly specify GOFLAGS for "go run" to use vendor source - emake "${myemakeargs[@]}" man -j1 #nowarn - emake "${myemakeargs[@]}" all - -} - -src_install() { - rm "${D}"/bin/gen-manpages - dobin bin/* - doman man/* - newconfd "${FILESDIR}"/${PN}.confd "${PN}" - newinitd "${FILESDIR}"/${PN}.initd "${PN}" - systemd_dounit containerd.service - keepdir /var/lib/containerd - - # we already installed manpages, remove markdown source - # before installing docs directory - rm -r docs/man || die - - local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. ) - einstalldocs -} diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.6.ebuild b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.6.ebuild deleted file mode 100644 index 8ce5ddd813b..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.6.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module systemd -GIT_REVISION=091922f03c2762540fd057fba91260237ff86acb - -DESCRIPTION="A daemon to control runC" -HOMEPAGE="https://containerd.io/" -SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" -IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" - -DEPEND=" - btrfs? ( sys-fs/btrfs-progs ) - seccomp? ( sys-libs/libseccomp ) -" - -# recommended version of runc is found in script/setup/runc-version -RDEPEND=" - ${DEPEND} - ~app-containers/runc-1.1.9[apparmor?,seccomp?] -" - -BDEPEND=" - dev-go/go-md2man - virtual/pkgconfig -" - -# tests require root or docker -RESTRICT+="test" - -src_prepare() { - default - sed -i \ - -e "s/-s -w//" \ - -e "s/-mod=readonly//" \ - Makefile || die - sed -i \ - -e "s:/usr/local:/usr:" \ - containerd.service || die -} - -src_compile() { - local options=( - $(usev apparmor) - $(usex btrfs "" "no_btrfs") - $(usex cri "" "no_cri") - $(usex device-mapper "" "no_devmapper") - $(usev seccomp) - $(usev selinux) - ) - - myemakeargs=( - BUILDTAGS="${options[*]}" - LDFLAGS="$(usex hardened '-extldflags -fno-PIC' '')" - REVISION="${GIT_REVISION}" - VERSION=v${PV} - ) - - # race condition in man target https://bugs.gentoo.org/765100 - # we need to explicitly specify GOFLAGS for "go run" to use vendor source - emake "${myemakeargs[@]}" man -j1 #nowarn - emake "${myemakeargs[@]}" all - -} - -src_install() { - rm "${D}"/bin/gen-manpages - dobin bin/* - doman man/* - newconfd "${FILESDIR}"/${PN}.confd "${PN}" - newinitd "${FILESDIR}"/${PN}.initd "${PN}" - systemd_dounit containerd.service - keepdir /var/lib/containerd - - # we already installed manpages, remove markdown source - # before installing docs directory - rm -r docs/man || die - - local DOCS=( ADOPTERS.md README.md RELEASES.md ROADMAP.md SCOPE.md docs/. ) - einstalldocs -} diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.1.ebuild similarity index 85% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.1-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.1.ebuild index cc7ea051626..82e4dbe7a8d 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.1-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.1.ebuild @@ -1,9 +1,9 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit go-module systemd -GIT_REVISION=2806fc1057397dbaeefbea0e4e17bddfbd388f38 +GIT_REVISION=88aa2f531d6c2922003cc7929e51daf1c14caa0a DESCRIPTION="A daemon to control runC" HOMEPAGE="https://containerd.io/" @@ -14,15 +14,19 @@ SLOT="0" KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv ~x86" IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" -DEPEND=" +COMMON_DEPEND=" btrfs? ( sys-fs/btrfs-progs ) seccomp? ( sys-libs/libseccomp ) " -# recommended version of runc is found in script/setup/runc-version +DEPEND=" +${COMMON_DEPEND} +" + +# recommended minimum version of runc is found in script/setup/runc-version RDEPEND=" - ${DEPEND} - ~app-containers/runc-1.1.7[apparmor?,seccomp?] + ${COMMON_DEPEND} + >=app-containers/runc-1.2.1[apparmor?,seccomp?] " BDEPEND=" @@ -69,7 +73,7 @@ src_compile() { } src_install() { - rm "${D}"/bin/gen-manpages + rm bin/gen-manpages || die dobin bin/* doman man/* newconfd "${FILESDIR}"/${PN}.confd "${PN}" diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.2.ebuild b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.2.ebuild similarity index 85% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.2.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.2.ebuild index 498fb8d90a5..37fb931e518 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-1.7.2.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.2.ebuild @@ -1,9 +1,9 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit go-module systemd -GIT_REVISION=0cae528dd6cb557f7201036e9f43420650207b58 +GIT_REVISION=c507a0257ea6462fbd6f5ba4f5c74facb04021f4 DESCRIPTION="A daemon to control runC" HOMEPAGE="https://containerd.io/" @@ -14,15 +14,19 @@ SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" IUSE="apparmor btrfs device-mapper +cri hardened +seccomp selinux test" -DEPEND=" +COMMON_DEPEND=" btrfs? ( sys-fs/btrfs-progs ) seccomp? ( sys-libs/libseccomp ) " -# recommended version of runc is found in script/setup/runc-version +DEPEND=" +${COMMON_DEPEND} +" + +# recommended minimum version of runc is found in script/setup/runc-version RDEPEND=" - ${DEPEND} - ~app-containers/runc-1.1.7[apparmor?,seccomp?] + ${COMMON_DEPEND} + >=app-containers/runc-1.2.4[apparmor?,seccomp?] " BDEPEND=" @@ -69,7 +73,7 @@ src_compile() { } src_install() { - rm "${D}"/bin/gen-manpages + rm bin/gen-manpages || die dobin bin/* doman man/* newconfd "${FILESDIR}"/${PN}.confd "${PN}" diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml index 5d63e8606e9..4ee50fa856d 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml @@ -12,10 +12,6 @@ williamh@gentoo.org William Hubbs - - gyakovlev@gentoo.org - Georgy Yakovlev - Support for BTRFS snapshot driver Support for Kubernetes CRI From 1e9bf5954e93ac5508efebdd6aab082c25dc524f Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:03:39 +0100 Subject: [PATCH 109/145] .github: Add app-admin/sudo to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index a45f5c4c476..f84044e00ed 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -67,6 +67,7 @@ acct-user/tss app-admin/eselect app-admin/perl-cleaner +app-admin/sudo app-alternatives/awk app-alternatives/bc From ba0a62dd46fcc2177c57571c8a43e63d7ed7626e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:05:02 +0100 Subject: [PATCH 110/145] app-containers/containerd: Move to portage-stable --- .../app-containers/containerd/Manifest | 0 .../app-containers/containerd/containerd-2.0.1.ebuild | 0 .../app-containers/containerd/containerd-2.0.2.ebuild | 0 .../app-containers/containerd/files/containerd.confd | 0 .../app-containers/containerd/files/containerd.initd | 0 .../app-containers/containerd/metadata.xml | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/Manifest (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/containerd-2.0.1.ebuild (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/containerd-2.0.2.ebuild (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/files/containerd.confd (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/files/containerd.initd (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/app-containers/containerd/metadata.xml (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest b/sdk_container/src/third_party/portage-stable/app-containers/containerd/Manifest similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/Manifest rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/Manifest diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.1.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.1.ebuild rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.2.ebuild b/sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.2.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/containerd-2.0.2.ebuild rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/containerd-2.0.2.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/files/containerd.confd b/sdk_container/src/third_party/portage-stable/app-containers/containerd/files/containerd.confd similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/files/containerd.confd rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/files/containerd.confd diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/files/containerd.initd b/sdk_container/src/third_party/portage-stable/app-containers/containerd/files/containerd.initd similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/files/containerd.initd rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/files/containerd.initd diff --git a/sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml b/sdk_container/src/third_party/portage-stable/app-containers/containerd/metadata.xml similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-containers/containerd/metadata.xml rename to sdk_container/src/third_party/portage-stable/app-containers/containerd/metadata.xml From 61ab88d25c3a774ad1dc3ab497e447b3e5b16c73 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:05:36 +0100 Subject: [PATCH 111/145] .github: Add app-containers/containerd to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index f84044e00ed..970fd7355cd 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -104,6 +104,7 @@ app-cdr/cdrtools app-containers/aardvark-dns app-containers/catatonit app-containers/conmon +app-containers/containerd app-containers/containers-common app-containers/containers-image app-containers/containers-shortnames From cbb50998a973e5ac8dd341c3c4425537c4216206 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:06:37 +0100 Subject: [PATCH 112/145] .github: Drop containerd-specific automation --- .github/workflows/containerd-apply-patch.sh | 48 ------------------ .../workflows/containerd-release-main.yaml | 50 ------------------- 2 files changed, 98 deletions(-) delete mode 100755 .github/workflows/containerd-apply-patch.sh delete mode 100644 .github/workflows/containerd-release-main.yaml diff --git a/.github/workflows/containerd-apply-patch.sh b/.github/workflows/containerd-apply-patch.sh deleted file mode 100755 index 0b47f1c4c51..00000000000 --- a/.github/workflows/containerd-apply-patch.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -source "${GHA_SCRIPTS_DIR}/.github/workflows/common.sh" - -prepare_git_repo - -if ! check_remote_branch "containerd-${VERSION_NEW}-${TARGET_BRANCH}"; then - echo "remote branch already exists, nothing to do" - exit 0 -fi - -pushd "${SDK_OUTER_OVERLAY}" - -VERSION_OLD=$(sed -n "s/^DIST containerd-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p" app-containers/containerd/Manifest | sort -ruV | head -n1) -if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then - echo "already the latest Containerd, nothing to do" - exit 0 -fi - -# we need to update not only the main ebuild file, but also its CONTAINERD_COMMIT, -# which needs to point to COMMIT_HASH that matches with $VERSION_NEW from upstream containerd. -containerdEbuildOld=$(get_ebuild_filename app-containers/containerd "${VERSION_OLD}") -containerdEbuildNew="app-containers/containerd/containerd-${VERSION_NEW}.ebuild" -git mv "${containerdEbuildOld}" "${containerdEbuildNew}" -sed -i "s/GIT_REVISION=.*/GIT_REVISION=${COMMIT_HASH}/g" "${containerdEbuildNew}" - -# The ebuild is masked by default to maintain compatibility with Gentoo upstream -# so we add an unmask for Flatcar only. -keywords_file="profiles/coreos/base/package.accept_keywords" -ts=$(date +'%Y-%m-%d %H:%M:%S') -comment="DO NOT EDIT THIS LINE. Added by containerd-apply-patch.sh on ${ts}" -sed -i "s;^\(=app-containers/containerd\)-${VERSION_OLD} .*;\1-${VERSION_NEW} ~amd64 ~arm64 # ${comment};" "${keywords_file}" - -popd - -URL="https://github.com/containerd/containerd/releases/tag/v${VERSION_NEW}" - -generate_update_changelog 'containerd' "${VERSION_NEW}" "${URL}" 'containerd' - -# Commit package changes and updated keyword file -commit_changes app-containers/containerd "${VERSION_OLD}" "${VERSION_NEW}" "${keywords_file}" - -cleanup_repo - -echo "VERSION_OLD=${VERSION_OLD}" >>"${GITHUB_OUTPUT}" -echo 'UPDATE_NEEDED=1' >>"${GITHUB_OUTPUT}" diff --git a/.github/workflows/containerd-release-main.yaml b/.github/workflows/containerd-release-main.yaml deleted file mode 100644 index 7e3b1d38a96..00000000000 --- a/.github/workflows/containerd-release-main.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: Get the latest Containerd release for main -on: - schedule: - - cron: '00 8 * * 5' - workflow_dispatch: - -jobs: - get-containerd-release: - runs-on: ubuntu-latest - steps: - - name: Check out scripts - uses: actions/checkout@v4 - with: - token: ${{ secrets.BOT_PR_TOKEN }} - path: scripts - - name: Figure out latest Containerd release version - id: containerd-latest-release - run: | - versionCommitPair=( $(git ls-remote --tags https://github.com/containerd/containerd | grep 'refs/tags/v[0-9]*\.[0-9]*\.[0-9]*$' | sed -e 's#^\([0-9a-fA-F]*\)[[:space:]]*refs/tags/v\(.*\)$#\2 \1#g' | sort --reverse --unique --version-sort | head --lines 1) ) - - echo "VERSION_NEW=${versionCommitPair[0]}" >>"${GITHUB_OUTPUT}" - echo "COMMIT_HASH=${versionCommitPair[1]}" >>"${GITHUB_OUTPUT}" - - name: Set up Flatcar SDK - id: setup-flatcar-sdk - env: - WORK_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - CHANNEL: main - run: scripts/.github/workflows/setup-flatcar-sdk.sh - - name: Apply patch for main - id: apply-patch-main - env: - GHA_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - WORK_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - VERSION_NEW: ${{ steps.containerd-latest-release.outputs.VERSION_NEW }} - COMMIT_HASH: ${{ steps.containerd-latest-release.outputs.COMMIT_HASH }} - PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }} - SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} - TARGET_BRANCH: main - run: scripts/.github/workflows/containerd-apply-patch.sh - - name: Create pull request for main - uses: peter-evans/create-pull-request@v6 - if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 - with: - token: ${{ secrets.BOT_PR_TOKEN }} - path: scripts - branch: "containerd-${{ steps.containerd-latest-release.outputs.VERSION_NEW }}-main" - base: main - title: Upgrade Containerd in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.containerd-latest-release.outputs.VERSION_NEW }} - body: Subject says it all. - labels: main From 2b635e4d5e07e4ef57179e1c098e26259433650b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:15:51 +0100 Subject: [PATCH 113/145] virtual/ldb: Add from Gentoo It's from Gentoo commit dabacec32ecfbe1080c70a7797a58941147a6467. --- .../portage-stable/virtual/ldb/ldb-2.10.0.ebuild | 11 +++++++++++ .../portage-stable/virtual/ldb/ldb-2.8.1.ebuild | 11 +++++++++++ .../portage-stable/virtual/ldb/ldb-2.9.1.ebuild | 11 +++++++++++ .../portage-stable/virtual/ldb/metadata.xml | 8 ++++++++ 4 files changed, 41 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.10.0.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.8.1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.9.1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/virtual/ldb/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.10.0.ebuild b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.10.0.ebuild new file mode 100644 index 00000000000..a90983ccac2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.10.0.ebuild @@ -0,0 +1,11 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Virtual for samba project's ldb" + +SLOT="0/2.10.0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +RDEPEND="net-fs/samba:${SLOT}" diff --git a/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.8.1.ebuild b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.8.1.ebuild new file mode 100644 index 00000000000..7c7fc38d208 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.8.1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Virtual for samba project's ldb" + +SLOT="0/2.8.1" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +RDEPEND="sys-libs/ldb:${SLOT}" diff --git a/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.9.1.ebuild b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.9.1.ebuild new file mode 100644 index 00000000000..d8876396740 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/ldb/ldb-2.9.1.ebuild @@ -0,0 +1,11 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Virtual for samba project's ldb" + +SLOT="0/2.9.1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND="sys-libs/ldb:${SLOT}" diff --git a/sdk_container/src/third_party/portage-stable/virtual/ldb/metadata.xml b/sdk_container/src/third_party/portage-stable/virtual/ldb/metadata.xml new file mode 100644 index 00000000000..09a9748a01c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/virtual/ldb/metadata.xml @@ -0,0 +1,8 @@ + + + + + samba@gentoo.org + Samba + + From 16bb2bf3876f61773990173b4c2e32f724ecec4b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:16:42 +0100 Subject: [PATCH 114/145] .github: Add virtual/ldb to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index 970fd7355cd..63a9db4a734 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -684,6 +684,7 @@ virtual/acl virtual/dev-manager virtual/editor virtual/krb5 +virtual/ldb virtual/libc virtual/libcrypt virtual/libelf From c2a604c919a2ee1a23c92504ca72625add561eae Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:26:54 +0100 Subject: [PATCH 115/145] overlay profiles: Update accept keywords for some packages --- .../profiles/coreos/base/package.accept_keywords | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4842443a89b..99b26151f2d 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 @@ -11,7 +11,7 @@ =app-containers/containerd-1.7.23 ~amd64 ~arm64 # DO NOT EDIT THIS LINE. Added by containerd-apply-patch.sh on 2024-10-18 08:06:10 # Keep versions on both arches in sync. -=app-containers/cri-tools-1.27.0 ~arm64 +=app-containers/cri-tools-1.32.0 ~arm64 # Accept unstable for Docker and its CLI. =app-containers/docker-27.3.1 ~amd64 ~arm64 @@ -78,7 +78,7 @@ =sys-apps/azure-vm-utils-0.4.0 ~amd64 ~arm64 # Keep versions on both arches in sync. -=sys-apps/zram-generator-1.1.2-r1 ~arm64 +=sys-apps/zram-generator-1.2.1 ~arm64 # Needed to avoid pulling python into production images. =sys-auth/sssd-2.9.6-r1 ~amd64 ~arm64 From bd8d76fc715b41eb81fa65f2004c1eb69fb8c633 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 14:42:01 +0100 Subject: [PATCH 116/145] overlay profiles: Add accept keywords for dev-libs/glib --- .../profiles/coreos/base/package.accept_keywords | 3 +++ 1 file changed, 3 insertions(+) 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 99b26151f2d..90d7e6ee36f 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 @@ -51,6 +51,9 @@ =dev-lang/yasm-1.3.0-r1 ~arm64 =dev-libs/ding-libs-0.6.2-r1 ~arm64 +# Needed to address CVE-2024-52533 +=dev-libs/glib-2.82.4-r1 ~amd64 ~arm64 + # The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet. =dev-libs/jose-12 ** From af599b873c1eafc21b165a700f89abb3dcb7a4ee Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 15:39:20 +0100 Subject: [PATCH 117/145] sys-libs/glibc: Move from portage-stable, sync and modify It's from Gentoo commit e11eb4b6fbdae37dfaf9c62ce17fbd0a103bf9d7. We apply our modifications in a bit different way to avoid modifying the ebuild itself: - To avoid having unstripped binaries we add a hack to make "dostrip x -/" a noop. - Using tmpfiles for putting the nscd config file into /etc is not necessary any more - our overlay setup for /etc will handle it. We add a symlink at /usr/share/baselayout/nscd.conf to point to its flatcar-etc counterpart for backward compatibility. - Using tmpfiles for creating a directory under /var is also not necessary - at a later build stage we will generate such a tmpfile for all the directories in /var. The trigger to move the glibc to portage-stable was to update it to address some security issue. --- .../coreos/config/env/sys-libs/glibc | 27 + .../coreos-overlay/sys-libs/glibc/Manifest | 4 - .../coreos-overlay/sys-libs/glibc/README.md | 9 - .../sys-libs/glibc/files/nscd-conf.tmpfiles | 2 - .../portage-stable/sys-libs/glibc/Manifest | 35 + .../glibc/files/2.19/glibc-2.19-gcc-10.patch | 15 + .../glibc-2.19-ia64-gcc-4.8-reloc-hack.patch | 32 + .../glibc-2.19-kernel-2.6.16-compat.patch | 85 + .../glibc-2.19-kernel-2.6.16-hide-pipe2.patch | 16 + .../2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch | 102 + .../sys-libs/glibc/files/host.conf-1 | 0 .../sys-libs/glibc/files/nscd-1 | 0 .../sys-libs/glibc/files/nscd.service | 15 + .../sys-libs/glibc/files/nscd.tmpfilesd | 4 + .../sys-libs/glibc/glibc-2.19-r3.ebuild | 1332 +++++++++++++ .../sys-libs/glibc/glibc-2.31-r7.ebuild | 1511 ++++++++++++++ .../sys-libs/glibc/glibc-2.32-r8.ebuild | 1529 ++++++++++++++ .../sys-libs/glibc/glibc-2.33-r14.ebuild | 1606 +++++++++++++++ .../sys-libs/glibc/glibc-2.34-r14.ebuild | 1627 +++++++++++++++ .../sys-libs/glibc/glibc-2.35-r11.ebuild | 1635 +++++++++++++++ .../sys-libs/glibc/glibc-2.36-r8.ebuild | 1676 ++++++++++++++++ .../sys-libs/glibc/glibc-2.37-r10.ebuild | 1695 ++++++++++++++++ .../sys-libs/glibc/glibc-2.38-r13.ebuild | 45 +- .../sys-libs/glibc/glibc-2.39-r11.ebuild | 1751 ++++++++++++++++ .../sys-libs/glibc/glibc-2.40-r5.ebuild | 1751 ++++++++++++++++ .../sys-libs/glibc/glibc-2.40-r7.ebuild | 1754 ++++++++++++++++ .../sys-libs/glibc/glibc-2.40-r8.ebuild | 1754 ++++++++++++++++ .../sys-libs/glibc/glibc-9999.ebuild | 1767 +++++++++++++++++ .../sys-libs/glibc/metadata.xml | 0 29 files changed, 21738 insertions(+), 41 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/glibc delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/README.md delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/sys-libs/glibc/files/host.conf-1 (100%) rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/sys-libs/glibc/files/nscd-1 (100%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.service create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.tmpfilesd create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.19-r3.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.31-r7.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.32-r8.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.33-r14.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.34-r14.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.35-r11.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.36-r8.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.37-r10.ebuild rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/sys-libs/glibc/glibc-2.38-r13.ebuild (98%) create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.39-r11.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r5.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r7.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r8.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-9999.ebuild rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/sys-libs/glibc/metadata.xml (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/glibc b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/glibc new file mode 100644 index 00000000000..75cc098bff7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-libs/glibc @@ -0,0 +1,27 @@ +# A terrible hack to actually strip our binaries. We want to make +# "dostrip -x /" a no-op, otherwise pass everything to the original +# dostrip. +eval "$(echo 'flatcar_hacked_dostrip()'; declare -pf dostrip | tail -n + 2)" +dostrip() { + if [[ ${#} = 2 && ${1} = '-x' && ${2} = '/' ]]; then + return + fi + flatcar_hacked_dostrip "${@}" +} + +cros_post_src_install_etc_munging() { + # Clean out any default configs. Baselayout will provide those. + rm -rf "${ED}"/etc + # Restore this one for the SDK. + test ! -e "${T}"/00glibc || doenvd "${T}"/00glibc + # Create nscd directories and config. + keepdir /var/db/nscd + insinto /etc + doins "${S}/nscd/nscd.conf" + # Create a symlink for backward-compatibility. + dosym -r /usr/share/flatcar/etc/nscd.conf /usr/share/baselayout/nscd.conf + # And an empty file, so the compat symlink is not dangling. It + # will be replaced later with a valid file from /etc. + insinto /usr/share/flatcar/etc + newins - nscd.conf +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest deleted file mode 100644 index 7d3514d9b4e..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347 -DIST glibc-2.38-patches-13.tar.xz 92708 BLAKE2B b2f05a793c92ea0b7901d2124fcd968fa846fdf687f8cbdbc17795c33fae2d538133fae66d575c5b98a7a05a29f9f816e7ecd45f3be5ed10ef65adbf92c7fc4d SHA512 24e45a88fa7676ef22a7e2bb864dff27262f69900c4ef76d21c6fee498d728949b6f5d03dd094d1774a66a8a47b779bf4b16ee31e5306bcdb55cedcc0a1c5e9f -DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900 -DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/README.md b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/README.md deleted file mode 100644 index 0bcb9dd9ee6..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# GLibc - -The system's C library, sometimes referred to as "service pack for the C -language". The build recipe has a single modification over the one Gentoo -upstream uses: in the installation callback `glibc_do_src_install`, we remove -all of glibc's `/etc` files right after the stock glibc build diligently -installed them, since we ship our own `/etc` stuff via the `baseimage` recipe. -The addition sits at the end of the `glibc_do_src_install` function and is duly -labelled `## Flatcar Container Linux: ...`. diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles deleted file mode 100644 index 0cf43dcb7a1..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-conf.tmpfiles +++ /dev/null @@ -1,2 +0,0 @@ -L /etc/nscd.conf - - - - ../usr/share/baselayout/nscd.conf -d /var/db/nscd - - - - - diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/Manifest new file mode 100644 index 00000000000..49fb11471ca --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/Manifest @@ -0,0 +1,35 @@ +DIST backport-rv32.txz 26416 BLAKE2B 7a6b593859f88a3c040f06324dace4cc6137d14d4580fad9ea285829666d761c3dd01c190746e86846c219423124c77a55bc57b6e56efe6401a9c99d7fa445cd SHA512 d08dc02c4f0a3c5a15c57fbb5190588121c0e0728e6ab2119483407a98625efe58b3c83b44d750b0146171e63dcf8a6dbb6d1a057d042f794eed9adbd1f0293e +DIST gcc-4.7.3-r1-multilib-bootstrap.tar.bz2 8064097 BLAKE2B 3cc5c82cd57d0fbd26d9a376ee8ca02f119fe9d653311cbe4d2b7b93aec2290adac3be271be19a7fdedae2e11e4b6e32360184e557204e100ad64357f5575d4b SHA512 40b93e194ad41a75d649d84d1c49070680f253a13f0617803243bc61c44fed1ca2d0a7572a97ebb79353f312b58b5f6360be916dd7435928cc53935082e15269 +DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853 +DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347 +DIST glibc-2.19-patches-9.tar.bz2 24584 BLAKE2B a96e930a5bd20fa75d9f259cc2117fa5ce98072274a24a5823bf877e3739fa4c001a94d7865e065ee0527f3974430d27da8038e042340a451ad2052c62724f26 SHA512 a95b3063ade974a3556480b798b317d33c7423a8cb9e69f67249ffb8b3d3c671d70d2d5f782c1efadc0bec4cc49a96d4fe89911f3dfcd85b459f69f3b4f38f0e +DIST glibc-2.19.tar.xz 12083312 BLAKE2B 9dc03346e0f0df4bf009a92d894b0a9f964ff92b7f4c9663cedf1cb6cf90435f28a15539d33791ecf43ee578fa4e26f916af0367651312ef8f9c1c38ce0dafa2 SHA512 9e021fcb3afbb9ace2a0e37fded231a62de861bd766e29d47163a03182e37add718b7acc3963d1c525f9556773e842297725715acde48dcfbaab6e756af1a23d +DIST glibc-2.31-patches-9.tar.xz 74712 BLAKE2B 62991b67de4def4cca944e8420d2f0139f88b6754c6bc81072bb321c574c1db22641857345325848e1dfb551c10758f582e4425e687a7921cdbd4e7e7923a047 SHA512 699d898e3a8ed02b04573c675f572076e8f747767bfc577a033a49cd7d9078a7a60ac325acd4bd419a93b56edf90ce067baa7578ab315e27885f1f0e13916354 +DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306 +DIST glibc-2.32-patches-8.tar.xz 65532 BLAKE2B 00c572cff396e52313d0324f7bc28192a65f06b22fc5a04aa631b76b3016842365006399715531ee693f3519720edcebef7884247f2f8c19e3518c1ddafab7cc SHA512 5240bc3a6df46d12c03ea4ce7b1a0df85301256ae3bd003fd04c61dadaaec34998873bf20544d891f6eedf896302bb916010aebc1d8d646a3cce09a93b533d0b +DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b +DIST glibc-2.33-patches-11.tar.xz 143916 BLAKE2B ac13b3ccf9681bb6d3c35ecc33e268ea3f67c1809f916019e692dc83e3ce809402a45548da5ca6c7c30d2a45a2638f9fa4254c0355bd4c53bdb216f17aa4e28b SHA512 0ee1dfcf9574543d49ab4fbfe53571258422b6e82b9d12a33e411cee7e517821a4c45c24962b5120783a4efc898afdfa170d33486cc74d94c526bdd14cc84300 +DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb +DIST glibc-2.34-patches-17.tar.xz 241584 BLAKE2B e4eea130c331f64ba66e14a6ba318853141ee3e41b455cb45b8fdb702cae071dd307229dafcfcafcc41e5a56982f52c87e31d95295f824f1a2ae689a7e0f5b49 SHA512 c6a51b373be3986e1ad753541ccf73f29515b5df0f80e0450b26bed37e8c505e22e8f13e89554347e551819c8d89d30f306464e5d25cafa4a12400c112578dca +DIST glibc-2.34.tar.xz 17301232 BLAKE2B 874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c SHA512 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624 +DIST glibc-2.35-loongarch-patches-20220522.tar.xz 44728 BLAKE2B 09e7a061f3269ebd763cd700f7c23e6cd7aab738d87ee31f76a81281920c4e5e207964c79104cd75f0a2e07b77344c2a730a9063344aa1483cd3d9aeac87de40 SHA512 21f13892fb52ec753856d5559b032c2be3a76d1cf940127222f7aa878548ce7e6ea0d2ff8791ddb91aaa2b77ce17131cd2fb2ebbdaa99443bf0a6b4c81f7388d +DIST glibc-2.35-patches-12.tar.xz 266056 BLAKE2B 7979dcfee270107d51c10e5ec74c9c1ab0d0a9743d6718a6d915d241fee6482958c957ef9fd25cd704925e3aa0d98c23115274c7594d149dec08c5e0766a488d SHA512 37a4c086b6a459cb378608a49d90705dddb806376edb2456b8c98e3a469fc558bce7b1b4c8a856b8dffb209e7b6e1c48382ed6f050284c5f74a92ca4f7d4b88a +DIST glibc-2.35.tar.xz 18165952 BLAKE2B 623c728884f070cd87ffeb9203f74206197c52405ac9bc44f3dd519a3468b8e8ae2536c883e5d17d94417dbd1e91775de2e674314e4ff7424f9720026d6b7063 SHA512 e7336ce27561be5d7c217832a1136fb327e057bd8d3f92925b35c97e3e9f9e486948b5a1e03e5e4090772ef06437a074d10b82e68f17f1ad8f22077ee39e1b66 +DIST glibc-2.36-patches-10.tar.xz 118268 BLAKE2B 3d1bdb6c1a9e10ba78a344ca8940f68c49411a94aefd4d66bab17d784bc8783f2ae71efb171dea6d1919ea2c4a1f54333dabc2c4d99838ba8ec568484b84d0ae SHA512 b88dfc56ffc2df495e13cf90e709629db2b9b411a1c5ba6d39f40f45be3c2f49df7b1fe320d1cd7552515fe68dfc644c12916a6db34139ccf94ff755235d3a40 +DIST glibc-2.36.tar.xz 18610836 BLAKE2B f8375e084043f032609e66fd98c234249df57a595c59672acb1bb8c69aed64d339d526611553449492b097cda900ad1d9bae8873d7f5932b10a9a0d8c9210c55 SHA512 9ea0bbda32f83a85b7da0c34f169607fb8a102f0a11a914e6bf531be47d1bef4f5307128286cffa1e2dc5879f0e6ccaef527dd353486883fa332a0b44bde8b3e +DIST glibc-2.37-patches-12.tar.xz 83716 BLAKE2B 123951d94dad6c22150c4ef2299bcaafc080322d6eeb58b49b0525a7f5c6867e99e96cd5c065578632d9a73b5527e2b2742bc29162da487894ecea6aff75df2e SHA512 b53c06e157b23f5fae1cd15eb90fdbf3076c79f295a687bdfd285689f94417267f167ff2d6a55c4d3c3b2e08dd6406c36fed4a5fee33378dd69976c1102c01a2 +DIST glibc-2.37.tar.xz 18674604 BLAKE2B 8139cd977b2ed3bfdbde5ffb1cda8f759763dbb83071167272fef798cfbdc0d17cfd1ec893d126c52c91511b7961f3ad12eed34534b99412dfa04a1cdd5b4ea3 SHA512 4fc5932f206bb1b8b54828a28af1a681616b838bbab60c81c82155f3629cbfe1301d271af65511ed917f4c6949a025429221fe6035753282f15346919f15b90c +DIST glibc-2.38-patches-13.tar.xz 92708 BLAKE2B b2f05a793c92ea0b7901d2124fcd968fa846fdf687f8cbdbc17795c33fae2d538133fae66d575c5b98a7a05a29f9f816e7ecd45f3be5ed10ef65adbf92c7fc4d SHA512 24e45a88fa7676ef22a7e2bb864dff27262f69900c4ef76d21c6fee498d728949b6f5d03dd094d1774a66a8a47b779bf4b16ee31e5306bcdb55cedcc0a1c5e9f +DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900 +DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc95b7f521ffb27686a9109fe92e0458e903a24e763db17631b8ae6c1e8de7add2a11979b970689b2378aeb6ef29da7ceb6 SHA512 9daf2c57d178c7ce9d98ee454f680280738b37571bbbecc1724282e4866df29b78e60de40ad81a6efcc0a75b45d08148cb1a5f942ae7e308ae6fa63f9671b7de +DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2 +DIST glibc-2.40-patches-5.tar.xz 87376 BLAKE2B b09b9d2c8e45c0b494223cd01effb14ef205b030f2aeb76e1d7d289997258c1e46d85f8f4ad761e22afc35b1f4747fbca51d7caf252181c7b054b6a3e6bd2bfe SHA512 bf4776c27e5d962d2774afbed2236996a712a6127e5fdccd051af212d86a7e699a932cf4cb22f5516d513b9490b91d5e145727035e845cd4ef290985ac3dc524 +DIST glibc-2.40-patches-7.tar.xz 104100 BLAKE2B 6e91571bea0475b1a47a2c1b796cc91d2ab0f542cc82dba8691f99d09459bea73c0940c89c8f559edfb315cf9844a5c1eb0392f40499b1b8861f1e16f8b549db SHA512 8d61810f11f4c2ce97037e0f3c62e2a7bf0d83571fe68c7f80a248df744c31c2bda075c1f4c6189e8d5de0b200c1070e667a753144c61b0cb9bd5456b1c99d8b +DIST glibc-2.40-patches-8.tar.xz 112020 BLAKE2B 17f5a3e5486aa570cb4d9103a84b649af9731bc398a4ff65d3d24c8912215dc7f5f2d6fa9a0222c514374a132b96796e8926a5cc31c87b326bf6d1a39772bd7a SHA512 97a28822f97d1c06773953750a8d9a38a6bd9ce488f4c4d5f0752b573591cbdc84dfbbb277e3fb8e5664c56596efc093fd83a78e4c47bb9c11cafe942b13a0f1 +DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885 +DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238 +DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc +DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff +DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db +DIST locale-gen-2.22.tar.gz 7971 BLAKE2B 2dc66fa69bf51799d0c34459b654fba6998b80a7e322e9b670036c967e269ad921f50195e6e34c4a83c1f0bad191fd5aa3f37defb82271b73acbca07b7e49d08 SHA512 9798b10dbbc792345a7b7a121dec5f4bba9839a8aec010f01a09f3402fd5bf2376f79e03a6a19bc357010db780037a8811c381136ce19be1f1370374906dff38 +DIST locale-gen-2.23.tar.gz 7977 BLAKE2B bf2cc1fa05828a9133789133ce2d910662f1b5979269869cd76dac45831c45917700fc81357441fc7691af23196c6a6c3a28bb4440ceb6a5a3b17dbdc55c2bcc SHA512 f6b3daf3e2f10bc2f68626d8e7edc0f27eb0fe16bfe8840904a1b13d8fc76318d9f83277ee7fcb7a6db177413ba8a2cda94493e56d01df3a20ca37fed64e469c diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch new file mode 100644 index 00000000000..45e8ab80007 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-gcc-10.patch @@ -0,0 +1,15 @@ +Identify gcc-10+ as a good compiler. + +Index: work/glibc-2.19/configure +=================================================================== +--- glibc-2.19/configure ++++ glibc-2.19/configure +@@ -4710,7 +4710,7 @@ $as_echo_n "checking version of $CC... " + ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ) ++ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* ) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch new file mode 100644 index 00000000000..72a616a046a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-ia64-gcc-4.8-reloc-hack.patch @@ -0,0 +1,32 @@ +https://bugs.gentoo.org/503838 +http://gcc.gnu.org/PR60465 +https://sourceware.org/ml/libc-alpha/2015-12/msg00556.html +https://trofi.github.io/posts/189-glibc-on-ia64-or-how-relocations-bootstrap.html + +newer versions of gcc generate relocations in the elf_get_dynamic_info func +which glibc relies on to populate some info structs. those structs are then +used by ldso to process relocations in itself. glibc requires that there are +no relocations until that point (*after* elf_get_dynamic_info), so we end up +crashing during elf_get_dynamic_info because the relocation has not yet been +processed. + +this hack shuffles the code in a way that tricks gcc into not generating the +relocation. we need to figure out something better for upstream. + +--- a/elf/get-dynamic-info.h ++++ b/elf/get-dynamic-info.h +@@ -66,8 +66,12 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) + info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM + + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn; + else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM) +- info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM +- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn; ++ { ++ d_tag_utype i = ++ DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM ++ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM; ++ info[i] = dyn; ++ } + ++dyn; + } + diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch new file mode 100644 index 00000000000..bf75f80cb7c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-compat.patch @@ -0,0 +1,85 @@ +Remove newer symbols that does not work on linux-2.6.16. + +This is only for Prefix standalone. + +Index: glibc-2.19/io/sys/stat.h +=================================================================== +--- glibc-2.19.orig/io/sys/stat.h ++++ glibc-2.19/io/sys/stat.h +@@ -361,10 +361,6 @@ extern int mkfifoat (int __fd, const cha + #ifdef __USE_ATFILE + /* Set file access and modification times relative to directory file + descriptor. */ +-extern int utimensat (int __fd, const char *__path, +- const struct timespec __times[2], +- int __flags) +- __THROW __nonnull ((2)); + #endif + + #ifdef __USE_XOPEN2K8 +Index: glibc-2.19/posix/unistd.h +=================================================================== +--- glibc-2.19.orig/posix/unistd.h ++++ glibc-2.19/posix/unistd.h +@@ -419,7 +419,6 @@ extern int pipe (int __pipedes[2]) __THR + #ifdef __USE_GNU + /* Same as pipe but apply flags passed in FLAGS to the new file + descriptors. */ +-extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur; + #endif + + /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. +Index: glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/x86/bits/epoll.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/x86/bits/epoll.h +@@ -19,11 +19,5 @@ + # error "Never use directly; include instead." + #endif + +-/* Flags to be passed to epoll_create1. */ +-enum +- { +- EPOLL_CLOEXEC = 02000000 +-#define EPOLL_CLOEXEC EPOLL_CLOEXEC +- }; + + #define __EPOLL_PACKED __attribute__ ((__packed__)) +Index: glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/bits/fcntl-linux.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +@@ -187,8 +187,6 @@ + # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ + #endif + #ifdef __USE_XOPEN2K8 +-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with +- close-on-exit set. */ + #endif + + /* For F_[GET|SET]FD. */ +Index: glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/sysv/linux/sys/epoll.h ++++ glibc-2.19/sysdeps/unix/sysv/linux/sys/epoll.h +@@ -101,7 +101,6 @@ extern int epoll_create (int __size) __T + + /* Same as epoll_create but with an FLAGS parameter. The unused SIZE + parameter has been dropped. */ +-extern int epoll_create1 (int __flags) __THROW; + + + /* Manipulate an epoll instance "epfd". Returns 0 in case of success, +Index: glibc-2.19/time/sys/time.h +=================================================================== +--- glibc-2.19.orig/time/sys/time.h ++++ glibc-2.19/time/sys/time.h +@@ -140,8 +140,6 @@ extern int utimes (const char *__file, c + + #ifdef __USE_BSD + /* Same as `utimes', but does not follow symbolic links. */ +-extern int lutimes (const char *__file, const struct timeval __tvp[2]) +- __THROW __nonnull ((1)); + + /* Same as `utimes', but takes an open file descriptor instead of a name. */ + extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW; diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch new file mode 100644 index 00000000000..2b9ccceced2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch @@ -0,0 +1,16 @@ +Remove the pipe2 symbol from libc.so, otherwise meson will pick it up. + +This is a balance. We decide not to strip all the O_CLOEXEC, otherwise +gtk+ will need to be patched. +Index: glibc-2.19/sysdeps/unix/make-syscalls.sh +=================================================================== +--- glibc-2.19.orig/sysdeps/unix/make-syscalls.sh ++++ glibc-2.19/sysdeps/unix/make-syscalls.sh +@@ -131,6 +131,7 @@ emit_weak_aliases() + echo " echo 'libc_hidden_def ($name)'; \\" + ;; + *) ++ [ $name = pipe2 ] && continue + echo " echo 'weak_alias ($strong, $name)'; \\" + echo " echo 'libc_hidden_weak ($name)'; \\" + ;; diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch new file mode 100644 index 00000000000..51fbe5f5407 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch @@ -0,0 +1,102 @@ +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2d7ed98add14f75041499ac189696c9bd3d757fe +https://bugs.gentoo.org/869263 + +From 2d7ed98add14f75041499ac189696c9bd3d757fe Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Tue, 13 Sep 2022 13:39:13 -0400 +Subject: [PATCH] Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 + [BZ# 29564] + +make-4.4 will add long flags to MAKEFLAGS variable: + + * WARNING: Backward-incompatibility! + Previously only simple (one-letter) options were added to the MAKEFLAGS + variable that was visible while parsing makefiles. Now, all options + are available in MAKEFLAGS. + +This causes locale builds to fail when long options are used: + + $ make --shuffle + ... + make -C localedata install-locales + make: invalid shuffle mode: '1662724426r' + +The change fixes it by passing eash option via whitespace and dashes. +That way option is appended to both single-word form and whitespace +separated form. + +While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering +out --long-options. Otherwise options like --shuffle flag enable silent +mode unintentionally. $(silent-make) variable consolidates the checks. + +Resolves: BZ# 29564 + +CC: Paul Smith +CC: Siddhesh Poyarekar +Signed-off-by: Sergei Trofimovich +Reviewed-by: Siddhesh Poyarekar +--- a/Makeconfig ++++ b/Makeconfig +@@ -43,6 +43,22 @@ else + $(error objdir must be defined by the build-directory Makefile) + endif + ++# Did we request 'make -s' run? "yes" or "no". ++# Starting from make-4.4 MAKEFLAGS now contains long ++# options like '--shuffle'. To detect presence of 's' ++# we pick first word with short options. Long options ++# are guaranteed to come after whitespace. We use '-' ++# prefix to always have a word before long options ++# even if no short options were passed. ++# Typical MAKEFLAGS values to watch for: ++# "rs --shuffle=42" (silent) ++# " --shuffle" (not silent) ++ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),) ++silent-make := no ++else ++silent-make := yes ++endif ++ + # Root of the sysdeps tree. + sysdep_dir := $(..)sysdeps + export sysdep_dir := $(sysdep_dir) +@@ -917,7 +933,7 @@ endif + # umpteen zillion filenames along with it (we use `...' instead) + # but we don't want this echoing done when the user has said + # he doesn't want to see commands echoed by using -s. +-ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s ++ifeq ($(silent-make),yes) # if -s + +cmdecho := echo >/dev/null + else # not -s + +cmdecho := echo +--- a/Makerules ++++ b/Makerules +@@ -794,7 +794,7 @@ endif + # Maximize efficiency by minimizing the number of rules. + .SUFFIXES: # Clear the suffix list. We don't use suffix rules. + # Don't define any builtin rules. +-MAKEFLAGS := $(MAKEFLAGS)r ++MAKEFLAGS := $(MAKEFLAGS) -r + + # Generic rule for making directories. + %/: +@@ -811,7 +811,7 @@ MAKEFLAGS := $(MAKEFLAGS)r + .PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c)) + + # Use the verbose option of ar and tar when not running silently. +-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s ++ifeq ($(silent-make),no) # if not -s + verbose := v + else # -s + verbose := +--- a/elf/rtld-Rules ++++ b/elf/rtld-Rules +@@ -52,7 +52,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\ + mv -f $@T $@ + + # Use the verbose option of ar and tar when not running silently. +-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s ++ifeq ($(silent-make),no) # if not -s + verbose := v + else # -s + verbose := diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/host.conf-1 b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/host.conf-1 similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/host.conf-1 rename to sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/host.conf-1 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-1 b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd-1 similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd-1 rename to sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd-1 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.service b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.service new file mode 100644 index 00000000000..25a3b1d9be0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Name Service Cache Daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/nscd -F +ExecStop=/usr/sbin/nscd --shutdown +ExecReload=/usr/sbin/nscd -i passwd +ExecReload=/usr/sbin/nscd -i group +ExecReload=/usr/sbin/nscd -i hosts +ExecReload=/usr/sbin/nscd -i services +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.tmpfilesd b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.tmpfilesd new file mode 100644 index 00000000000..52edbba673c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/files/nscd.tmpfilesd @@ -0,0 +1,4 @@ +# Configuration to create /run/nscd directory +# Used as part of systemd's tmpfiles + +d /run/nscd 0755 root root diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.19-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.19-r3.ebuild new file mode 100644 index 00000000000..7d492b72364 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.19-r3.ebuild @@ -0,0 +1,1332 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +TMPFILES_OPTIONAL=1 + +inherit prefix toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + inherit git-r3 +else + KEYWORDS="~amd64" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER="4.7.3-r1" + +# Gentoo patchset +PATCH_VER=9 + +SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )" + +IUSE="audit caps compile-locales +crypt debug doc gd headers-only multilib nscd profile selinux suid systemtap vanilla" + +# Yes this is a hack. It's always on here and we want to be able +# to simplify the dependencies... +REQUIRED_USE="crypt" + +# Minimum kernel version that glibc requires +# hppa requires 2.6.20 +MIN_KERN_VER="2.6.16" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we disable stripping +# entirely. +RESTRICT=strip + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS. +COMMON_DEPEND=" + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} + >=app-misc/pax-utils-0.1.10 + doc? ( sys-apps/texinfo ) +" +RDEPEND="${COMMON_DEPEND} + sys-apps/gentoo-functions +" + +if [[ ${CATEGORY} == cross-* ]] ; then + DEPEND+=" !headers-only? ( + >=${CATEGORY}/binutils-2.24 + >=${CATEGORY}/gcc-4.9 + )" + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" +else + DEPEND+=" + >=sys-devel/binutils-2.24 + >=sys-devel/gcc-4.9 + virtual/os-headers + " + RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" + PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" +fi + +# +# Small helper functions +# + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +just_headers() { + is_crosscompile && use headers-only +} + +alt_prefix() { + is_crosscompile && echo /usr/${CTARGET} +} + +# We need to be able to set alternative headers for compiling for non-native +# platform. Will also become useful for testing kernel-headers without screwing +# up the whole system. +alt_headers() { + echo ${ALT_HEADERS:=$(alt_prefix)/usr/include} +} + +alt_build_headers() { + if [[ -z ${ALT_BUILD_HEADERS} ]] ; then + ALT_BUILD_HEADERS="${EPREFIX}$(alt_headers)" + if tc-is-cross-compiler ; then + ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers) + if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then + local header_path=$(echo '#include ' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + nonfatal emake -s glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # Note: This test only matters when the x86 ABI is enabled, so we could + # optimize a bit and elide it. + # TODO: See cross-compile issues listed above for x86. + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + # If the CHOST is the basic one (e.g. not sparcv9-xxx already), + # try to pick a better one so glibc can use cpu-specific .S files. + # We key off the CFLAGS to get a good value. Also need to handle + # version skew. + # We can't force users to set their CHOST to their exact machine + # as many of these are not recognized by config.sub/gcc and such :(. + # Note: If the mcpu values don't scale, we might try probing CPP defines. + # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? + + local cpu + case ${CTARGET} in + sparc64-*) + case $(get-flag mcpu) in + niagara[234]) + cpu="sparc64v2" + ;; + niagara) + cpu="sparc64v" + ;; + ultrasparc3) + cpu="sparc64b" + ;; + *) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + niagara[234]) + cpu="sparcv9v2" + ;; + niagara) + cpu="sparcv9v" + ;; + ultrasparc3) + cpu="sparcv9b" + ;; + v9|ultrasparc) + cpu="sparcv9" + ;; + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # Lock glibc at -O2; we want to be conservative here. + # -fno-strict-aliasing is to work around #155906. + filter-flags '-O?' + append-flags -O2 -fno-strict-aliasing + + filter-flags '-fstack-protector*' + append-flags '-fno-stack-protector' +} + +want_tls() { + # Archs that can use TLS (Thread Local Storage) + case $(tc-arch) in + x86) + # requires i486 or better #106556 + [[ ${CTARGET} == i[4567]86* ]] && return 0 + return 1 + ;; + esac + return 0 +} + +want__thread() { + want_tls || return 1 + + # For some reason --with-tls --with__thread is causing segfaults on sparc32. + [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 + + [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} + + # only test gcc -- can't test linking yet + tc-has-tls -c ${CTARGET} + WANT__THREAD=$? + + return ${WANT__THREAD} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + local VAR=CFLAGS_${ABI} + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. + : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})} + export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +check_devpts() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown. + + # If merely building the binary package, then there's nothing to verify. + [[ ${MERGE_TYPE} == "buildonly" ]] && return + + # Only sanity check when installing the native glibc. + [[ -n ${ROOT} ]] && return + + # If they're opting in to the old suid code, then no need to check. + use suid && return + + if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then + eerror "In order to use glibc with USE=-suid, you must make sure that" + eerror "you have devpts mounted at /dev/pts with the gid=5 option." + eerror "Openrc should do this for you, so you should check /etc/fstab" + eerror "and make sure you do not have any invalid settings there." + die "mount & fix your /dev/pts settings" + fi +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "${EPREFIX}/$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown + check_devpts + + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # Check for sanity of /etc/nsswitch.conf + if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then + local entry + for entry in passwd group shadow; do + if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then + eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." + eerror "Please make sure you have 'files' entries for" + eerror "'passwd:', 'group:' and 'shadow:' databases." + eerror "For more details see:" + eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" + die "nsswitch.conf has no 'files' provider in '${entry}'." + fi + done + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend ${STAT} + if [[ ${STAT} -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + ebegin "Checking gcc for __thread support" + if ! eend $(want__thread ; echo $?) ; then + echo + eerror "Could not find a gcc that supports the __thread directive!" + eerror "Please update your binutils/gcc and try again." + die "No __thread support in gcc!" + fi + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 + + setup_env + + if [[ -n ${EGIT_REPO_URI} ]] ; then + git-r3_src_unpack + else + unpack ${P}.tar.xz + fi + + cd "${S}" || die + touch locale/C-translit.h || die #185476 #218003 + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 +} + +src_prepare() { + if ! use vanilla ; then + elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + if just_headers ; then + if [[ -e ports/sysdeps/mips/preconfigure ]] ; then + # mips peeps like to screw with us. if building headers, + # we don't have a real compiler, so we can't let them + # insert -mabi on us. + sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die + find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} + + fi + fi + + default + + gnuconfig_update + + eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-compat.patch + eapply "${FILESDIR}"/2.19/glibc-2.19-kernel-2.6.16-hide-pipe2.patch + eapply "${FILESDIR}"/2.19/glibc-2.19-gcc-10.patch + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh +} + +glibc_do_configure() { + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + # CXX isnt handled by the multilib system, so if we dont unset here + # we accumulate crap across abis + unset CXX + + einfo "Configuring glibc for nptl" + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS)" + einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + + echo + + local myconf=() + + case ${CTARGET} in + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + myconf+=( --enable-stack-protector=all ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + --sysconfdir="${EPREFIX}/etc" + --localstatedir="${EPREFIX}/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable systemtap) + $(use_enable nscd) + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="${EPREFIX}/sbin" + export libc_cv_slibdir="${EPREFIX}/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + CC="$(tc-getBUILD_CC)" \ + CFLAGS="-O1 -pipe" \ + CPPFLAGS="-U_FORTIFY_SOURCE" \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + emake check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local locale_list="${root%/}/etc/locale.gen" + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + locale-gen --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + cd "${ED}"$(alt_libdir)/.. + [[ -e lib ]] || mkdir lib + cd "${ED}"$(alt_usrlibdir)/.. + [[ -e lib ]] || mkdir lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + # Make sure all the ABI's can find the locales and so we only + # have to generate one set + local a + keepdir /usr/$(get_libdir)/locale + for a in $(get_install_abis) ; do + if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale + fi + done + + cd "${S}" + + # Install misc network config files + insinto /etc + doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf + doins "${WORKDIR}"/extra/etc/*.conf + + if use nscd ; then + doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)" + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + else + # Do this since extra/etc/*.conf above might have nscd.conf. + rm -f "${ED}"/etc/nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen "${ED}" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ./ld-*.so --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -n ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.31-r7.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.31-r7.ebuild new file mode 100644 index 00000000000..7df8f581644 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.31-r7.ebuild @@ -0,0 +1,1511 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=9 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20180511 + +LOCALE_GEN_VER=2.00 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-0.1.10 + sys-devel/bison + doc? ( sys-apps/texinfo ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' +} + +want_tls() { + # Archs that can use TLS (Thread Local Storage) + case $(tc-arch) in + x86) + # requires i486 or better #106556 + [[ ${CTARGET} == i[4567]86* ]] && return 0 + return 1 + ;; + esac + return 0 +} + +want__thread() { + want_tls || return 1 + + # For some reason --with-tls --with__thread is causing segfaults on sparc32. + [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 + + [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} + + # only test gcc -- can't test linking yet + tc-has-tls -c ${CTARGET} + WANT__THREAD=$? + + return ${WANT__THREAD} +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + local VAR=CFLAGS_${ABI} + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. + : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})} + export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # Check for sanity of /etc/nsswitch.conf + if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then + local entry + for entry in passwd group shadow; do + if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then + eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." + eerror "Please make sure you have 'files' entries for" + eerror "'passwd:', 'group:' and 'shadow:' databases." + eerror "For more details see:" + eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" + die "nsswitch.conf has no 'files' provider in '${entry}'." + fi + done + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers ; then + ebegin "Checking gcc for __thread support" + if ! eend $(want__thread ; echo $?) ; then + echo + eerror "Could not find a gcc that supports the __thread directive!" + eerror "Please update your binutils/gcc and try again." + die "No __thread support in gcc!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + elog "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + # CXX isnt handled by the multilib system, so if we dont unset here + # we accumulate crap across abis + unset CXX + + einfo "Configuring glibc for nptl" + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi + einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + + echo + + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + # '=all' is also known to have a problem in IFUNC resolution + # tests: https://sourceware.org/PR25680, bug #712356. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) + $(use_enable systemtap) + $(use_enable nscd) + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + # Make sure all the ABI's can find the locales and so we only + # have to generate one set + local a + keepdir /usr/$(get_libdir)/locale + for a in $(get_install_abis) ; do + if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale + fi + done + + # HACK: If we're building for riscv, we need to additionally make sure that + # we can find the locale archive afterwards + case ${CTARGET} in + riscv*) + if [[ ! -e ${ED}/usr/lib/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/lib/locale + fi + ;; + *) ;; + esac + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf nss/nsswitch.conf + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + elog "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ./ld-*.so --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.32-r8.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.32-r8.ebuild new file mode 100644 index 00000000000..656ad5161a2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.32-r8.ebuild @@ -0,0 +1,1529 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=8 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" + SRC_URI+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.10 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-0.1.10 + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' +} + +want_tls() { + # Archs that can use TLS (Thread Local Storage) + case $(tc-arch) in + x86) + # requires i486 or better #106556 + [[ ${CTARGET} == i[4567]86* ]] && return 0 + return 1 + ;; + esac + return 0 +} + +want__thread() { + want_tls || return 1 + + # For some reason --with-tls --with__thread is causing segfaults on sparc32. + [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 + + [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} + + # only test gcc -- can't test linking yet + tc-has-tls -c ${CTARGET} + WANT__THREAD=$? + + return ${WANT__THREAD} +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + local VAR=CFLAGS_${ABI} + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. + : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})} + export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # Check for sanity of /etc/nsswitch.conf + if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then + local entry + for entry in passwd group shadow; do + if ! grep -E -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then + eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." + eerror "Please make sure you have 'files' entries for" + eerror "'passwd:', 'group:' and 'shadow:' databases." + eerror "For more details see:" + eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" + die "nsswitch.conf has no 'files' provider in '${entry}'." + fi + done + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers ; then + ebegin "Checking gcc for __thread support" + if ! eend $(want__thread ; echo $?) ; then + echo + eerror "Could not find a gcc that supports the __thread directive!" + eerror "Please update your binutils/gcc and try again." + die "No __thread support in gcc!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use riscv && unpack backport-rv32.txz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + elog "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + + if use riscv ; then + elog "Adding rv32 backport patchset for glibc-2.32 (experimental)" + eapply "${WORKDIR}"/backport-rv32 + einfo "Done." + fi + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + # CXX isnt handled by the multilib system, so if we dont unset here + # we accumulate crap across abis + unset CXX + + einfo "Configuring glibc for nptl" + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}" + einfo " $(printf '%15s' 'Manual CC:') ${CC}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi + einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + einfo " $(printf '%15s' 'Manual NM:') ${NM}" + einfo " $(printf '%15s' 'Manual READELF:') ${READELF}" + + echo + + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + # '=all' is also known to have a problem in IFUNC resolution + # tests: https://sourceware.org/PR25680, bug #712356. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) + $(use_enable systemtap) + $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf nss/nsswitch.conf + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + elog "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ./ld-*.so --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.33-r14.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.33-r14.ebuild new file mode 100644 index 00000000000..5e23df0069e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.33-r14.ebuild @@ -0,0 +1,1606 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=11 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.22 + +GLIBC_SYSTEMD_VER=20210814 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-1.3.1 + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} + compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) + test? ( >=net-dns/libidn2-2.3.0 ) +" +RDEPEND="${COMMON_DEPEND} + app-arch/gzip + sys-apps/grep + app-alternatives/awk + sys-apps/gentoo-functions + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + + # and make sure __ORIC_CC and __ORIG_CXX is defined now. + export __ORIG_CC=${CC} + export __ORIG_CXX=${CXX} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + + local current_binutils_path=$(binutils-config -B) + local current_gcc_path=$(gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export __GLIBC_CC=${CC} + export __GLIBC_CXX=${CXX} + + export __abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +upgrade_warning() { + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks + upgrade_warning +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + echo + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + *) + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + # '=all' is also known to have a problem in IFUNC resolution + # tests: https://sourceware.org/PR25680, bug #712356. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) + $(use_enable systemtap) + $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + # Explicit override of https://sourceware.org/PR27991 + # exposes a bug in glibc's configure: + # https://sourceware.org/PR27991 + libc_cv_have_x86_lahf_sahf=no + libc_cv_have_x86_movbe=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + # We take care of patching our binutils to use both hash styles, + # and many people like to force gnu hash style only, so disable + # this overriding check. #347761 + export libc_cv_hashstyle=no + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + $(use_enable crypt) + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld-*so' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.34-r14.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.34-r14.ebuild new file mode 100644 index 00000000000..e23b9ae35e9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.34-r14.ebuild @@ -0,0 +1,1627 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=17 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.22 + +GLIBC_SYSTEMD_VER=20210729 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} + compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) + test? ( >=net-dns/libidn2-2.3.0 ) +" +RDEPEND="${COMMON_DEPEND} + app-arch/gzip + sys-apps/grep + app-alternatives/awk + sys-apps/gentoo-functions + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # Most of the time CC is already set, but not in early sanity checks. + nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}" + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + [[ ${ABI} == x86 ]] && + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + + # Workaround for https://bugs.gentoo.org/823780. This really should + # be removed when the upstream bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103275 + # is fixed in our tree, either via 11.3 or an 11.2p2 patch set. + if [[ ${ABI} == x86 ]] && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)); then + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" + einfo "Auto adding -mno-avx512f to CFLAGS_x86 (bug #823780) (ABI=${ABI})" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=' +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + + # and make sure __ORIC_CC and __ORIG_CXX is defined now. + export __ORIG_CC=${CC} + export __ORIG_CXX=${CXX} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export __GLIBC_CC=${CC} + export __GLIBC_CXX=${CXX} + + export __abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +upgrade_warning() { + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks + upgrade_warning +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + # Consistency is not guaranteed between pkg_ and src_ ... + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + if use clone3 ; then + append-cppflags -DGENTOO_USE_CLONE3 + else + # See e.g. bug #827386, bug #819045. + elog "Disabling the clone3 syscall for compatibility with older Electron apps." + elog "Please re-enable this flag before filing bugs!" + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM AR AS STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + echo + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + *) + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + # '=all' is also known to have a problem in IFUNC resolution + # tests: https://sourceware.org/PR25680, bug #712356. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable static-pie) + $(use_enable systemtap) + $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + # Explicit override of https://sourceware.org/PR27991 + # exposes a bug in glibc's configure: + # https://sourceware.org/PR27991 + libc_cv_have_x86_lahf_sahf=no + libc_cv_have_x86_movbe=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --without-cvs + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + $(use_enable crypt) + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.35-r11.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.35-r11.ebuild new file mode 100644 index 00000000000..0c2aec0025e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.35-r11.ebuild @@ -0,0 +1,1635 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=12 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" + SRC_URI+=" experimental-loong? ( https://dev.gentoo.org/~xen0n/distfiles/glibc-2.35-loongarch-patches-20220522.tar.xz )" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.22 + +GLIBC_SYSTEMD_VER=20210729 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc experimental-loong gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} + compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) + test? ( >=net-dns/libidn2-2.3.0 ) +" +RDEPEND="${COMMON_DEPEND} + app-arch/gzip + sys-apps/grep + app-alternatives/awk + sys-apps/gentoo-functions + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + + # Workaround for bug #823780. + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})" + fi + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # #492892 + filter-flags -frecord-gcc-switches + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + filter-flags '-fstack-protector*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=' +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + + # and make sure __ORIC_CC and __ORIG_CXX is defined now. + export __ORIG_CC=${CC} + export __ORIG_CXX=${CXX} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export __GLIBC_CC=${CC} + export __GLIBC_CXX=${CXX} + + export __abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${__GLIBC_CC} ${__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${__GLIBC_CXX} ${__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi +} + +upgrade_warning() { + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + use experimental-loong && unpack glibc-2.35-loongarch-patches-20220522.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + + if use experimental-loong ; then + einfo "Applying experimental LoongArch patchset" + eapply "${WORKDIR}"/loongarch-2.35 + einfo "Done." + fi + fi + + eapply "${FILESDIR}"/2.35/glibc-2.35-make-4.4-MAKEFLAGS.patch + + if use clone3 ; then + append-cppflags -DGENTOO_USE_CLONE3 + else + # See e.g. bug #827386, bug #819045. + elog "Disabling the clone3 syscall for compatibility with older Electron apps." + elog "Please re-enable this flag before filing bugs!" + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + # Explicit override of https://sourceware.org/PR27991 + # exposes a bug in glibc's configure: + # https://sourceware.org/PR27991 + libc_cv_have_x86_lahf_sahf=no + libc_cv_have_x86_movbe=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + $(use_enable crypt) + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.36-r8.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.36-r8.ebuild new file mode 100644 index 00000000000..cb6ddba38eb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.36-r8.ebuild @@ -0,0 +1,1676 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=10 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20201208 + +LOCALE_GEN_VER=2.23 + +GLIBC_SYSTEMD_VER=20210729 + +SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz" +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +# gzip, grep, awk are needed by locale-gen, bug 740750 + +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + doc? ( sys-apps/texinfo ) + !compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) + test? ( dev-lang/perl ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + perl? ( dev-lang/perl ) + test? ( dev-lang/perl ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} + compile-locales? ( + app-arch/gzip + sys-apps/grep + app-alternatives/awk + ) + test? ( >=net-dns/libidn2-2.3.0 ) +" +RDEPEND="${COMMON_DEPEND} + app-arch/gzip + sys-apps/grep + app-alternatives/awk + sys-apps/gentoo-functions + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + + # Workaround for bug #823780. + # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that. + CC_mangled=${CC} + CC=${glibc__GLIBC_CC} + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})" + fi + CC=${CC_mangled} + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if (use amd64 || use x86) && ! use cet; then + append-flags '-fcf-protection=none' + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + # Users have had a chance to phase themselves, time to give em the boot + if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then + eerror "You still haven't deleted ${EROOT}/etc/locales.build." + eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." + die "Lazy upgrader detected" + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack locale-gen-${LOCALE_GEN_VER}.tar.gz + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${RELEASE_VER}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc Patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + # move the external locale-gen to its old place + mkdir extra || die + mv locale-gen-${LOCALE_GEN_VER} extra/locale || die + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" +} + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl no))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + # Explicit override of https://sourceware.org/PR27991 + # exposes a bug in glibc's configure: + # https://sourceware.org/PR27991 + libc_cv_have_x86_lahf_sahf=no + libc_cv_have_x86_movbe=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + $(use_enable crypt) + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +do_src_test() { + local ret=0 + + glibc_src_test + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + if just_headers ; then + return + fi + + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + # gdb thread introspection relies on local libpthreas symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + cd "${WORKDIR}"/extra/locale + dosbin locale-gen + doman *.[0-8] + insinto /etc + doins locale.gen + + keepdir /usr/lib/locale + + cd "${S}" + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.37-r10.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.37-r10.ebuild new file mode 100644 index 00000000000..e323ee8ae32 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.37-r10.ebuild @@ -0,0 +1,1695 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..11} ) +TMPFILES_OPTIONAL=1 + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=12 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + + # Workaround for bug #823780. + # Need to save/restore CC because earlier on, we stuff it full of CFLAGS, and tc-getCPP doesn't like that. + CC_mangled=${CC} + CC=${glibc__GLIBC_CC} + if tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + export CFLAGS_x86="${CFLAGS_x86} -mno-avx512f" + einfo "Auto adding -mno-avx512f to CFLAGS_x86 for buggy GCC version (bug #823780) (ABI=${ABI})" + fi + CC=${CC_mangled} + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + # Lock glibc at -O2; we want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if (use amd64 || use x86) && ! use cet; then + append-flags '-fcf-protection=none' + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is buil first time + # when ${CTARGET}-g++ is not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporing IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + # Enable Intel Control-flow Enforcement Technology on amd64 if requested + case ${CTARGET} in + x86_64-*) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_enable crypt) + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # -march= option tricks build system to infer too + # high ISA level: https://sourceware.org/PR27318 + libc_cv_include_x86_isa_level=no + + # Explicit override of https://sourceware.org/PR27991 + # exposes a bug in glibc's configure: + # https://sourceware.org/PR27991 + libc_cv_have_x86_lahf_sahf=no + libc_cv_have_x86_movbe=no + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # ia64 static cross-compilers are a pita in so much that they + # can't produce static ELFs (as the libgcc.a is broken). so + # disable building of the programs for those targets if it + # doesn't work. + # XXX: We could turn this into a compiler test, but ia64 is + # the only one that matters, so this should be fine for now. + if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then + sed -i '1i+link-static = touch $@' config.make + fi + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(){}' > "${T}"/test.c + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + case ${CTARGET} in + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + local myconf=() + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + $(use_enable crypt) + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.38-r13.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.38-r13.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.38-r13.ebuild rename to sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.38-r13.ebuild index c28e70daaf2..5bba661e9e9 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.38-r13.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.38-r13.ebuild @@ -39,7 +39,7 @@ MIN_PAX_UTILS_VER="1.3.3" if [[ ${PV} == 9999* ]]; then inherit git-r3 else - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" fi @@ -454,6 +454,11 @@ setup_flags() { # anyway because glibc already handles this by itself. filter-ldflags '-Wl,--dynamic-linker=*' + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 # we have to do that here already so mips can filter it out again :P if use hash-sysv-compat ; then @@ -564,8 +569,10 @@ setup_env() { return 0 fi - # Glibc does not work with gold (for various reasons) #269274. - tc-ld-disable-gold + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd if use doc ; then export MAKEINFO=makeinfo @@ -812,7 +819,7 @@ sanity_prechecks() { # we test for... if ! is_crosscompile ; then if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then - ebegin "Checking that IA32 emulation is enabled in the running kernel" + ebegin "Checking if the system can execute 32-bit binaries" echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" local STAT if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then @@ -826,7 +833,11 @@ sanity_prechecks() { fi rm -f "${T}/check-ia32-emulation.elf32" eend $STAT - [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc." + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi fi fi @@ -1354,16 +1365,15 @@ glibc_do_src_install() { # '#define VERSION "2.26.90"' -> '2.26.90' local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - # Flatcar: override this and strip everything to keep image size at bay # Avoid stripping binaries not targeted by ${CHOST}. Or else # ${CHOST}-strip would break binaries build for ${CTARGET}. - # is_crosscompile && dostrip -x / + is_crosscompile && dostrip -x / # gdb thread introspection relies on local libpthreads symbols. stripping breaks it # See Note [Disable automatic stripping] - # dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so # valgrind requires knowledge about ld.so symbols. - # dostrip -x $(alt_libdir)/ld-*.so* + dostrip -x $(alt_libdir)/ld-*.so* if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then # Move versioned .a file out of libdir to evade portage QA checks @@ -1551,23 +1561,6 @@ glibc_do_src_install() { if use compile-locales && ! is_crosscompile ; then run_locale_gen --inplace-glibc "${ED}/" fi - - ## Flatcar Container Linux: Add some local changes: - # - Config files are installed by baselayout, not glibc. - # - Install nscd/systemd stuff in /usr. - - # Use tmpfiles to put nscd.conf in /etc and create directories. - insinto /usr/share/baselayout - if ! in_iuse nscd || use nscd ; then - doins "${S}"/nscd/nscd.conf || die - newtmpfiles "${FILESDIR}"/nscd-conf.tmpfiles nscd-conf.conf || die - fi - - # Clean out any default configs. - rm -rf "${ED}"/etc - - # Restore this one for the SDK. - test ! -e "${T}"/00glibc || doenvd "${T}"/00glibc } glibc_headers_install() { diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.39-r11.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.39-r11.ebuild new file mode 100644 index 00000000000..4b46bc6f4e3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.39-r11.ebuild @@ -0,0 +1,1751 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..12} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=11 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !' \ + | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 \ + | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \ + "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \ + "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r5.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r5.ebuild new file mode 100644 index 00000000000..3cfc6b63296 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r5.ebuild @@ -0,0 +1,1751 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=5 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !' \ + | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 \ + | grep -o '[^"]*linux/version.h') + ALT_BUILD_HEADERS=${header_path%/linux/version.h} + fi + fi + fi + echo "${ALT_BUILD_HEADERS}" +} + +alt_libdir() { + echo $(alt_prefix)/$(get_libdir) +} +alt_usrlibdir() { + echo $(alt_prefix)/usr/$(get_libdir) +} + +builddir() { + echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1" +} + +do_compile_test() { + local ret save_cflags=${CFLAGS} + CFLAGS+=" $1" + shift + + pushd "${T}" >/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \ + "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \ + "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r7.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r7.ebuild new file mode 100644 index 00000000000..e7b5d78134b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r7.ebuild @@ -0,0 +1,1754 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=7 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}") + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/${CTARGET}-gcc" + export CPP="${current_gcc_path}/${CTARGET}-cpp" + export CXX="${current_gcc_path}/${CTARGET}-g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "${ESYSROOT}$(alt_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \ + "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \ + "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + + # If fixincludes was/is active for a particular GCC slot, we + # must refresh it. See bug #933282 and GCC's documentation: + # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html + # + # TODO: Could this be done for non-cross? Some care would be needed + # to pass the right arguments. + while IFS= read -r -d $'\0' slot ; do + local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders + local pthread_h="${BROOT}"/usr/lib/gcc/${CBUILD}/${slot##*/}/include-fixed/pthread.h + if [[ -x ${mkheaders_path} ]] ; then + ebegin "Refreshing fixincludes for ${CBUILD} with gcc-${slot##*/}" + ${mkheaders_path} -v + eend $? + elif [[ -f ${pthread_h} ]] ; then + # fixincludes might have been enabled in the past for this + # GCC slot but not since we fixed toolchain.eclass to install + # mkheaders, so we need to manually delete pthread.h at least. + ebegin "Deleting stale fixincludes'd pthread.h for ${CBUILD} with gcc-${slot##*/}" + mv -v "${pthread_h}" "${pthread_h}.bak" + eend $? + fi + done < <(find "${BROOT}"/usr/libexec/gcc/${CBUILD}/ -mindepth 1 -maxdepth 1 -type d -print0) + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r8.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r8.ebuild new file mode 100644 index 00000000000..0a6d95e2ab8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-2.40-r8.ebuild @@ -0,0 +1,1754 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=8 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + return 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}") + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/${CTARGET}-gcc" + export CPP="${current_gcc_path}/${CTARGET}-cpp" + export CXX="${current_gcc_path}/${CTARGET}-g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "${ESYSROOT}$(alt_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \ + "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \ + "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + + # If fixincludes was/is active for a particular GCC slot, we + # must refresh it. See bug #933282 and GCC's documentation: + # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html + # + # TODO: Could this be done for non-cross? Some care would be needed + # to pass the right arguments. + while IFS= read -r -d $'\0' slot ; do + local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders + local pthread_h="${BROOT}"/usr/lib/gcc/${CBUILD}/${slot##*/}/include-fixed/pthread.h + if [[ -x ${mkheaders_path} ]] ; then + ebegin "Refreshing fixincludes for ${CBUILD} with gcc-${slot##*/}" + ${mkheaders_path} -v + eend $? + elif [[ -f ${pthread_h} ]] ; then + # fixincludes might have been enabled in the past for this + # GCC slot but not since we fixed toolchain.eclass to install + # mkheaders, so we need to manually delete pthread.h at least. + ebegin "Deleting stale fixincludes'd pthread.h for ${CBUILD} with gcc-${slot##*/}" + mv -v "${pthread_h}" "${pthread_h}.bak" + eend $? + fi + done < <(find "${BROOT}"/usr/libexec/gcc/${CBUILD}/ -mindepth 1 -maxdepth 1 -type d -print0) + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-9999.ebuild new file mode 100644 index 00000000000..9622057c772 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/glibc-9999.ebuild @@ -0,0 +1,1767 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=1 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# Here's how the cross-compile logic breaks down ... +# CTARGET - machine that will target the binaries +# CHOST - machine that will host the binaries +# CBUILD - machine that will build the binaries +# If CTARGET != CHOST, it means you want a libc for cross-compiling. +# If CHOST != CBUILD, it means you want to cross-compile the libc. +# CBUILD = CHOST = CTARGET - native build/install +# CBUILD != (CHOST = CTARGET) - cross-compile a native build +# (CBUILD = CHOST) != CTARGET - libc for cross-compiler +# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler +# For install paths: +# CHOST = CTARGET - install into / +# CHOST != CTARGET - install into /usr/CTARGET/ +# +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +# Note [Disable automatic stripping] +# Disabling automatic stripping for a few reasons: +# - portage's attempt to strip breaks non-native binaries at least on +# arm: bug #697428 +# - portage's attempt to strip libpthread.so.0 breaks gdb thread +# enumeration: bug #697910. This is quite subtle: +# * gdb uses glibc's libthread_db-1.0.so to enumerate threads. +# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols +# via 'ps_pglobal_lookup' symbol defined in gdb. +# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all +# known symbols in 'libpthread.so.0'. Specifically 'nptl_version' +# (unexported) is used to sanity check compatibility before enabling +# debugging. +# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint +# * normal 'strip' command trims '.symtab' +# Thus our main goal here is to prevent 'libpthread.so.0' from +# losing it's '.symtab' entries. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + sys-apps/gawk[mpfr] + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !/dev/null + + rm -f glibc-test* + printf '%b' "$*" > glibc-test.c + + # We assume CC is already set up. + nonfatal emake glibc-test + ret=$? + + popd >/dev/null + + CFLAGS=${save_cflags} + return ${ret} +} + +do_run_test() { + local ret + + if [[ ${MERGE_TYPE} == "binary" ]] ; then + # ignore build failures when installing a binary package #324685 + do_compile_test "" "$@" 2>/dev/null || return 0 + else + ebegin "Performing simple compile test for ABI=${ABI}" + if ! do_compile_test "" "$@" ; then + ewarn "Simple build failed ... assuming this is desired #324685" + eend 1 + return 0 + else + eend 0 + fi + fi + + pushd "${T}" >/dev/null + + ./glibc-test + ret=$? + rm -f glibc-test* + + popd >/dev/null + + return ${ret} +} + +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 + + case $(tc-arch) in + x86) + # -march needed for #185404 #199334 + # TODO: When creating the first glibc cross-compile, this test will + # always fail as it does a full link which in turn requires glibc. + # Probably also applies when changing multilib profile settings (e.g. + # enabling x86 when the profile was amd64-only previously). + # We could change main to _start and pass -nostdlib here so that we + # only test the gcc code compilation. Or we could do a compile and + # then look for the symbol via scanelf. + if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + filter-flags '-march=*' + export CFLAGS="-march=${t} ${CFLAGS}" + einfo "Auto adding -march=${t} to CFLAGS #185404" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + unset CBUILD_OPT CTARGET_OPT + if use multilib ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags + + if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then + CBUILD_OPT=${CTARGET_OPT} + fi + + # glibc's headers disallow -O0 and fail at build time: + # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +use_multiarch() { + # Allow user to disable runtime arch detection in multilib. + use multiarch || return 1 + # Make sure binutils is new enough to support indirect functions, + # #336792. This funky sed supports gold and bfd linkers. + local bver nver + bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}') + case $(tc-arch ${CTARGET}) in + amd64|x86) nver="2.20" ;; + arm) nver="2.22" ;; + hppa) nver="2.23" ;; + ppc|ppc64) nver="2.20" ;; + # ifunc support was added in 2.23, but glibc also needs + # machinemode which is in 2.24. + s390) nver="2.24" ;; + sparc) nver="2.21" ;; + *) return 1 ;; + esac + ver_test ${bver} -ge ${nver} +} + +# Setup toolchain variables that had historically been defined in the +# profiles for these archs. +setup_env() { + # silly users + unset LD_RUN_PATH + unset LD_ASSUME_KERNEL + + if is_crosscompile || tc-is-cross-compiler ; then + multilib_env ${CTARGET_OPT:-${CTARGET}} + + if ! use multilib ; then + MULTILIB_ABIS=${DEFAULT_ABI} + else + MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} + fi + + # If the user has CFLAGS_ in their make.conf, use that, + # and fall back on CFLAGS. + local VAR=CFLAGS_${CTARGET//[-.]/_} + CFLAGS=${!VAR-${CFLAGS}} + einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" + fi + + setup_flags + + export ABI=${ABI:-${DEFAULT_ABI:-default}} + + if just_headers ; then + # Avoid mixing host's CC and target's CFLAGS_${ABI}: + # At this bootstrap stage we have only binutils for + # target but not compiler yet. + einfo "Skip CC ABI injection. We can't use (cross-)compiler yet." + return 0 + fi + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}") + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/${CTARGET}-gcc" + export CPP="${current_gcc_path}/${CTARGET}-cpp" + export CXX="${current_gcc_path}/${CTARGET}-g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # We need to export CFLAGS with abi information in them because glibc's + # configure script checks CFLAGS for some targets (like mips). Keep + # around the original clean value to avoid appending multiple ABIs on + # top of each other. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760 + # To build .S (assembly) files with the same ABI-specific flags + # upstream currently recommends adding CFLAGS to CC/CXX: + # https://sourceware.org/PR23273 + # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS + # and breaks multiarch support. See 659030#c3 for an example. + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ not available yet. We avoid + # building auxiliary programs that require C++: bug #683074 + # It should not affect final result. + export libc_cv_cxx_link_ok=no + # The line above has the same effect. We set CXX explicitly + # to make build logs less confusing. + export CXX= + fi +} + +foreach_abi() { + setup_env + + local ret=0 + local abilist="" + if use multilib ; then + abilist=$(get_install_abis) + else + abilist=${DEFAULT_ABI} + fi + local -x ABI + for ABI in ${abilist:-default} ; do + setup_env + einfo "Running $1 for ABI ${ABI}" + $1 + : $(( ret |= $? )) + done + return ${ret} +} + +glibc_banner() { + local b="Gentoo ${PVR}" + [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "${ESYSROOT}$(alt_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \n#include \nint main(){return syscall(1000)!=-1;}\n' ; then + eerror "Your old kernel is broken. You need to update it to a newer" + eerror "version as syscall() will break. See bug 279260." + die "Old and broken kernel." + fi + fi + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c" + local STAT + if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi + rm -f "${T}/check-ia32-emulation.elf32" + eend $STAT + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + fi + + if [[ ${CTARGET} == *-linux* ]] ; then + local run_kv build_kv want_kv + + run_kv=$(g_get_running_KV) + build_kv=$(g_int_to_KV $(get_kheader_version)) + want_kv=${MIN_KERN_VER} + + if ! is_crosscompile && ! tc-is-cross-compiler ; then + # Building fails on an non-supporting kernel + ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi + fi + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI=" + https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git + https://github.com/gentoo/glibc-patches.git + " + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + EGIT_REPO_URI=" + https://sourceware.org/git/glibc.git + https://git.sr.ht/~sourceware/glibc + https://gitlab.com/x86-glibc/glibc.git + " + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting IFUNC. glibc's ./configure + # is not robust enough to detect proper support: + # https://bugs.gentoo.org/641216 + # https://sourceware.org/PR22634#c0 + case $(tc-arch ${CTARGET}) in + # Keep whitelist of targets where autodetection mostly works. + amd64|x86|sparc|ppc|ppc64|arm|arm64|s390|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) myconf+=( $(use_enable cet) ) ;; + *) ;; + esac + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + myconf+=( --enable-kernel=${MIN_KERN_VER} ) + + # Since SELinux support is only required for nscd, only enable it if: + # 1. USE selinux + # 2. only for the primary ABI on multilib systems + # 3. Not a crosscompile + if ! is_crosscompile && use selinux ; then + if use multilib ; then + if is_final_abi ; then + myconf+=( --with-selinux ) + else + myconf+=( --without-selinux ) + fi + else + myconf+=( --with-selinux ) + fi + else + myconf+=( --without-selinux ) + fi + + # Force a few tests where we always know the answer but + # configure is incapable of finding it. + if is_crosscompile ; then + export \ + libc_cv_c_cleanup=yes \ + libc_cv_forced_unwind=yes + fi + + myconf+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${EXTRA_ECONF} + ) + + # We rely on sys-libs/timezone-data for timezone tools normally. + myconf+=( $(use_enable vanilla timezone-tools) ) + + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no) + ac_cv_lib_cap_cap_init=$(usex caps || echo no) + + # There is no configure option for this and we need to export it + # since the glibc build will re-run configure on itself + export libc_cv_rootsbindir="$(host_eprefix)/sbin" + export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then + sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + fi + fi +} + +glibc_headers_configure() { + export ABI=default + + local builddir=$(builddir "headers") + mkdir -p "${builddir}" + cd "${builddir}" + + # if we don't have a compiler yet, we can't really test it now ... + # hopefully they don't affect header generation, so let's hope for + # the best here ... + local v vars=( + ac_cv_header_cpuid_h=yes + libc_cv_{386,390,alpha,arm,hppa,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes + libc_cv_asm_cfi_directives=yes + libc_cv_broken_visibility_attribute=no + libc_cv_c_cleanup=yes + libc_cv_compiler_powerpc64le_binary128_ok=yes + libc_cv_forced_unwind=yes + libc_cv_gcc___thread=yes + libc_cv_mlong_double_128=yes + libc_cv_mlong_double_128ibm=yes + libc_cv_ppc_machine=yes + libc_cv_ppc_rel16=yes + libc_cv_predef_fortify_source=no + libc_cv_target_power8_ok=yes + libc_cv_visibility_attribute=yes + libc_cv_z_combreloc=yes + libc_cv_z_execstack=yes + libc_cv_z_initfirst=yes + libc_cv_z_nodelete=yes + libc_cv_z_nodlopen=yes + libc_cv_z_relro=yes + libc_mips_abi=${ABI} + libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) + # These libs don't have configure flags. + ac_cv_lib_audit_audit_log_user_avc_message=no + ac_cv_lib_cap_cap_init=no + ) + + einfo "Forcing cached settings:" + for v in "${vars[@]}" ; do + einfo " ${v}" + export ${v} + done + + local headers_only_arch_CPPFLAGS=() + + # Blow away some random CC settings that screw things up. #550192 + if [[ -d ${S}/sysdeps/mips ]]; then + pushd "${S}"/sysdeps/mips >/dev/null + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die + sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die + + # Force the mips ABI to the default. This is OK because the set of + # installed headers in this phase is the same between the 3 ABIs. + # If this ever changes, this hack will break, but that's unlikely + # as glibc discourages that behavior. + # https://crbug.com/647033 + sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die + + popd >/dev/null + fi + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + riscv*) + # RISC-V interrogates the compiler to determine which target to + # build. If building the headers then we don't strictly need a + # RISC-V compiler, so the built-in definitions that are provided + # along with all RISC-V compiler might not exist. This causes + # glibc's RISC-V preconfigure script to blow up. Since we're just + # building the headers any value will actually work here, so just + # pick the standard one (rv64g/lp64d) to make the build scripts + # happy for now -- the headers are all the same anyway so it + # doesn't matter. + headers_only_arch_CPPFLAGS+=( + -D__riscv_xlen=64 + -D__riscv_flen=64 + -D__riscv_float_abi_double=1 + -D__riscv_atomic=1 + ) ;; + esac + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers="${ESYSROOT}$(alt_headers)" + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +run_locale_gen() { + # if the host locales.gen contains no entries, we'll install everything + local root="$1" + local inplace="" + + if [[ "${root}" == "--inplace-glibc" ]] ; then + inplace="--inplace-glibc" + root="$2" + fi + + local locale_list="${root%/}/etc/locale.gen" + + pushd "${ED}"/$(get_libdir) >/dev/null + + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${root%/}/usr/share/i18n/SUPPORTED" + fi + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.so* + + if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + # Move versioned .a file out of libdir to evade portage QA checks + # instead of using gen_usr_ldscript(). We fix ldscript as: + # "GROUP ( /usr/lib64/libm-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.a ..." + sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" \ + "${ED}"/$(alt_usrlibdir)/libm.a || die + dodir $(alt_usrlibdir)/${P} + mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a \ + "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die + fi + + # We configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + local x striptest + for x in cal date env free ls true uname uptime ; do + x=$(type -p ${x}) + [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue + striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue + case ${striptest} in + *"statically linked"*) continue;; + *"ASCII text"*) continue;; + esac + # We need to clear the locale settings as the upgrade might want + # incompatible locale data. This test is not for verifying that. + LC_ALL=C \ + ${newldso} --library-path . ${x} > /dev/null \ + || die "simple run test (${x}) failed" + done + + popd >/dev/null +} + +pkg_preinst() { + # nothing to do if just installing headers + just_headers && return + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + + # If fixincludes was/is active for a particular GCC slot, we + # must refresh it. See bug #933282 and GCC's documentation: + # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html + # + # TODO: Could this be done for non-cross? Some care would be needed + # to pass the right arguments. + while IFS= read -r -d $'\0' slot ; do + local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders + local pthread_h="${BROOT}"/usr/lib/gcc/${CBUILD}/${slot##*/}/include-fixed/pthread.h + if [[ -x ${mkheaders_path} ]] ; then + ebegin "Refreshing fixincludes for ${CBUILD} with gcc-${slot##*/}" + ${mkheaders_path} -v + eend $? + elif [[ -f ${pthread_h} ]] ; then + # fixincludes might have been enabled in the past for this + # GCC slot but not since we fixed toolchain.eclass to install + # mkheaders, so we need to manually delete pthread.h at least. + ebegin "Deleting stale fixincludes'd pthread.h for ${CBUILD} with gcc-${slot##*/}" + mv -v "${pthread_h}" "${pthread_h}.bak" + eend $? + fi + done < <(find "${BROOT}"/usr/libexec/gcc/${CBUILD}/ -mindepth 1 -maxdepth 1 -type d -print0) + fi + + upgrade_warning + + # Check for sanity of /etc/nsswitch.conf, take 2 + if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then + local entry + for entry in passwd group shadow; do + if grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/glibc/metadata.xml similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml rename to sdk_container/src/third_party/portage-stable/sys-libs/glibc/metadata.xml From e7d1f2dc9b086c6478e7b051c9df0c2122666c24 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 15:48:22 +0100 Subject: [PATCH 118/145] .github: Add sys-libs/glibc to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index 63a9db4a734..c16a70f9f6d 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -655,6 +655,7 @@ sys-libs/binutils-libs sys-libs/cracklib sys-libs/efivar sys-libs/gdbm +sys-libs/glibc sys-libs/ldb sys-libs/libcap sys-libs/libcap-ng From 3aacab574fbdda8fb18c36b606bbdb86a983b9f0 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 16:06:06 +0100 Subject: [PATCH 119/145] overlay app-misc/ca-certificates: Add dependency on app-misc/c_rehash It was relying on dev-libs/openssl pulling app-misc/c_rehash. But in Gentoo, openssl dropped its dependency on c_rehash, as openssl does not need it. Our ca-certificates package is using c_rehash in its systemd service, so depend on c_rehash directly. This will remove one modification we make to openssl package. --- ...es-3.107.ebuild => ca-certificates-3.107-r1.ebuild} | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) rename sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/{ca-certificates-3.107.ebuild => ca-certificates-3.107-r1.ebuild} (96%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107.ebuild b/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107-r1.ebuild similarity index 96% rename from sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107-r1.ebuild index 9fbd69bde2e..6e98e259178 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.107-r1.ebuild @@ -21,11 +21,15 @@ SLOT="0" KEYWORDS="amd64 arm64" IUSE="" -RDEPEND="dev-libs/openssl +RDEPEND=" + >=app-misc/c_rehash-1.7-r1 + dev-libs/openssl sys-apps/findutils - sys-apps/systemd" + sys-apps/systemd +" DEPEND="${RDEPEND} - ${PYTHON_DEPS}" + ${PYTHON_DEPS} +" pkg_setup() { python-any-r1_pkg_setup From 62a3c2c808d0b42f2c0da02b40f030c6e1e8eb10 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 16:28:09 +0100 Subject: [PATCH 120/145] dev-libs/openssl: Move to portage-stable, sync with Gentoo and modify It's from Gentoo commit c6f66f3f44b35413f09f95ddbd52fecb19e2d8f3. We apply modifications without changing the ebuild: - The tmpfiles config files are not necessary any more for files in /etc, so we just put the config there directly. - The c_rehash dependency was moved to its actual user - the app-misc/ca-certificates package. - We override openssl command to make it a no-op for rehashing during the pkg_postinst phase. --- .../coreos/config/env/dev-libs/openssl | 29 ++ .../coreos-overlay/dev-libs/openssl/Manifest | 2 - .../dev-libs/openssl/files/openssl.conf | 3 - .../portage-stable/dev-libs/openssl/Manifest | 17 + .../openssl/files/gentoo.config-1.0.2 | 172 ++++++++++ .../openssl/files/gentoo.config-1.0.4 | 0 .../openssl-1.1.0j-parallel_install_fix.patch | 21 ++ .../files/openssl-1.1.1i-riscv32.patch | 61 ++++ .../files/openssl-3.0.13-CVE-2024-2511.patch | 141 ++++++++ .../files/openssl-3.0.13-p11-segfault.patch | 79 +++++ .../files/openssl-3.0.15-CVE-2024-9143.patch | 193 +++++++++++ .../files/openssl-3.1.7-CVE-2024-9143.patch | 192 +++++++++++ .../files/openssl-3.2.3-CVE-2024-9143.patch | 0 .../files/openssl-3.3.2-CVE-2024-9143.patch | 193 +++++++++++ .../files/openssl-3.3.2-silence-warning.patch | 34 ++ .../dev-libs/openssl/metadata.xml | 0 .../dev-libs/openssl/openssl-1.0.2u-r1.ebuild | 303 +++++++++++++++++ .../dev-libs/openssl/openssl-1.1.1w.ebuild | 268 +++++++++++++++ .../dev-libs/openssl/openssl-3.0.13-r2.ebuild | 283 ++++++++++++++++ .../dev-libs/openssl/openssl-3.0.14.ebuild | 278 ++++++++++++++++ .../dev-libs/openssl/openssl-3.0.15-r1.ebuild | 287 ++++++++++++++++ .../dev-libs/openssl/openssl-3.0.15.ebuild | 283 ++++++++++++++++ .../dev-libs/openssl/openssl-3.0.9999.ebuild | 288 +++++++++++++++++ .../dev-libs/openssl/openssl-3.1.7-r1.ebuild | 288 +++++++++++++++++ .../dev-libs/openssl/openssl-3.1.9999.ebuild | 289 +++++++++++++++++ .../dev-libs/openssl/openssl-3.2.3-r1.ebuild | 34 +- .../dev-libs/openssl/openssl-3.2.9999.ebuild | 295 +++++++++++++++++ .../dev-libs/openssl/openssl-3.3.2-r1.ebuild | 304 +++++++++++++++++ .../dev-libs/openssl/openssl-3.3.2-r2.ebuild | 305 ++++++++++++++++++ .../dev-libs/openssl/openssl-3.3.2.ebuild | 300 +++++++++++++++++ .../dev-libs/openssl/openssl-3.3.9999.ebuild | 293 +++++++++++++++++ .../dev-libs/openssl/openssl-3.4.9999.ebuild | 293 +++++++++++++++++ 32 files changed, 5505 insertions(+), 23 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-libs/openssl delete mode 100644 sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/Manifest delete mode 100644 sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl.conf create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.2 rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-libs/openssl/files/gentoo.config-1.0.4 (100%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-CVE-2024-2511.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-p11-segfault.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.15-CVE-2024-9143.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.1.7-CVE-2024-9143.patch rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-libs/openssl/files/openssl-3.2.3-CVE-2024-9143.patch (100%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-CVE-2024-9143.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-silence-warning.patch rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-libs/openssl/metadata.xml (100%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.0.2u-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.1.1w.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.13-r2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.14.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.9999.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.7-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.9999.ebuild rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-libs/openssl/openssl-3.2.3-r1.ebuild (91%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.9999.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.9999.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.4.9999.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-libs/openssl b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-libs/openssl new file mode 100644 index 00000000000..d2d30ce81bc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-libs/openssl @@ -0,0 +1,29 @@ +# A hack to avoid rehashing certs in a nonexistent directory. +flatcar_hacked_openssl=$(command -v openssl) +openssl() { + if [[ ${#} -gt 0 && ${1} = 'rehash' ]]; then + return; + fi + "${flatcar_hacked_openssl}" "${@}" +} + +cros_post_src_install_certs() { + # Do not keep the sample CA files in /etc. + rm -rf "${ED}${SSL_CNF_DIR}" + + # Save the default openssl.cnf in /etc. + diropts -m0755 + insinto "${SSL_CNF_DIR}" + doins "${S}/apps/openssl.cnf" + # Recreate the private directory. + diropts -m0700 + keepdir "${SSL_CNF_DIR}/private" + diropts -m0755 + + # Create a symlink for backward-compatibility. + dosym -r /usr/share/flatcar/etc/ssl/openssl.cnf /usr/share/ssl/openssl.cnf + # And an empty file, so the compat symlink is not dangling. It + # will be replaced later with a valid file from /etc. + insinto /usr/share/flatcar/etc/ssl + newins - openssl.cnf +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/Manifest b/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/Manifest deleted file mode 100644 index d8dbdc8175c..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST openssl-3.2.3.tar.gz 17762604 BLAKE2B 1445336aa92d0fd9df266ad570fe2bf5701279e462dd3fccd4cf662f328bfee923dc6c72c42c1921fd38bce43e1c60cacdec3f1c2963fe0ffda6a0e8e34ac6e4 SHA512 9e9f06ab630914e32e64bfb945dfa375ea3595b3db4eb8ef68288a58909baf753b34998439907c22ff2b8561cfd3f3f6b7fbf22981479e66a98c2e92fda172a2 -DIST openssl-3.2.3.tar.gz.asc 833 BLAKE2B 5a7289ed40534a058b9eb7686ce444b9d453a2973ab7ebda01c99f7245f6ba19197123f8bb3b16940d4bfbc5e313babc0249f280e55911190b47da3a47ed1e6a SHA512 e727adb88f84c48082ef0cae963bf999cce11619f7322014cc7f36c16e8375a60542f518c1b86319208cf8da33044e942b3d65208bc59fd4a5f522ab78ff1c23 diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl.conf b/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl.conf deleted file mode 100644 index d8788d29293..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl.conf +++ /dev/null @@ -1,3 +0,0 @@ -d /etc/ssl - - - - - -d /etc/ssl/private 0700 - - - - -L /etc/ssl/openssl.cnf - - - - ../../usr/share/ssl/openssl.cnf diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/Manifest new file mode 100644 index 00000000000..37d84c04034 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/Manifest @@ -0,0 +1,17 @@ +DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659 +DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6 +DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32 +DIST openssl-1.1.1w.tar.gz 9893384 BLAKE2B 2fdba6ca0188928ab2f74e606136afca66cfa0467170fa6298ef160b64ac6fdcad1e81e5dd14013ce0e9921d0f7417edec531cd0beaf1196fec704c2c6d48395 SHA512 b4c625fe56a4e690b57b6a011a225ad0cb3af54bd8fb67af77b5eceac55cc7191291d96a660c5b568a08a2fbf62b4612818e7cca1bb95b2b6b4fc649b0552b6d +DIST openssl-1.1.1w.tar.gz.asc 833 BLAKE2B d990be69ed913509d52b78e7473668429d4485adb29ef03e4612dd0cadbac4f04c7289d8e5baf6f397bcedeaac9f802f18fc719964d882ae0514ed1ca16ae277 SHA512 0f3d7aa48b1cabf8dd43e8108aeed10a4dffb4f5a244d4da9c86ea358b0c8b90c46da561d21e01c567c2f5035d824ed82ec104aad1776b7f33a1be85990e98ef +DIST openssl-3.0.13.tar.gz 15294843 BLAKE2B 869aa5f70a8c1d0cac6027e9261530df70ab5a8b448c785f5f8ff3f206e742c5364424132d0e109a6449af9b4082c4c179c7103dccb16a4539f776ca834c8ccc SHA512 22f4096781f0b075f5bf81bd39a0f97e111760dfa73b6f858f6bb54968a7847944d74969ae10f9a51cc21a2f4af20d9a4c463649dc824f5e439e196d6764c4f9 +DIST openssl-3.0.13.tar.gz.asc 833 BLAKE2B 519515b6faa505d68ff9acc30db9515fac494145086fa5ad9561c39385a6fabb39ad9de10fedd49c8fc716ec59ea1b13ec5e6b466e549ea9f29b8d0bb74ba7b3 SHA512 c52d97c93d16f3ca2a7026fb25890482b6d86c37b5ab686c56b0e08522743ec4ea3f84afa4deb64b0df0d9a16b557430c4d4139ab42ffcf97d769b61d1e6197c +DIST openssl-3.0.14.tar.gz 15305497 BLAKE2B 7426aea63d5495775c4a0440658cc9c46c4aa31c31473cd5519c2b1ca158e122634e0bbc275237d3eb124fc8bed3d58808d8ac1d228f24f7281d2630ff7813e0 SHA512 1c59c01e60da902a20780d71f1fa5055d4037f38c4bc3fb27ed5b91f211b36a6018055409441ad4df58b5e9232b2528240d02067272c3c9ccb8c221449ca9ac0 +DIST openssl-3.0.14.tar.gz.asc 833 BLAKE2B 8a700452f6f698fbfa206469888fd72706f1798be212e712fd8a4c1ae87f0d98d54820974c64a3db3b5ac69d7beda665f462e83182337391212c0e72e1feb72e SHA512 003d17a2b71176517f5bfba6699c18b271111e5fec3effc275b965286140d1281fa6f5f5e6bcf63feca89dfa035ab776bda8d2af4b71ae921ca9e7a936581fb4 +DIST openssl-3.0.15.tar.gz 15318633 BLAKE2B f2900d0894b97e86c709079ca4336d5dc508d69e91d3a4de4420c8d9344cb54dada6ea2cdd408166e53db0c652b06654e670701166b67a0a40578676e1cea535 SHA512 acd80f2f7924d90c1416946a5c61eff461926ad60f4821bb6b08845ea18f8452fd5e88a2c2c5bd0d7590a792cb8341a3f3be042fd0a5b6c9c1b84a497c347bbf +DIST openssl-3.0.15.tar.gz.asc 833 BLAKE2B 43088d6ae9e95aec8cfa08c0d338d76c2299ee89a1719a39c497b25c83a4c0c2d155fa00a62b47e15a7f2889680197741390c850d62a84ec5ce27ed1bbddcd28 SHA512 8b9471074130fd26b511820a1c2586792fd0105421515734c213ae18de27b5b026261e64d4cb8f5e7b568d1f4193484ebe0e99eda9d99df72474310a568ca3bf +DIST openssl-3.1.7.tar.gz 15684836 BLAKE2B 1332f4b2454b6c9bf3ff2099aa343d6202bec98c6e44fba6377d5bb8efd9bf337df3a95549d874a2908f376056f6f333e6f65cbec7e27377d1ab8cbefddaa241 SHA512 bb4743c1a95148901d2d2bc51460c14cea3387c7dda9323524adbdb11334562f72aa3a873913c51ea1ffce606e675e22a74f78b3119b6a956da3f75c942cd0e2 +DIST openssl-3.1.7.tar.gz.asc 833 BLAKE2B 17220aa3274a5eda3df8c04f60f87a48fcf5c773167e746bf3f9feb6cc3c03b024a2e83b1c93122b6baa073b12417e2910230f270287be7b7f2c5300814b7fda SHA512 89b6f4b913aac8b2519aac586ba0c70a3df331eb70ea79c2aa45355bfd9430ba1af3c8ea0d31b171f55036a8cc332207787cabf58da871f400d666a5ae09ce2a +DIST openssl-3.2.3.tar.gz 17762604 BLAKE2B 1445336aa92d0fd9df266ad570fe2bf5701279e462dd3fccd4cf662f328bfee923dc6c72c42c1921fd38bce43e1c60cacdec3f1c2963fe0ffda6a0e8e34ac6e4 SHA512 9e9f06ab630914e32e64bfb945dfa375ea3595b3db4eb8ef68288a58909baf753b34998439907c22ff2b8561cfd3f3f6b7fbf22981479e66a98c2e92fda172a2 +DIST openssl-3.2.3.tar.gz.asc 833 BLAKE2B 5a7289ed40534a058b9eb7686ce444b9d453a2973ab7ebda01c99f7245f6ba19197123f8bb3b16940d4bfbc5e313babc0249f280e55911190b47da3a47ed1e6a SHA512 e727adb88f84c48082ef0cae963bf999cce11619f7322014cc7f36c16e8375a60542f518c1b86319208cf8da33044e942b3d65208bc59fd4a5f522ab78ff1c23 +DIST openssl-3.3.2.tar.gz 18076531 BLAKE2B cc53d45418673bc2a406d6697b8bd17ff6c726463c4ccc87bb2fa5a6592d0d178dc8cfeb2fbb980ea354a5dc2c86f31c48453427c6937896c7221273e623c9b5 SHA512 5ae47bf1aed2740a33ba5df7dc7345a6738aa6bfa3c9c4de5e51742485e24b25192988d7a2c1b8201ef70056ad8abd0ca78b3d55abe24c0b0373d83b47ed9b74 +DIST openssl-3.3.2.tar.gz.asc 833 BLAKE2B c318e2dcef085b83ced77048dc136d9bc8438d49a7985f3c6ebd4ffd0e5e290ece47e8fd1074c6cc056e87b2bae2101dd58b8d70dbc0eb99aa134d776125439c SHA512 981f8438bbd541b97e745aca1bb77cde68900ce4b5ffefc9eccc2f18c675292203f6b4c7bffefde2256a442b7310d8438279b52fb21aac65921e9a529bc00067 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.2 b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.2 new file mode 100644 index 00000000000..caa569588f3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.2 @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +# +# Openssl doesn't play along nicely with cross-compiling +# like autotools based projects, so let's teach it new tricks. +# +# Review the bundled 'config' script to see why kind of targets +# we can pass to the 'Configure' script. + + +# Testing routines +if [[ $1 == "test" ]] ; then + for c in \ + "arm-gentoo-linux-uclibc |linux-generic32 -DL_ENDIAN" \ + "armv5b-linux-gnu |linux-armv4 -DB_ENDIAN" \ + "x86_64-pc-linux-gnu |linux-x86_64" \ + "alpha-linux-gnu |linux-alpha-gcc" \ + "alphaev56-unknown-linux-gnu |linux-alpha+bwx-gcc" \ + "i686-pc-linux-gnu |linux-elf" \ + "whatever-gentoo-freebsdX.Y |BSD-generic32" \ + "i686-gentoo-freebsdX.Y |BSD-x86-elf" \ + "sparc64-alpha-freebsdX.Y |BSD-sparc64" \ + "ia64-gentoo-freebsd5.99234 |BSD-ia64" \ + "x86_64-gentoo-freebsdX.Y |BSD-x86_64" \ + "hppa64-aldsF-linux-gnu5.3 |linux-generic32 -DB_ENDIAN" \ + "powerpc-gentOO-linux-uclibc |linux-ppc" \ + "powerpc64-unk-linux-gnu |linux-ppc64" \ + "powerpc64le-linux-gnu |linux-ppc64le" \ + "x86_64-apple-darwinX |darwin64-x86_64-cc" \ + "powerpc64-apple-darwinX |darwin64-ppc-cc" \ + "i686-apple-darwinX |darwin-i386-cc" \ + "i386-apple-darwinX |darwin-i386-cc" \ + "powerpc-apple-darwinX |darwin-ppc-cc" \ + "i586-pc-winnt |winnt-parity" \ + "s390-ibm-linux-gnu |linux-generic32 -DB_ENDIAN" \ + "s390x-linux-gnu |linux64-s390x" \ + ;do + CHOST=${c/|*} + ret_want=${c/*|} + ret_got=$(CHOST=${CHOST} "$0") + + if [[ ${ret_want} == "${ret_got}" ]] ; then + echo "PASS: ${CHOST}" + else + echo "FAIL: ${CHOST}" + echo -e "\twanted: ${ret_want}" + echo -e "\twe got: ${ret_got}" + fi + done + exit 0 +fi +[[ -z ${CHOST} && -n $1 ]] && CHOST=$1 + + +# Detect the operating system +case ${CHOST} in + *-aix*) system="aix";; + *-darwin*) system="darwin";; + *-freebsd*) system="BSD";; + *-hpux*) system="hpux";; + *-linux*) system="linux";; + *-solaris*) system="solaris";; + *-winnt*) system="winnt";; + x86_64-*-mingw*) system="mingw64";; + *mingw*) system="mingw";; + *) exit 0;; +esac + + +# Compiler munging +compiler="gcc" +if [[ ${CC} == "ccc" ]] ; then + compiler=${CC} +fi + + +# Detect target arch +machine="" +chost_machine=${CHOST%%-*} +case ${system} in +linux) + case ${chost_machine}:${ABI} in + aarch64*be*) machine="aarch64 -DB_ENDIAN";; + aarch64*) machine="aarch64 -DL_ENDIAN";; + alphaev56*|\ + alphaev[678]*)machine=alpha+bwx-${compiler};; + alpha*) machine=alpha-${compiler};; + armv[4-9]*b*) machine="armv4 -DB_ENDIAN";; + armv[4-9]*) machine="armv4 -DL_ENDIAN";; + arm*b*) machine="generic32 -DB_ENDIAN";; + arm*) machine="generic32 -DL_ENDIAN";; + avr*) machine="generic32 -DL_ENDIAN";; + bfin*) machine="generic32 -DL_ENDIAN";; + # hppa64*) machine=parisc64;; + hppa*) machine="generic32 -DB_ENDIAN";; + i[0-9]86*|\ + x86_64*:x86) machine=elf;; + ia64*) machine=ia64;; + loongarch64*) machine="generic64 -DL_ENDIAN";; + m68*) machine="generic32 -DB_ENDIAN";; + mips*el*) machine="generic32 -DL_ENDIAN";; + mips*) machine="generic32 -DB_ENDIAN";; + powerpc64*le*)machine=ppc64le;; + powerpc64*) machine=ppc64;; + powerpc*le*) machine="generic32 -DL_ENDIAN";; + powerpc*) machine=ppc;; + riscv32*) machine="generic32 -DL_ENDIAN";; + riscv64*) machine="generic64 -DL_ENDIAN";; + # sh64*) machine=elf;; + sh*b*) machine="generic32 -DB_ENDIAN";; + sh*) machine="generic32 -DL_ENDIAN";; + # TODO: Might want to do -mcpu probing like glibc to determine a + # better default for sparc-linux-gnu targets. This logic will + # break v7 and older systems when they use it. + sparc*v7*) machine="generic32 -DB_ENDIAN";; + sparc64*) machine=sparcv9 system=linux64;; + sparc*v9*) machine=sparcv9;; + sparc*v8*) machine=sparcv8;; + sparc*) machine=sparcv8;; + s390x*) machine=s390x system=linux64;; + s390*) machine="generic32 -DB_ENDIAN";; + x86_64*:x32) machine=x32;; + x86_64*) machine=x86_64;; + esac + ;; +BSD) + case ${chost_machine} in + alpha*) machine=generic64;; + i[6-9]86*) machine=x86-elf;; + ia64*) machine=ia64;; + sparc64*) machine=sparc64;; + x86_64*) machine=x86_64;; + *) machine=generic32;; + esac + ;; +aix) + machine=${compiler} + ;; +darwin) + case ${chost_machine} in + powerpc64) machine=ppc-cc; system=${system}64;; + powerpc) machine=ppc-cc;; + i?86*) machine=i386-cc;; + x86_64) machine=x86_64-cc; system=${system}64;; + esac + ;; +hpux) + case ${chost_machine} in + ia64) machine=ia64-${compiler} ;; + esac + ;; +solaris) + case ${chost_machine} in + i386) machine=x86-${compiler} ;; + x86_64*) machine=x86_64-${compiler}; system=${system}64;; + sparcv9*) machine=sparcv9-${compiler}; system=${system}64;; + sparc*) machine=sparcv8-${compiler};; + esac + ;; +winnt) + machine=parity + ;; +mingw*) + # special case ... no xxx-yyy style name + echo ${system} + ;; +esac + + +# If we have something, show it +[[ -n ${machine} ]] && echo ${system}-${machine} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/gentoo.config-1.0.4 b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.4 similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/gentoo.config-1.0.4 rename to sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/gentoo.config-1.0.4 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch new file mode 100644 index 00000000000..c837e208cf6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.0j-parallel_install_fix.patch @@ -0,0 +1,21 @@ +https://github.com/openssl/openssl/issues/7679 + +--- a/Configurations/unix-Makefile.tmpl ++++ b/Configurations/unix-Makefile.tmpl +@@ -77,8 +77,14 @@ + # to. You're welcome. + sub dependmagic { + my $target = shift; +- +- return "$target: build_generated\n\t\$(MAKE) depend && \$(MAKE) _$target\n_$target"; ++ my $magic = <<"_____"; ++$target: build_generated depend ++ \$(MAKE) _$target ++_$target ++_____ ++ # Remove line ending ++ $magic =~ s|\R$||; ++ return $magic; + } + ''; + -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch new file mode 100644 index 00000000000..c94b0323eb4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-1.1.1i-riscv32.patch @@ -0,0 +1,61 @@ +From 5b5e2985f355c8e99c196d9ce5d02c15bebadfbc Mon Sep 17 00:00:00 2001 +From: Alistair Francis +Date: Thu, 29 Aug 2019 13:56:21 -0700 +Subject: [PATCH] Add support for io_pgetevents_time64 syscall + +32-bit architectures that are y2038 safe don't include syscalls that use +32-bit time_t. Instead these architectures have suffixed syscalls that +always use a 64-bit time_t. In the case of the io_getevents syscall the +syscall has been replaced with the io_pgetevents_time64 syscall instead. + +This patch changes the io_getevents() function to use the correct +syscall based on the avaliable syscalls and the time_t size. We will +only use the new 64-bit time_t syscall if the architecture is using a +64-bit time_t. This is to avoid having to deal with 32/64-bit +conversions and relying on a 64-bit timespec struct on 32-bit time_t +platforms. As of Linux 5.3 there are no 32-bit time_t architectures +without __NR_io_getevents. In the future if a 32-bit time_t architecture +wants to use the 64-bit syscalls we can handle the conversion. + +This fixes build failures on 32-bit RISC-V. + +Signed-off-by: Alistair Francis + +Reviewed-by: Richard Levitte +Reviewed-by: Paul Dale +(Merged from https://github.com/openssl/openssl/pull/9819) +--- + engines/e_afalg.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/engines/e_afalg.c b/engines/e_afalg.c +index dacbe358cb..99516cb1bb 100644 +--- a/engines/e_afalg.c ++++ b/engines/e_afalg.c +@@ -125,7 +125,23 @@ static ossl_inline int io_getevents(aio_context_t ctx, long min, long max, + struct io_event *events, + struct timespec *timeout) + { ++#if defined(__NR_io_getevents) + return syscall(__NR_io_getevents, ctx, min, max, events, timeout); ++#elif defined(__NR_io_pgetevents_time64) ++ /* Let's only support the 64 suffix syscalls for 64-bit time_t. ++ * This simplifies the code for us as we don't need to use a 64-bit ++ * version of timespec with a 32-bit time_t and handle converting ++ * between 64-bit and 32-bit times and check for overflows. ++ */ ++ if (sizeof(timeout->tv_sec) == 8) ++ return syscall(__NR_io_pgetevents_time64, ctx, min, max, events, timeout, NULL); ++ else { ++ errno = ENOSYS; ++ return -1; ++ } ++#else ++# error "We require either the io_getevents syscall or __NR_io_pgetevents_time64." ++#endif + } + + static void afalg_waitfd_cleanup(ASYNC_WAIT_CTX *ctx, const void *key, +-- +2.26.2 + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-CVE-2024-2511.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-CVE-2024-2511.patch new file mode 100644 index 00000000000..fff4fb72837 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-CVE-2024-2511.patch @@ -0,0 +1,141 @@ +https://www.openssl.org/news/secadv/20240408.txt +https://bugs.gentoo.org/930047 +https://github.com/openssl/openssl/commit/b52867a9f618bb955bed2a3ce3db4d4f97ed8e5d +https://github.com/openssl/openssl/commit/cc9ece9118eeacccc3571c2ee852f8ba067d0607 + +From b52867a9f618bb955bed2a3ce3db4d4f97ed8e5d Mon Sep 17 00:00:00 2001 +From: Matt Caswell +Date: Tue, 5 Mar 2024 15:43:53 +0000 +Subject: [PATCH] Fix unconstrained session cache growth in TLSv1.3 + +In TLSv1.3 we create a new session object for each ticket that we send. +We do this by duplicating the original session. If SSL_OP_NO_TICKET is in +use then the new session will be added to the session cache. However, if +early data is not in use (and therefore anti-replay protection is being +used), then multiple threads could be resuming from the same session +simultaneously. If this happens and a problem occurs on one of the threads, +then the original session object could be marked as not_resumable. When we +duplicate the session object this not_resumable status gets copied into the +new session object. The new session object is then added to the session +cache even though it is not_resumable. + +Subsequently, another bug means that the session_id_length is set to 0 for +sessions that are marked as not_resumable - even though that session is +still in the cache. Once this happens the session can never be removed from +the cache. When that object gets to be the session cache tail object the +cache never shrinks again and grows indefinitely. + +CVE-2024-2511 + +Reviewed-by: Neil Horman +Reviewed-by: Tomas Mraz +(Merged from https://github.com/openssl/openssl/pull/24044) + +(cherry picked from commit 7e4d731b1c07201ad9374c1cd9ac5263bdf35bce) +--- a/ssl/ssl_lib.c ++++ b/ssl/ssl_lib.c +@@ -3736,9 +3736,10 @@ void ssl_update_cache(SSL *s, int mode) + + /* + * If the session_id_length is 0, we are not supposed to cache it, and it +- * would be rather hard to do anyway :-) ++ * would be rather hard to do anyway :-). Also if the session has already ++ * been marked as not_resumable we should not cache it for later reuse. + */ +- if (s->session->session_id_length == 0) ++ if (s->session->session_id_length == 0 || s->session->not_resumable) + return; + + /* +--- a/ssl/ssl_sess.c ++++ b/ssl/ssl_sess.c +@@ -152,16 +152,11 @@ SSL_SESSION *SSL_SESSION_new(void) + return ss; + } + +-SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) +-{ +- return ssl_session_dup(src, 1); +-} +- + /* + * Create a new SSL_SESSION and duplicate the contents of |src| into it. If + * ticket == 0 then no ticket information is duplicated, otherwise it is. + */ +-SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) ++static SSL_SESSION *ssl_session_dup_intern(const SSL_SESSION *src, int ticket) + { + SSL_SESSION *dest; + +@@ -285,6 +280,27 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) + return NULL; + } + ++SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) ++{ ++ return ssl_session_dup_intern(src, 1); ++} ++ ++/* ++ * Used internally when duplicating a session which might be already shared. ++ * We will have resumed the original session. Subsequently we might have marked ++ * it as non-resumable (e.g. in another thread) - but this copy should be ok to ++ * resume from. ++ */ ++SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) ++{ ++ SSL_SESSION *sess = ssl_session_dup_intern(src, ticket); ++ ++ if (sess != NULL) ++ sess->not_resumable = 0; ++ ++ return sess; ++} ++ + const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) + { + if (len) +--- a/ssl/statem/statem_srvr.c ++++ b/ssl/statem/statem_srvr.c +@@ -2338,9 +2338,8 @@ int tls_construct_server_hello(SSL *s, WPACKET *pkt) + * so the following won't overwrite an ID that we're supposed + * to send back. + */ +- if (s->session->not_resumable || +- (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) +- && !s->hit)) ++ if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) ++ && !s->hit) + s->session->session_id_length = 0; + + if (usetls13) { + +From cc9ece9118eeacccc3571c2ee852f8ba067d0607 Mon Sep 17 00:00:00 2001 +From: Matt Caswell +Date: Fri, 15 Mar 2024 17:58:42 +0000 +Subject: [PATCH] Hardening around not_resumable sessions + +Make sure we can't inadvertently use a not_resumable session + +Related to CVE-2024-2511 + +Reviewed-by: Neil Horman +Reviewed-by: Tomas Mraz +(Merged from https://github.com/openssl/openssl/pull/24044) + +(cherry picked from commit c342f4b8bd2d0b375b0e22337057c2eab47d9b96) +--- a/ssl/ssl_sess.c ++++ b/ssl/ssl_sess.c +@@ -531,6 +531,12 @@ SSL_SESSION *lookup_sess_in_cache(SSL *s, const unsigned char *sess_id, + ret = s->session_ctx->get_session_cb(s, sess_id, sess_id_len, ©); + + if (ret != NULL) { ++ if (ret->not_resumable) { ++ /* If its not resumable then ignore this session */ ++ if (!copy) ++ SSL_SESSION_free(ret); ++ return NULL; ++ } + ssl_tsan_counter(s->session_ctx, + &s->session_ctx->stats.sess_cb_hit); + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-p11-segfault.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-p11-segfault.patch new file mode 100644 index 00000000000..73b131ab792 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.13-p11-segfault.patch @@ -0,0 +1,79 @@ +https://bugs.gentoo.org/916328 +https://github.com/opendnssec/SoftHSMv2/issues/729 +https://github.com/openssl/openssl/issues/22508 +https://github.com/openssl/openssl/commit/ad6cbe4b7f57a783a66a7ae883ea0d35ef5f82b6 + +From ad6cbe4b7f57a783a66a7ae883ea0d35ef5f82b6 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Fri, 15 Dec 2023 13:45:50 +0100 +Subject: [PATCH] Revert "Improved detection of engine-provided private + "classic" keys" + +This reverts commit 2b74e75331a27fc89cad9c8ea6a26c70019300b5. + +The commit was wrong. With 3.x versions the engines must be themselves +responsible for creating their EVP_PKEYs in a way that they are treated +as legacy - either by using the respective set1 calls or by setting +non-default EVP_PKEY_METHOD. + +The workaround has caused more problems than it solved. + +Fixes #22945 + +Reviewed-by: Dmitry Belyavskiy +Reviewed-by: Neil Horman +(Merged from https://github.com/openssl/openssl/pull/23063) + +(cherry picked from commit 39ea78379826fa98e8dc8c0d2b07e2c17cd68380) +--- a/crypto/engine/eng_pkey.c ++++ b/crypto/engine/eng_pkey.c +@@ -79,48 +79,6 @@ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, + ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FAILED_LOADING_PRIVATE_KEY); + return NULL; + } +- /* We enforce check for legacy key */ +- switch (EVP_PKEY_get_id(pkey)) { +- case EVP_PKEY_RSA: +- { +- RSA *rsa = EVP_PKEY_get1_RSA(pkey); +- EVP_PKEY_set1_RSA(pkey, rsa); +- RSA_free(rsa); +- } +- break; +-# ifndef OPENSSL_NO_EC +- case EVP_PKEY_SM2: +- case EVP_PKEY_EC: +- { +- EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); +- EVP_PKEY_set1_EC_KEY(pkey, ec); +- EC_KEY_free(ec); +- } +- break; +-# endif +-# ifndef OPENSSL_NO_DSA +- case EVP_PKEY_DSA: +- { +- DSA *dsa = EVP_PKEY_get1_DSA(pkey); +- EVP_PKEY_set1_DSA(pkey, dsa); +- DSA_free(dsa); +- } +- break; +-#endif +-# ifndef OPENSSL_NO_DH +- case EVP_PKEY_DH: +- { +- DH *dh = EVP_PKEY_get1_DH(pkey); +- EVP_PKEY_set1_DH(pkey, dh); +- DH_free(dh); +- } +- break; +-#endif +- default: +- /*Do nothing */ +- break; +- } +- + return pkey; + } + + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.15-CVE-2024-9143.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.15-CVE-2024-9143.patch new file mode 100644 index 00000000000..252a24776ae --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.0.15-CVE-2024-9143.patch @@ -0,0 +1,193 @@ +https://bugs.gentoo.org/941643 +https://github.com/openssl/openssl/commit/72ae83ad214d2eef262461365a1975707f862712 + +From 72ae83ad214d2eef262461365a1975707f862712 Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni +Date: Thu, 19 Sep 2024 01:02:40 +1000 +Subject: [PATCH] Harden BN_GF2m_poly2arr against misuse. + +The BN_GF2m_poly2arr() function converts characteristic-2 field +(GF_{2^m}) Galois polynomials from a representation as a BIGNUM bitmask, +to a compact array with just the exponents of the non-zero terms. + +These polynomials are then used in BN_GF2m_mod_arr() to perform modular +reduction. A precondition of calling BN_GF2m_mod_arr() is that the +polynomial must have a non-zero constant term (i.e. the array has `0` as +its final element). + +Internally, callers of BN_GF2m_poly2arr() did not verify that +precondition, and binary EC curve parameters with an invalid polynomial +could lead to out of bounds memory reads and writes in BN_GF2m_mod_arr(). + +The precondition is always true for polynomials that arise from the +standard form of EC parameters for characteristic-two fields (X9.62). +See the "Finite Field Identification" section of: + + https://www.itu.int/ITU-T/formal-language/itu-t/x/x894/2018-cor1/ANSI-X9-62.html + +The OpenSSL GF(2^m) code supports only the trinomial and pentanomial +basis X9.62 forms. + +This commit updates BN_GF2m_poly2arr() to return `0` (failure) when +the constant term is zero (i.e. the input bitmask BIGNUM is not odd). + +Additionally, the return value is made unambiguous when there is not +enough space to also pad the array with a final `-1` sentinel value. +The return value is now always the number of elements (including the +final `-1`) that would be filled when the output array is sufficiently +large. Previously the same count was returned both when the array has +just enough room for the final `-1` and when it had only enough space +for non-sentinel values. + +Finally, BN_GF2m_poly2arr() is updated to reject polynomials whose +degree exceeds `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against +CPU exhausition attacks via excessively large inputs. + +The above issues do not arise in processing X.509 certificates. These +generally have EC keys from "named curves", and RFC5840 (Section 2.1.1) +disallows explicit EC parameters. The TLS code in OpenSSL enforces this +constraint only after the certificate is decoded, but, even if explicit +parameters are specified, they are in X9.62 form, which cannot represent +problem values as noted above. + +Initially reported as oss-fuzz issue 71623. + +A closely related issue was earlier reported in +. + +Severity: Low, CVE-2024-9143 + +Reviewed-by: Matt Caswell +Reviewed-by: Bernd Edlinger +Reviewed-by: Paul Dale +Reviewed-by: Tomas Mraz +(Merged from https://github.com/openssl/openssl/pull/25639) + +(cherry picked from commit 8e008cb8b23ec7dc75c45a66eeed09c815b11cd2) +--- a/crypto/bn/bn_gf2m.c ++++ b/crypto/bn/bn_gf2m.c +@@ -15,6 +15,7 @@ + #include "bn_local.h" + + #ifndef OPENSSL_NO_EC2M ++# include + + /* + * Maximum number of iterations before BN_GF2m_mod_solve_quad_arr should +@@ -1140,16 +1141,26 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + /* + * Convert the bit-string representation of a polynomial ( \sum_{i=0}^n a_i * + * x^i) into an array of integers corresponding to the bits with non-zero +- * coefficient. Array is terminated with -1. Up to max elements of the array +- * will be filled. Return value is total number of array elements that would +- * be filled if array was large enough. ++ * coefficient. The array is intended to be suitable for use with ++ * `BN_GF2m_mod_arr()`, and so the constant term of the polynomial must not be ++ * zero. This translates to a requirement that the input BIGNUM `a` is odd. ++ * ++ * Given sufficient room, the array is terminated with -1. Up to max elements ++ * of the array will be filled. ++ * ++ * The return value is total number of array elements that would be filled if ++ * array was large enough, including the terminating `-1`. It is `0` when `a` ++ * is not odd or the constant term is zero contrary to requirement. ++ * ++ * The return value is also `0` when the leading exponent exceeds ++ * `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against CPU exhaustion attacks, + */ + int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + { + int i, j, k = 0; + BN_ULONG mask; + +- if (BN_is_zero(a)) ++ if (!BN_is_odd(a)) + return 0; + + for (i = a->top - 1; i >= 0; i--) { +@@ -1167,12 +1178,13 @@ int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + } + } + +- if (k < max) { ++ if (k > 0 && p[0] > OPENSSL_ECC_MAX_FIELD_BITS) ++ return 0; ++ ++ if (k < max) + p[k] = -1; +- k++; +- } + +- return k; ++ return k + 1; + } + + /* +--- a/test/ec_internal_test.c ++++ b/test/ec_internal_test.c +@@ -155,6 +155,56 @@ static int field_tests_ecp_mont(void) + } + + #ifndef OPENSSL_NO_EC2M ++/* Test that decoding of invalid GF2m field parameters fails. */ ++static int ec2m_field_sanity(void) ++{ ++ int ret = 0; ++ BN_CTX *ctx = BN_CTX_new(); ++ BIGNUM *p, *a, *b; ++ EC_GROUP *group1 = NULL, *group2 = NULL, *group3 = NULL; ++ ++ TEST_info("Testing GF2m hardening\n"); ++ ++ BN_CTX_start(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ if (!TEST_ptr(b = BN_CTX_get(ctx)) ++ || !TEST_true(BN_one(a)) ++ || !TEST_true(BN_one(b))) ++ goto out; ++ ++ /* Even pentanomial value should be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf2))) ++ goto out; ++ if (!TEST_ptr_null(group1 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Zero constant term accepted in GF2m polynomial"); ++ ++ /* Odd hexanomial should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf3))) ++ goto out; ++ if (!TEST_ptr_null(group2 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Hexanomial accepted as GF2m polynomial"); ++ ++ /* Excessive polynomial degree should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0x71)) ++ || !TEST_true(BN_set_bit(p, OPENSSL_ECC_MAX_FIELD_BITS + 1))) ++ goto out; ++ if (!TEST_ptr_null(group3 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("GF2m polynomial degree > %d accepted", ++ OPENSSL_ECC_MAX_FIELD_BITS); ++ ++ ret = group1 == NULL && group2 == NULL && group3 == NULL; ++ ++ out: ++ EC_GROUP_free(group1); ++ EC_GROUP_free(group2); ++ EC_GROUP_free(group3); ++ BN_CTX_end(ctx); ++ BN_CTX_free(ctx); ++ ++ return ret; ++} ++ + /* test EC_GF2m_simple_method directly */ + static int field_tests_ec2_simple(void) + { +@@ -443,6 +493,7 @@ int setup_tests(void) + ADD_TEST(field_tests_ecp_simple); + ADD_TEST(field_tests_ecp_mont); + #ifndef OPENSSL_NO_EC2M ++ ADD_TEST(ec2m_field_sanity); + ADD_TEST(field_tests_ec2_simple); + #endif + ADD_ALL_TESTS(field_tests_default, crv_len); + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.1.7-CVE-2024-9143.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.1.7-CVE-2024-9143.patch new file mode 100644 index 00000000000..4f33ef000dc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.1.7-CVE-2024-9143.patch @@ -0,0 +1,192 @@ +https://bugs.gentoo.org/941643 +https://github.com/openssl/openssl/commit/fdf6723362ca51bd883295efe206cb5b1cfa5154 + +From fdf6723362ca51bd883295efe206cb5b1cfa5154 Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni +Date: Thu, 19 Sep 2024 01:02:40 +1000 +Subject: [PATCH] Harden BN_GF2m_poly2arr against misuse. + +The BN_GF2m_poly2arr() function converts characteristic-2 field +(GF_{2^m}) Galois polynomials from a representation as a BIGNUM bitmask, +to a compact array with just the exponents of the non-zero terms. + +These polynomials are then used in BN_GF2m_mod_arr() to perform modular +reduction. A precondition of calling BN_GF2m_mod_arr() is that the +polynomial must have a non-zero constant term (i.e. the array has `0` as +its final element). + +Internally, callers of BN_GF2m_poly2arr() did not verify that +precondition, and binary EC curve parameters with an invalid polynomial +could lead to out of bounds memory reads and writes in BN_GF2m_mod_arr(). + +The precondition is always true for polynomials that arise from the +standard form of EC parameters for characteristic-two fields (X9.62). +See the "Finite Field Identification" section of: + + https://www.itu.int/ITU-T/formal-language/itu-t/x/x894/2018-cor1/ANSI-X9-62.html + +The OpenSSL GF(2^m) code supports only the trinomial and pentanomial +basis X9.62 forms. + +This commit updates BN_GF2m_poly2arr() to return `0` (failure) when +the constant term is zero (i.e. the input bitmask BIGNUM is not odd). + +Additionally, the return value is made unambiguous when there is not +enough space to also pad the array with a final `-1` sentinel value. +The return value is now always the number of elements (including the +final `-1`) that would be filled when the output array is sufficiently +large. Previously the same count was returned both when the array has +just enough room for the final `-1` and when it had only enough space +for non-sentinel values. + +Finally, BN_GF2m_poly2arr() is updated to reject polynomials whose +degree exceeds `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against +CPU exhausition attacks via excessively large inputs. + +The above issues do not arise in processing X.509 certificates. These +generally have EC keys from "named curves", and RFC5840 (Section 2.1.1) +disallows explicit EC parameters. The TLS code in OpenSSL enforces this +constraint only after the certificate is decoded, but, even if explicit +parameters are specified, they are in X9.62 form, which cannot represent +problem values as noted above. + +Initially reported as oss-fuzz issue 71623. + +A closely related issue was earlier reported in +. + +Severity: Low, CVE-2024-9143 + +Reviewed-by: Matt Caswell +Reviewed-by: Bernd Edlinger +Reviewed-by: Paul Dale +Reviewed-by: Tomas Mraz +(Merged from https://github.com/openssl/openssl/pull/25639) + +(cherry picked from commit 8e008cb8b23ec7dc75c45a66eeed09c815b11cd2) +--- a/crypto/bn/bn_gf2m.c ++++ b/crypto/bn/bn_gf2m.c +@@ -15,6 +15,7 @@ + #include "bn_local.h" + + #ifndef OPENSSL_NO_EC2M ++# include + + /* + * Maximum number of iterations before BN_GF2m_mod_solve_quad_arr should +@@ -1140,16 +1141,26 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + /* + * Convert the bit-string representation of a polynomial ( \sum_{i=0}^n a_i * + * x^i) into an array of integers corresponding to the bits with non-zero +- * coefficient. Array is terminated with -1. Up to max elements of the array +- * will be filled. Return value is total number of array elements that would +- * be filled if array was large enough. ++ * coefficient. The array is intended to be suitable for use with ++ * `BN_GF2m_mod_arr()`, and so the constant term of the polynomial must not be ++ * zero. This translates to a requirement that the input BIGNUM `a` is odd. ++ * ++ * Given sufficient room, the array is terminated with -1. Up to max elements ++ * of the array will be filled. ++ * ++ * The return value is total number of array elements that would be filled if ++ * array was large enough, including the terminating `-1`. It is `0` when `a` ++ * is not odd or the constant term is zero contrary to requirement. ++ * ++ * The return value is also `0` when the leading exponent exceeds ++ * `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against CPU exhaustion attacks, + */ + int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + { + int i, j, k = 0; + BN_ULONG mask; + +- if (BN_is_zero(a)) ++ if (!BN_is_odd(a)) + return 0; + + for (i = a->top - 1; i >= 0; i--) { +@@ -1167,12 +1178,13 @@ int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + } + } + +- if (k < max) { ++ if (k > 0 && p[0] > OPENSSL_ECC_MAX_FIELD_BITS) ++ return 0; ++ ++ if (k < max) + p[k] = -1; +- k++; +- } + +- return k; ++ return k + 1; + } + + /* +--- a/test/ec_internal_test.c ++++ b/test/ec_internal_test.c +@@ -155,6 +155,56 @@ static int field_tests_ecp_mont(void) + } + + #ifndef OPENSSL_NO_EC2M ++/* Test that decoding of invalid GF2m field parameters fails. */ ++static int ec2m_field_sanity(void) ++{ ++ int ret = 0; ++ BN_CTX *ctx = BN_CTX_new(); ++ BIGNUM *p, *a, *b; ++ EC_GROUP *group1 = NULL, *group2 = NULL, *group3 = NULL; ++ ++ TEST_info("Testing GF2m hardening\n"); ++ ++ BN_CTX_start(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ if (!TEST_ptr(b = BN_CTX_get(ctx)) ++ || !TEST_true(BN_one(a)) ++ || !TEST_true(BN_one(b))) ++ goto out; ++ ++ /* Even pentanomial value should be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf2))) ++ goto out; ++ if (!TEST_ptr_null(group1 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Zero constant term accepted in GF2m polynomial"); ++ ++ /* Odd hexanomial should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf3))) ++ goto out; ++ if (!TEST_ptr_null(group2 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Hexanomial accepted as GF2m polynomial"); ++ ++ /* Excessive polynomial degree should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0x71)) ++ || !TEST_true(BN_set_bit(p, OPENSSL_ECC_MAX_FIELD_BITS + 1))) ++ goto out; ++ if (!TEST_ptr_null(group3 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("GF2m polynomial degree > %d accepted", ++ OPENSSL_ECC_MAX_FIELD_BITS); ++ ++ ret = group1 == NULL && group2 == NULL && group3 == NULL; ++ ++ out: ++ EC_GROUP_free(group1); ++ EC_GROUP_free(group2); ++ EC_GROUP_free(group3); ++ BN_CTX_end(ctx); ++ BN_CTX_free(ctx); ++ ++ return ret; ++} ++ + /* test EC_GF2m_simple_method directly */ + static int field_tests_ec2_simple(void) + { +@@ -443,6 +493,7 @@ int setup_tests(void) + ADD_TEST(field_tests_ecp_simple); + ADD_TEST(field_tests_ecp_mont); + #ifndef OPENSSL_NO_EC2M ++ ADD_TEST(ec2m_field_sanity); + ADD_TEST(field_tests_ec2_simple); + #endif + ADD_ALL_TESTS(field_tests_default, crv_len); diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl-3.2.3-CVE-2024-9143.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.2.3-CVE-2024-9143.patch similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/files/openssl-3.2.3-CVE-2024-9143.patch rename to sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.2.3-CVE-2024-9143.patch diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-CVE-2024-9143.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-CVE-2024-9143.patch new file mode 100644 index 00000000000..5776c78bfbb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-CVE-2024-9143.patch @@ -0,0 +1,193 @@ +https://bugs.gentoo.org/941643 +https://github.com/openssl/openssl/commit/c0d3e4d32d2805f49bec30547f225bc4d092e1f4 + +From c0d3e4d32d2805f49bec30547f225bc4d092e1f4 Mon Sep 17 00:00:00 2001 +From: Viktor Dukhovni +Date: Thu, 19 Sep 2024 01:02:40 +1000 +Subject: [PATCH] Harden BN_GF2m_poly2arr against misuse. + +The BN_GF2m_poly2arr() function converts characteristic-2 field +(GF_{2^m}) Galois polynomials from a representation as a BIGNUM bitmask, +to a compact array with just the exponents of the non-zero terms. + +These polynomials are then used in BN_GF2m_mod_arr() to perform modular +reduction. A precondition of calling BN_GF2m_mod_arr() is that the +polynomial must have a non-zero constant term (i.e. the array has `0` as +its final element). + +Internally, callers of BN_GF2m_poly2arr() did not verify that +precondition, and binary EC curve parameters with an invalid polynomial +could lead to out of bounds memory reads and writes in BN_GF2m_mod_arr(). + +The precondition is always true for polynomials that arise from the +standard form of EC parameters for characteristic-two fields (X9.62). +See the "Finite Field Identification" section of: + + https://www.itu.int/ITU-T/formal-language/itu-t/x/x894/2018-cor1/ANSI-X9-62.html + +The OpenSSL GF(2^m) code supports only the trinomial and pentanomial +basis X9.62 forms. + +This commit updates BN_GF2m_poly2arr() to return `0` (failure) when +the constant term is zero (i.e. the input bitmask BIGNUM is not odd). + +Additionally, the return value is made unambiguous when there is not +enough space to also pad the array with a final `-1` sentinel value. +The return value is now always the number of elements (including the +final `-1`) that would be filled when the output array is sufficiently +large. Previously the same count was returned both when the array has +just enough room for the final `-1` and when it had only enough space +for non-sentinel values. + +Finally, BN_GF2m_poly2arr() is updated to reject polynomials whose +degree exceeds `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against +CPU exhausition attacks via excessively large inputs. + +The above issues do not arise in processing X.509 certificates. These +generally have EC keys from "named curves", and RFC5840 (Section 2.1.1) +disallows explicit EC parameters. The TLS code in OpenSSL enforces this +constraint only after the certificate is decoded, but, even if explicit +parameters are specified, they are in X9.62 form, which cannot represent +problem values as noted above. + +Initially reported as oss-fuzz issue 71623. + +A closely related issue was earlier reported in +. + +Severity: Low, CVE-2024-9143 + +Reviewed-by: Matt Caswell +Reviewed-by: Bernd Edlinger +Reviewed-by: Paul Dale +Reviewed-by: Tomas Mraz +(Merged from https://github.com/openssl/openssl/pull/25639) + +(cherry picked from commit 8e008cb8b23ec7dc75c45a66eeed09c815b11cd2) +--- a/crypto/bn/bn_gf2m.c ++++ b/crypto/bn/bn_gf2m.c +@@ -15,6 +15,7 @@ + #include "bn_local.h" + + #ifndef OPENSSL_NO_EC2M ++# include + + /* + * Maximum number of iterations before BN_GF2m_mod_solve_quad_arr should +@@ -1130,16 +1131,26 @@ int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, + /* + * Convert the bit-string representation of a polynomial ( \sum_{i=0}^n a_i * + * x^i) into an array of integers corresponding to the bits with non-zero +- * coefficient. Array is terminated with -1. Up to max elements of the array +- * will be filled. Return value is total number of array elements that would +- * be filled if array was large enough. ++ * coefficient. The array is intended to be suitable for use with ++ * `BN_GF2m_mod_arr()`, and so the constant term of the polynomial must not be ++ * zero. This translates to a requirement that the input BIGNUM `a` is odd. ++ * ++ * Given sufficient room, the array is terminated with -1. Up to max elements ++ * of the array will be filled. ++ * ++ * The return value is total number of array elements that would be filled if ++ * array was large enough, including the terminating `-1`. It is `0` when `a` ++ * is not odd or the constant term is zero contrary to requirement. ++ * ++ * The return value is also `0` when the leading exponent exceeds ++ * `OPENSSL_ECC_MAX_FIELD_BITS`, this guards against CPU exhaustion attacks, + */ + int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + { + int i, j, k = 0; + BN_ULONG mask; + +- if (BN_is_zero(a)) ++ if (!BN_is_odd(a)) + return 0; + + for (i = a->top - 1; i >= 0; i--) { +@@ -1157,12 +1168,13 @@ int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max) + } + } + +- if (k < max) { ++ if (k > 0 && p[0] > OPENSSL_ECC_MAX_FIELD_BITS) ++ return 0; ++ ++ if (k < max) + p[k] = -1; +- k++; +- } + +- return k; ++ return k + 1; + } + + /* +--- a/test/ec_internal_test.c ++++ b/test/ec_internal_test.c +@@ -155,6 +155,56 @@ static int field_tests_ecp_mont(void) + } + + #ifndef OPENSSL_NO_EC2M ++/* Test that decoding of invalid GF2m field parameters fails. */ ++static int ec2m_field_sanity(void) ++{ ++ int ret = 0; ++ BN_CTX *ctx = BN_CTX_new(); ++ BIGNUM *p, *a, *b; ++ EC_GROUP *group1 = NULL, *group2 = NULL, *group3 = NULL; ++ ++ TEST_info("Testing GF2m hardening\n"); ++ ++ BN_CTX_start(ctx); ++ p = BN_CTX_get(ctx); ++ a = BN_CTX_get(ctx); ++ if (!TEST_ptr(b = BN_CTX_get(ctx)) ++ || !TEST_true(BN_one(a)) ++ || !TEST_true(BN_one(b))) ++ goto out; ++ ++ /* Even pentanomial value should be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf2))) ++ goto out; ++ if (!TEST_ptr_null(group1 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Zero constant term accepted in GF2m polynomial"); ++ ++ /* Odd hexanomial should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0xf3))) ++ goto out; ++ if (!TEST_ptr_null(group2 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("Hexanomial accepted as GF2m polynomial"); ++ ++ /* Excessive polynomial degree should also be rejected */ ++ if (!TEST_true(BN_set_word(p, 0x71)) ++ || !TEST_true(BN_set_bit(p, OPENSSL_ECC_MAX_FIELD_BITS + 1))) ++ goto out; ++ if (!TEST_ptr_null(group3 = EC_GROUP_new_curve_GF2m(p, a, b, ctx))) ++ TEST_error("GF2m polynomial degree > %d accepted", ++ OPENSSL_ECC_MAX_FIELD_BITS); ++ ++ ret = group1 == NULL && group2 == NULL && group3 == NULL; ++ ++ out: ++ EC_GROUP_free(group1); ++ EC_GROUP_free(group2); ++ EC_GROUP_free(group3); ++ BN_CTX_end(ctx); ++ BN_CTX_free(ctx); ++ ++ return ret; ++} ++ + /* test EC_GF2m_simple_method directly */ + static int field_tests_ec2_simple(void) + { +@@ -443,6 +493,7 @@ int setup_tests(void) + ADD_TEST(field_tests_ecp_simple); + ADD_TEST(field_tests_ecp_mont); + #ifndef OPENSSL_NO_EC2M ++ ADD_TEST(ec2m_field_sanity); + ADD_TEST(field_tests_ec2_simple); + #endif + ADD_ALL_TESTS(field_tests_default, crv_len); + diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-silence-warning.patch b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-silence-warning.patch new file mode 100644 index 00000000000..d6ccff0e437 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/files/openssl-3.3.2-silence-warning.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/946621 + +commit 1d2cbd9b5a126189d5e9bc78a3bdb9709427d02b +Author: Bhaskar Metiya +Date: Wed Aug 14 12:57:14 2024 +0530 + + apps/req.c: No warning reading from stdin if redirected + + CLA: trivial + + Reviewed-by: Matt Caswell + Reviewed-by: Tomas Mraz + Reviewed-by: Richard Levitte + (Merged from https://github.com/openssl/openssl/pull/25179) + +--- a/apps/req.c ++++ b/apps/req.c +@@ -30,6 +30,7 @@ + #ifndef OPENSSL_NO_DSA + # include + #endif ++#include "internal/e_os.h" /* For isatty() */ + + #define BITS "default_bits" + #define KEYFILE "default_keyfile" +@@ -516,7 +517,7 @@ int req_main(int argc, char **argv) + if (infile == NULL) { + if (gen_x509) + newreq = 1; +- else if (!newreq) ++ else if (!newreq && isatty(fileno_stdin())) + BIO_printf(bio_err, + "Warning: Will read cert request from stdin since no -in option is given\n"); + } diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/metadata.xml similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/metadata.xml rename to sdk_container/src/third_party/portage-stable/dev-libs/openssl/metadata.xml diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.0.2u-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.0.2u-r1.ebuild new file mode 100644 index 00000000000..26a292612be --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.0.2u-r1.ebuild @@ -0,0 +1,303 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic toolchain-funcs multilib-minimal + +# openssl-1.0.2-patches-1.6 contain additional CVE patches +# which got fixed with this release. +# Please use 1.7 version number when rolling a new tarball! +PATCH_SET="openssl-1.0.2-patches-1.5" + +MY_P=${P/_/-} + +# This patch set is based on the following files from Fedora 25, +# see https://src.fedoraproject.org/rpms/openssl/blob/25/f/openssl.spec +# for more details: +# - hobble-openssl (SOURCE1) +# - ec_curve.c (SOURCE12) -- MODIFIED +# - ectest.c (SOURCE13) +# - openssl-1.1.1-ec-curves.patch (PATCH37) -- MODIFIED +BINDIST_PATCH_SET="openssl-1.0.2t-bindist-1.0.tar.xz" + +DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)" +HOMEPAGE="https://openssl-library.org/" +SRC_URI="mirror://openssl/source/${MY_P}.tar.gz + bindist? ( + mirror://gentoo/bb/${BINDIST_PATCH_SET} + ) + !vanilla? ( + https://dev.gentoo.org/~chutzpah/dist/${PN}/${PATCH_SET}.tar.xz + )" + +LICENSE="openssl" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x86-linux ~arm64-macos" +IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test tls-compression +tls-heartbeat vanilla" +RESTRICT="!bindist? ( bindist ) + !test? ( test )" + +RDEPEND=">=app-misc/c_rehash-1.7-r1 + gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) + kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] ) + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + )" +PDEPEND="app-misc/ca-certificates" + +S="${WORKDIR}/${MY_P}" + +MULTILIB_WRAPPED_HEADERS=( + usr/include/openssl/opensslconf.h +) + +src_prepare() { + if use bindist; then + mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die + bash "${WORKDIR}"/hobble-openssl || die + + cp -f "${WORKDIR}"/bindist-patches/ec_curve.c "${S}"/crypto/ec/ || die + cp -f "${WORKDIR}"/bindist-patches/ectest.c "${S}"/crypto/ec/ || die + + eapply "${WORKDIR}"/bindist-patches/ec-curves.patch + + # Also see the configure parts below: + # enable-ec \ + # $(use_ssl !bindist ec2m) \ + # $(use_ssl !bindist srp) \ + fi + + # keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + eapply "${WORKDIR}"/patch/*.patch + fi + + eapply_user + + # disable fips in the build + # make sure the man pages are suffixed #302165 + # don't bother building man pages if they're disabled + sed -i \ + -e '/DIRS/s: fips : :g' \ + -e '/^MANSUFFIX/s:=.*:=ssl:' \ + -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ + -e $(has noman FEATURES \ + && echo '/^install:/s:install_docs::' \ + || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ + Makefile.org \ + || die + # show the actual commands in the log + sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared + + # since we're forcing $(CC) as makedep anyway, just fix + # the conditional as always-on + # helps clang (#417795), and versioned gcc (#499818) + # this breaks build with 1.0.2p, not sure if it is needed anymore + #sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die + + # quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (#417795 again) + [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments + + # allow openssl to be cross-compiled + cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die + chmod a+rx gentoo.config || die + + append-flags -fno-strict-aliasing + append-flags $(test-flags-CC -Wa,--noexecstack) + append-cppflags -DOPENSSL_NO_BUF_FREELISTS + + sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906 + # The config script does stupid stuff to prompt the user. Kill it. + sed -i '/stty -icanon min 0 time 50; read waste/d' config || die + ./config --test-sanity || die "I AM NOT SANE" + + multilib_copy_sources +} + +multilib_src_configure() { + unset APPS #197996 + unset SCRIPTS #312551 + unset CROSS_COMPILE #311473 + + tc-export CC AR RANLIB RC + + # Clean out patent-or-otherwise-encumbered code + # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher) + # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm + # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography + # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2 + # RC5: Expired https://en.wikipedia.org/wiki/RC5 + + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + echoit() { echo "$@" ; "$@" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(./gentoo.config) + einfo "Use configuration ${sslout:-(openssl knows best)}" + local config="Configure" + [[ -z ${sslout} ]] && config="config" + + # Fedora hobbled-EC needs 'no-ec2m', 'no-srp' + # Make sure user flags don't get added *yet* to avoid duplicated + # flags. + CFLAGS= LDFLAGS= echoit \ + ./${config} \ + ${sslout} \ + $(use cpu_flags_x86_sse2 || echo "no-sse2") \ + enable-camellia \ + enable-ec \ + $(use_ssl !bindist ec2m) \ + $(use_ssl !bindist srp) \ + ${ec_nistp_64_gcc_128} \ + enable-idea \ + enable-mdc2 \ + enable-rc5 \ + enable-tlsext \ + $(use_ssl asm) \ + $(use_ssl gmp gmp -lgmp) \ + $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \ + $(use_ssl rfc3779) \ + $(use_ssl sctp) \ + $(use_ssl sslv2 ssl2) \ + $(use_ssl sslv3 ssl3) \ + $(use_ssl tls-compression zlib) \ + $(use_ssl tls-heartbeat heartbeats) \ + --prefix="${EPREFIX}"/usr \ + --openssldir="${EPREFIX}"${SSL_CNF_DIR} \ + --libdir=$(get_libdir) \ + shared threads \ + || die + + # Clean out hardcoded flags that openssl uses + local DEFAULT_CFLAGS=$(grep ^CFLAG= Makefile | LC_ALL=C sed \ + -e 's:^CFLAG=::' \ + -e 's:\(^\| \)-fomit-frame-pointer::g' \ + -e 's:\(^\| \)-O[^ ]*::g' \ + -e 's:\(^\| \)-march=[^ ]*::g' \ + -e 's:\(^\| \)-mcpu=[^ ]*::g' \ + -e 's:\(^\| \)-m[^ ]*::g' \ + -e 's:^ *::' \ + -e 's: *$::' \ + -e 's: \+: :g' \ + -e 's:\\:\\\\:g' + ) + + # Now insert clean default flags with user flags + sed -i \ + -e "/^CFLAG/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ + -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ + Makefile || die +} + +multilib_src_compile() { + # depend is needed to use $confopts; it also doesn't matter + # that it's -j1 as the code itself serializes subdirs + emake -j1 V=1 depend + emake all + # rehash is needed to prep the certs/ dir; do this + # separately to avoid parallel build issues. + emake rehash +} + +multilib_src_test() { + emake -j1 test +} + +multilib_src_install() { + # We need to create $ED/usr on our own to avoid a race condition #665130 + if [[ ! -d "${ED}/usr" ]]; then + # We can only create this directory once + mkdir "${ED}"/usr || die + fi + + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake INSTALL_PREFIX="${D}" -j1 install + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + local -a DOCS=( CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el ) + einstalldocs + + use rfc3779 && dodoc engines/ccgost/README.gost + + # create the certs directory + dodir ${SSL_CNF_DIR}/certs + cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die + rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired} + + # Namespace openssl programs to prevent conflicts with other man pages + cd "${ED}"/usr/share/man + local m d s + for m in $(find . -type f | xargs grep -L '#include') ; do + d=${m%/*} ; d=${d#./} ; m=${m##*/} + [[ ${m} == openssl.1* ]] && continue + [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" + mv ${d}/{,ssl-}${m} + # fix up references to renamed man pages + sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} + ln -s ssl-${m} ${d}/openssl-${m} + # locate any symlinks that point to this man page ... we assume + # that any broken links are due to the above renaming + for s in $(find -L ${d} -type l) ; do + s=${s##*/} + rm -f ${d}/${s} + ln -s ssl-${m} ${d}/ssl-${s} + ln -s ssl-${s} ${d}/openssl-${s} + done + done + [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" + + dodir /etc/sandbox.d #254521 + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_postinst() { + ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" + c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null + eend $? +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.1.1w.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.1.1w.ebuild new file mode 100644 index 00000000000..99916fa6c68 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-1.1.1w.ebuild @@ -0,0 +1,268 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic toolchain-funcs multilib-minimal verify-sig + +MY_P=${P/_/-} +DESCRIPTION="Full-strength general purpose cryptography library (including SSL and TLS)" +HOMEPAGE="https://openssl-library.org/" +SRC_URI="mirror://openssl/source/${MY_P}.tar.gz + verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" +S="${WORKDIR}/${MY_P}" + +LICENSE="openssl" +SLOT="0/1.1" # .so version of libssl/libcrypto +if [[ ${PV} != *_pre* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi +IUSE="+asm rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-compression tls-heartbeat vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +RDEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND}" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + kernel_linux? ( sys-process/procps ) + ) + verify-sig? ( /dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]]; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_unpack() { + # Can delete this once test fix patch is dropped + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES}; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die + + # Remove test target when FEATURES=test isn't set + if ! use test ; then + sed \ + -e '/^$config{dirs}/s@ "test",@@' \ + -i Configure || die + fi + + if use prefix && [[ ${CHOST} == *-solaris* ]] ; then + # use GNU ld full option, not to confuse it on Solaris + sed -i \ + -e 's/-Wl,-M,/-Wl,--version-script=/' \ + -e 's/-Wl,-h,/-Wl,--soname=/' \ + Configurations/10-main.conf || die + fi + + # The config script does stupid stuff to prompt the user. Kill it. + sed -i '/stty -icanon min 0 time 50; read waste/d' config || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-cppflags -DOPENSSL_NO_BUF_FREELISTS + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Use configuration ${sslout:-(openssl knows best)}" + local config=( perl "${S}/Configure" ) + [[ -z ${sslout} ]] && config=( sh "${S}/config" -v ) + + # "disable-deprecated" option breaks too many consumers. + # Don't set it without thorough revdeps testing. + # Make sure user flags don't get added *yet* to avoid duplicated + # flags. + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + ${ec_nistp_64_gcc_128} + enable-idea + enable-mdc2 + enable-rc5 + $(use_ssl sslv3 ssl3) + $(use_ssl sslv3 ssl3-method) + $(use_ssl asm) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl tls-heartbeat heartbeats) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo "${config[@]}" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake all +} + +multilib_src_test() { + emake -j1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} MANSUFFIX=ssl -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.13-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.13-r2.ebuild new file mode 100644 index 00000000000..a7de7307589 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.13-r2.ebuild @@ -0,0 +1,283 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI="mirror://openssl/source/${MY_P}.tar.gz + verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/3" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( =4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.14.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.14.ebuild new file mode 100644 index 00000000000..24e53cd2ac7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.14.ebuild @@ -0,0 +1,278 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI="mirror://openssl/source/${MY_P}.tar.gz + verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/3" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( =4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15-r1.ebuild new file mode 100644 index 00000000000..210e8a87c01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15-r1.ebuild @@ -0,0 +1,287 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/3" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" + +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2024-9143.patch +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15.ebuild new file mode 100644 index 00000000000..cc6072743d0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.15.ebuild @@ -0,0 +1,283 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/3" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" + +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.9999.ebuild new file mode 100644 index 00000000000..6d7eefcece5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.0.9999.ebuild @@ -0,0 +1,288 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == *9999 ]] ; then + [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH="openssl-${PV%%.9999}" + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + inherit verify-sig + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 )" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/3" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND+=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.7-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.7-r1.ebuild new file mode 100644 index 00000000000..5ca73111c8f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.7-r1.ebuild @@ -0,0 +1,288 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" + +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2024-9143.patch +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.9999.ebuild new file mode 100644 index 00000000000..56f9601dd58 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.1.9999.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == *9999 ]] ; then + [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH="openssl-${PV%%.9999}" + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + inherit verify-sig + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 )" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND+=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 + append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + emake HARNESS_JOBS="$(makeopts_jobs)" -Onone VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-3.2.3-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.3-r1.ebuild similarity index 91% rename from sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-3.2.3-r1.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.3-r1.ebuild index 9e1b7ddd8ca..9e0ddd97404 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-3.2.3-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.3-r1.ebuild @@ -4,9 +4,8 @@ EAPI=8 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc -TMPFILES_OPTIONAL=1 inherit edo flag-o-matic linux-info toolchain-funcs -inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig tmpfiles +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" HOMEPAGE="https://openssl-library.org/" @@ -26,7 +25,7 @@ else " if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi fi @@ -37,12 +36,8 @@ SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" RESTRICT="!test? ( test )" -# Flatcar: Gentoo dropped dependency on c_rehash, a required tool for -# generating certs, and does not provide a built-in tool either. -# Continue shipping it. COMMON_DEPEND=" !=app-misc/c_rehash-1.7-r1 tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) " BDEPEND=" @@ -276,21 +271,15 @@ multilib_src_install_all() { dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + # bug #254521 dodir /etc/sandbox.d echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl - # flatcar changes: do not keep the sample CA files in `/etc` - rm -rf "${ED}"${SSL_CNF_DIR} - - # flatcar changes: save the default `openssl.cnf` in `/usr` - dodir /usr/share/ssl - insinto /usr/share/ssl - doins "${S}"/apps/openssl.cnf - dotmpfiles "${FILESDIR}"/openssl.conf - - # flatcar changes: package `tmpfiles.d` setup for SDK bootstrapping. - systemd-tmpfiles --create --root="${ED}" "${FILESDIR}"/openssl.conf + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private } pkg_preinst() { @@ -306,3 +295,12 @@ pkg_preinst() { preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) } + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.9999.ebuild new file mode 100644 index 00000000000..162a9453a62 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.2.9999.ebuild @@ -0,0 +1,295 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == *9999 ]] ; then + [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH="openssl-${PV%%.9999}" + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + inherit verify-sig + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 )" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND+=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw + + if multilib_is_native_abi; then + emake build_docs + fi +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r1.ebuild new file mode 100644 index 00000000000..f33725cf316 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r1.ebuild @@ -0,0 +1,304 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls +quic rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2024-9143.patch +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_unpack() { + # Can delete this once test fix patch is dropped + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(multilib_is_native_abi || echo "no-docs") + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use quic && echo "enable-quic") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r2.ebuild new file mode 100644 index 00000000000..0299c1afeaf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2-r2.ebuild @@ -0,0 +1,305 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls +quic rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +PATCHES=( + "${FILESDIR}"/${P}-CVE-2024-9143.patch + "${FILESDIR}"/${PN}-3.3.2-silence-warning.patch +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_unpack() { + # Can delete this once test fix patch is dropped + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(multilib_is_native_abi || echo "no-docs") + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use quic && echo "enable-quic") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2.ebuild new file mode 100644 index 00000000000..7165d21845e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.2.ebuild @@ -0,0 +1,300 @@ +# 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/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs verify-sig + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls +quic rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) + verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_unpack() { + # Can delete this once test fix patch is dropped + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc} + fi + + default +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(multilib_is_native_abi || echo "no-docs") + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use quic && echo "enable-quic") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.9999.ebuild new file mode 100644 index 00000000000..41de3131f21 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.3.9999.ebuild @@ -0,0 +1,293 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == *9999 ]] ; then + [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH="openssl-${PV%%.9999}" + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + inherit verify-sig + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 )" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls +quic rfc3779 sctp static-libs test tls-compression vanilla weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND+=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(multilib_is_native_abi || echo "no-docs") + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use quic && echo "enable-quic") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.4.9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.4.9999.ebuild new file mode 100644 index 00000000000..41de3131f21 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/openssl/openssl-3.4.9999.ebuild @@ -0,0 +1,293 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc +inherit edo flag-o-matic linux-info toolchain-funcs +inherit multilib multilib-minimal multiprocessing preserve-libs + +DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)" +HOMEPAGE="https://openssl-library.org/" + +MY_P=${P/_/-} + +if [[ ${PV} == *9999 ]] ; then + [[ ${PV} == *.*.9999 ]] && EGIT_BRANCH="openssl-${PV%%.9999}" + EGIT_REPO_URI="https://github.com/openssl/openssl.git" + + inherit git-r3 +else + inherit verify-sig + SRC_URI=" + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz + verify-sig? ( + https://github.com/openssl/openssl/releases/download/${P}/${P}.tar.gz.asc + ) + " + + if [[ ${PV} != *_alpha* && ${PV} != *_beta* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + fi + + BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-openssl-20240920 )" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto +IUSE="+asm cpu_flags_x86_sse2 fips ktls +quic rfc3779 sctp static-libs test tls-compression vanilla weak-ssl-ciphers" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + !=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) +" +BDEPEND+=" + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + app-alternatives/bc + sys-process/procps + ) +" +DEPEND="${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" +PDEPEND="app-misc/ca-certificates" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/openssl/configuration.h +) + +pkg_setup() { + if use ktls ; then + if kernel_is -lt 4 18 ; then + ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" + else + CONFIG_CHECK="~TLS ~TLS_DEVICE" + ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" + ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" + use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER" + + linux-info_pkg_setup + fi + fi + + [[ ${MERGE_TYPE} == binary ]] && return + + # must check in pkg_setup; sysctl doesn't work with userpriv! + if use test && use sctp ; then + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel" + # if sctp.auth_enable is not enabled. + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null) + if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]] ; then + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!" + fi + fi +} + +src_prepare() { + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile || die + + if ! use vanilla ; then + PATCHES+=( + # Add patches which are Gentoo-specific customisations here + ) + fi + + default + + if use test && use sctp && has network-sandbox ${FEATURES} ; then + einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..." + rm test/recipes/80-test_ssl_new.t || die + fi + + # Test fails depending on kernel configuration, bug #699134 + rm test/recipes/30-test_afalg.t || die +} + +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/12247 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + # The OpenSSL developers don't test with LTO right now, it leads to various + # warnings/errors (which may or may not be false positives), it's considered + # unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663. + filter-lto + + append-flags $(test-flags-CC -Wa,--noexecstack) + + # bug #895308 -- check inserts GNU ld-compatible arguments + [[ ${CHOST} == *-darwin* ]] || append-atomic-flags + # Configure doesn't respect LIBS + export LDLIBS="${LIBS}" + + # bug #197996 + unset APPS + # bug #312551 + unset SCRIPTS + # bug #311473 + unset CROSS_COMPILE + + tc-export AR CC CXX RANLIB RC + + multilib-minimal_src_configure +} + +multilib_src_configure() { + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths, bug #460790. + #local ec_nistp_64_gcc_128 + # + # Disable it for now though (bug #469976) + # Do NOT re-enable without substantial discussion first! + # + #echo "__uint128_t i;" > "${T}"/128.c + #if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + #fi + + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") + einfo "Using configuration: ${sslout:-(openssl knows best)}" + + # https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features + local myeconfargs=( + ${sslout} + + $(multilib_is_native_abi || echo "no-docs") + $(use cpu_flags_x86_sse2 || echo "no-sse2") + enable-camellia + enable-ec + enable-ec2m + enable-sm2 + enable-srp + $(use elibc_musl && echo "no-async") + enable-idea + enable-mdc2 + enable-rc5 + $(use fips && echo "enable-fips") + $(use quic && echo "enable-quic") + $(use_ssl asm) + $(use_ssl ktls) + $(use_ssl rfc3779) + $(use_ssl sctp) + $(use test || echo "no-tests") + $(use_ssl tls-compression zlib) + $(use_ssl weak-ssl-ciphers) + + --prefix="${EPREFIX}"/usr + --openssldir="${EPREFIX}"${SSL_CNF_DIR} + --libdir=$(get_libdir) + + shared + threads + ) + + edo perl "${S}/Configure" "${myeconfargs[@]}" +} + +multilib_src_compile() { + emake build_sw +} + +multilib_src_test() { + # See https://github.com/openssl/openssl/blob/master/test/README.md for options. + # + # VFP = show subtests verbosely and show failed tests verbosely + # Normal V=1 would show everything verbosely but this slows things down. + # + # -j1 here for https://github.com/openssl/openssl/issues/21999, but it + # shouldn't matter as tests were already built earlier, and HARNESS_JOBS + # controls running the tests. + emake -Onone -j1 HARNESS_JOBS="$(makeopts_jobs)" VFP=1 test +} + +multilib_src_install() { + # Only -j1 is supported for the install targets: + # https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305 + emake DESTDIR="${D}" -j1 install_sw + if use fips; then + emake DESTDIR="${D}" -j1 install_fips + # Regen this in pkg_preinst, bug 900625 + rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die + fi + + if multilib_is_native_abi; then + emake DESTDIR="${D}" -j1 install_ssldirs + emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} -j1 install_docs + fi + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + if ! use static-libs ; then + rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die + fi +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc {AUTHORS,CHANGES,NEWS,README,README-PROVIDERS}.md doc/*.txt doc/${PN}-c-indent.el + + # Create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # bug #254521 + dodir /etc/sandbox.d + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_preinst() { + if use fips; then + # Regen fipsmodule.cnf, bug 900625 + ebegin "Running openssl fipsinstall" + "${ED}/usr/bin/openssl" fipsinstall -quiet \ + -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \ + -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so" + eend $? + fi + + preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} + +pkg_postinst() { + ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)" + openssl rehash "${EROOT}${SSL_CNF_DIR}/certs" + eend $? + + preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1) \ + /usr/$(get_libdir)/lib{crypto,ssl}$(get_libname 1.1) +} From b962283916a65c349356acbd59a2a186a897fb89 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 16:33:19 +0100 Subject: [PATCH 121/145] .github: Add dev-libs/openssl to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index c16a70f9f6d..2a8c2657fde 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -268,6 +268,7 @@ dev-libs/npth dev-libs/nspr dev-libs/oniguruma dev-libs/opensc +dev-libs/openssl dev-libs/popt dev-libs/protobuf dev-libs/tree-sitter From 117e3deee1af1cda53d9c9b4aae36dbce71ab06c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 27 Jan 2025 16:50:03 +0100 Subject: [PATCH 122/145] overlay coreos-base/coreos: Add man user and group Some dependency was dropped and the man group and user packages are not installed any more. Bring them in with an eventual goal of dropping group and passwd from baselayout. --- .../{coreos-0.0.1-r317.ebuild => coreos-0.0.1-r318.ebuild} | 0 .../coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild | 3 +++ 2 files changed, 3 insertions(+) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/{coreos-0.0.1-r317.ebuild => coreos-0.0.1-r318.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r317.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r318.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r317.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r318.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild index cc54f9fb1e1..4810c287f75 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild @@ -219,5 +219,8 @@ RDEPEND+=" # Group and user packages to eventually replace passwd in baselayout. RDEPEND="${RDEPEND} acct-group/floppy + acct-group/man acct-group/uucp + + acct-user/man " From e996f5d5daebac1ebc6be65e0d9e7738ce92bd5b Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 12:01:24 +0100 Subject: [PATCH 123/145] overlay profiles: Drop accept keywords for app-containers/containerd --- .../profiles/coreos/base/package.accept_keywords | 3 --- 1 file changed, 3 deletions(-) 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 90d7e6ee36f..fedbd2a3818 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 @@ -7,9 +7,6 @@ # Gentoo upstream package stabilisation # (the following packages are "unstable" upstream; we're stabilising these) -# Handled by automation -=app-containers/containerd-1.7.23 ~amd64 ~arm64 # DO NOT EDIT THIS LINE. Added by containerd-apply-patch.sh on 2024-10-18 08:06:10 - # Keep versions on both arches in sync. =app-containers/cri-tools-1.32.0 ~arm64 From c88b5b9d7a4e31b26e161f3364f0e5857e6f07b3 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 12:06:15 +0100 Subject: [PATCH 124/145] overlay profiles: Drop accept keywords for app-containers/docker{,-cli} --- .../profiles/coreos/base/package.accept_keywords | 4 ---- 1 file changed, 4 deletions(-) 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 fedbd2a3818..5832762f76c 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 @@ -10,10 +10,6 @@ # Keep versions on both arches in sync. =app-containers/cri-tools-1.32.0 ~arm64 -# Accept unstable for Docker and its CLI. -=app-containers/docker-27.3.1 ~amd64 ~arm64 -=app-containers/docker-cli-27.3.1 ~amd64 ~arm64 - # These seem to be the versions we initially got, but the # modifications made to the ebuilds were clobbered, so these are here # to keep using the same version. Can be dropped when these or newer From 2e45afe6f677a0f11f3e14af75cda219640f4c23 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 12:20:49 +0100 Subject: [PATCH 125/145] overlay profiles: Drop accept keywords for app-containers/runc --- .../profiles/coreos/base/package.accept_keywords | 6 ------ 1 file changed, 6 deletions(-) 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 5832762f76c..72059f8e72c 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 @@ -10,12 +10,6 @@ # Keep versions on both arches in sync. =app-containers/cri-tools-1.32.0 ~arm64 -# These seem to be the versions we initially got, but the -# modifications made to the ebuilds were clobbered, so these are here -# to keep using the same version. Can be dropped when these or newer -# get stabilized in Gentoo. -=app-containers/runc-1.1.14 ~amd64 ~arm64 - # Seems to be the only available ebuild in portage-stable right now. =app-crypt/adcli-0.9.2 ~arm64 From f0220159c5035a3d5c56e13ae47e0c7055e58d71 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 12:21:02 +0100 Subject: [PATCH 126/145] overlay profiles: Drop accept keywords for app-emulation/virt-firmware --- .../profiles/coreos/base/package.accept_keywords | 3 --- 1 file changed, 3 deletions(-) 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 72059f8e72c..885571a6ae8 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 @@ -25,9 +25,6 @@ # We need the new --provider option. =app-crypt/p11-kit-0.25.5 ~amd64 ~arm64 -# Needed in SDK for Secure Boot. -=app-emulation/virt-firmware-24.7 ~amd64 - # Needed by arm64-native SDK. =app-emulation/open-vmdk-1.0 * From 035eb664c3d62ba478eff9e12cb9bd7e3d26ea36 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 12:22:49 +0100 Subject: [PATCH 127/145] overlay profiles: Update accept keywords for dev-build/meson --- .../coreos-overlay/profiles/coreos/base/package.accept_keywords | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 885571a6ae8..f8eb9ea0af0 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 @@ -30,7 +30,7 @@ # Keep versions on both arches in sync. =app-emulation/qemu-guest-agent-8.2.0 ~arm64 -=dev-build/meson-1.5.2 ~arm64 +=dev-build/meson-1.6.1 ~arm64 =dev-cpp/glog-0.6.0 ~arm64 =dev-lang/yasm-1.3.0-r1 ~arm64 =dev-libs/ding-libs-0.6.2-r1 ~arm64 From ab687c8b76b31d669b7f3e3bc9e12dbc6605737d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 14:02:26 +0100 Subject: [PATCH 128/145] overlay profiles: Add accept keywords for dev-util/maturin --- .../coreos-overlay/profiles/coreos/base/package.accept_keywords | 1 + 1 file changed, 1 insertion(+) 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 f8eb9ea0af0..78738338779 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 @@ -51,6 +51,7 @@ =dev-util/catalyst-4.0.0 ~amd64 ~arm64 # Keep versions on both arches in sync. +=dev-util/maturin-1.8.1 ~arm64 =net-firewall/conntrack-tools-1.4.8-r1 ~arm64 =net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64 =net-libs/libnetfilter_cttimeout-1.0.1 ~arm64 From bd54d529c54076b0bdbb01e88b6b07713e738922 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 15:13:07 +0100 Subject: [PATCH 129/145] overlay coreos/user-patches: Update README for sys-auth/sssd patch --- .../coreos-overlay/coreos/user-patches/sys-auth/sssd/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-auth/sssd/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-auth/sssd/README.md index 39ecb103a18..decf8bef1eb 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-auth/sssd/README.md +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-auth/sssd/README.md @@ -1,3 +1,3 @@ The `0001-Assume-that-callbacks-are-not-broken-in-OpenLDAP-whe.patch` allows the project to be cross-compiled without disabling LDAP connection -callbacks. It is being upstreamed. +callbacks. Drop when updating to >=2.9.7 or >=2.10.2. From 24d07c7e757ff3ebd5541da12c72bc6b5ab00d7a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 15:13:25 +0100 Subject: [PATCH 130/145] overlay profiles: Drop obsolete USE flag for sys-auth/sssd --- .../third_party/coreos-overlay/profiles/coreos/base/package.use | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5c5c37fcbf3..2b4a14af3ca 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 @@ -59,7 +59,7 @@ sys-libs/glibc nscd dev-libs/cyrus-sasl kerberos -gdbm # don't build manpages for sssd -sys-auth/sssd -python samba kerberos gssapi ssh sudo selinux +sys-auth/sssd -python samba kerberos gssapi ssh selinux # enable logging command-line options in update_engine dev-cpp/glog gflags From 7c2623b1006e16ad054e6d526b5a5fd2cf0bff10 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 30 Jan 2025 10:22:39 +0100 Subject: [PATCH 131/145] overlay profiles: Add accept keywords for dev-util/{gdbus-codegen,glib-utils} So they match the version of dev-libs/glib. --- .../profiles/coreos/base/package.accept_keywords | 4 ++++ 1 file changed, 4 insertions(+) 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 78738338779..f0938641418 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 @@ -50,6 +50,10 @@ # Catalyst 4 is not stable yet, but earlier versions are masked now. =dev-util/catalyst-4.0.0 ~amd64 ~arm64 +# Needed to address CVE-2024-52533 +=dev-util/gdbus-codegen-2.82.4 ~amd64 ~arm64 +=dev-util/glib-utils-2.82.4 ~amd64 ~arm64 + # Keep versions on both arches in sync. =dev-util/maturin-1.8.1 ~arm64 =net-firewall/conntrack-tools-1.4.8-r1 ~arm64 From 081c415ae4ecc6ff5ae8e4e94a99fe838a19dbf7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 15:39:41 +0100 Subject: [PATCH 132/145] dev-lang/go: Move from overlay to portage-stable and sync It's from Gentoo commit a1cbaebe28de048b8120c353b0669b3829a34d6f. Gentoo's ebuild look mostly like our coreos-go-lang eclass, but with possibly some improvements. The difference is in slotting - Gentoo uses "0/${PV}" and Flatcar uses "${MAJOR}.${MINOR}/${PV}". I don't think that there is any practical sense in diverging here - maybe it made sense at the times when we had several version of go because some packages were really picky about which version of go was used to build them. --- .../dev-lang/go/go-1.22.11.ebuild | 8 - .../dev-lang/go/Manifest | 1 + .../go-never-download-newer-toolchains.patch | 13 ++ .../dev-lang/go/files/go-sets.conf | 7 + .../dev-lang/go/go-1.22.11.ebuild | 166 ++++++++++++++++++ .../dev-lang/go/go-1.23.5.ebuild | 162 +++++++++++++++++ .../portage-stable/dev-lang/go/go-9999.ebuild | 166 ++++++++++++++++++ .../dev-lang/go/metadata.xml | 10 +- 8 files changed, 522 insertions(+), 11 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/dev-lang/go/go-1.22.11.ebuild rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-lang/go/Manifest (50%) create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-never-download-newer-toolchains.patch create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-sets.conf create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.22.11.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.5.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild rename sdk_container/src/third_party/{coreos-overlay => portage-stable}/dev-lang/go/metadata.xml (50%) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/go-1.22.11.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-lang/go/go-1.22.11.ebuild deleted file mode 100644 index 7951a795c11..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/go-1.22.11.ebuild +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 2022 Flatcar Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit coreos-go-lang - -KEYWORDS="-* amd64 arm64" diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest similarity index 50% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/go/Manifest rename to sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest index e01f8bfa59f..d080a95cfd4 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/Manifest @@ -1 +1,2 @@ DIST go1.22.11.src.tar.gz 27565913 BLAKE2B d4b8f746846f0ba45307ecf732e035c2628483d59402f0868bc42a2fd1ae3447f61d9c3a6eacbc28b1f25e0b35b99ccf8831baeba4203601810b09267d8743f6 SHA512 40c133d6008df7c7cc3bb95a41c29f7442a6af2dd78b807007daf732471c88e2c641aed32878414d57be3904e5efa580d2ecd13fff5412ee668e753e50f1356e +DIST go1.23.5.src.tar.gz 28179014 BLAKE2B 6fe6101054a0c10ce415aea65367a48ef8397c88d66bad01b7c72107a6c60daf0b9a47f7c1cd6c8da9855ab04309f25941cc867e6a9f90ac51d1ab0c54662313 SHA512 b04317afeab2d0ced7c36b8682dd32ac085d95d874cf3f614daa34859d7f7f2b75138132e7a64e237c6b4d711d5b03a4d20533f92a44840915630f4ea7cfafa2 diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-never-download-newer-toolchains.patch b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-never-download-newer-toolchains.patch new file mode 100644 index 00000000000..74e85f80b63 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-never-download-newer-toolchains.patch @@ -0,0 +1,13 @@ +diff --git a/go.env b/go.env +index 6ff2b921d4..1112a19c9b 100644 +--- a/go.env ++++ b/go.env +@@ -7,6 +7,6 @@ + GOPROXY=https://proxy.golang.org,direct + GOSUMDB=sum.golang.org + +-# Automatically download newer toolchains as directed by go.mod files. ++# Never download newer toolchains. + # See https://go.dev/doc/toolchain for details. +-GOTOOLCHAIN=auto ++GOTOOLCHAIN=local diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-sets.conf b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-sets.conf new file mode 100644 index 00000000000..f38edb71a6f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/files/go-sets.conf @@ -0,0 +1,7 @@ +# Installed packages for which vdb *DEPEND includes dev-lang/go. +# This is useful after a dev-lang/go version change to rebuild all +# software written in Go. +[golang-rebuild] +class = portage.sets.dbapi.VariableSet +variable = BDEPEND +includes = dev-lang/go diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.22.11.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.22.11.ebuild new file mode 100644 index 00000000000..bd8a9171cf6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.22.11.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +# See "Bootstrap" in release notes +GO_BOOTSTRAP_MIN=1.20.14 +MY_PV=${PV/_/} + +inherit go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) + KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="cpu_flags_x86_sse2" + +RDEPEND=" +arm? ( sys-devel/binutils[gold] ) +arm64? ( sys-devel/binutils[gold] )" +BDEPEND="|| ( + >=dev-lang/go-${GO_BOOTSTRAP_MIN} + >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT=" strip" + +DOCS=( + CONTRIBUTING.md + PATENTS + README.md + SECURITY.md +) + +go_tuple() { + echo "$(go-env_goos $@)_$(go-env_goarch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +PATCHES=( + "${FILESDIR}"/go-never-download-newer-toolchains.patch +) + +src_compile() { + if has_version -b ">=dev-lang/go-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b ">=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go + export GOROOT="${PWD}" + export GOBIN="${GOROOT}/bin" + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go-env_goarch ${CBUILD}) + export GOHOSTOS=$(go-env_goos ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go-env_goarch) + export GOOS=$(go-env_goos) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go-env_goarm) + use x86 && export GO386=$(go-env_go386) + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + + cd src + + # https://github.com/golang/go/issues/42005 + rm cmd/link/internal/ld/fallocate_test.go || die + + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild -k || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + dodir /usr/lib/go + # The use of cp is deliberate in order to retain permissions + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + insinto /usr/lib/go + doins go.env VERSION* + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.5.ebuild new file mode 100644 index 00000000000..7958019d7f9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-1.23.5.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +# See "Bootstrap" in release notes +GO_BOOTSTRAP_MIN=1.20.14 +MY_PV=${PV/_/} + +inherit go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) + KEYWORDS="-* amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="cpu_flags_x86_sse2" + +RDEPEND=" +arm? ( sys-devel/binutils[gold] ) +arm64? ( sys-devel/binutils[gold] )" +BDEPEND="|| ( + >=dev-lang/go-${GO_BOOTSTRAP_MIN} + >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT=" strip" + +DOCS=( + CONTRIBUTING.md + PATENTS + README.md + SECURITY.md +) + +go_tuple() { + echo "$(go-env_goos $@)_$(go-env_goarch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +PATCHES=( + "${FILESDIR}"/go-never-download-newer-toolchains.patch +) + +src_compile() { + if has_version -b ">=dev-lang/go-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b ">=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go-env_goarch ${CBUILD}) + export GOHOSTOS=$(go-env_goos ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go-env_goarch) + export GOOS=$(go-env_goos) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go-env_goarm) + use x86 && export GO386=$(go-env_go386) + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + + cd src + + # https://github.com/golang/go/issues/42005 + rm cmd/link/internal/ld/fallocate_test.go || die + + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild -k || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + dodir /usr/lib/go + # The use of cp is deliberate in order to retain permissions + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + insinto /usr/lib/go + doins go.env VERSION* + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild new file mode 100644 index 00000000000..485f2a1bde8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/go-9999.ebuild @@ -0,0 +1,166 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +# See "Bootstrap" in release notes +GO_BOOTSTRAP_MIN=1.20.14 +MY_PV=${PV/_/} + +inherit go-env toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) +# KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="cpu_flags_x86_sse2" + +RDEPEND=" +arm? ( sys-devel/binutils[gold] ) +arm64? ( sys-devel/binutils[gold] )" +BDEPEND="|| ( + >=dev-lang/go-${GO_BOOTSTRAP_MIN} + >=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN} )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT=" strip" + +DOCS=( + CONTRIBUTING.md + PATENTS + README.md + SECURITY.md +) + +go_tuple() { + echo "$(go-env_goos $@)_$(go-env_goarch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +PATCHES=( + "${FILESDIR}"/go-never-download-newer-toolchains.patch +) + +src_compile() { + if has_version -b ">=dev-lang/go-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b ">=dev-lang/go-bootstrap-${GO_BOOTSTRAP_MIN}"; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go + export GOROOT="${PWD}" + export GOBIN="${GOROOT}/bin" + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go-env_goarch ${CBUILD}) + export GOHOSTOS=$(go-env_goos ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go-env_goarch) + export GOOS=$(go-env_goos) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go-env_goarm) + use x86 && export GO386=$(go-env_go386) + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + + cd src + + # https://github.com/golang/go/issues/42005 + rm cmd/link/internal/ld/fallocate_test.go || die + + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild -k || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + dodir /usr/lib/go + # The use of cp is deliberate in order to retain permissions + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + insinto /usr/lib/go + doins go.env VERSION* + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/go/metadata.xml similarity index 50% rename from sdk_container/src/third_party/coreos-overlay/dev-lang/go/metadata.xml rename to sdk_container/src/third_party/portage-stable/dev-lang/go/metadata.xml index b8d86563d87..5e00214a73f 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-lang/go/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-lang/go/metadata.xml @@ -1,13 +1,17 @@ - + - + williamh@gentoo.org William Hubbs - Go is a new systems programming language developped at google by + Go is a new systems programming language developed at google by Rob Pike. It has garbage collection, coroutines, communication channels and a clean syntax. + + cpe:/a:golang:go + golang/go + From a8ed1227a239c4819eedb3ac78e54142e3b77fba Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 15:44:03 +0100 Subject: [PATCH 133/145] overlay eclass/coreos-go-depend: Drop support for old EAPIs --- .../third_party/coreos-overlay/eclass/coreos-go-depend.eclass | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass index 542d464ecb3..1177d8fa3f6 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass @@ -16,7 +16,6 @@ export COREOS_GO_VERSION="${COREOS_GO_VERSION:-go1.22}" case "${EAPI:-0}" in - 5|6) DEPEND="dev-lang/go:${COREOS_GO_VERSION#go}=" ;; 7|8) BDEPEND="dev-lang/go:${COREOS_GO_VERSION#go}=" ;; *) die "Unsupported EAPI=${EAPI} for ${ECLASS}" esac From 2fd3ce14a052ced3e65f93a25049f5765ab7f653 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 15:43:11 +0100 Subject: [PATCH 134/145] overlay eclass/coreos-go-depend: Bump to 1.23 Also relax the dependency from depending on certain slot of dev-lang/go to depending on any newer version of the package and any slot (but forcing rebuild on slot change). --- .../third_party/coreos-overlay/eclass/coreos-go-depend.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass index 1177d8fa3f6..724ed36fca9 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-depend.eclass @@ -13,10 +13,10 @@ # @CODE # COREOS_GO_VERSION=go1.20 # @CODE -export COREOS_GO_VERSION="${COREOS_GO_VERSION:-go1.22}" +export COREOS_GO_VERSION="${COREOS_GO_VERSION:-go1.23}" case "${EAPI:-0}" in - 7|8) BDEPEND="dev-lang/go:${COREOS_GO_VERSION#go}=" ;; + 7|8) BDEPEND=">=dev-lang/go-${COREOS_GO_VERSION#go}:=" ;; *) die "Unsupported EAPI=${EAPI} for ${ECLASS}" esac From 809c66467f171faf5b9d42adeb34a43b998c07a8 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 15:50:31 +0100 Subject: [PATCH 135/145] overlay eclass/coreos-go-lang: Drop unused eclass --- .../eclass/coreos-go-lang.eclass | 121 ------------------ 1 file changed, 121 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-lang.eclass diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-lang.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-lang.eclass deleted file mode 100644 index e5f34fe9d26..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-lang.eclass +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2016 CoreOS, Inc. -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: coreos-go-lang.eclass -# @BLURB: Common functionality for building Go itself -# @DESCRIPTION: -# Only dev-lang/go ebuilds should inherit this eclass. -# -# Native (${CHOST} == ${CTARGET}): -# - -case "${EAPI:-0}" in - 6|7|8) ;; - *) die "Unsupported EAPI=${EAPI} for ${ECLASS}" -esac - -inherit coreos-go-utils toolchain-funcs - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} - -# Determine the main SLOT we will be using, e.g.: PV=1.5.3 SLOT=1.5 -GOSLOT="$(ver_cut 1-2)" - -DESCRIPTION="A concurrent garbage collected and typesafe programming language" -HOMEPAGE="http://www.golang.org" -SRC_URI="https://storage.googleapis.com/golang/go${PV}.src.tar.gz" - -LICENSE="BSD" -SLOT="${GOSLOT}/${PV}" -IUSE="" - -RDEPEND="app-eselect/eselect-go" -DEPEND="${RDEPEND} - >=dev-lang/go-bootstrap-1.17.13" - -# These test data objects have writable/executable stacks. -QA_EXECSTACK="usr/lib/go${GOSLOT}/src/debug/elf/testdata/*.obj" - -# Similarly, test data is never executed so don't check link dependencies. -REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" - -# The tools in /usr/lib/go should not cause the multilib-strict check to fail. -QA_MULTILIB_PATHS="usr/lib/go${GOSLOT}/pkg/tool/.*/.*" - -# The go language uses *.a files which are _NOT_ libraries and should not be -# stripped. The test data objects should also be left alone and unstripped. -STRIP_MASK="*.a /usr/lib/go${GOSLOT}/src/*" - -S="${WORKDIR}/go" - -coreos-go-lang_pkg_pretend() { - # make.bash does not understand cross-compiling a cross-compiler - if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then - die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" - fi -} - -coreos-go-lang_src_compile() { - export GOROOT_BOOTSTRAP="${EPREFIX}/usr/lib/go-bootstrap" - export GOROOT_FINAL="${EPREFIX}/usr/lib/go${GOSLOT}" - export GOROOT="${S}" - export GOBIN="${GOROOT}/bin" - - # Go's build script does not use BUILD/HOST/TARGET consistently. :( - go_export - export GOHOSTARCH=$(go_arch ${CBUILD}) - export GOHOSTOS=$(go_os ${CBUILD}) - export CC_FOR_TARGET=$(tc-getCC) - export CXX_FOR_TARGET=$(tc-getCXX) - # Must be set *after* calling tc-getCC - export CC=$(tc-getBUILD_CC) - - cd src - ./make.bash || die "build failed" -} - -coreos-go-lang_src_test() { - go_cross_compile && return 0 - - cd src - PATH="${GOBIN}:${PATH}" \ - ./run.bash -no-rebuild || die "tests failed" -} - -coreos-go-lang_src_install() { - exeinto "/usr/lib/go${GOSLOT}/bin" - if go_cross_compile; then - doexe "${GOBIN}/$(go_tuple)/"{go,gofmt} - else - doexe "${GOBIN}/"{go,gofmt} - fi - dosym "../lib/go${GOSLOT}/bin/go" "/usr/bin/go${GOSLOT}" - dosym "../lib/go${GOSLOT}/bin/gofmt" "/usr/bin/gofmt${GOSLOT}" - - exeinto "/usr/lib/go${GOSLOT}/pkg/tool/$(go_tuple)" - doexe "pkg/tool/$(go_tuple)/"* - - insopts -m0644 -p # preserve timestamps - insinto "/usr/lib/go${GOSLOT}" - doins -r doc lib src - insinto "/usr/lib/go${GOSLOT}/pkg" - doins -r "pkg/include" - - # Install pkg/linux_{amd64,arm64} only for Go <= 1.19, as Go 1.20+ - # does not ship pre-compiled package archives for the standard library - # in $GOROOT/pkg. See https://go.dev/doc/go1.20. - ver_test "${GOSLOT}" -lt 1.20 && doins -r "pkg/$(go_tuple)" - - dodoc CONTRIBUTING.md PATENTS README.md -} - -coreos-go-lang_pkg_postinst() { - eselect go update -} - -coreos-go-lang_pkg_postrm() { - eselect go update -} - -EXPORT_FUNCTIONS pkg_pretend src_compile src_test src_install pkg_postinst pkg_postrm From 36d86045e86badcb27112facf5b6aab0dcc7a701 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 15:52:12 +0100 Subject: [PATCH 136/145] overlay coreos-base/hard-host-depends: Make dep on go less strict I don't think we need to be strict about installed go version anymore. We'll just pull the latest one from Gentoo. If Gentoo's version is too new, we can temporarily mask the update. --- .../hard-host-depends/hard-host-depends-0.0.1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/hard-host-depends/hard-host-depends-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/hard-host-depends/hard-host-depends-0.0.1.ebuild index b0692afd7f3..434f5e22a7a 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/hard-host-depends/hard-host-depends-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/hard-host-depends/hard-host-depends-0.0.1.ebuild @@ -36,7 +36,7 @@ RDEPEND="${RDEPEND} app-text/xmlto dev-build/gtk-doc-am dev-lang/go-bootstrap - dev-lang/go:1.22 + dev-lang/go dev-lang/nasm =dev-lang/python-3* dev-lang/swig From edf201e1f9bd58a68645a256322b3f81908e7184 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 16:06:51 +0100 Subject: [PATCH 137/145] .github: Add dev-lang/go to automation --- .github/workflows/portage-stable-packages-list | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index 2a8c2657fde..283e653f3e7 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -206,6 +206,7 @@ dev-embedded/u-boot-tools dev-go/go-md2man dev-lang/duktape +dev-lang/go dev-lang/go-bootstrap dev-lang/nasm dev-lang/perl From ff5286a47da53374e3173e57f8826a5516189c00 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 16:08:32 +0100 Subject: [PATCH 138/145] .github: Drop GitHub Action for updating go --- .github/workflows/go-apply-patch.sh | 74 ------------------- .../workflows/go-current-major-versions.sh | 30 -------- .github/workflows/go-release-main.yaml | 48 ------------ 3 files changed, 152 deletions(-) delete mode 100755 .github/workflows/go-apply-patch.sh delete mode 100755 .github/workflows/go-current-major-versions.sh delete mode 100644 .github/workflows/go-release-main.yaml diff --git a/.github/workflows/go-apply-patch.sh b/.github/workflows/go-apply-patch.sh deleted file mode 100755 index affdb3e3bd9..00000000000 --- a/.github/workflows/go-apply-patch.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -source "${GHA_SCRIPTS_DIR}/.github/workflows/common.sh" - -prepare_git_repo - -# create a mapping between short version and new version, e.g. 1.16 -> 1.16.3 -declare -A VERSIONS -for version_new in ${VERSIONS_NEW}; do - version_new_trimmed="${version_new%.*}" - if [[ "${version_new_trimmed%.*}" = "${version_new_trimmed}" ]]; then - version_new_trimmed="${version_new}" - fi - VERSIONS["${version_new_trimmed}"]="${version_new}" -done - -branch_name="go-$(join_by '-and-' ${VERSIONS_NEW})-main" - -if ! check_remote_branch "${branch_name}"; then - echo "remote branch already exists, nothing to do" - exit 0 -fi - -# Parse the Manifest file for already present source files and keep the latest version in the current series -# DIST go1.17.src.tar.gz ... => 1.17 -# DIST go1.17.1.src.tar.gz ... => 1.17.1 -declare -a UPDATED_VERSIONS_OLD UPDATED_VERSIONS_NEW -any_different=0 -for version_short in "${!VERSIONS[@]}"; do - pushd "${SDK_OUTER_OVERLAY}" - VERSION_NEW="${VERSIONS["${version_short}"]}" - VERSION_OLD=$(sed -n "s/^DIST go\(${version_short}\(\.*[0-9]*\)\?\)\.src.*/\1/p" dev-lang/go/Manifest | sort -ruV | head -n1) - if [[ -z "${VERSION_OLD}" ]]; then - echo "${version_short} is not packaged, skipping" - popd - continue - fi - if [[ "${VERSION_NEW}" = "${VERSION_OLD}" ]]; then - echo "${version_short} is already at the latest (${VERSION_NEW}), skipping" - popd - continue - fi - UPDATED_VERSIONS_OLD+=("${VERSION_OLD}") - UPDATED_VERSIONS_NEW+=("${VERSION_NEW}") - - any_different=1 - EBUILD_FILENAME=$(get_ebuild_filename dev-lang/go "${VERSION_OLD}") - git mv "${EBUILD_FILENAME}" "dev-lang/go/go-${VERSION_NEW}.ebuild" - - popd - - URL="https://go.dev/doc/devel/release#go${VERSION_NEW}" - - generate_update_changelog 'Go' "${VERSION_NEW}" "${URL}" 'go' - - commit_changes dev-lang/go "${VERSION_OLD}" "${VERSION_NEW}" -done - -cleanup_repo - -if [[ $any_different -eq 0 ]]; then - echo "go packages were already at the latest versions, nothing to do" - exit 0 -fi - -vo_gh="$(join_by ' and ' "${UPDATED_VERSIONS_OLD[@]}")" -vn_gh="$(join_by ' and ' "${UPDATED_VERSIONS_NEW[@]}")" - -echo "VERSIONS_OLD=${vo_gh}" >>"${GITHUB_OUTPUT}" -echo "VERSIONS_NEW=${vn_gh}" >>"${GITHUB_OUTPUT}" -echo "BRANCH_NAME=${branch_name}" >>"${GITHUB_OUTPUT}" -echo 'UPDATE_NEEDED=1' >>"${GITHUB_OUTPUT}" diff --git a/.github/workflows/go-current-major-versions.sh b/.github/workflows/go-current-major-versions.sh deleted file mode 100755 index d279161b764..00000000000 --- a/.github/workflows/go-current-major-versions.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -source "${GHA_SCRIPTS_DIR}/.github/workflows/common.sh" - -pushd "${SDK_OUTER_OVERLAY}" - -versions=() -for ebuild in dev-lang/go/go-*.ebuild; do - version="${ebuild##*/go-}" # 1.20.1-r1.ebuild or 1.19.ebuild - version="${version%.ebuild}" # 1.20.1-r1 or 1.19 - version="${version%%-*}" # 1.20.1 or 1.19 - short_version="${version%.*}" # 1.20 or 1 - if [[ "${short_version%.*}" = "${short_version}" ]]; then - # fix short version - short_version="${version}" - fi - - versions+=($(git ls-remote --tags https://github.com/golang/go | \ - cut -f2 | \ - sed --quiet "/refs\/tags\/go${short_version}\(\.[0-9]*\)\?$/s/^refs\/tags\/go//p" | \ - grep --extended-regexp --invert-match --regexp='(beta|rc)' | \ - sort --reverse --unique --version-sort | \ - head --lines=1)) -done - -popd - -echo "VERSIONS_NEW=${versions[*]}" >>"${GITHUB_OUTPUT}" diff --git a/.github/workflows/go-release-main.yaml b/.github/workflows/go-release-main.yaml deleted file mode 100644 index 3543cf25c15..00000000000 --- a/.github/workflows/go-release-main.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Get the latest Go release for main -on: - schedule: - - cron: '15 7 * * 1' - workflow_dispatch: - -jobs: - get-go-releases: - runs-on: ubuntu-latest - steps: - - name: Check out scripts - uses: actions/checkout@v4 - with: - token: ${{ secrets.BOT_PR_TOKEN }} - path: scripts - - name: Figure out latest Go release versions - id: go-latest-release - env: - GHA_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - WORK_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - run: scripts/.github/workflows/go-current-major-versions.sh - - name: Set up Flatcar SDK - id: setup-flatcar-sdk - env: - WORK_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - CHANNEL: main - run: scripts/.github/workflows/setup-flatcar-sdk.sh - - name: Apply patch for main - id: apply-patch-main - env: - GHA_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - WORK_SCRIPTS_DIR: "${{ github.workspace }}/scripts" - VERSIONS_NEW: ${{ steps.go-latest-release.outputs.VERSIONS_NEW }} - PACKAGES_CONTAINER: ${{ steps.setup-flatcar-sdk.outputs.PACKAGES_CONTAINER }} - SDK_NAME: ${{ steps.setup-flatcar-sdk.outputs.SDK_NAME }} - TARGET_BRANCH: main - run: scripts/.github/workflows/go-apply-patch.sh - - name: Create pull request for main - uses: peter-evans/create-pull-request@v6 - if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 - with: - token: ${{ secrets.BOT_PR_TOKEN }} - path: scripts - branch: ${{ steps.apply-patch-main.outputs.BRANCH_NAME }} - base: main - title: Upgrade Go from ${{ steps.apply-patch-main.outputs.VERSIONS_OLD }} to ${{ steps.apply-patch-main.outputs.VERSIONS_NEW }} - body: Subject says it all. - labels: main From 0ba6b62bf012933657ebb24b0d15939695f9876c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 16:16:04 +0100 Subject: [PATCH 139/145] pkg-auto: Disable pager when printing package occurences --- pkg_auto/impl/pkg_auto_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg_auto/impl/pkg_auto_lib.sh b/pkg_auto/impl/pkg_auto_lib.sh index 437efd619e6..d96bc607650 100644 --- a/pkg_auto/impl/pkg_auto_lib.sh +++ b/pkg_auto/impl/pkg_auto_lib.sh @@ -2768,7 +2768,7 @@ function grep_pkg() { pkg=${1}; shift # rest are directories - git -C "${scripts}" grep "${pkg}"'\(-[0-9]\|[^a-zA-Z0-9_-]\|$\)' -- "${@}" || : + GIT_PAGER= git -C "${scripts}" grep "${pkg}"'\(-[0-9]\|[^a-zA-Z0-9_-]\|$\)' -- "${@}" || : } # Prints the passed files preceding and following with BEGIN ENTRY and From ddab51dfa1914ab92d52720e4cd637747fbd9c7c Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 31 Jan 2025 16:18:46 +0100 Subject: [PATCH 140/145] overlay app-eselect/eselect-go: Drop unused package Incidentally, it was yet another package that was using a source code from github.com/coreos that we forgot to fork over to Flatcar org. --- .../app-eselect/eselect-go/Manifest | 1 - .../eselect-go/eselect-go-0.1.0-r1.ebuild | 36 ------------------- .../app-eselect/eselect-go/metadata.xml | 12 ------- 3 files changed, 49 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/Manifest delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/eselect-go-0.1.0-r1.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/metadata.xml diff --git a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/Manifest b/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/Manifest deleted file mode 100644 index c03364a6ffd..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST eselect-go-0.1.0.tar.gz 104232 BLAKE2B 770773f990509bdfcdb1c463f01915526358fe28b440be288dad0833a4e8647cf52ba136569b4e7b46c71b80c6ffd43075fd25bfb516ec5790f80067247e08c5 SHA512 b7e9bf07bc7026115d639ed893c54332d63cd2d7a46a6f3b2f8a6748658dfb82f09e875def8bf9abecfb1e39f054ef194b39b0c415ac9ce69ea03332125d4c1f diff --git a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/eselect-go-0.1.0-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/eselect-go-0.1.0-r1.ebuild deleted file mode 100644 index d7bb345d5eb..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/eselect-go-0.1.0-r1.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2016 CoreOS, Inc. -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Eselect module for managing multiple Go versions" -HOMEPAGE="https://github.com/coreos/eselect-go" -SRC_URI="https://github.com/coreos/eselect-go/releases/download/v${PV}/${P}.tar.gz" -# Note for future releases: the tarball was generated via `make dist` and -# uploaded to GitHub so there is no need for initializing autotools here. - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 arm64" -IUSE="test" -RESTRICT="!test? ( test )" - -DEPEND="test? ( dev-libs/glib )" -RDEPEND="app-admin/eselect - !dev-lang/go:0" - -src_configure() { - # Go is installed to /usr/lib, not /usr/lib64 - econf --libdir=/usr/lib -} - -src_install() { - keepdir /etc/env.d/go - default -} - -pkg_postinst() { - if has_version 'dev-lang/go'; then - eselect go update --if-unset - fi -} diff --git a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/metadata.xml deleted file mode 100644 index 8fc934b3a96..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-eselect/eselect-go/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - This tool is intended for use in the CoreOS SDK in order to support - packages or architectures that cannot upgrade to the same Go version - all at the same time. Gentoo doesn't support this use case. - - - coreos/eselect-go - - From 67b187f752ce808b9415161ca90a3fa0c7a41476 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 4 Feb 2025 10:37:23 +0100 Subject: [PATCH 141/145] overlay eclass/coreos-go-utils: Use unversioned go We have switched to dev-lang/go package from Gentoo, which is not using versioned binaries, so switch to the unversioned one. --- .../third_party/coreos-overlay/eclass/coreos-go-utils.eclass | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-utils.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-utils.eclass index b5d07016dec..ae4f28fa6bf 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-utils.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-go-utils.eclass @@ -91,9 +91,7 @@ go_export() { export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" - - # Ensure the `go` wrapper calls the version we expect - export EGO="${COREOS_GO_VERSION}" + export EGO=go # With Go >= 1.16, GO111MODULE=on is set by default. # Few of our repos still don't support Go modules so we would need to set From 9c27045b1b2270d9ba4eb1ad3a3966c4f1c52f0e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 5 Feb 2025 17:16:09 +0100 Subject: [PATCH 142/145] coreos/user-patches: Add a patch for dev-lang/go --- ...rcing-binutils-gold-dependency-on-aa.patch | 68 +++++++++++++++++++ .../coreos/user-patches/dev-lang/go/README.md | 6 ++ 2 files changed, 74 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/0001-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/README.md diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/0001-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/0001-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch new file mode 100644 index 00000000000..55c3fa2f40d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/0001-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch @@ -0,0 +1,68 @@ +From 6d265b008e3d106b2706645e5a88cd8e2fb98953 Mon Sep 17 00:00:00 2001 +From: Dirk Müller +Date: Wed, 09 Mar 2022 17:47:23 +0100 +Subject: [PATCH] cmd/link: stop forcing binutils-gold dependency on aarch64 + +The bfd linker appears to be working just fine at least in version +2.41 or above. Reject the known broken one instead, which +avoids an architecture specific linker dependency that +is cumbersome for distributions. + +Fixes #22040. + +Change-Id: I9f377e47c22ef20497479c0978c053ed5de46a38 +--- + +diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go +index 2d8f964..fcf0bc7 100644 +--- a/src/cmd/link/internal/ld/lib.go ++++ b/src/cmd/link/internal/ld/lib.go +@@ -1670,27 +1670,6 @@ + // Use lld to avoid errors from default linker (issue #38838) + altLinker = "lld" + } +- +- if ctxt.Arch.InFamily(sys.ARM64) && buildcfg.GOOS == "linux" { +- // On ARM64, the GNU linker will fail with +- // -znocopyreloc if it thinks a COPY relocation is +- // required. Switch to gold. +- // https://sourceware.org/bugzilla/show_bug.cgi?id=19962 +- // https://go.dev/issue/22040 +- altLinker = "gold" +- +- // If gold is not installed, gcc will silently switch +- // back to ld.bfd. So we parse the version information +- // and provide a useful error if gold is missing. +- name, args := flagExtld[0], flagExtld[1:] +- args = append(args, "-fuse-ld=gold", "-Wl,--version") +- cmd := exec.Command(name, args...) +- if out, err := cmd.CombinedOutput(); err == nil { +- if !bytes.Contains(out, []byte("GNU gold")) { +- log.Fatalf("ARM64 external linker must be gold (issue #15696, 22040), but is not: %s", out) +- } +- } +- } + } + if ctxt.Arch.Family == sys.ARM64 && buildcfg.GOOS == "freebsd" { + // Switch to ld.bfd on freebsd/arm64. +diff --git a/src/make.bash b/src/make.bash +index b67ae15..7df4910 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -94,6 +94,16 @@ + ;; + esac + ++# Test for bad bfd.ld ++if test "$(uname -m)" = "aarch64" && ld -v | grep -E "GNU ld.* 2\.([0-3]|40)"; then ++ echo 'ERROR: Your system uses bfd.LD 2.40 or older which has issues with dynamic linking on aarch64' ++ echo 'Consider upgrading or switching to binutils-gold.' ++ echo ++ echo 'See https://sourceware.org/bugzilla/show_bug.cgi?id=30437' ++ ++ exit 1 ++fi ++ + # Test for bad ld. + if ld --version 2>&1 | grep 'gold.* 2\.20' >/dev/null; then + echo 'ERROR: Your system has gold 2.20 installed.' diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/README.md new file mode 100644 index 00000000000..77663c42ec1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/dev-lang/go/README.md @@ -0,0 +1,6 @@ +The `0001-cmd-link-stop-forcing-binutils-gold-dependency-on-aa.patch` +drops the use of the gold linker. Track the following to see when it +needs to be dropped: + +- https://go-review.googlesource.com/c/go/+/391115 +- https://github.com/golang/go/issues/22040 From 6b8fcce30ffba3a828fd658be72bcdd7807f27a7 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 5 Feb 2025 17:10:41 +0100 Subject: [PATCH 143/145] overlay coreos/user-patches: Drop dangling symlinks These should have been dropped at the same time as the user patch for sys-devel/gcc. --- .../coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc | 1 - .../coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc | 1 - 2 files changed, 2 deletions(-) delete mode 120000 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc delete mode 120000 sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc deleted file mode 120000 index c59b0e7dcd7..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-aarch64-cros-linux-gnu/gcc +++ /dev/null @@ -1 +0,0 @@ -../sys-devel/gcc \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc b/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc deleted file mode 120000 index c59b0e7dcd7..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos/user-patches/cross-x86_64-cros-linux-gnu/gcc +++ /dev/null @@ -1 +0,0 @@ -../sys-devel/gcc \ No newline at end of file From 709f11808401e378229bb36e65597efada7bc6a1 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 6 Feb 2025 12:08:33 +0100 Subject: [PATCH 144/145] overlay coreos/config: Fix cross-compilation of docker and docker-cli --- .../coreos/config/env/app-containers/docker | 12 ++++++++++++ .../coreos/config/env/app-containers/docker-cli | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker new file mode 100644 index 00000000000..e7ee65aa01c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker @@ -0,0 +1,12 @@ +# Fix cross-compilation by setting up the environment properly. +# +# This is what go-module_src_unpack does, but docker does not use it. +cros_pre_src_unpack_set_build_env() { + if use amd64 || use arm || use arm64 || + ( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then + GOFLAGS="-buildmode=pie ${GOFLAGS}" + fi + GOFLAGS="${GOFLAGS} -p=$(makeopts_jobs)" + + go-env_set_compile_environment +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli new file mode 100644 index 00000000000..e7ee65aa01c --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/app-containers/docker-cli @@ -0,0 +1,12 @@ +# Fix cross-compilation by setting up the environment properly. +# +# This is what go-module_src_unpack does, but docker does not use it. +cros_pre_src_unpack_set_build_env() { + if use amd64 || use arm || use arm64 || + ( use ppc64 && [[ $(tc-endian) == "little" ]] ) || use s390 || use x86; then + GOFLAGS="-buildmode=pie ${GOFLAGS}" + fi + GOFLAGS="${GOFLAGS} -p=$(makeopts_jobs)" + + go-env_set_compile_environment +} From 3dedaf6c9eb3a8f9f1ead7f394086f411f138c0a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 29 Jan 2025 16:20:18 +0100 Subject: [PATCH 145/145] changelog: Add entries --- .../security/2025-01-29-weekly-updates.md | 5 +++++ .../updates/2025-01-29-weekly-updates.md | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 changelog/security/2025-01-29-weekly-updates.md create mode 100644 changelog/updates/2025-01-29-weekly-updates.md diff --git a/changelog/security/2025-01-29-weekly-updates.md b/changelog/security/2025-01-29-weekly-updates.md new file mode 100644 index 00000000000..50c9adb2ae3 --- /dev/null +++ b/changelog/security/2025-01-29-weekly-updates.md @@ -0,0 +1,5 @@ +- git ([CVE-2024-50349](https://nvd.nist.gov/vuln/detail/CVE-2024-50349), [CVE-2024-52005](https://nvd.nist.gov/vuln/detail/CVE-2024-52005), [CVE-2024-52006](https://nvd.nist.gov/vuln/detail/CVE-2024-52006)) +- glib ([CVE-2024-52533](https://nvd.nist.gov/vuln/detail/CVE-2024-52533)) +- glibc ([CVE-2025-0395](https://nvd.nist.gov/vuln/detail/CVE-2025-0395)) +- openssl ([CVE-2024-13176](https://nvd.nist.gov/vuln/detail/CVE-2024-13176)) +- rsync ([CVE-2024-12084](https://nvd.nist.gov/vuln/detail/CVE-2024-12084), [CVE-2024-12085](https://nvd.nist.gov/vuln/detail/CVE-2024-12085), [CVE-2024-12086](https://nvd.nist.gov/vuln/detail/CVE-2024-12086), [CVE-2024-12087](https://nvd.nist.gov/vuln/detail/CVE-2024-12087), [CVE-2024-12088](https://nvd.nist.gov/vuln/detail/CVE-2024-12088), [CVE-2024-12747](https://nvd.nist.gov/vuln/detail/CVE-2024-12747)) diff --git a/changelog/updates/2025-01-29-weekly-updates.md b/changelog/updates/2025-01-29-weekly-updates.md new file mode 100644 index 00000000000..b457a1857da --- /dev/null +++ b/changelog/updates/2025-01-29-weekly-updates.md @@ -0,0 +1,21 @@ +- SDK: go ([1.23.5](https://go.dev/doc/go1.23)) +- SDK: meson ([1.6.1](https://mesonbuild.com/Release-notes-for-1-6-0.html)) +- SDK: rust ([1.83.0](https://blog.rust-lang.org/2024/11/28/Rust-1.83.0.html)) +- base, dev: cri-tools ([1.32.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.32.0) (includes [1.31.1](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.31.1), [1.31.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.31.0), [1.30.1](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.30.1), [1.30.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.30.0), [1.29.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.29.0), [1.28.0](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.28.0), [1.27.1](https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.27.1))) +- base, dev: git ([2.45.3](https://github.com/git/git/blob/v2.45.3/Documentation/RelNotes/2.45.3.txt)) +- base, dev: glib ([2.82.4](https://gitlab.gnome.org/GNOME/glib/-/releases/2.82.4) (includes [2.82.3](https://gitlab.gnome.org/GNOME/glib/-/releases/2.82.3), [2.82.2](https://gitlab.gnome.org/GNOME/glib/-/releases/2.82.2), [2.82.1](https://gitlab.gnome.org/GNOME/glib/-/releases/2.82.1), [2.82.0](https://gitlab.gnome.org/GNOME/glib/-/releases/2.82.0))) +- base, dev: gnupg ([2.4.7](https://dev.gnupg.org/T7353)) +- base, dev: gnutls ([3.8.8](https://gitlab.com/gnutls/gnutls/-/blob/3.8.8/NEWS)) +- base, dev: ipset ([7.23](https://ipset.netfilter.org/changelog.html)) +- base, dev: kbd ([2.7.1](https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/tag/?h=v2.7.1) (includes [2.7](https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/tag/?h=v2.7), [2.7-rc1](https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/tag/?h=v2.7-rc1))) +- base, dev: nghttp2 ([1.64.0](https://github.com/nghttp2/nghttp2/releases/tag/v1.64.0) (includes [1.63.0](https://github.com/nghttp2/nghttp2/releases/tag/v1.63.0))) +- base, dev: socat ([1.8.0.1](https://repo.or.cz/socat.git/blob/6ff391324d2d3b9f6bfb58e7d16a20be43b47af7:/CHANGES)) +- base, dev: sqlite ([3.47.2](https://sqlite.org/releaselog/3_47_2.html)) +- base, dev: sssd ([2.9.6](https://sssd.io/release-notes/sssd-2.9.6.html)) +- base, dev: zram-generator ([1.2.1](https://github.com/systemd/zram-generator/releases/tag/v1.2.1) (includes [1.2.0](https://github.com/systemd/zram-generator/releases/tag/v1.2.0))) +- containerd: runc ([1.2.4](https://github.com/opencontainers/runc/releases/tag/v1.2.4) (includes [1.2.3](https://github.com/opencontainers/runc/releases/tag/v1.2.3), [1.2.2](https://github.com/opencontainers/runc/releases/tag/v1.2.2), [1.2.1](https://github.com/opencontainers/runc/releases/tag/v1.2.1), [1.2.0](https://github.com/opencontainers/runc/releases/tag/v1.2.0), [1.1.15](https://github.com/opencontainers/runc/releases/tag/v1.1.15))) +- dev: gcc-config ([2.12.1](https://gitweb.gentoo.org/proj/gcc-config.git/log/?h=v2.12.1)) +- docker: docker ([27.4.1](https://docs.docker.com/engine/release-notes/27/#2741) (includes [27.4.0](https://docs.docker.com/engine/release-notes/27/#2740)) +- docker: docker-buildx ([0.19.1](https://github.com/docker/buildx/releases/tag/v0.19.1) (includes [0.19.0](https://github.com/docker/buildx/releases/tag/v0.19.0), [0.18.0](https://github.com/docker/buildx/releases/tag/v0.18.0), [0.17.1](https://github.com/docker/buildx/releases/tag/v0.17.1), [0.17.0](https://github.com/docker/buildx/releases/tag/v0.17.0), [0.16.2](https://github.com/docker/buildx/releases/tag/v0.16.2), [0.16.1](https://github.com/docker/buildx/releases/tag/v0.16.1), [0.16.0](https://github.com/docker/buildx/releases/tag/v0.16.0), [0.15.1](https://github.com/docker/buildx/releases/tag/v0.15.1), [0.15.0](https://github.com/docker/buildx/releases/tag/v0.15.0), [0.14.1](https://github.com/docker/buildx/releases/tag/v0.14.1))) +- sysext-python: setuptools ([75.8.0](https://github.com/pypa/setuptools/blob/v75.8.0/NEWS.rst#v7580) (includes [75.7.0](https://github.com/pypa/setuptools/blob/v75.7.0/NEWS.rst#v7570))) +- vmware: xmlsec ([1.3.6](https://github.com/lsh123/xmlsec/releases/tag/1.3.6))