From f2f8da03f9e6f6eb043d3d959db0ab5b2e159715 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 5 Oct 2022 15:42:15 +0200 Subject: [PATCH] sys-libs/glibc: Sync with Gentoo It's from Gentoo commit a3d93f81ed9442703de09b684f309d8e1d596571. --- .../coreos-overlay/sys-libs/glibc/Manifest | 6 +- .../coreos-overlay/sys-libs/glibc/README.md | 9 -- .../sys-libs/glibc/files/nscd-conf.tmpfiles | 2 - .../sys-libs/glibc/files/nscd.service | 15 --- .../sys-libs/glibc/files/nscd.tmpfilesd | 4 - ...-2.33-r14.ebuild => glibc-2.34-r14.ebuild} | 98 +++++++++---------- .../sys-libs/glibc/metadata.xml | 1 + 7 files changed, 52 insertions(+), 83 deletions(-) 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 delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.service delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.tmpfilesd rename sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/{glibc-2.33-r14.ebuild => glibc-2.34-r14.ebuild} (95%) 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 index 306e9e4f39..3306d08aac 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/Manifest @@ -1,5 +1,5 @@ DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347 -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-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc +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-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238 DIST locale-gen-2.22.tar.gz 7971 BLAKE2B 2dc66fa69bf51799d0c34459b654fba6998b80a7e322e9b670036c967e269ad921f50195e6e34c4a83c1f0bad191fd5aa3f37defb82271b73acbca07b7e49d08 SHA512 9798b10dbbc792345a7b7a121dec5f4bba9839a8aec010f01a09f3402fd5bf2376f79e03a6a19bc357010db780037a8811c381136ce19be1f1370374906dff38 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 0bcb9dd9ee..0000000000 --- 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 0cf43dcb7a..0000000000 --- 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/coreos-overlay/sys-libs/glibc/files/nscd.service b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.service deleted file mode 100644 index 25a3b1d9be..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.service +++ /dev/null @@ -1,15 +0,0 @@ -[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/coreos-overlay/sys-libs/glibc/files/nscd.tmpfilesd b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.tmpfilesd deleted file mode 100644 index 52edbba673..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/files/nscd.tmpfilesd +++ /dev/null @@ -1,4 +0,0 @@ -# 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/coreos-overlay/sys-libs/glibc/glibc-2.33-r14.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.34-r14.ebuild similarity index 95% rename from sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.33-r14.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.34-r14.ebuild index 421f7ec0c3..4547969526 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.33-r14.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/glibc-2.34-r14.ebuild @@ -6,10 +6,7 @@ EAPI=7 # Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc # Please read & adapt the page as necessary if obsolete. -# We avoid Python 3.10 here _for now_ (it does work!) to avoid circular dependencies -# on upgrades as people migrate to libxcrypt. -# https://wiki.gentoo.org/wiki/User:Sam/Portage_help/Circular_dependencies#Python_and_libcrypt -PYTHON_COMPAT=( python3_{8,9} ) +PYTHON_COMPAT=( python3_{8..10} ) TMPFILES_OPTIONAL=1 inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ @@ -23,7 +20,7 @@ SLOT="2.2" EMULTILIB_PKG="true" # Gentoo patchset (ignored for live ebuilds) -PATCH_VER=11 +PATCH_VER=17 PATCH_DEV=dilfridge if [[ ${PV} == 9999* ]]; then @@ -40,16 +37,19 @@ GCC_BOOTSTRAP_VER=20201208 LOCALE_GEN_VER=2.22 -GLIBC_SYSTEMD_VER=20210814 +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 headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla" +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 @@ -103,7 +103,7 @@ fi BDEPEND=" ${PYTHON_DEPS} - >=app-misc/pax-utils-1.3.1 + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} sys-devel/bison doc? ( sys-apps/texinfo ) !compile-locales? ( @@ -135,7 +135,7 @@ RDEPEND="${COMMON_DEPEND} sys-apps/grep virtual/awk sys-apps/gentoo-functions - ! '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 libpthreas 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 if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then # Move versioned .a file out of libdir to evade portage QA checks @@ -1450,23 +1465,6 @@ glibc_do_src_install() { run_locale_gen --inplace-glibc "${ED}/" sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die 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() { @@ -1518,7 +1516,7 @@ glibc_sanity_check() { # 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) + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml index eb25b52087..69c29b299a 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/glibc/metadata.xml @@ -13,6 +13,7 @@ When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL) Add experimental LoongArch patchset build memusage and memusagestat tools + enable sysv linker hashes in glibc for compatibility with binary software (EAC via wine/proton) enable optimizations for multiple CPU architectures (detected at runtime) Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch. Build, and enable support for, the Name Service Cache Daemon