From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 479F21382C5 for ; Sat, 20 Jan 2018 18:13:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 564CBE08A2; Sat, 20 Jan 2018 18:13:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2515BE088C for ; Sat, 20 Jan 2018 18:13:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 949F2335C2C for ; Sat, 20 Jan 2018 18:13:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2C8C11C0 for ; Sat, 20 Jan 2018 18:13:25 +0000 (UTC) From: "Andreas Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Hüttel" Message-ID: <1516471986.45d742aedff0cfa1b1c87ea8856a47b61188a1f1.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/glibc/glibc-9999.ebuild X-VCS-Directories: sys-libs/glibc/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas Hüttel X-VCS-Revision: 45d742aedff0cfa1b1c87ea8856a47b61188a1f1 X-VCS-Branch: master Date: Sat, 20 Jan 2018 18:13:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 51afb588-b204-41b3-af86-84216a004f2e X-Archives-Hash: 75ec6a54286520d6073c4c4858e91caa commit: 45d742aedff0cfa1b1c87ea8856a47b61188a1f1 Author: Andreas K. Hüttel gentoo org> AuthorDate: Sat Jan 20 18:05:27 2018 +0000 Commit: Andreas Hüttel gentoo org> CommitDate: Sat Jan 20 18:13:06 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45d742ae sys-libs/glibc: Restructure sanity tests Package-Manager: Portage-2.3.19, Repoman-2.3.6 sys-libs/glibc/glibc-9999.ebuild | 125 ++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 74 deletions(-) diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 81dadb17794..224a4f232d0 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -574,49 +574,10 @@ get_kheader_version() { tail -n 1 } -check_nptl_support() { - # We don't care about the compiler here as we aren't using it - just_headers && return - - local run_kv build_kv want_kv - - run_kv=$(g_get_running_KV) - build_kv=$(g_int_to_KV $(get_kheader_version)) - want_kv=${MIN_KERN_VER} - - ebegin "Checking gcc for __thread support" - if ! eend $(want__thread ; echo $?) ; then - echo - eerror "Could not find a gcc that supports the __thread directive!" - eerror "Please update your binutils/gcc and try again." - die "No __thread support in gcc!" - fi - - if ! is_crosscompile && ! tc-is-cross-compiler ; then - # Building fails on an non-supporting kernel - ebegin "Checking running kernel version (${run_kv} >= ${want_kv})" - if ! eend_KV ${run_kv} ${want_kv} ; then - echo - eerror "You need a kernel of at least ${want_kv}!" - die "Kernel version too low!" - fi - fi - - ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" - if ! eend_KV ${build_kv} ${want_kv} ; then - echo - eerror "You need linux-headers of at least ${want_kv}!" - die "linux-headers version too low!" - fi -} - -# -# the phases -# - -# pkg_pretend - -pkg_pretend() { +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we can call this function both in pkg_pretend +# and in src_configure. +sanity_prechecks() { # Make sure devpts is mounted correctly for use w/out setuid pt_chown check_devpts @@ -635,9 +596,6 @@ pkg_pretend() { eerror " Downgrading glibc is not supported and a sure way to destruction." die "Aborting to save your system." fi - - # removed check for #262698 since it's about kernel 2.6.18 ... - # removed check for #279260 since it's about kernel <2.6.28 ... fi # Users have had a chance to phase themselves, time to give em the boot @@ -663,30 +621,6 @@ pkg_pretend() { use hardened && ! tc-enables-pie && \ ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" - # Make sure host system is up to date #394453 - if has_version '= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then + echo + eerror "You need a kernel of at least ${want_kv}!" + die "Kernel version too low!" + fi + fi + + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then + echo + eerror "You need linux-headers of at least ${want_kv}!" + die "linux-headers version too low!" + fi + fi +} + + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + # All the checks... + einfo "Checking general environment sanity." + sanity_prechecks } # todo: shouldn't most of these checks be called also in src_configure again? # (since consistency is not guaranteed between pkg_ and src_) @@ -729,10 +710,6 @@ src_unpack() { setup_env - # Check NPTL support _before_ we unpack things to save some time - check_nptl_support - # todo: 1) move this to pkg_pretend? 2) use proper functions for kv - if [[ -n ${EGIT_REPO_URI} ]] ; then git-r3_src_unpack else