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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C9F49158020 for ; Sat, 19 Nov 2022 09:26:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 55567E092D; Sat, 19 Nov 2022 09:24:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1023DE0929 for ; Sat, 19 Nov 2022 09:24:53 +0000 (UTC) From: Matthew Smith To: gentoo-dev@lists.gentoo.org Cc: Matthew Smith Subject: [gentoo-dev] [PATCH 4/4] waf-utils.eclass: set PYTHONHASHSEED environment variable Date: Sat, 19 Nov 2022 09:23:58 +0000 Message-Id: <20221119092358.280588-5-matthew@gentoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221119092358.280588-1-matthew@gentoo.org> References: <20221119092358.280588-1-matthew@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: e81b4c06-f016-44c5-9f13-d01e1e805924 X-Archives-Hash: 284b4ce8e8225cf6925b59d45dc89b8b waf relies on Python set order, so let's make it consistent to avoid brittle builds. Added into existing phase functions instead of pkg_setup to retain compatibility with existing ebuilds. Signed-off-by: Matthew Smith --- eclass/waf-utils.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 66041fc3f60..3ff74db0d79 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -95,6 +95,7 @@ waf-utils_src_configure() { tc-export AR CC CPP CXX RANLIB local CMD=( + PYTHONHASHSEED=1 CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" PKGCONFIG="$(tc-getPKG_CONFIG)" @@ -119,6 +120,8 @@ waf-utils_src_compile() { local _mywafconfig [[ ${WAF_VERBOSE} == ON ]] && _mywafconfig="--verbose" + export PYTHONHASHSEED=1 + local jobs="--jobs=$(makeopts_jobs)" echo "\"${WAF_BINARY}\" build ${_mywafconfig} ${jobs} ${*}" "${WAF_BINARY}" ${_mywafconfig} ${jobs} "${@}" || die "build failed" @@ -130,6 +133,8 @@ waf-utils_src_compile() { waf-utils_src_install() { debug-print-function ${FUNCNAME} "$@" + export PYTHONHASHSEED=1 + echo "\"${WAF_BINARY}\" --jobs=1 --destdir=\"${D}\" ${*} install" "${WAF_BINARY}" --jobs=1 --destdir="${D}" "${@}" install || die "Make install failed" -- 2.38.1