From patchwork Thu Sep 16 11:47:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 32897 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 02DBB27BBE1; Thu, 16 Sep 2021 12:49:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CF69727BBE3 for ; Thu, 16 Sep 2021 12:49:06 +0100 (BST) Received: from localhost ([::1]:53460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQpt3-0003k1-Vf for patchwork@mira.cbaines.net; Thu, 16 Sep 2021 07:49:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQps2-0002ru-Sg for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQps2-0005u5-KQ for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQps2-0007PX-JA for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 1/2] guix: packages: Document 'computed-origin-method'. References: <20210916114505.2686370-1-zimon.toutoune@gmail.com> In-Reply-To: <20210916114505.2686370-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Sep 2021 11:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50620 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50620@debbugs.gnu.org Cc: zimoun Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.163179286728450 (code B ref 50620); Thu, 16 Sep 2021 11:48:02 +0000 Received: (at 50620) by debbugs.gnu.org; 16 Sep 2021 11:47:47 +0000 Received: from localhost ([127.0.0.1]:54003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQprm-0007Oo-OX for submit@debbugs.gnu.org; Thu, 16 Sep 2021 07:47:47 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:37816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQpri-0007OI-QE for 50620@debbugs.gnu.org; Thu, 16 Sep 2021 07:47:44 -0400 Received: by mail-wm1-f45.google.com with SMTP id c8-20020a7bc008000000b002e6e462e95fso7155170wmb.2 for <50620@debbugs.gnu.org>; Thu, 16 Sep 2021 04:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4IIHHqUhQKQN7CyJDFPM1+vkRqsNFbDxZrpo08ThJoE=; b=gzVAoT5CiOeWP08FXganZmDXcKbjS49S6I5IuX8ZswUghsPjR3s2fcSl7IZp6savip CQ03CcJnbOFh/Z079rIG+7fBIp2tJWtb76VCvNpfbUy7HsCTLMdNjzPpLKEnrJQEGKWH 9uW4JufNEKWl27seR3N+07NDkCCfppNwZSpaM+/Z/h5RqeIVMw5P8+Hoj67P6+5CtKSX OxB1wj3pN1vFh16MQ6h7Nf1r8QKdmgMNCGHVKBaJpJFUYryecxuJgb/JlFCJKJQJUxoa 9mS6LRfQIFaQbIoyYIAjHzJuAK1OG/As1LP/oXAtKLiQlU9/G5r/51g8hSKKz2baA/Mv Zn1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4IIHHqUhQKQN7CyJDFPM1+vkRqsNFbDxZrpo08ThJoE=; b=MIekmaO2gi76OToJVMAqxXOl8NCi95e16Gw78FfgCkgYjav0M28qw7T5R46uU2JfQ5 Lb8nrCxaxgb0wT4mWYr0+nM4aXVTiZ00tWCMZtVRhULhiFoudKfJKH///XtK1nVx6vTb yBNa8QMTgTHT652DNZBUTaia884P1VyNIgbqWHmRD3BMFEWT19BYSEt6d+5W+XifDiZX x5jRtcB5zDZaCWygafK/td63dhuyaN2xEC+Q7wdZLMp/pIWCS78xwh4C3sS33dTpB4Jj qmlkCjAMlFE4oeJBmqcu9qHJ7om1kIXN3qB9Hy7qflZX5zdsGcSEdU1SpCJqk8DxTrYf NrpA== X-Gm-Message-State: AOAM532OTPhZnpVfSZFNe4fg82IQuD3eNnqGAaKGgwdap45wUAzqSyK+ DNgwD5lwHYDKMtSfhfK2Er2RRfd9cCA= X-Google-Smtp-Source: ABdhPJx3nocB7am6mLjPKs5wMZ5ucb+6XXdGfqI7ejdaqa5BELSOsqukNYpXBF+qJG0yjJclNOuDFQ== X-Received: by 2002:a1c:2b04:: with SMTP id r4mr9535074wmr.89.1631792856995; Thu, 16 Sep 2021 04:47:36 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.117]) by smtp.gmail.com with ESMTPSA id l10sm3472519wrg.50.2021.09.16.04.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 04:47:36 -0700 (PDT) From: zimoun Date: Thu, 16 Sep 2021 13:47:33 +0200 Message-Id: <20210916114734.2686426-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The 'computed-origin-method' had been introduced as a workaround limitations in the 'snippet' mechanism. The procedure is duplicated which makes hard to automatically detects packages using it. * guix/packages.scm (computed-origin-method): Move procedure from... * gnu/packages/gnuzilla.scm: ...here and... * gnu/packages/gnuzilla.scm: ...there. --- gnu/packages/gnuzilla.scm | 14 ++------------ gnu/packages/linux.scm | 14 ++------------ guix/packages.scm | 23 ++++++++++++++++++++++- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 431b487fd0..9f6e1f24e1 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -682,18 +682,8 @@ in C/C++.") ("1j6l66v1xw27z8w78mpsnmqgv8m277mf4r0hgqcrb4zx7xc2vqyy" "527e5e090608" "zh-CN") ("1frwx35klpyz3sdwrkz7945ivb2dwaawhhyfnz4092h9hn7rc4ky" "6cd366ad2947" "zh-TW"))) -(define* (computed-origin-method gexp-promise hash-algo hash - #:optional (name "source") - #:key (system (%current-system)) - (guile (default-guile))) - "Return a derivation that executes the G-expression that results -from forcing GEXP-PROMISE." - (mlet %store-monad ((guile (package->derivation guile system))) - (gexp->derivation (or name "computed-origin") - (force gexp-promise) - #:graft? #f ;nothing to graft - #:system system - #:guile-for-build guile))) +;; XXXX: Workaround 'snippet' limitations. +(define computed-origin-method (@@ (guix packages) computed-origin-method)) (define %icecat-version "78.14.0-guix0-preview1") (define %icecat-build-id "20210907000000") ;must be of the form YYYYMMDDhhmmss diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 285eb132f4..eb792be9a3 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -216,18 +216,8 @@ defconfig. Return the appropriate make target if applicable, otherwise return (file-name (string-append "linux-libre-deblob-check-" version "-" gnu-revision)) (sha256 deblob-check-hash)))) -(define* (computed-origin-method gexp-promise hash-algo hash - #:optional (name "source") - #:key (system (%current-system)) - (guile (default-guile))) - "Return a derivation that executes the G-expression that results -from forcing GEXP-PROMISE." - (mlet %store-monad ((guile (package->derivation guile system))) - (gexp->derivation (or name "computed-origin") - (force gexp-promise) - #:graft? #f ;nothing to graft - #:system system - #:guile-for-build guile))) +;; XXXX: Workaround 'snippet' limitations +(define computed-origin-method (@@ (guix packages) computed-origin-method)) (define (make-linux-libre-source version upstream-source diff --git a/guix/packages.scm b/guix/packages.scm index ad7937b4fb..8c3a0b0b7b 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès -;;; Copyright © 2014, 2015, 2017, 2018 Mark H Weaver +;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2017, 2019, 2020 Efraim Flashner @@ -344,6 +344,27 @@ name of its URI." ;; git, svn, cvs, etc. reference #f)))) +;; Work around limitations in the 'snippet' mechanism. It is not possible for +;; a 'snippet' to produce a tarball with a different base name than the +;; original downloaded source. Moreover, cherry picking dozens of upsteam +;; patches and applying them suddenly is often impractical; especially when a +;; comprehensive code reformatting is done upstream. Mainly designed for +;; Linux and IceCat packages. +;; XXXX: do not make part of public API (export) such radical capability +;; before a detailed review process. +(define* (computed-origin-method gexp-promise hash-algo hash + #:optional (name "source") + #:key (system (%current-system)) + (guile (default-guile))) + "Return a derivation that executes the G-expression that results +from forcing GEXP-PROMISE." + (mlet %store-monad ((guile (package->derivation guile system))) + (gexp->derivation (or name "computed-origin") + (force gexp-promise) + #:graft? #f ;nothing to graft + #:system system + #:guile-for-build guile))) + (define %supported-systems ;; This is the list of system types that are supported. By default, we From patchwork Thu Sep 16 11:47:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 32896 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EE04127BBE1; Thu, 16 Sep 2021 12:49:01 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8418127BBE3 for ; Thu, 16 Sep 2021 12:49:01 +0100 (BST) Received: from localhost ([::1]:53248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQpsy-0003bN-LI for patchwork@mira.cbaines.net; Thu, 16 Sep 2021 07:49:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQps2-0002rF-Gd for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQps2-0005tp-8c for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQps2-0007PQ-6o for guix-patches@gnu.org; Thu, 16 Sep 2021 07:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50620] [PATCH 2/2] gnu: guix: Update to xxxx. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Sep 2021 11:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50620 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50620@debbugs.gnu.org Cc: zimoun Received: via spool by 50620-submit@debbugs.gnu.org id=B50620.163179286428439 (code B ref 50620); Thu, 16 Sep 2021 11:48:02 +0000 Received: (at 50620) by debbugs.gnu.org; 16 Sep 2021 11:47:44 +0000 Received: from localhost ([127.0.0.1]:54001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQprk-0007Oa-Hg for submit@debbugs.gnu.org; Thu, 16 Sep 2021 07:47:44 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:55974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQprj-0007OJ-3k for 50620@debbugs.gnu.org; Thu, 16 Sep 2021 07:47:43 -0400 Received: by mail-wm1-f45.google.com with SMTP id 70so1666321wme.5 for <50620@debbugs.gnu.org>; Thu, 16 Sep 2021 04:47:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B87dYz7oUEC4rXYidENqRvmdES+avudmEtXCGoOeaYA=; b=lFfOSxhv49AjvshGhaPqEtT1kuYftjmpmBIH2S3iYn60xltyDFPHuxQPZOB/B1Sv4m qxFRn4F6LFf3W/i4uZZ7x2GqLuYUqYZbtMkfWVtsdc0+H59ClmFXgCTc9oIxQYEOBaii kEBQjmcV9L5y+XKGGWgDHTcG4JvopNygJF3Ln0SLK8hLyNpzzi3D9kJVtJsanKW/sQjZ gUGKU2F0kay0UZszel2ezc9oTM2ToWCwg/EXpaXQxTrTYAuG80mjHCP+SU5q4tpcf+2Z KHXTO9qPBWks9sodrVnGPW+PdIg0G22khmgbqgkLH52gMPdYkQi5NtgEofsciAIfE06l B93Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B87dYz7oUEC4rXYidENqRvmdES+avudmEtXCGoOeaYA=; b=u/R6iTuhBJIdEISfK7OEMFCBb+omsC9X0uezVD7UwAvF+AYlII2zr/X81v9uLCYusX 0DizqVfe/2+aDhoJpfrQZ/saLzvI7ELaYBXqRnHOfN9DIuthdodkpDo1cjKjz51ZtInH wLDJwaSDGMaVQ+Jysi5ftvhUDkW5rjba6+1KxMLVP3c65stJp7g4zGhrM28AgHiTpUcc HGytDk3xvTC2Tm33FDKcqIIg2ApTuWqeU8ogofNMfs5BjV+VC744j0vo8sB017jY5YYa Urh+W7WYzKLun5nn7P5TUzGNhil0UIhMSy2c34Qb14djFmkqLvf6UPrFwbEjp3dfKFMN c/4w== X-Gm-Message-State: AOAM530Pax2vEdZqbz9nBqVHTlPhtcXCd0D7LtPWwoNhTtRHnW7ytuXO WSWdbn8+Iep9D5ilTzTgCWzQXA4J3R8= X-Google-Smtp-Source: ABdhPJwtjgR/sTOrM6ARG2FHKsY78YyzwsTWiFRksDXmE/FwTyUbKwNJPGmBddLB4MuFxC2BNSAnPw== X-Received: by 2002:a1c:3b87:: with SMTP id i129mr708805wma.115.1631792857474; Thu, 16 Sep 2021 04:47:37 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.117]) by smtp.gmail.com with ESMTPSA id l10sm3472519wrg.50.2021.09.16.04.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 04:47:37 -0700 (PDT) From: zimoun Date: Thu, 16 Sep 2021 13:47:34 +0200 Message-Id: <20210916114734.2686426-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210916114734.2686426-1-zimon.toutoune@gmail.com> References: <20210916114734.2686426-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/package-management.scm (guix): Update to xxxx. --- gnu/packages/package-management.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 2611951a52..458e121ef2 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -137,8 +137,8 @@ ;; Note: the 'update-guix-package.scm' script expects this definition to ;; start precisely like this. (let ((version "1.3.0") - (commit "6243ad3812f8c689599a19f0e8b9719ba14461f2") - (revision 5)) + (commit "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") + (revision 6)) (package (name "guix") @@ -154,7 +154,7 @@ (commit commit))) (sha256 (base32 - "0i3sgk2w2yjy9ip47vk0h17afk16yl5ih3p3q75083kgjzyjdm3d")) + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")) (file-name (string-append "guix-" version "-checkout")))) (build-system gnu-build-system) (arguments