diff options
Diffstat (limited to 'sys-libs')
25 files changed, 1709 insertions, 436 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz Binary files differindex 16515b0a11ee..a34792850a8e 100644 --- a/sys-libs/Manifest.gz +++ b/sys-libs/Manifest.gz diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index f3a423429ef3..8ed833fee203 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -13,15 +13,19 @@ DIST glibc-2.19.tar.xz 12083312 BLAKE2B 9dc03346e0f0df4bf009a92d894b0a9f964ff92b DIST glibc-2.25-patches-15.tar.bz2 78320 BLAKE2B 70c62cc10db13e2844de4d8a18972e0f4d01ba52fbd40db57c11d7b1c2c0d571b894f01e762bb26632fd696a77c299ef0766e2f129d2eda896f58325a754a13c SHA512 7204218ea82b677e0f278c4752ddb90aa0c08ac2349d061de81ec91dac204b0f10fe223d7b1055b9e0c21dac97c835f913a90c0168a5000d3be00dd20027c185 DIST glibc-2.25.tar.xz 13873900 BLAKE2B 73ef792fff059f6ad154c9af2155ea15b7869ec1b93e557b6c58129bfb50f863c06f8b49425d75fd2df537dd9c4a68bad790cff770c50a6889732d66f507d349 SHA512 5b7a2418d5b8a1b6a907c6c7fb6477ee2a473151cb45e03d0d4cdd9a33497c90b1ee39e2e7e885e2b25743dcd3747336ef114b4a73eb001da1fd79f29e0f9a6e DIST glibc-2.30-patches-10.tar.xz 72808 BLAKE2B a7a95c99482524b2896d15539766f1e6b1fe34a22f32119248c6dd44f42632076e86fdcbbdc2d604ec73ceccdd8a7f5936a62a6f4c3d039fae8f6901dfc6be77 SHA512 af5e213ff08bf38f6f529816c36b4e38df27207c2df254609ebe45b2f039ab553bbe563aa6f64b6667d328fd2c120dc21b6e2676540bdd94e58079237089eac3 +DIST glibc-2.30-sparc-reg-fix-clobber.patch 6106 BLAKE2B cad6a4cbef5d529519ef486f4ef8e189cb4d43dd67fa8f8d50d67072cbb682f60474d482a5c5152d1317de92b98851d8a88eee6b331eb5bc22de065c03c58fde SHA512 a018ef1f196257f3888af20a5cbc97892c8382a4f489da042568e087c077f30cf4dda6ac711b573e1274317866ce97cf817d92a28cf55f18f5e8d32787e6cb3f DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b -DIST glibc-2.31-patches-4.tar.xz 40464 BLAKE2B 8c79b446a37be8f33c10b9fe987d2f55f285bf672a48bf307b60cbc322aadad1eec209b8d2ab88c023fcc718b08d089a151797e2b7352672234044ccd5eb9a9d SHA512 385de24a814646af3c8504ac1b76aa9d8ee5043d1e666656f7b31fc4a66c32b7c2a7b361b1a77e910182c07ff44bb1d228fd8de13a1915210035cad71251001a DIST glibc-2.31-patches-5.tar.xz 52720 BLAKE2B 0e4315a79d4108e8a0eb2d849086de40a3ddebd9c09592ec5ecd02d9a0481f58588d7fca345624b0e345b077f6f3ad4257fb5949a0f05be2a004489af585a329 SHA512 c081aef22efacac19ce343ad6e55b8102869c42142dfd478e1cc03e85d6569771b52b737173df0996e273dc6ad1e8dea391658e03d5bcb69f2ed754801b3f6fa +DIST glibc-2.31-patches-7.tar.xz 56088 BLAKE2B 5af4dc008775c7d7958fc03df3800855685d00af7312f024a966948bd85522d40f357288deb4f13281dc93ace1b08cf40edf0b4c573dcba789887e86b45ce6ed SHA512 059082e5ce052189ed0c36ee97d7295f88cbb9e20dcb5677565a65d60cba11ff969d4382b6c6a69b8d6255da7274c205cf5c167fe76a24db3b9765f1633a9962 +DIST glibc-2.31-sparc-patch1-reg-kabi.patch 8525 BLAKE2B 2600ba4b0e24df2054a6e77ef79b6e5312e5594714d78015c4a949bb2c9b29c9535121bed9d633215710f6f50525fa0d2864aea43abbfeae281a6cc3dab71e5d SHA512 8dab29ea2e9e809806df17f3b707e7be27ac37121d0e3c6ee52fd41c1d6891bf71c0d8c154593754531aee96f8c866e06646f149c8bdd602521b703471d56bd2 +DIST glibc-2.31-sparc-patch2-reg-fix-clobber.patch 6864 BLAKE2B a39a10ff204d74289278125d7f2686db01874e998cb27b46b3b8b9597b5a2eae3b975a5ab08a8f5dd83693455891f6862b6eb70654f215c2ce6c5da222be96a1 SHA512 69bba011a30177386193ac4ac14a4e731c45b12dbb3745619ee802459aa75d6bbd37e62e979ec9790f691edb5f9077d37ee668b8df406f8f1c4d4316ef8c0aa7 DIST glibc-2.31.tar.xz 16676764 BLAKE2B 91df1792345f157265eae405185a81fd4b8ce36d4c2388f44b0d5b1ae38174ea374cbc909cd260770b9f38ea58051da13766d4fa22abf41c2d4a2493257b179b SHA512 735e4c0ef10418b6ea945ad3906585e5bbd8b282d76f2131309dce4cec6b15066a5e4a3731773ce428a819b542579c9957867bb0abf05ed2030983fca4412306 DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff EBUILD glibc-2.19-r2.ebuild 38287 BLAKE2B 6537e90257900cfb0abd28c3391fb530fa24ce74cdcf870ce340f8ee605b941550329120b1598266ed9ace251f5d12980a20d0297c04fdff633ab92baed66ed4 SHA512 7082dfd299db188b9fad3a3807e723d7b274520cb579b8681030b10d8807520ccbc960ac47d03ad7c6788add345caaeae894e2f2bce2bc1394e564540707c488 EBUILD glibc-2.25-r11.ebuild 6063 BLAKE2B a995a2553fad56abe09f0f890e2c70f94568675057367795acc7e62fdeb8b103a8ed9b5228bbe3aa74a70c7d657808ee0420c6c8931386c7a9c2adb0c330d15c SHA512 1b8e906841492e4f9361f909e91069c3a642d84a0216fab18b434f61db991c13765a31e29175854d43bf1b8159b462cd02e138bd593990c2306afd70f163a0cd EBUILD glibc-2.30-r8.ebuild 43136 BLAKE2B 2db384e8d1db4918f13eebb9ee6069b6564e8c58a64d091451159c3a209a7afb175a835f50f82a9a82a2650fc2cd8b7cd225f82ce2359a0250c6e240f72d34e7 SHA512 1154bf9ba79957a238fb21a40c2e4e1118d92646596ef1ce901470e1b78c3ca17c1284bf820cd5d951cfbb6eb10f2431dc9d1d5b5d798433bace07f32479208d -EBUILD glibc-2.31-r2.ebuild 42977 BLAKE2B f0835caa912c06b3c94c679f521c81d74213d906c9b1341a29f3c858fcda0791e090962aa2fb3e196111ad92b48c860f7d7368c66e2fc7b98d8e5294c71a3a17 SHA512 1d0d0cd31d4fa5e9f14fea2571f32fc86b1a458a7ac083db8b7a13d29817dcbfd7264774d672bf38529c19c42903bf838cb5cb72f0122e7b4b0e88702bcd6a26 -EBUILD glibc-2.31-r3.ebuild 43425 BLAKE2B bf1f5ca67512ce33b7c97e3185e500f4ef63a1034b7b67370d56d828183ec20890c60501c593a24cecccd1e68b637853ab748e3ada15357c3c0d4fadd41c777c SHA512 2e36d74a5a8539938d56ab39191793fb0c20e1a77ff76076cccbe78eb3f9a097ea509627b789a7269aa20a463e146dadd0d8c02a125cb3687e30446ffd4c5b30 -EBUILD glibc-9999.ebuild 43827 BLAKE2B d2e446cad1da860e8c2e226a631d3adffec590d9dc471af358fe74b1ab5f27965166e89bd1fdd4f01081cc642272b9afa0169d739eb41fd7900415f4f7fd51bd SHA512 96f1c58f044ed5f30ff8c576a52dcc00c018f16ac0292f014113a1001b93df7eaabb8d5f16e6fa082e8cef47c958b2a475e56ca2176d606d74ba6a88611b56b8 +EBUILD glibc-2.30-r9.ebuild 43297 BLAKE2B 41e0b1bdba84561d206553ce2610e986efeef547714dfa0d1f3e5362c27fb8b57aad3e46fc46b69eb4cc1a41184448d30b243c06b8a9084d3e3a49bf7bca415f SHA512 ccf0a3c865b0a35f5dd6a5585f82e08610c34b18c058c4b9f6aee2fe338d42c27b1bd62fa3dc279cc2e1d4799ad8e021feb628a83a5bda567d82e3ddab3a37c6 +EBUILD glibc-2.31-r4.ebuild 44270 BLAKE2B cd228e0f40764ec5a5ba672129c360456034c995bbc7c4c3d02d303e44108fcbda61843ebf49335fdeb70c40f91a236e4b52de72c3d70643d66a8a887fbe258e SHA512 d01ad3f8273a8c1f5ba1e603a88f732df269ab3e91b0624d9f2656a0d67d0c5e5a7b894b6d8469fb9cc3cb78686e4e5122fcc54822843c39d13acf55ac35d4d0 +EBUILD glibc-2.31-r5.ebuild 44345 BLAKE2B 3788348935b2a735297403f3dab224731e331b2ff38c4815276dde2fa02f2af3de205823203e4a3ec84d2b75d06a92ab59e957c76da4773b85c5eaf068a1cff1 SHA512 e31e3b94acd99a4f1c3f91d328c5017ffda311ff3d6bdb69f410b463361d25b767e9cba6cc7f9ae8409ea96112b50f1700018c2073887f0119b396dcf4acdcca +EBUILD glibc-9999.ebuild 44357 BLAKE2B 288b519d2746f032e0e719c9a5e1b3a2231b0d4d805a885f09f628326f11ac7a93908ccd793c81f5fba4f651311f7627e6bf6f2ad1cae336b1dcfe5e545b82a0 SHA512 a4363934c451801b1a94232541f1e575d8bf76cc604af0d6838a696d6c8988186022ae13105f8606057a047214fa388cdc1bcc16e4afb2fa5101e981f625c4df MISC metadata.xml 1491 BLAKE2B 4688b54e937163824a5895f4fbbcc9f09152378c68416f62294f7f1506379ecb82de43e8d2c6a64d1647c16700abe7c750b3cc658a9c7053891b3a9504f2ae93 SHA512 f6c002a52bb81471fbb631c7c430e1e91f6fdefc84a0c1f330606ac6347067b60f8a6d078169d49d2b30fa6991883466fff05caf4f93f53c00e5ced625dd8c88 diff --git a/sys-libs/glibc/glibc-2.31-r2.ebuild b/sys-libs/glibc/glibc-2.30-r9.ebuild index 2648f6738855..1c74a0712158 100644 --- a/sys-libs/glibc/glibc-2.31-r2.ebuild +++ b/sys-libs/glibc/glibc-2.30-r9.ebuild @@ -19,8 +19,7 @@ if [[ ${PV} == 9999* ]]; then EGIT_REPO_URI="https://sourceware.org/git/glibc.git" inherit git-r3 else - # needs minimal testing - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" fi @@ -29,13 +28,14 @@ RELEASE_VER=${PV} GCC_BOOTSTRAP_VER=20180511 # Gentoo patchset -PATCH_VER=4 +PATCH_VER=10 PATCH_DEV=dilfridge SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/glibc-2.30-sparc-reg-fix-clobber.patch" -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" +IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla" # Minimum kernel version that glibc requires MIN_KERN_VER="3.2.0" @@ -85,8 +85,6 @@ fi # 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 @@ -103,7 +101,6 @@ COMMON_DEPEND=" suid? ( caps? ( sys-libs/libcap ) ) selinux? ( sys-libs/libselinux ) systemtap? ( dev-util/systemtap ) - !<net-misc/openssh-8.1_p1-r2 " DEPEND="${COMMON_DEPEND} test? ( >=net-dns/libidn2-2.3.0 ) @@ -139,9 +136,22 @@ GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}" # The following tests fail due to the Gentoo build system and are thus # executed but ignored: XFAIL_TEST_LIST=( + # 1) Sandbox + tst-ldconfig-bad-aux-cache + tst-pldd + tst-mallocfork2 + tst-nss-db-endgrent + tst-nss-db-endpwent + tst-nss-files-hosts-long + tst-nss-test3 + # 2) Namespaces and cgroup + tst-locale-locpath # 9) Failures of unknown origin tst-latepthread + # buggy test, fixed in glibc-2.31 in 70ba28f7ab29 + tst-pkey + # buggy test, assumes /dev/ and /dev/null on a single filesystem # 'mount --bind /dev/null /chroot/dev/null' breaks it. # https://sourceware.org/PR25909 @@ -296,6 +306,12 @@ setup_target_flags() { einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" fi ;; + ia64) + # Workaround GPREL22 overflow by slightly pessimizing global + # references to go via 64-bit relocations instead of 22-bit ones. + # This allows building glibc on ia64 without an overflow: #723268 + append-flags -fcommon + ;; mips) # The mips abi cannot support the GNU style hashes. #233233 filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both @@ -735,6 +751,7 @@ src_prepare() { if ! use vanilla ; then elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" eapply "${WORKDIR}"/patches + eapply "${DISTDIR}"/glibc-2.30-sparc-reg-fix-clobber.patch einfo "Done." fi @@ -894,7 +911,6 @@ glibc_do_configure() { --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} @@ -1097,10 +1113,7 @@ glibc_src_test() { 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 + emake ${myxfailparams} check } do_src_test() { @@ -1142,10 +1155,8 @@ run_locale_gen() { locale_list="${root}/usr/share/i18n/SUPPORTED" fi - set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ --destdir "${root}" - echo "$@" - "$@" popd >/dev/null } diff --git a/sys-libs/glibc/glibc-2.31-r3.ebuild b/sys-libs/glibc/glibc-2.31-r4.ebuild index 5580625ba6d0..487ca85ae402 100644 --- a/sys-libs/glibc/glibc-2.31-r3.ebuild +++ b/sys-libs/glibc/glibc-2.31-r4.ebuild @@ -37,6 +37,10 @@ PATCH_DEV=dilfridge SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" 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 )" +SRC_URI+=" + https://dev.gentoo.org/~slyfox/distfiles/glibc-2.31-sparc-patch1-reg-kabi.patch + https://dev.gentoo.org/~slyfox/distfiles/glibc-2.31-sparc-patch2-reg-fix-clobber.patch +" 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" @@ -226,7 +230,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # 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 @@ -746,6 +751,8 @@ src_prepare() { if ! use vanilla ; then elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" eapply "${WORKDIR}"/patches + eapply "${DISTDIR}"/glibc-2.31-sparc-patch1-reg-kabi.patch + eapply "${DISTDIR}"/glibc-2.31-sparc-patch2-reg-fix-clobber.patch einfo "Done." fi @@ -784,7 +791,7 @@ glibc_do_configure() { 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 + 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 @@ -813,6 +820,14 @@ glibc_do_configure() { 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=() diff --git a/sys-libs/glibc/glibc-2.31-r5.ebuild b/sys-libs/glibc/glibc-2.31-r5.ebuild new file mode 100644 index 000000000000..6e3ecc03699c --- /dev/null +++ b/sys-libs/glibc/glibc-2.31-r5.ebuild @@ -0,0 +1,1494 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing + +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=7 +PATCH_DEV=dilfridge + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 + !<sys-devel/bison-2.7 + 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-util/systemtap ) + !<net-misc/openssh-8.1_p1-r2 +" +DEPEND="${COMMON_DEPEND} + test? ( >=net-dns/libidn2-2.3.0 ) +" +RDEPEND="${COMMON_DEPEND} + sys-apps/gentoo-functions +" + +RESTRICT="!test? ( test )" + +if [[ ${CATEGORY} == cross-* ]] ; then + BDEPEND+=" !headers-only? ( + >=${CATEGORY}/binutils-2.24 + >=${CATEGORY}/gcc-6 + )" + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" +else + BDEPEND+=" + >=sys-devel/binutils-2.24 + >=sys-devel/gcc-6 + " + DEPEND+=" virtual/os-headers " + RDEPEND+=" + >=net-dns/libidn2-2.3.0 + vanilla? ( !sys-libs/timezone-data ) + " + PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" +fi + +# Ignore tests whitelisted below +GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}" + +# The following tests fail due to the Gentoo build system and are thus +# executed but ignored: +XFAIL_TEST_LIST=( + # 9) Failures of unknown origin + tst-latepthread + + # buggy test, assumes /dev/ and /dev/null on a single filesystem + # 'mount --bind /dev/null /chroot/dev/null' breaks it. + # https://sourceware.org/PR25909 + tst-support_descriptors + + # Flaky test, known to fail occasionally: + # https://sourceware.org/PR19329 + # https://bugs.gentoo.org/719674#c12 + tst-stack4 +) + +# +# Small helper functions +# + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +just_headers() { + is_crosscompile && use headers-only +} + +alt_prefix() { + is_crosscompile && echo /usr/${CTARGET} +} + +# This prefix is applicable to CHOST when building against this +# glibc. It is baked into the library at configure time. +host_eprefix() { + is_crosscompile || echo "${EPREFIX}" +} + +# This prefix is applicable to CBUILD when building against this +# glibc. It determines the destination path at install time. +build_eprefix() { + is_crosscompile && echo "${EPREFIX}" +} + +# 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="$(host_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 <linux/version.h>' | $(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 + ;; + ia64) + # Workaround GPREL22 overflow by slightly pessimizing global + # references to go via 64-bit relocations instead of 22-bit ones. + # This allows building glibc on ia64 without an overflow: #723268 + append-flags -fcommon + ;; + 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" + + 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-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # #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_<CTARGET> 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 <linux/version.h>\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 <unistd.h>\n#include <sys/syscall.h>\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(<bignum>) 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 ! egrep -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 that IA32 emulation is enabled in the running kernel" + 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 + [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc." + 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 gold (for various reasons) #269274. + tc-ld-disable-gold + + # 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 '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-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.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 + ppc64 /lib64/ld64.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 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.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 + systemd_newtmpfilesd 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 egrep -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/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 2355e5bce34e..2159f471f182 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -22,7 +22,7 @@ PATCH_DEV=slyfox if [[ ${PV} == 9999* ]]; then inherit git-r3 else - #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" KEYWORDS="" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" @@ -225,7 +225,8 @@ do_compile_test() { rm -f glibc-test* printf '%b' "$*" > glibc-test.c - nonfatal emake glibc-test + # 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 @@ -798,7 +799,7 @@ glibc_do_configure() { 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 + 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 @@ -827,6 +828,14 @@ glibc_do_configure() { 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=() diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest index 1bce12c45ae0..857d04986f6c 100644 --- a/sys-libs/ldb/Manifest +++ b/sys-libs/ldb/Manifest @@ -5,7 +5,7 @@ DIST ldb-2.0.8.tar.gz 1676902 BLAKE2B b86b24a597bd81ae11382311f3b60aeb8aca78ddbe DIST ldb-2.0.9.tar.gz 1676176 BLAKE2B 0d18a570ca61fcdf159b6398ecef74bc983c24ffd4d8f85bc9cfcbb182f787d0deb50c5f446684b851993146e03bdaf10d80c083a9534446b829714fff025b8f SHA512 f4d2480491f16aac7837fa2ff071e81e429bd9b3a365264723245791aad1831a236ffeff0f01f85becb998b224c321b166f3edd3f9a828714b7c3b24aed11a5e DIST ldb-2.1.2.tar.gz 1670997 BLAKE2B 0622d39029819b89119bce6a570c56b247871a92685d4ca33153a141d4cbbcb52a041a33c6ddbf6b01d5195feeb49fcf24f15a571cad99d031f347374860b3fe SHA512 6b9a7e6e3f6532ccedb087394b1d2d28f53a034353288bac1ea8d9ca65da5981191e31de6493445daa87684e08cc587886dd7fce19391bd20f1c7d440dbf3fbf DIST ldb-2.1.3.tar.gz 1673208 BLAKE2B 32723fb8cbf404258a1334589e08f1a1b1ee78a6260327e4793d338f73132ae89a5655f77ef4160a0c4b751f5e33e841420c2027034c78d371bf5fd7f3931a37 SHA512 3f5adf5ed6c98cefce56ba47c986c5d59619731def8fa66440957aba1483de19bcfdc4ec5498d34db70753312b1ad47b864020269df924d3d431c8d4d223af10 -EBUILD ldb-2.0.10.ebuild 2689 BLAKE2B 1673576c465572ef9ece8a2e98cc3711acc8d77b2d0f1448b5296db8a9118650cbf63d85e9a08c436163c0222a04fdb0f6fdd2d0f7be9e9b110a4237c9e46030 SHA512 fb478aa89aa5a5050f7d86535e0262bbb77de221b49392ae9cf04c73f988f781223abcabf1b92bf12af56c9c091e6214225d91eddcd7e6006dfaa213bafaad76 +EBUILD ldb-2.0.10.ebuild 2688 BLAKE2B ecc1ec7275796e6de5af9be875671301aa38da49e2345408d5f9054657ed4775d21cd1456a474217def897ccbd02e44be18a14cad14dd58ccaa816d8be968a9f SHA512 9c3320b50fdbb0e7912b731d6c6905de97b065c2c049ec046e35f09e296f0b1f350120062c3d1e3b29ada3e4fbff90e5d8576bc96397dc89c9536882d2a770bb EBUILD ldb-2.0.8.ebuild 2688 BLAKE2B ecc1ec7275796e6de5af9be875671301aa38da49e2345408d5f9054657ed4775d21cd1456a474217def897ccbd02e44be18a14cad14dd58ccaa816d8be968a9f SHA512 9c3320b50fdbb0e7912b731d6c6905de97b065c2c049ec046e35f09e296f0b1f350120062c3d1e3b29ada3e4fbff90e5d8576bc96397dc89c9536882d2a770bb EBUILD ldb-2.0.9.ebuild 2695 BLAKE2B 9ef1575d86dbe106a307851c63a8bbe84bc948a13c5837fb3a09caf996ed8e8f9b37ec76fcebc2faf423db3a0f7558464d150a1f64e142d94022a5607a1a1bf6 SHA512 fee1fd6ebdbd919332ae2b35506b9e69856761d340fd6ad117b27ce2f08c31a9eda4f4bb156a64e2f01ac35c95bec438a60d58fb696639376f32dde98ab02fc9 EBUILD ldb-2.1.2.ebuild 2695 BLAKE2B c41b17921331a9677117f36bde021a244d548c3e2b3b5d9285e5ca104d96437a7723779b856276740d1e6a786fe2e3d2823fd2afce499bb3b5d1839cf034943e SHA512 21740fa246033d07d5ba0b16e72bdf26e787decd87095b7c32747bc48a7927b74fb25da9875afac670bf40b9b6c0c547574b7dd5b1bff7565e2b0cd229dc1579 diff --git a/sys-libs/ldb/ldb-2.0.10.ebuild b/sys-libs/ldb/ldb-2.0.10.ebuild index 1e3232e088f6..ef525af0a11a 100644 --- a/sys-libs/ldb/ldb-2.0.10.ebuild +++ b/sys-libs/ldb/ldb-2.0.10.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://www.samba.org/ftp/pub/${PN}/${P}.tar.gz" LICENSE="LGPL-3" SLOT="0/${PV}" -KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" IUSE="doc +ldap +lmdb python test" RESTRICT="!test? ( test )" diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest index 3f213b29bd6a..edb437e0bb9d 100644 --- a/sys-libs/libcap/Manifest +++ b/sys-libs/libcap/Manifest @@ -3,14 +3,13 @@ AUX libcap-2.25-build-system-fixes.patch 4705 BLAKE2B be3c05b5c798411cc03458c1ce AUX libcap-2.25-ignore-RAISE_SETFCAP-install-failures.patch 988 BLAKE2B 63417032b843ff7cb704c9880cfca4db5083d05d479c71dd12925d729f22a4900c2ae277a20399d58830eaca969842d587a2ae0a646809d6b659a75d13678312 SHA512 ba573ce68858c1370f3d25ad03678a534e6f3052076694d09e795d1febf2f3d76a6a170658b71d9e31105521fd5d22dd72095585a5402286dba424937064b389 AUX libcap-2.26-no-perl.patch 2483 BLAKE2B 34d20ca017119a40e31e2da64786a93c1d5468558e8dfcfb15f3758b6648aaad38bf333c11b35a2c8c4cb66d823e4daefed93b7073a0a65225fe9ef3494ff9ef SHA512 750a64c7b45fd145a043f29b8262c9f972aa4dcfb76afed9e440365c0e55d67d0103491e67a34f0f24ee580656e2fffd589b46b0c5a04b4c9e05b5dac6bbe994 AUX libcap-2.28-no_perl.patch 2599 BLAKE2B 55a6ef3573517e7cd7f367b811a5b6edc2b91974a23e99a31e1704dd5bcda90dfa3b7fde69c37f48c8ad1d97d0c8d68441830f7cc94adacb50cb54246519cb89 SHA512 40d739250a3508538f7083da700efe47628acd6b213e806b5c9d321ce55ce870dd58073459991b235d3cd3190b53e62e1fcc11f79779bda9239f3e042fb9428b -AUX libcap-2.33-build-system-fixes.patch 6821 BLAKE2B 35eafed271fc489d4daf36ecfae2a4b713a8ddfd0e3d609855bfd86b8b4c6fff0243f66b7e281610884092ecde589706fdc4903842c7803ae0b27734b5fad62f SHA512 7f0c5f2200d977954ce8d21348135366685707ad12979e256cfedc7a9eb231bd19b4c229ca7168819a8dd85c9a755d0aaf4923b6c960ca3d1a15eeef53a1df77 AUX libcap-2.34-build-system-fixes.patch 6993 BLAKE2B 66f003f78f3176be90f9e71f6ff1fc3de6005201be398583c3a79854e7b08a6bda384bb49bf24b24994bf4f5d2dfe9c6e82a7351483acad504628d6610a19094 SHA512 2f59a6831ed9b0116fa48becec66fa48fd8668254d3085d45e2c3ab198bde3148617bd7c852b8c7e1ab48d8a563116505e46dddc59d6d1a4eb18d02f86523804 DIST libcap-2.26.tar.xz 67172 BLAKE2B 9d1952bd03e1bba5ffa225a5088b8d841c2007219bbb9524f979ac65e472bf932db496acf93984fa77fe42e71d45b85cd603ca461a071fb4742526dfbc5f66eb SHA512 1c2d59f007226405a924950b2c2090393527e06f0692a84e6463e33915a070df61a9070b8f30a624d5630ddd39290eac117e5d440577d1edd48510195b9d12f0 DIST libcap-2.27.tar.xz 67780 BLAKE2B 7b58d7afdd90281771a302cd9554f067b9e3636b0c052935973d8a0d890490c3933b3513874b788a8c10e37ab5ad9cfa766408c9629b7c8562cb17bfdef87747 SHA512 e32335fd3e0d1564574acc73df7030b5b0fd98875217bffabd76f2765f1a7a6f1369f03df2ee22a1782776838784e342378c10613ea1163d53ae5055ab6a62b6 -DIST libcap-2.33.tar.xz 111280 BLAKE2B 9a34b6e871c6175da5ef665ab7a5ed8b9889f598875f58a6e0b7aef9b6b2737f2a85bb0a6e259a730a3fcea3b8ebbec793b52ee5dec7d11fcf236dfb2148eb83 SHA512 bb5bdc1318b524ee607026038dff7c1c621f1710fa07f8c341b1f86761cb086d32b93d7a12dbe4256d4440ee984143db8659d2679330e221ce184d7048c142b4 DIST libcap-2.34.tar.xz 111556 BLAKE2B 083599a899e5cc8942aedc3c932627d8608ea9cdc4eefe716e5fe2fb195276be26373697aa5bb3e84b801ccabb08f78c44f67ed82ea5c383a7c6a4d86f9e06b4 SHA512 6604aeab3de547e16e3c63e35cf41a5aaacf0cb52ffc818c822ada88595437986df731990d4b288eb72f9150de41fb8a93a6a727b936058e88b49b86352c4771 +DIST libcap-2.36.tar.xz 112612 BLAKE2B fec0997eba7af6e9df83ce91235bdd96e98d7284268f0e3d3f4ef41e7b5e0621649a90069f2a162bcecf387c156ff481be379012fc57bbbc59309b850fe879ae SHA512 0193bd1b1b6223260a629458a37db581a0ff61f1d23f439fd2bdd0e6f3acb30ce996fb0f4f86c59670183d9f42932ae1e817e44e6b64f4ff49d61ea3a4a10aa5 EBUILD libcap-2.26-r2.ebuild 2064 BLAKE2B aa5abfd36287b9c97d2d738b7ee22c79861a657cb59752bb6bf41b3d161db25d87f3440c5458bccd6a0c7912fc96b200a8f8bf37f8c2adcfd635e99a8adf5c44 SHA512 f68fa911a03fe962f0b23851c951d25900f1d61750263763e9b9c8a144aa93070c4018552d3b90cafa72254aa5e459489b6c33d3fb27cebc1fd214b817b253fb EBUILD libcap-2.27.ebuild 2073 BLAKE2B 97374abb2a068288ec1456020d3896bf59ef358715b749e8fd01c6dab55001944f658623aef58b1415cdb434d441728f0b3c264034d6e71850919c71f0f6a29f SHA512 e76a058c37dd0f4eeae4efebba9f92c4c0f3a8cf924a461870795d6405b832124e79031f3f3e4723eca749cdd8795ec9aa022ca257f10b1d7df3d31912983d46 -EBUILD libcap-2.33.ebuild 2145 BLAKE2B ad9e97bd11e1c8830676780717488cd42e3d2f9a38d51efe8ade8ededd48a123962fb5f874030f8b094ff420755aaed2ca21a98720fd86c44ed6acf92b012dcc SHA512 35e5e377045d42ba444d3f7338786c9c981ed771dbe2876a3cd9fa4e0612f56535a58f270f4b06dfc63116a0e4e5fab7b84f47b9269facbb8b60ddb60e5ebf8b EBUILD libcap-2.34.ebuild 2181 BLAKE2B 7ba9a0776b869e13f99e923d6cc81e1b2f6b0f29101149297b91508ca7577bcb56f7c9edb8025ace9928cc805995a6b5373448d3baf3fcecee60edd20042f199 SHA512 991999593030f1af2f999de2d0cdec7973acc915b92b4a6227679194ba5f0ca11f74840c38e813379b07f34cca450b3824133482193f27db9d6b15b285933fef +EBUILD libcap-2.36.ebuild 2181 BLAKE2B 7ba9a0776b869e13f99e923d6cc81e1b2f6b0f29101149297b91508ca7577bcb56f7c9edb8025ace9928cc805995a6b5373448d3baf3fcecee60edd20042f199 SHA512 991999593030f1af2f999de2d0cdec7973acc915b92b4a6227679194ba5f0ca11f74840c38e813379b07f34cca450b3824133482193f27db9d6b15b285933fef MISC metadata.xml 332 BLAKE2B 2177c836192a85a6d943221da405f7f11f355011767789d81009d5e4d822a203302a946fa1a0ffbc66be6a37a7069aa94a796125fa1dedbdf023762b47f8f614 SHA512 a9887500fd60b72156ac2589b1fefab8dd70b0c03477dd795f147fdc91bbe6fd027b8cf58c3e86cdb6e831368d34b4881cdf0e833af5aee9e7d1a01e90408ae1 diff --git a/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch b/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch deleted file mode 100644 index a5d967802317..000000000000 --- a/sys-libs/libcap/files/libcap-2.33-build-system-fixes.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 17e5e3e7f647343dafa701b95628b5160790e2a4 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Wed, 10 Feb 2016 09:47:27 +0100 -Subject: [PATCH] build system fixes - -This touches up the homebrewed build system to work much better "out of the -box" for people. Specifically: - - allow toolchain vars to be set via environment - - CC / BUILD_CC / AR / RANLIB - - CFLAGS / CPPFLAGS / LDFLAGS - - split CPPFLAGS out of CFLAGS - - break -fPIC out of global CFLAGS and only use where needed - - use LDLIBS for libraries, not LDFLAGS - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> - -Forward ported from libcap-2.24 to libcap-2.25 -Forward ported from libcap-2.25 to libcap-2.28 -Forward ported from libcap-2.28 to libcap-2.29 -Forward ported from libcap-2.29 to libcap-2.33 - -Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> ---- - Make.Rules | 27 +++++++++++++++------------ - Makefile | 1 - - libcap/Makefile | 7 ++++--- - pam_cap/Makefile | 8 +++++--- - progs/Makefile | 2 +- - tests/Makefile | 8 +++++--- - 6 files changed, 30 insertions(+), 23 deletions(-) - -diff --git a/Make.Rules b/Make.Rules -index 948435f..5a5184d 100644 ---- a/Make.Rules -+++ b/Make.Rules -@@ -47,35 +47,38 @@ MINOR=33 - # Compilation specifics - - KERNEL_HEADERS := $(topdir)/libcap/include/uapi --IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include -- --CC := gcc # -std=c99 --CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --BUILD_CC := $(CC) --BUILD_CFLAGS := $(CFLAGS) $(IPATH) --AR := ar --RANLIB := ranlib -+ -+CC ?= gcc # -std=c99 -+CFLAGS ?= -O2 -+BUILD_CC ?= $(CC) -+BUILD_CFLAGS ?= $(CFLAGS) -+AR ?= ar -+RANLIB ?= ranlib - DEBUG = -g #-DDEBUG - WARNINGS=-Wall -Wwrite-strings \ - -Wpointer-arith -Wcast-qual -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes \ - -Wnested-externs -Winline -Wshadow - LD=$(CC) -Wl,-x -shared --LDFLAGS := #-g -+LDFLAGS ?= #-g - LIBCAPLIB := -L$(topdir)/libcap -lcap - LIBPSXLIB := -L$(topdir)/libcap -lpsx -lpthread - - BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes) - --SYSTEM_HEADERS = /usr/include -+LIBCAP_CPPFLAGS = -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include -+LIBCAP_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -+CPPFLAGS += $(LIBCAP_CPPFLAGS) -+BUILD_CPPFLAGS += $(LIBCAP_CPPFLAGS) - INCS=$(topdir)/libcap/include/sys/capability.h - LDFLAGS += -L$(topdir)/libcap --CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) -+CPPFLAGS += -Dlinux -+CFLAGS += $(WARNINGS) $(DEBUG) - PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) - INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) - DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) - --GOLANG := $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi) -+GOLANG ?= $(shell if [ -n "$(shell go version 2>/dev/null)" ]; then echo yes ; else echo no ; fi) - ifeq ($(GOLANG),yes) - GOROOT := $(shell go env GOROOT) - GOCGO := $(shell if [ "$(shell go env CGO_ENABLED)" = 1 ]; then echo yes ; else echo no ; fi) -diff --git a/Makefile b/Makefile -index d8cf49c..c0b10a0 100644 ---- a/Makefile -+++ b/Makefile -@@ -16,7 +16,6 @@ endif - ifeq ($(GOLANG),yes) - $(MAKE) -C go $@ - endif -- $(MAKE) -C tests $@ - $(MAKE) -C progs $@ - $(MAKE) -C doc $@ - $(MAKE) -C kdebug $@ -diff --git a/libcap/Makefile b/libcap/Makefile -index c2cb0d1..406dfe5 100644 ---- a/libcap/Makefile -+++ b/libcap/Makefile -@@ -21,6 +21,7 @@ PSXOBJS=$(addsuffix .o, $(PSXFILES)) - MAJLIBNAME=$(LIBNAME).$(VERSION) - MINLIBNAME=$(MAJLIBNAME).$(MINOR) - GPERF_OUTPUT = _caps_output.gperf -+CFLAGS += -fPIC - - all: $(MINLIBNAME) $(STACAPLIBNAME) libcap.pc libpsx.pc $(STAPSXLIBNAME) - -@@ -48,7 +49,7 @@ libpsx.pc: libpsx.pc.in - $< >$@ - - _makenames: _makenames.c cap_names.list.h -- $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ -+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ - - cap_names.h: _makenames - ./_makenames > cap_names.h -@@ -75,10 +76,10 @@ $(MINLIBNAME): $(CAPOBJS) - ln -sf $(MAJLIBNAME) $(LIBNAME) - - %.o: %.c $(INCLS) -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) -- $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ - - cap_test: cap_test.c libcap.h - $(CC) $(CFLAGS) $(IPATH) $< -o $@ -diff --git a/pam_cap/Makefile b/pam_cap/Makefile -index 56604fd..2da4674 100644 ---- a/pam_cap/Makefile -+++ b/pam_cap/Makefile -@@ -3,6 +3,8 @@ - topdir=$(shell pwd)/.. - include ../Make.Rules - -+CFLAGS += -fPIC -+ - all: pam_cap.so - $(MAKE) testlink - -@@ -16,16 +18,16 @@ install: all - # written (and you know why it fails), email me and explain why. Thanks! - - pam_cap.so: pam_cap.o -- $(LD) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS) -+ $(LD) $(CFLAGS) -o pam_cap.so $< $(LIBCAPLIB) $(LDFLAGS) - - pam_cap.o: pam_cap.c -- $(CC) $(CFLAGS) $(IPATH) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - test_pam_cap: test_pam_cap.c pam_cap.c - $(CC) $(CFLAGS) $(IPATH) -o $@ test_pam_cap.c $(LIBCAPLIB) $(LDFLAGS) --static - - testlink: test.c pam_cap.o -- $(CC) $(CFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS) -+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $+ -lpam -ldl $(LIBCAPLIB) $(LDFLAGS) - - test: pam_cap.so - make testlink -diff --git a/progs/Makefile b/progs/Makefile -index 4c24f16..a3bbbd4 100644 ---- a/progs/Makefile -+++ b/progs/Makefile -@@ -23,7 +23,7 @@ $(BUILD): %: %.o $(DEPS) - $(CC) $(CFLAGS) -o $@ $< $(LIBCAPLIB) $(LDFLAGS) - - %.o: %.c $(INCS) -- $(CC) $(IPATH) $(CFLAGS) -c $< -o $@ -+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ - - install: all - mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR) -diff --git a/tests/Makefile b/tests/Makefile -index 3fedeca..3645ddd 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -16,6 +16,8 @@ test: run_psx_test run_libcap_psx_test - - sudotest: test run_libcap_launch_test run_libcap_launch_test - -+CFLAGS += -fPIC -+ - install: all - - run_psx_test: psx_test psx_test_wrap -@@ -23,16 +25,16 @@ run_psx_test: psx_test psx_test_wrap - ./psx_test_wrap - - psx_test: psx_test.c $(DEPS) -- $(CC) $(CFLAGS) $(IPATH) -DNOWRAP $< -o $@ $(LIBPSXLIB) -+ $(CC) $(CFLAGS) $(CPPFLAGS) -DNOWRAP $< -o $@ $(LIBPSXLIB) - - psx_test_wrap: psx_test.c $(DEPS) -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBPSXLIB) -Wl,-wrap,pthread_create - - run_libcap_psx_test: libcap_psx_test - ./libcap_psx_test - - libcap_psx_test: libcap_psx_test.c $(DEPS) -- $(CC) $(CFLAGS) $(IPATH) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static -+ $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBCAPLIB) $(LIBPSXLIB) -Wl,-wrap,pthread_create --static - - run_libcap_launch_test: libcap_launch_test libcap_psx_launch_test noop - sudo ./libcap_launch_test --- -2.25.1 - diff --git a/sys-libs/libcap/libcap-2.33.ebuild b/sys-libs/libcap/libcap-2.36.ebuild index 1242ea1ed916..3546067e15c6 100644 --- a/sys-libs/libcap/libcap-2.33.ebuild +++ b/sys-libs/libcap/libcap-2.36.ebuild @@ -27,7 +27,7 @@ DEPEND="${RDEPEND} RESTRICT="test" PATCHES=( - "${FILESDIR}"/${PN}-2.33-build-system-fixes.patch + "${FILESDIR}"/${PN}-2.34-build-system-fixes.patch "${FILESDIR}"/${PN}-2.28-no_perl.patch "${FILESDIR}"/${PN}-2.25-ignore-RAISE_SETFCAP-install-failures.patch "${FILESDIR}"/${PN}-2.21-include.patch @@ -51,11 +51,13 @@ run_emake() { emake "${args[@]}" "$@" } -multilib_src_compile() { +src_configure() { tc-export AR CC RANLIB - local BUILD_CC tc-export_build_env BUILD_CC + multilib-minimal_src_configure +} +multilib_src_compile() { run_emake } diff --git a/sys-libs/libnih/Manifest b/sys-libs/libnih/Manifest index a11d8dd2b09f..0ee54c1e6f88 100644 --- a/sys-libs/libnih/Manifest +++ b/sys-libs/libnih/Manifest @@ -6,5 +6,5 @@ AUX libnih-1.0.3-pkg-config.patch 393 BLAKE2B 77ed2af4429624e03e86f00cdb58c015f1 AUX libnih-1.0.3-signal-race.patch 1432 BLAKE2B b08b7356d2fae755fbe45b2a45b4081c9e1b27ab5aa3a1f71a6945ced5048bc587883de5b9181887a8124f4fc025bcbea4e668ae0e93d5b97e56f67788dd42a8 SHA512 5bd1ff4d7774db62cb6f54721c3b30b5fba1f085a69b28da12f85f448efacb6efd0dd9b9b61801ceb3fc94ca1616fb898bdce33e873f9e57486e44f26c063ed5 DIST libnih-1.0.3.tar.gz 1187624 BLAKE2B f8f9fcdda86eabff39de0b0f92cd1f8c1c0eeb0c86ec4970e5bef1cc0dff0fda83db64975ece93d5d8ede5d0613d5f363dd7456c59fe966feb5e61e5b8913627 SHA512 fce40d2445b28c27b8838631681ca3206a4f053b2dd4fc488fc9ef98bbd3d933e3d62b82cf346be2ef1677f6457f692cf5544cd915a6bb1e5c618f98ffa101b4 EBUILD libnih-1.0.3-r3.ebuild 1499 BLAKE2B 81ebd631c031c5f18ca79c582cd582c21b5d605e65976c48f0a75623ed0469bee634387ef976f2c8910ac2365c9944cd9cbd960836704908a4af9c6e62fb113e SHA512 845a2a47d3e193f3c09e5c0486252da24c246dccd409b56d702725995ee1845e719c14fa3ecba6916d2f986aed9762e6f0776792d64206a68af1314a4885fc3d -EBUILD libnih-1.0.3-r4.ebuild 1556 BLAKE2B 79b7a02d29bc6e8b3c853be8addbefc6c48a510fb92fb8069db1681c083077065cdce6fe85c690c333ffd11e340a7759c1ab15ec144fdde2c508a3e2012fda94 SHA512 21c2f46eb9c5271e21b86d9361ec06cc71421142969735dd0c65fac685f63aa336d173ccd9b9d22c3d13ce7b9a41388ea199e47a59b5f336a6b455b54f5ea850 +EBUILD libnih-1.0.3-r4.ebuild 1555 BLAKE2B 950ef019b57994e8b2e1b921f0eef8e0af2ccddfb3974a33fe710c26fb2eb8ab4278f7252a3662aba2dca682ecbd3be7cf6e28adde89d28588df1ea2d09409fe SHA512 d8f2060c866dc2f04cb89dd59c68e1e40d35922493baa25a853e07cdeb19e5ab008dbd5caa2898c4f283ef863509dfefd418f3b928cec7fb64e843f3b939d9df MISC metadata.xml 241 BLAKE2B 02f7c7b912751df8725055416a093647e79dfdbf7f06c9f56246c67f6a1176997454dd3aaaa493ecf7d00d8ae295066e2861ac10bee860a94eef6085437561af SHA512 31e21c0bed310c4a025385f24c5b76f2e588999912fa548ca343947d95ad448b3a1232211cd4427607550c0f5de2e562e2b4e492415b6d207c954a516b811a84 diff --git a/sys-libs/libnih/libnih-1.0.3-r4.ebuild b/sys-libs/libnih/libnih-1.0.3-r4.ebuild index c59946540be9..e391515b3bb0 100644 --- a/sys-libs/libnih/libnih-1.0.3-r4.ebuild +++ b/sys-libs/libnih/libnih-1.0.3-r4.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc ~x86" IUSE="+dbus nls static-libs +threads" # The configure phase will check for valgrind headers, and the tests will use diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest index 59098741d650..42df52d2e769 100644 --- a/sys-libs/liburing/Manifest +++ b/sys-libs/liburing/Manifest @@ -1,5 +1,5 @@ DIST liburing-0.5.tar.bz2 75525 BLAKE2B 7b58a59212a6c3527c0adfc102add73dc875885bcdcd6ba9dcd64020d6c8f277b5cc0e1d33860aab0d9495f0409461278175aed7483aa9c44d3c7f78b1238920 SHA512 70202f25fad89787c5c0f0022dddebd3f5ff8eb572ec50c36cc3980f291b456de445c1cf411761be1438e22c69bdb446e1e5b3c10317ec00cb3412a63508faa4 DIST liburing-0.6.tar.bz2 81429 BLAKE2B f905238a324d5e3f4fd0c572aa7db7a2c337aea282175d2a0f89802588d3900d2fb3ef8d6787aea38a406f1ccc57bf143864b708a4716783b09d4208164d2d99 SHA512 07fb0f61cc1d204bd340ef55ec65579a718ca266e4b9c8cdd6e47ae06defa3a9521e83fb3e6ed7c8910f52428dd62f4af900c4ec13c3509c7e366b4c13e7feb5 -EBUILD liburing-0.5.ebuild 942 BLAKE2B 0bb5394e342b9bf6fd740a0079ee47853f62b90a68822fcc30d84ac45f53716c8ed4828ed5d54db560b81c11fc9f8685b1e5fcdfb1bb7a61b502c9def21e8164 SHA512 630e1131259f6795b6c4641cc5d5ce410e7eda225d26205d816f77aca75354e75e4963eb3e3dd3a73d20fba37a2b402a861ec63c5ce086aac5a53aeed24a999c -EBUILD liburing-0.6.ebuild 942 BLAKE2B 0bb5394e342b9bf6fd740a0079ee47853f62b90a68822fcc30d84ac45f53716c8ed4828ed5d54db560b81c11fc9f8685b1e5fcdfb1bb7a61b502c9def21e8164 SHA512 630e1131259f6795b6c4641cc5d5ce410e7eda225d26205d816f77aca75354e75e4963eb3e3dd3a73d20fba37a2b402a861ec63c5ce086aac5a53aeed24a999c +EBUILD liburing-0.5.ebuild 991 BLAKE2B 9c781b011d0c89fbe6cf03902d1e0ede7fff1da5a30d988d4b38bc0618cea53a0caaae994c7c16e9fa5a4c17d0ed0705aa93b3613392b54b81647d082d7974a2 SHA512 97a4df55e63fdc33e244a5893027eb586355b551175b47cdc3656421d40d98865998e6d5fbf7eaec24d582075c37da79eb89a9821c5059643db9fdcaf932e8b4 +EBUILD liburing-0.6.ebuild 991 BLAKE2B 9c781b011d0c89fbe6cf03902d1e0ede7fff1da5a30d988d4b38bc0618cea53a0caaae994c7c16e9fa5a4c17d0ed0705aa93b3613392b54b81647d082d7974a2 SHA512 97a4df55e63fdc33e244a5893027eb586355b551175b47cdc3656421d40d98865998e6d5fbf7eaec24d582075c37da79eb89a9821c5059643db9fdcaf932e8b4 MISC metadata.xml 330 BLAKE2B 9999abbe311550c99eac0de3e7942a37bab51413090b5ca192c0deeac61e3b0d3017a0c05650a433041e1589a6518539ea6686494cd9f57d787ab7519caa78fd SHA512 fe3f892ef7bea57e0c2889ef07f25a8f4230bd54484c73c8c00685a5a05d269271513b7235bf15dcb594b2e18e5e7d638d5d37c4b4563449dc6af1afbacec1c3 diff --git a/sys-libs/liburing/liburing-0.5.ebuild b/sys-libs/liburing/liburing-0.5.ebuild index e79816781b8e..3d71e8bd7549 100644 --- a/sys-libs/liburing/liburing-0.5.ebuild +++ b/sys-libs/liburing/liburing-0.5.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="static-libs" src_prepare() { @@ -32,7 +32,7 @@ multilib_src_configure() { } multilib_src_compile() { - emake V=1 + emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" } multilib_src_install_all() { diff --git a/sys-libs/liburing/liburing-0.6.ebuild b/sys-libs/liburing/liburing-0.6.ebuild index e79816781b8e..3d71e8bd7549 100644 --- a/sys-libs/liburing/liburing-0.6.ebuild +++ b/sys-libs/liburing/liburing-0.6.ebuild @@ -11,7 +11,7 @@ SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="static-libs" src_prepare() { @@ -32,7 +32,7 @@ multilib_src_configure() { } multilib_src_compile() { - emake V=1 + emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" } multilib_src_install_all() { diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest index 4fa7a2f622b9..ba157ea6f15d 100644 --- a/sys-libs/ncurses/Manifest +++ b/sys-libs/ncurses/Manifest @@ -11,5 +11,5 @@ DIST ncurses-6.1.tar.gz 3365395 BLAKE2B 1248a5088bc982d0880cb9550b1192457f6f6249 DIST ncurses-6.2.tar.gz 3425862 BLAKE2B 6680cd7a369a4cb8234442a70869c283f0db6db9d7da1da2a7a5c519eb862a2c9b9411957d99f9ebb5089cad00b42e1ca6bc0784327461113df2eeaec695913c SHA512 4c1333dcc30e858e8a9525d4b9aefb60000cfc727bc4a1062bace06ffc4639ad9f6e54f6bdda0e3a0e5ea14de995f96b52b3327d9ec633608792c99a1e8d840d EBUILD ncurses-6.1_p20181020.ebuild 9293 BLAKE2B 8ce72eed16d81cd82a9e588782b1a2d09840f7a95a7a0358dec0fe9b77a4f46d3d50fe9ba55867b45270999f269b29ec985e1c79e6ed983a9d55a7bf1194ec20 SHA512 281e363326b0f92b0d9dc0c8e753bfec38ac6bfabca490871fda8ca7fa8f6850f7c08e647263ed8e9389370f3fde2c3c0ea5ffeee93acb629e6593d0831aa595 EBUILD ncurses-6.1_p20190609.ebuild 9489 BLAKE2B bb0bca320c2d4d651b8176049694e2db185f28d5d150b994be8da1b571e20396cf77b95abb9c70fe09c1b2c1a298484f09358ac5fdf364de03e7f1053dc06ad7 SHA512 45aeccee896cf01e9efcc605b849a2c96b90f538d29fe4ffe8d5430b718c7bf73cf17ae4efcf74173fa1425957b8bf0a668ad107f88b9d8293ae5d81303e1d7e -EBUILD ncurses-6.2-r1.ebuild 9545 BLAKE2B 4cb494e0edbfe2c661fc8ff62cc74fca856d351c6cee9151711de00b52b96cb852207a7887c268c101402376fb11be140e5a16af3f92c79b9d459372b5ddac2d SHA512 00ed5b543f3f8625e781bf6967bf932c0a3865f3b8fb0236a1c6631a783dfbad04ffd329a9ecb3f2f7087e7ae5b016d374515c317b8029f5fb97a4143a4de67f +EBUILD ncurses-6.2-r1.ebuild 9544 BLAKE2B 0820025fec160513a4e8db5d1f249c6bdbf32ba992385189a8539630695d1ed65407dfa25f65ceec272c3beccde5d3576f293eeb2002f68a5a8ac48f9ff922ec SHA512 96bda407ac56dd6814fcf51361aeeeb6eca440590496f64647b4b386d5534438c2f026219093fdd2df9b471e72bdec5c62b10d701fe7be72618dd35f82ddc359 MISC metadata.xml 696 BLAKE2B 00deabf0f9a310870a8080425ee4df0e581c6871565f5f3c42c823f51bb4fabac4a8980e371f2bd142a982b6369527bee184ecb941e5d5f31697a871cd0a8237 SHA512 ff73226dc25e761ad9106768fc7ad0d2c40b6fefd3beced9ba5dfcc31a499220408fb2f2a6fd8aa53bb360398154a3653bf0e0ddb16c4ef4e5e89fe60752b7b5 diff --git a/sys-libs/ncurses/ncurses-6.2-r1.ebuild b/sys-libs/ncurses/ncurses-6.2-r1.ebuild index 4e5ee6bf3719..e9bdde4156dd 100644 --- a/sys-libs/ncurses/ncurses-6.2-r1.ebuild +++ b/sys-libs/ncurses/ncurses-6.2-r1.ebuild @@ -19,7 +19,7 @@ fi LICENSE="MIT" # The subslot reflects the SONAME. SLOT="0/6" -KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86" IUSE="ada +cxx debug doc gpm minimal profile static-libs test threads tinfo trace unicode" RESTRICT="!test? ( test )" diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest index ed1f3b52bcf7..a138cf9a501f 100644 --- a/sys-libs/pam/Manifest +++ b/sys-libs/pam/Manifest @@ -1,6 +1,9 @@ AUX pam-remove-browsers.patch 985 BLAKE2B 3e258e00f7287436b1b6a97323764612a3098dc4effb12e62cd8d55151ace2b97b6ea7b67ae33613aa6b3cca318bfbfc310b48a99b0c81e1beaa9d16188e69eb SHA512 42d89d35fc754e51112040a5468067ee9f6a3a411e538cb634187e28975040c0b7ef48fab166ec6a20a849f6ed9d74a069355269cf708d9985ded6b87fe13ed1 DIST pam-1.3.1.tar.gz 749997 BLAKE2B 3b44c41daaa5810c53e3e2baeac1ab58463768fde433f874b9bd09c7c28cfd55e0f227c9a0c318e66444a3adb23c112a2db32d5c7211b07c84c2d4600a47ca5c SHA512 0c5019493b2ac42180ee9c4974a51329a2395a44f5f892c1ca567ec9b43cc3a9bce0212861d4dfb82eb236c5eaa682b27189ce672ed6cafa37d8801d059a944d +DIST pam-1.4.0-doc.tar.xz 48080 BLAKE2B 48cec348c3db7ecae6ea85934fa242d908643d0a8f6d1789a8aac3b254dc21439e11066f9ff2a7238e61e5d16c41a6c49a26dbc7351fe7eb0a1fef4a2f69378e SHA512 634cbb1b948a2b1431b9ef219a4e9e63e870b34520665170f55aca10e65cd46f0c190697cafd18a42caeaec26299f63fd8ad794ae379648e767d8481af6c36f2 +DIST pam-1.4.0.tar.gz 804586 BLAKE2B 941925677c19f0a77a4fbc29f723706d5eb31b4020b0d35732ae3c00e5a623c943ea784e11aef1c2d5092d2a7fbe1724eeefa45d8d8ebd8a053a39f01a8b541c SHA512 16003f5c118125aeabf22503bc328a4bdd68b3af35d70b608a8b261adbaffae58ce490765f246c469b2ffbff67bd5216e0586ece0eb934905074423a990c2f98 DIST pam-4dd9b97b762cc73816cb867d49c9d0d0b91d642c.tar.gz 765455 BLAKE2B 8a8543b51c9fa877cd48d483d9af489df00376f92f26fea648d38a0ce3168702888a662e5d3c7423cce8a5d56896e84e4c1829e56d08fca8c3ab878b20945a7d SHA512 bdb236a47a5810449fb96546ff89d70dec185a215b0d047178a12e40945fde4ffdb801dbbd87ff95eead1bb7acb4748333a2d3383881d5de0dbd89ec5ceddd3f EBUILD pam-1.3.1-r2.ebuild 3342 BLAKE2B a9c03e5ae1005b63f416b3778de5e6a4cfc02fde311aa3ff1bc41b459fd39d464afe43561934885abe1f19c1e98075bfc4071843d9ccb89026b376a52985a5be SHA512 1c7d78bc680eb1025b41b8e724b2e59eaceccccef6cbb57a6887a268a21e49a813f75e16f7d3f7a2b3f20b402453a0e9a42b99e8f7ee252c6af88601dc6bbb53 EBUILD pam-1.3.1_p20200128-r1.ebuild 3551 BLAKE2B aa6581a5d90745c4a195e2516c73cc9ef25b768bbb7cc3ff4dcb2e7a86276916a44276aa002fdc7f96524a63484d3feb5370bcaeb5823c399e5e26dffff94200 SHA512 5ee4e9449e15fd5d113299cee9bd19210e837f4a72e6c4b01c7bcf97d85ac3415813d2ded97711b11df1b437e7740dabc91d3cb5a0df74b586de95eb3716a89b +EBUILD pam-1.4.0.ebuild 3604 BLAKE2B fd67cc30dfa80bfd479d8de6725e512a9b91ba1fdea30239048850d46acfa2d63ddbcfa7012e23f1ac0b833588b441001d5f614223427c01ce277c80a0443c09 SHA512 4c2192a36db1e575b88623ec52eca8953dedc07483ce756715d22d1168018511bd548c26d31af3473c495aa87f020160cc65d182cae6dd4fcb21a227b06d8a39 MISC metadata.xml 1086 BLAKE2B 39d2291ff9553394ce684a87a49a2c41b18689102d8cf352c905ce2ede28508501aa41a4a473d287c461b77e5732aa4ed0eaac94db94c851ed9491bffdac8acf SHA512 6743a2021ef7d7ab9fc547b270c17b205747a498e0e2bafc07ad171d52657a4aa3f84803c2b4e5c088b73b1732d600b5b2189c958d4b15fba8e081714790fc72 diff --git a/sys-libs/pam/pam-1.4.0.ebuild b/sys-libs/pam/pam-1.4.0.ebuild new file mode 100644 index 000000000000..3583a5ca60aa --- /dev/null +++ b/sys-libs/pam/pam-1.4.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools db-use fcaps multilib-minimal toolchain-funcs usr-ldscript + +DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)" +HOMEPAGE="https://github.com/linux-pam/linux-pam" + +SRC_URI="https://github.com/linux-pam/linux-pam/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~zlogene/distfiles/${CATEGORY}/${PN}/${P}-doc.tar.xz" + +LICENSE="|| ( BSD GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="audit berkdb debug nis +pie selinux static-libs" + +BDEPEND=" + dev-libs/libxslt + sys-devel/flex + sys-devel/gettext + virtual/pkgconfig[${MULTILIB_USEDEP}]" + +DEPEND=" + virtual/libcrypt:=[${MULTILIB_USEDEP}] + >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] + audit? ( >=sys-process/audit-2.2.2[${MULTILIB_USEDEP}] ) + berkdb? ( >=sys-libs/db-4.8.30-r1:=[${MULTILIB_USEDEP}] ) + selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) + nis? ( >=net-libs/libtirpc-0.2.4-r2[${MULTILIB_USEDEP}] )" + +RDEPEND="${DEPEND}" + +PDEPEND="sys-auth/pambase" + +S="${WORKDIR}/linux-${P}" + +src_prepare() { + default + touch ChangeLog || die + eautoreconf +} + +multilib_src_configure() { + # Do not let user's BROWSER setting mess us up. #549684 + unset BROWSER + + # Disable automatic detection of libxcrypt; we _don't_ want the + # user to link libxcrypt in by default, since we won't track the + # dependency and allow to break PAM this way. + + export ac_cv_header_xcrypt_h=no + + local myconf=( + --with-db-uniquename=-$(db_findver sys-libs/db) + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog + --enable-securedir="${EPREFIX}"/$(get_libdir)/security + --includedir="${EPREFIX}"/usr/include/security + --libdir="${EPREFIX}"/usr/$(get_libdir) + --exec-prefix="${EPREFIX}" + --disable-prelude + --disable-cracklib + --disable-tally + --disable-tally2 + --disable-doc + --disable-regenerate-docu + $(use_enable audit) + $(use_enable berkdb db) + $(use_enable debug) + $(use_enable debug Werror) + $(use_enable nis) + $(use_enable pie) + $(use_enable selinux) + $(use_enable static-libs static) + --enable-isadir='.' #464016 + ) + ECONF_SOURCE="${S}" econf ${myconf[@]} +} + +multilib_src_compile() { + emake sepermitlockdir="${EPREFIX}/run/sepermit" +} + +multilib_src_install() { + emake DESTDIR="${D}" install \ + sepermitlockdir="${EPREFIX}/run/sepermit" + + gen_usr_ldscript -a pam pam_misc pamc +} + +multilib_src_install_all() { + find "${ED}" -type f -name '*.la' -delete || die + + dodir /usr/lib/tmpfiles.d + cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}-:${SLOT}.conf <<EOF +d /var/run/faillock 0755 root root - +EOF + + if use selinux; then + cat - >> "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF +d /run/sepermit 0755 root root +EOF + fi + + for i in "${WORKDIR}"/${P}-doc/*; do + doman ${i} + done +} + +pkg_postinst() { + ewarn "Some software with pre-loaded PAM libraries might experience" + ewarn "warnings or failures related to missing symbols and/or versions" + ewarn "after any update. While unfortunate this is a limit of the" + ewarn "implementation of PAM and the software, and it requires you to" + ewarn "restart the software manually after the update." + ewarn "" + ewarn "You can get a list of such software running a command like" + ewarn " lsof / | egrep -i 'del.*libpam\\.so'" + ewarn "" + ewarn "Alternatively, simply reboot your system." + + # The pam_unix module needs to check the password of the user which requires + # read access to /etc/shadow only. + fcaps cap_dac_override sbin/unix_chkpwd +} diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index e874c6d8607e..2a35d40ca01c 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -28,6 +28,5 @@ DIST readline80-003 2158 BLAKE2B d8910aef1b796a59500b255df8db71ad1738dd164fd6982 DIST readline80-004 1275 BLAKE2B ac260bab163f17ccc783e0c2a21351b05e9e86ad973383d228d10ec749f265df8588c38946c9da15e987192b50f1bcb81141c2f4e171f65455f58521e864a534 SHA512 301ced2361e7583468f9932038936387a016c20d1c41966658a78c7f7c48c70308bf66b3228de0a3c6fc880427b6a90ee1ac4d2693daed432e5ae970671a7461 EBUILD readline-6.3_p8-r3.ebuild 4382 BLAKE2B 40f4d50108b38fea8c04c4d21d7f2d0166c903e4094b55a1878c230e8aa2dbe53c482e6ac0bd7173444aabf05e384b322852f06b8959b281c5cda7e561692540 SHA512 756f195d204a9ff3bc942ded6767db0afe8fb4186ffb86b66d8ac77262cc32834a34877a05d6903ae5da399562c596e3eab7641fb950bb7a97bd87261ce534d7 EBUILD readline-7.0_p5-r1.ebuild 4873 BLAKE2B 3906ef2e23648e451512d7a9b7020b1185f098ca6e6f0d99a8939bc768f73fc90b3db227f861d3816102fe2cb4f950b456004ed333b325dda872a6cf88f148b0 SHA512 9c72e370630bb34d98c65bcdf8a4e9d5b064ac9237c67eda268f41d1ef2c3f0a5b8109b746b987cded1fc6807ac3c025a4b124bfe9910a01f07da5d12b8106a8 -EBUILD readline-8.0_p1-r1.ebuild 4852 BLAKE2B d7030926a429ed544cc522a1a6d7dfe3f478bb0b2a7839afd88921f40d44e9e608b9ba07663366f11f70c7a8f5b778f3ae4049bfc43b498c290475387e306a71 SHA512 5b2afd0c8cfe07af987fca735186d04abb6d5780d74e5448ac17dec67e1ecc23b865c6e9e88e873a505e8d940eeb242f76ae5a64bde0e4c8f0af89316ea9e085 -EBUILD readline-8.0_p4.ebuild 4844 BLAKE2B 866a75409baab0c750fb472b8cb78fefc0884d68b6e4f4f489ac6cb8e82c8eee8c1e64d4a4314051afd8b396785f5ca7756f95b53ffb60f4808348a2e7f7ae9e SHA512 b26c7ebd0092b7172e75cdaf15be0020acf3b4cbc2e20973a7e175a63839a72e6e6952f242b71222a75ea7bb82ac58f5b7aa643b117f99ee403863b5760fd633 +EBUILD readline-8.0_p4.ebuild 4843 BLAKE2B 4466c69c466200c3da9528b4456c69c86d46ace2dd7fb98183e8a42a8e956d0a4a597db0c3658396dea9f0cb57e40dd7926a2ea83e8388c430fb3d145e7635a2 SHA512 0b768071df2aabb2ec3381c13fbb6a0ff30ae9da8471c37f93daf96aa6a2fda652864feddca458e10e28f4d595041575db3da118928251394b623f05d48d6458 MISC metadata.xml 472 BLAKE2B 8d3717ac6980105677b10449a1aabca9f9347066f73802241b904101172690bb789b8071f3670dd91ad2af0223c7bc5fb4ed594dc8af3aff20b17bdd681f7630 SHA512 f19a6f0d6aed18903778adc5ad45fdae39c4388e4f09e7cb8a110b798e8cc7ab1739ff813a227ad08ef1166309e1ead57c200b7fe42499a06db97af9f4bce173 diff --git a/sys-libs/readline/readline-8.0_p1-r1.ebuild b/sys-libs/readline/readline-8.0_p1-r1.ebuild deleted file mode 100644 index 25d7fd3844cf..000000000000 --- a/sys-libs/readline/readline-8.0_p1-r1.ebuild +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic multilib-minimal preserve-libs toolchain-funcs usr-ldscript - -# Official patches -# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ -PLEVEL="${PV##*_p}" -MY_PV="${PV/_p*}" -MY_PV="${MY_PV/_/-}" -MY_P="${PN}-${MY_PV}" -[[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - done - fi -} - -DESCRIPTION="Another cute console display library" -HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" - -case ${PV} in - *_alpha*|*_beta*|*_rc*) - SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" - ;; - *) - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" - ;; -esac - -LICENSE="GPL-3" -SLOT="0/8" # subslot matches SONAME major -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="static-libs +unicode utils" - -RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -BDEPEND=" - virtual/pkgconfig -" - -S="${WORKDIR}/${MY_P}" - -PATCHES=( - "${FILESDIR}"/${PN}-5.0-no_rpath.patch - "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 - "${FILESDIR}"/${PN}-7.0-headers.patch - "${FILESDIR}"/${PN}-8.0-headers.patch -) - -# Needed because we don't want the patches being unpacked -# (which emits annoying and useless error messages) -src_unpack() { - unpack ${MY_P}.tar.gz -} - -src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) - default - - # Force ncurses linking. #71420 - # Use pkg-config to get the right values. #457558 - local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) - sed -i \ - -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ - support/shobj-conf || die - sed -i \ - -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ - examples/rlfe/configure || die - - # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated - # objformat for years, so we don't want to rely on that. - sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die - - ln -s ../.. examples/rlfe/readline || die # for local readline headers -} - -src_configure() { - # fix implicit decls with widechar funcs - append-cppflags -D_GNU_SOURCE - # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html - append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free - - # Make sure configure picks a better ar than `ar`. #484866 - export ac_cv_prog_AR=$(tc-getAR) - - # Force the test since we used sed above to force it. - export bash_cv_termcap_lib=ncurses - - # Control cross-compiling cases when we know the right answer. - # In cases where the C library doesn't support wide characters, readline - # itself won't work correctly, so forcing the answer below should be OK. - if tc-is-cross-compiler ; then - use kernel_Winnt || export bash_cv_func_sigsetjmp='present' - export bash_cv_func_ctype_nonascii='yes' - export bash_cv_wcwidth_broken='no' #503312 - fi - - # This is for rlfe, but we need to make sure LDFLAGS doesn't change - # so we can re-use the config cache file between the two. - append-ldflags -L. - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myeconfargs=( - --cache-file="${BUILD_DIR}"/config.cache - --with-curses - $(use_enable static-libs static) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - mkdir -p examples/rlfe || die - cd examples/rlfe || die - ECONF_SOURCE="${S}"/examples/rlfe \ - econf --cache-file="${BUILD_DIR}"/config.cache - fi -} - -multilib_src_compile() { - emake - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - cd examples/rlfe || die - local l - for l in readline history ; do - ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die - ln -s ../../lib${l}.a lib${l}.a || die - done - emake - fi -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - gen_usr_ldscript -a readline history #4411 - - if use utils && ! tc-is-cross-compiler; then - dobin examples/rlfe/rlfe - fi - fi -} - -multilib_src_install_all() { - HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs - dodoc USAGE - docinto ps - dodoc doc/*.ps -} -pkg_preinst() { - # bug #29865 - # Reappeared in #595324 with paludis so keeping this for now... - preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} -} - -pkg_postinst() { - preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} -} diff --git a/sys-libs/readline/readline-8.0_p4.ebuild b/sys-libs/readline/readline-8.0_p4.ebuild index e4a3c770fea7..89d0c6f52b78 100644 --- a/sys-libs/readline/readline-8.0_p4.ebuild +++ b/sys-libs/readline/readline-8.0_p4.ebuild @@ -41,7 +41,7 @@ esac LICENSE="GPL-3" SLOT="0/8" # subslot matches SONAME major -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="static-libs +unicode utils" RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" diff --git a/sys-libs/uclibc-ng/Manifest b/sys-libs/uclibc-ng/Manifest index fd0de3716738..75be2d464bc0 100644 --- a/sys-libs/uclibc-ng/Manifest +++ b/sys-libs/uclibc-ng/Manifest @@ -5,6 +5,6 @@ DIST uClibc-ng-1.0.32.tar.bz2 2352471 BLAKE2B 887b67f7f03fc8610d8236a18f90584720 DIST uClibc-ng-1.0.33.tar.bz2 2399235 BLAKE2B c20fd767487b2f24a0af432a1366bfb6ddf02243495d2f1c3fa95db25551a8d6215be184608528ee544661ec2ddbc2f439299245ff3dff4597b376dc7a4658ec SHA512 cab89fb6a6e314c6cc8ac964604bdfae01d2e45dc71678bbb6a8985871f625ac680fec3ddc1cb29f6d15585b7fcb782eaf40fa6c89207cde2a04286c3d610169 EBUILD uclibc-ng-1.0.30-r1.ebuild 10333 BLAKE2B ffa5feeb97445afc2e383dedcc1bc9a323c555f6e6804bc5a36fc94fffd61ae1924de915dd502c0201bf05c458a8ccdb855cfd823392bdf9414fcb168834c035 SHA512 f58101bbdc06e4c8f1174bd03eec3cb0618f348960f4e9c920d9e5a96a48b57077248e47899b31280f23aedb0a359400a89faabff9371bdb07a9987b1e1fd659 EBUILD uclibc-ng-1.0.32.ebuild 10283 BLAKE2B c62bcdc2976c3856b1588521df51b4cc73aecb4f7d071345fa73e4eae56590affdfe2bb6a6dfbb5502c737f96e91629e52150684a9287c4bd0d6f53ab1af2c7c SHA512 21140aa3c9f86262f6a5a7d3c44115fd1ab515966c27d54edb2db535cdd82bd1b7cb4ff2555261082d2a66f7466b257851bede3a2b36cd6da4adfd69e2244b0e -EBUILD uclibc-ng-1.0.33.ebuild 10290 BLAKE2B 63ddacde22ec6e60279750af73c265591c74a3b317ff45c4e0ca775ba43c4a7e57d76c8f0ef7c05ffa89f09ccecef9aa8531f57106811e2f82f4c7ac5e8febc2 SHA512 5ecc9d58896f3e65cc74c22a4eb330f708cdd3637d8b4c622c3d5e8393f55a2c0363bcc8089b40134afc62a341cc5a748236b7a1dddd7750b206c55214b25bb5 +EBUILD uclibc-ng-1.0.33.ebuild 10289 BLAKE2B 60b576b1bc404fa3b2785c62117e8cb51642db55b352d372e1327ac42a4571802711574bef3ff8e21f4285df0efdf511a85b535e82cc1ea258e37107d91a9b3b SHA512 44b0782d2e914b3f05cff2e34f1c94176cb340d8940efeb2b0f0d3719c12adf9a61d540ee722835eb4370ead2c7326a6b34ade1c55d6a821002c7286fc023327 EBUILD uclibc-ng-9999.ebuild 10291 BLAKE2B eb05c3ddf01a6654dde891395cf530662f6310ad1d20743f27a63f8c019a06ab06d84a7cb7e4a961de4575a574b9bc74779b96d292d73d31a5b9e07ef9c47a63 SHA512 19254a93c71a4d5bc3eea3f3d49b0f507fa28770c8e88265a461f3826f09f2e58318500c75e9d6a8f4dcd4d171ceb0c1edd2a9cf892cd768c93a726f60e3b0e5 MISC metadata.xml 790 BLAKE2B b48396e1f8dca79f2b9e452982007573959e89ab8467e2c0d65863a0c00dee140f9a7a5a4f02c916da76018dacdcd9993434c30ba0a511888248f83a9c063e7f SHA512 a8e955511974be64f2360c16a883eec4b9450eebb393bee5f97b50e233275de1cce62e2ef3b9945174a9dca19a7f30aaab6e90c5c28f283c378709eb3fab3ac4 diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild index 6f884b80c8ca..4dd7db70cc0f 100644 --- a/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild +++ b/sys-libs/uclibc-ng/uclibc-ng-1.0.33.ebuild @@ -18,7 +18,7 @@ HOMEPAGE="https://uclibc-ng.org/" if [[ ${PV} != "9999" ]] ; then PATCH_VER="" SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2" - KEYWORDS="-* amd64 ~arm ~mips ~ppc ~x86" + KEYWORDS="-* amd64 ~arm ~mips ~ppc x86" fi LICENSE="LGPL-2" |