From patchwork Wed Mar 13 09:57:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 1410 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 06A8316CCC; Wed, 13 Mar 2019 09:59:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B0242169F6 for ; Wed, 13 Mar 2019 09:59:09 +0000 (GMT) Received: from localhost ([127.0.0.1]:41385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h40fF-0002p0-4D for patchwork@mira.cbaines.net; Wed, 13 Mar 2019 05:59:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h40f9-0002nY-8o for guix-patches@gnu.org; Wed, 13 Mar 2019 05:59:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h40f8-0002Mu-9t for guix-patches@gnu.org; Wed, 13 Mar 2019 05:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55733) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h40f8-0002Mi-5M for guix-patches@gnu.org; Wed, 13 Mar 2019 05:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h40f8-00014W-0B for guix-patches@gnu.org; Wed, 13 Mar 2019 05:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#34838] [PATCH 0/6] Add '--with-git-url' and make sure it composes well Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Mar 2019 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34838@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15524711004053 (code B ref -1); Wed, 13 Mar 2019 09:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Mar 2019 09:58:20 +0000 Received: from localhost ([127.0.0.1]:41044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h40eR-00013J-Se for submit@debbugs.gnu.org; Wed, 13 Mar 2019 05:58:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h40eP-000136-QL for submit@debbugs.gnu.org; Wed, 13 Mar 2019 05:58:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:36301) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h40eK-0001t0-Jf for submit@debbugs.gnu.org; Wed, 13 Mar 2019 05:58:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h40eJ-0002Me-GW for guix-patches@gnu.org; Wed, 13 Mar 2019 05:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h40eI-0001rs-Gl for guix-patches@gnu.org; Wed, 13 Mar 2019 05:58:11 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:40448) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h40eI-0001qG-8t; Wed, 13 Mar 2019 05:58:10 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4BDFBD5D2; Wed, 13 Mar 2019 10:58:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u3xMFdW5J17u; Wed, 13 Mar 2019 10:58:07 +0100 (CET) Received: from gnu.org (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 34EC3D5D0; Wed, 13 Mar 2019 10:58:07 +0100 (CET) From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 13 Mar 2019 10:57:55 +0100 Message-Id: <20190313095755.15378-1-ludo@gnu.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 Hello Guix! This patch series allows for things like this: guix build python-numpy \ --with-git-url=python=https://github.com/python/cpython \ --with-commit=python=86900a49000c4a96ad1dc34e49d8af4245b08843 Initially I just wanted to add a ‘--with-git-url’ transformation option, but then allowing it to be combined with ‘--with-branch’, for example, turned out to be more involved. To achieve that, this patch series changes transformation options so they match packages by spec (“guile”, “guile@2”, etc.) instead of matching them by identity as was the case before (specifically, we’d get the identity of the package to be replaced with ‘specification->package’.) That leads to a slight semantic change: transformations now apply to any package that matches the given spec, whereas before they would only apply to the public package that matches the spec. In practice, it probably doesn’t make any difference since there are rarely (if ever) several distinct packages with the same name. Feedback welcome! Ludo’. Ludovic Courtès (6): guix build: Add '--with-git-url'. packages: Add 'package-input-rewriting/spec'. guix build: Factorize 'package-git-url'. guix build: Transformation options match packages by spec. guix build: '--with-commit' makes recursive checkouts. guix build: '--with-branch' strips slashes from the version string. doc/guix.texi | 61 ++++++++++++++--- guix/packages.scm | 38 +++++++++++ guix/scripts/build.scm | 146 +++++++++++++++++++++++++++------------- tests/packages.scm | 51 ++++++++++++++ tests/scripts-build.scm | 109 ++++++++++++++++++++++++++++-- 5 files changed, 343 insertions(+), 62 deletions(-)