From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kEP9OIqR4WU0RAAA62LTzQ:P1 (envelope-from ) for ; Fri, 01 Mar 2024 09:27:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kEP9OIqR4WU0RAAA62LTzQ (envelope-from ) for ; Fri, 01 Mar 2024 09:27:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709281674; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ItcLH99bIDs6Svmq9okk1lIWiHRVCYjcJZkikVuhzMQ=; b=DY8AYNM/QmwhQF95DkJlj9Qsy6ONY5wF2lFjAy+3Vd+rdc8GehSMuZbVWtj0Kk+GgVAt/U QhjvwR84p1HAmVlb150Axf4ccwLtRR95dqD8ZKX7MQrkMfju72xDNAkN000ni1TE4/umKs g9U2w+4BlhjIPGZNpjso9ikY4iFlFmel1kIRUywrL/4bDu4UIxZuM+6aSZjJD4ePRTDjOc jrlwxRnpFEOmR3DVVIh3lNI2aLYBMOfwk48EJLrAIf8irSA9Y+ZuFyqiZ5h14jmSqnf8FU K7KDDr4AsbcqoPNsUAlPbmY8VpSZMe1cP9uNeCd2GRBJG624xUggl28vDd7xnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709281674; a=rsa-sha256; cv=none; b=r8zPwPjHa9d4JBMgA8g6EFed/1/uNANdaowXBSJFXD6V8K7GupObVrzwrYlWUL5gmToDLD nAJ9v969RNpLUKcHan1l/qTRSJT0K3N1RYlTG70flnkOVKijBC6IKtaP9hiZbGJtHJGAjb VlKne7aVmU9/ZHIDNmNhYMFsnPDaFuFpHtaDJmUd2gLWMy6H/wSgcxpMOp/B+F+SMwVIhF 1Zf8t1T2CF7PMddzvcS9wsUWs/EqP5pODXdGWI5Kwqt9MaREF6xlYdICLfnbdiH/PnuJtJ OMEMjAvYXuDc/d8ABYs+PJWbk3hkq0u84TxDaym0KJidlDWOFq0XYoeUyjgv3w== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7C3D9313D5 for ; Fri, 1 Mar 2024 09:27:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfyF1-00061o-BN; Fri, 01 Mar 2024 03:27:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfyEy-00061E-1u for bug-guix@gnu.org; Fri, 01 Mar 2024 03:27:36 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfyEx-0001v5-Po for bug-guix@gnu.org; Fri, 01 Mar 2024 03:27:35 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfyFN-0001Yg-PZ; Fri, 01 Mar 2024 03:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#57005: [PATCH v2] gnu: petsc: scrub build machine specifics References: <87fsiag2vm.fsf@inria.fr> In-Reply-To: <87fsiag2vm.fsf@inria.fr> Resent-From: Lars Bilke Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, bavier@posteo.net, sharlatanus@gmail.com, bug-guix@gnu.org Resent-Date: Fri, 01 Mar 2024 08:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57005 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57005@debbugs.gnu.org Cc: Lars Bilke , Andreas Enge , Eric Bavier , Sharlatan Hellseher X-Debbugs-Original-Xcc: Andreas Enge , Eric Bavier , Sharlatan Hellseher Received: via spool by 57005-submit@debbugs.gnu.org id=B57005.17092816805983 (code B ref 57005); Fri, 01 Mar 2024 08:28:01 +0000 Received: (at 57005) by debbugs.gnu.org; 1 Mar 2024 08:28:00 +0000 Received: from localhost ([127.0.0.1]:36002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfyFL-0001YQ-IQ for submit@debbugs.gnu.org; Fri, 01 Mar 2024 03:27:59 -0500 Received: from mailgate5.ufz.de ([141.65.7.212]:36830 helo=mailgate.ufz.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfyFH-0001YA-4Z for 57005@debbugs.gnu.org; Fri, 01 Mar 2024 03:27:58 -0500 Received: from imap.intranet.ufz.de (dcs1.intranet.ufz.de [141.65.125.135]) by mailgate.ufz.de (Mailgate5-UFZ) with ESMTP id 13E3E16002D for <57005@debbugs.gnu.org>; Fri, 1 Mar 2024 09:27:21 +0100 (CET) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from conversion-daemon.imap.intranet.ufz.de by imap.intranet.ufz.de (Oracle Communications Messaging Server 8.0.2.6.20200227 64bit (built Feb 27 2020)) id <0S9N00H00TLLSG00@imap.intranet.ufz.de> for 57005@debbugs.gnu.org; Fri, 01 Mar 2024 09:27:21 +0100 (CET) Received: from smtp2.ufz.de ([141.65.7.217]) by imap.intranet.ufz.de (Oracle Communications Messaging Server 8.0.2.6.20200227 64bit (built Feb 27 2020)) with ESMTPS id <0S9N00JMOU5KGMC0@imap.intranet.ufz.de> for 57005@debbugs.gnu.org; Fri, 01 Mar 2024 09:27:20 +0100 (CET) Received: from envinf4.minotaur-alpha.ts.net (unknown [141.65.34.85]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp2.ufz.de (smtp2-UFZ) with ESMTPSA id B8CA1E0069; Fri, 1 Mar 2024 09:27:20 +0100 (CET) Date: Fri, 01 Mar 2024 09:27:02 +0100 From: Lars Bilke Message-id: <18f29b40d908e9c965f49bc124a505a6278b2a50.1709281622.git.lars.bilke@ufz.de> X-Mailer: git-send-email 2.43.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.77 X-Spam-Score: -4.77 X-Migadu-Queue-Id: 7C3D9313D5 X-TUID: Tlu4ubIT6rqC 'Libraries compiled on' does not have to be removed since PETSc 3.9: https: //gitlab.com/petsc/petsc/-/commit/a970bd748978a4e12790be7c36b10e832ec0149f Also merged all add-after 'install phases into `clean-install. Change-Id: I41d82339e43187d7dc7e3fc189a338784c363c68 --- gnu/packages/maths.scm | 43 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 1f61ee0583..4b4d033506 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3455,30 +3455,34 @@ (define-public petsc (substitute* "config/example_template.py" (("#!/usr/bin/env bash") (string-append "#!" (which "bash"))))))) - (add-after 'configure 'clean-local-references - (lambda* (#:key outputs #:allow-other-keys) + (add-after 'install 'clean-install + ;; Try to keep installed files from leaking build directory names. + (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (substitute* (find-files "." "^petsc(conf|machineinfo).h$") + (substitute* (find-files "." "petscmachineinfo.h") ;; Prevent build directory from leaking into compiled code (((getcwd)) out) - ;; Scrub timestamp for reproducibility - ((".*Libraries compiled on.*") "")) + ;; Scrub build machine characteristic + (("Machine characteristics: Linux-[0-9]+\\.[0-9]+\\.[0-9]+") + "Machine characteristics: Linux-x.x.x")) (substitute* (find-files "." "petscvariables") ;; Do not expose build machine characteristics, set to defaults. - (("MAKE_NP = [:digit:]+") "MAKE_NP = 2") - (("NPMAX = [:digit:]+") "NPMAX = 2"))))) - (add-after 'install 'clean-install - ;; Try to keep installed files from leaking build directory names. - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (("MAKE_NP = [[:digit:]]+") "MAKE_NP = 2") + (("MAKE_TEST_NP = [[:digit:]]+") "MAKE_TEST_NP = 2") + (("MAKE_LOAD = [[:digit:]]+\\.[[:digit:]]+") "MAKE_LOAD = 2.0") + (("NPMAX = [[:digit:]]+") "NPMAX = 2")) (substitute* (map (lambda (file) (string-append out "/lib/petsc/conf/" file)) '("petscvariables")) (((getcwd)) out)) - ;; Make compiler references point to the store (substitute* (string-append out "/lib/petsc/conf/petscvariables") - (("= (gcc|g\\+\\+|gfortran)" _ compiler) - (string-append "= " (which compiler)))) + ;; Do not retain a reference to GCC and other build only inputs. + (("([[:graph:]]+)/bin/gcc") "gcc") + (("([[:graph:]]+)/bin/g\\+\\+") "g++") + (("([[:graph:]]+)/bin/make") "make") + (("([[:graph:]]+)/bin/diff") "diff") + (("([[:graph:]]+)/bin/sed") "sed") + (("([[:graph:]]+)/bin/gfortran") "gfortran")) ;; PETSc installs some build logs, which aren't necessary. (for-each (lambda (file) (let ((f (string-append out "/lib/petsc/conf/" file))) @@ -3490,17 +3494,6 @@ (define-public petsc "configure-hash" ;; Once installed, should uninstall with Guix "uninstall.py"))))) - (add-after 'clean-install 'clear-reference-to-compiler - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Do not retain a reference to GCC and other build only inputs. - (let ((out (assoc-ref outputs "out"))) - (substitute* (string-append out "/lib/petsc/conf/petscvariables") - (("([[:graph:]]+)/bin/gcc") "gcc") - (("([[:graph:]]+)/bin/g\\+\\+") "g++") - (("([[:graph:]]+)/bin/make") "make") - (("([[:graph:]]+)/bin/diff") "diff") - (("([[:graph:]]+)/bin/sed") "sed") - (("([[:graph:]]+)/bin/gfortran") "gfortran"))))) (add-after 'install 'move-examples (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) base-commit: 75bad75367fcf2c289fae3b40dbcc850f92177be -- 2.43.0