From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yL6NMdJ1OGFxRwAAgWs5BA (envelope-from ) for ; Wed, 08 Sep 2021 10:35:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KGgfLdJ1OGHgRAAAbx9fmQ (envelope-from ) for ; Wed, 08 Sep 2021 08:35:30 +0000 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 6C33A1CEBE for ; Wed, 8 Sep 2021 10:35:30 +0200 (CEST) Received: from localhost ([::1]:46862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNt3J-0003yO-D6 for larch@yhetil.org; Wed, 08 Sep 2021 04:35:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNsz3-0006EB-6e for guix-patches@gnu.org; Wed, 08 Sep 2021 04:31:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNsz0-00008F-09 for guix-patches@gnu.org; Wed, 08 Sep 2021 04:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNsyz-00076M-TN for guix-patches@gnu.org; Wed, 08 Sep 2021 04:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49868] [PATCH 0/2] guix: dune-build-system: Add a profile parameter. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Sep 2021 08:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49868 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 49868@debbugs.gnu.org Received: via spool by 49868-submit@debbugs.gnu.org id=B49868.163108980627149 (code B ref 49868); Wed, 08 Sep 2021 08:31:01 +0000 Received: (at 49868) by debbugs.gnu.org; 8 Sep 2021 08:30:06 +0000 Received: from localhost ([127.0.0.1]:58541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNsy5-00073o-Ge for submit@debbugs.gnu.org; Wed, 08 Sep 2021 04:30:06 -0400 Received: from mout01.posteo.de ([185.67.36.65]:42095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNsy2-00072b-Vv for 49868@debbugs.gnu.org; Wed, 08 Sep 2021 04:30:04 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id AE56B240026 for <49868@debbugs.gnu.org>; Wed, 8 Sep 2021 10:29:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1631089796; bh=Z23REpMHfjnR6QfSHA8uy+QyGX40KmNXiCLjwln3iR0=; h=From:To:Cc:Subject:Date:From; b=H6nCfKbrHVYzJFr1OtIWGVsmvwaePCJVjHTxm91lg8NkLXXgaTSO2WwHiF82uC/NP EqKCPV+KsXjy2phCvLZDFJ7DjjtK+u8v3gRIjqs/QbbdzyujRHOylU25PwRYMqT7uE co41kSkIqFNn6QShY8UX3vPEcsM67hOeSh7Q/ySrrIW3Y6gpQkyC5X+xo/uFmdqJZo 63hBKjohJ16V93ULE2bwkTGPhKv5kd4kA3Um2nkBr/XUPF7gGSPVHAcmxkQxFnFmus lbNKnhR5cnPUTwFVN0CpOM6b2i8YBtRY8NEU+eBe93P5ugK/00AEW9t9X9bd7l/MvU 6foJIK7LOmADA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4H4FgR4ZZWz6tmP; Wed, 8 Sep 2021 10:29:55 +0200 (CEST) References: <20210804080423.3533-1-pukkamustard@posteo.net> <20210821000926.00deacf3@tachikoma.lepiller.eu> <868s0r72rb.fsf@posteo.net> <865yvv71sw.fsf@posteo.net> <86zgt75lhe.fsf@posteo.net> <86y288yavn.fsf@posteo.net> <36A316B4-720C-4753-AFFC-DBC68DBE5EF4@lepiller.eu> <86pmtky4yu.fsf@posteo.net> <20210907150330.31124799@tachikoma.lepiller.eu> <86lf48xifn.fsf@posteo.net> <20210908000321.662876ee@tachikoma.lepiller.eu> From: pukkamustard Date: Wed, 08 Sep 2021 08:24:19 +0000 In-reply-to: <20210908000321.662876ee@tachikoma.lepiller.eu> Message-ID: <86h7evxyf2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631090130; 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: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: dkim-signature; bh=M2kBRIYhjwNtIFzrZ7S/HkPDoNmxDKZv6Lhox2lHQn0=; b=j9A7altb9LcKLBgHXzN8p7zG0z2gIoXCuVB3UhC3aWBa9BKS8HpZnJMN3yLhHPO03ufSO8 APegr3NEadCpMJ2m0TxXg9qoGJGDYL2l+Q4WtbILBa/06k75I/uQHK+ACqi3Vbot0JN6FD BNI4uLWwg5V2lX51ZIfYA95jC7O5JwQXLc9l8yljuGAhgI5dh1pOQyD8JdRMnOgEwM90GK DE5+b4oxgM7MmBHBcz4CsAFMwPAehzk+AmrWXS0XJnnCgLj+O2cEA4LOwyFE78+lSFf5k1 enHSGAr/IiwfSJdg6r3NT0DpPWtEND6AeSOJL2wY6nqU105zqZC5P7kD7SWQFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631090130; a=rsa-sha256; cv=none; b=tkm1dNZtpC4XjtX4/8NJ2urabkDCbqVYdsWiytTYEpx08lyOrTd1O8qZLTs0id4vBng1HO yXg9xWe4e6/u6XAWgpby7VVOOOa/CJ+DzKy3aQH50C1eQ/JWp0WP4SIy8qhehrDCqEPNZM fpBAHvXvrIYxsEn/c9ViQ8hjLgCs89J8K8ljE9XGqQI+iGB5mrQpz5RFML9g7heMq8+oqH 0ohdG1ZbtAyedNb15f/KM+t3p86uoFL8OXs0TQIExyC5nTGG6dzEx5aWdABopJUK46JIt8 iY/gRRnxWrKutUu1uJQWxiAYrTlUvAgs6tEgXA5QsDhlrfsn4Jsp3HLQcjWDrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=H6nCfKbr; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=H6nCfKbr; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 6C33A1CEBE X-Spam-Score: 0.19 X-Migadu-Scanner: scn0.migadu.com X-TUID: EMcKKfrxTb5x --=-=-= Content-Type: text/plain Julien Lepiller writes: >> >> 2.9.0: >> --8<---------------cut here---------------start------------->8--- >> --root . --ignore-promoted-rules --no-config --profile release >> --always-show-command-line --promote-install-files --default-target >> @install >> --8<---------------cut here---------------end--------------->8--- >> >> 1.11.3: >> --8<---------------cut here---------------start------------->8--- >> --root . --ignore-promoted-rules --no-config ----profile release >> --8<---------------cut here---------------end--------------->8--- > > I suppose these additional flags are not available in dune 1.11? > No, unfortunately the flags are not available in 1.11. We need to check version and use appropriate flags. >> >> Can we check the version of dune in dune-build-system and either use >> --release or the set of 1.11.3 flags? >> >> I just tried doing this in (guix build dune-build-system). Didn't work >> as I couldn't use (guix package). After reading up, I guess this needs >> to be done in (guix build-system dune) and lowered down as an >> argument - maybe as 'dune-release-flags'? Would that be ok? > > Yeah, that sounds good. Attached a patch that does that. ocaml4.07 packages are building again. Unsure about the double quote things and if there is a better way to check versions. > Another solution would be to get rid of > ocaml4.07, but that's our future bootstrap path (as this is the only > bootstrapped version currently), so we will need it anyway... Yup, good to keep it. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-guix-dune-build-system-Put-dune-into-a-reproducible-.patch >From bb6bf9e12b81165405da6d5872c18f63e425742d Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Tue, 7 Sep 2021 13:41:12 +0200 Subject: [PATCH] guix: dune-build-system: Put dune into a reproducible release mode. * guix/build/dune-build-system.scm (build,check): Remove the profile parameter and use the release flag. * guix/build-system/dune.scm: Remove the profile parameter. * doc/guix.texi: Remove paragraph on profile parameter. --- doc/guix.texi | 5 ----- guix/build-system/dune.scm | 17 ++++++++++++++--- guix/build/dune-build-system.scm | 15 +++++++++------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 36a0c7f5ec..a056edc192 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7735,11 +7735,6 @@ is useful when a package contains multiple packages and you want to build only one of them. This is equivalent to passing the @code{-p} argument to @code{dune}. -The @code{#:profile} parameter can be passed to specify the -@uref{https://dune.readthedocs.io/en/stable/dune-files.html#profile, -dune build profile}. This is equivalent to passing the @code{--profile} -argument to @code{dune}. Its default value is @code{"release"}. - @end defvr @defvr {Scheme Variable} go-build-system diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm index 1a64cf9b75..f52bbd0257 100644 --- a/guix/build-system/dune.scm +++ b/guix/build-system/dune.scm @@ -60,6 +60,15 @@ #:allow-other-keys #:rest arguments) "Return a bag for NAME." + + ;; Flags that put dune into reproducible build mode. + (define dune-release-flags + (if (equal? (package-version dune) "1.11.3") + ''("--root" "." "--ignore-promoted-rules" "--no-config" + "--profile" "release") + ;; For dune >= 2.5.0 this is just --release. + ''("--release"))) + (define private-keywords '(#:source #:target #:dune #:findlib #:ocaml #:inputs #:native-inputs)) @@ -79,7 +88,9 @@ (build-inputs `(("dune" ,dune) ,@(bag-build-inputs base))) (build dune-build) - (arguments (strip-keyword-arguments private-keywords arguments)))))) + (arguments (append + `(#:dune-release-flags ,dune-release-flags) + (strip-keyword-arguments private-keywords arguments))))))) (define* (dune-build store name inputs #:key (guile #f) @@ -89,7 +100,7 @@ (out-of-source? #t) (jbuild? #f) (package #f) - (profile "release") + (dune-release-flags ''()) (tests? #t) (test-flags ''()) (test-target "test") @@ -129,7 +140,7 @@ provides a 'setup.ml' file as its build system." #:out-of-source? ,out-of-source? #:jbuild? ,jbuild? #:package ,package - #:profile ,profile + #:dune-release-flags ,dune-release-flags #:tests? ,tests? #:test-target ,test-target #:install-target ,install-target diff --git a/guix/build/dune-build-system.scm b/guix/build/dune-build-system.scm index 6a0c2593ac..e9ccc71057 100644 --- a/guix/build/dune-build-system.scm +++ b/guix/build/dune-build-system.scm @@ -32,23 +32,26 @@ ;; Code: (define* (build #:key (build-flags '()) (jbuild? #f) - (use-make? #f) (package #f) - (profile "release") #:allow-other-keys) + (use-make? #f) (package #f) (dune-release-flags '()) + #:allow-other-keys) "Build the given package." (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "build" "@install" - (append (if package (list "-p" package) '()) - `("--profile" ,profile) + (append (if package (list "-p" package) + dune-release-flags) build-flags))) #t) (define* (check #:key (test-flags '()) (test-target "test") tests? - (jbuild? #f) (package #f) #:allow-other-keys) + (jbuild? #f) (package #f) (dune-release-flags '()) + #:allow-other-keys) "Test the given package." (when tests? (let ((program (if jbuild? "jbuilder" "dune"))) (apply invoke program "runtest" test-target - (append (if package (list "-p" package) '()) test-flags)))) + (append (if package (list "-p" package) + dune-release-flags) + test-flags)))) #t) (define* (install #:key outputs (install-target "install") (jbuild? #f) -- 2.33.0 --=-=-=--