From patchwork Wed Sep 23 16:12:53 2020 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: 24260 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 B048827BBE8; Wed, 23 Sep 2020 17:23:24 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 3FF2627BBE7 for ; Wed, 23 Sep 2020 17:23:24 +0100 (BST) Received: from localhost ([::1]:49492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YB-00011C-8D for patchwork@mira.cbaines.net; Wed, 23 Sep 2020 12:23:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL7PA-000745-Lz for guix-patches@gnu.org; Wed, 23 Sep 2020 12:14:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kL7P7-0006uQ-TV for guix-patches@gnu.org; Wed, 23 Sep 2020 12:14:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kL7P7-0001Bq-OS for guix-patches@gnu.org; Wed, 23 Sep 2020 12:14:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Sep 2020 16:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43578@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16008775864466 (code B ref -1); Wed, 23 Sep 2020 16:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Sep 2020 16:13:06 +0000 Received: from localhost ([127.0.0.1]:37595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7OE-00019x-EY for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:13:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:44644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL7O9-00019j-OP for submit@debbugs.gnu.org; Wed, 23 Sep 2020 12:13:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL7O9-0005rp-Gj for guix-patches@gnu.org; Wed, 23 Sep 2020 12:13:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46893) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7O8-0006j5-Fn; Wed, 23 Sep 2020 12:13:00 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52508 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kL7O7-0001pK-L4; Wed, 23 Sep 2020 12:13:00 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 23 Sep 2020 18:12:53 +0200 Message-Id: <20200923161253.2378-1-ludo@gnu.org> X-Mailer: git-send-email 2.28.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 Hello Guix! This patch set aims to hit two bird hunters with one stone: initially my goal was to fix , which has become a hindrance to the use of package transformation options, but it also ends up addressing the fact that those options did not, until now, rewrite implicit dependencies. Concretely, the following commands had no effect thus far: guix build python-itsdangerous --with-input=python=python2 guix build hello --with-input=gcc=gcc-toolchain@10 In both cases, this is because the input we want to change is an implicit input. This patch set fixes that, and it fixes as a side effect. This opens new possibilities. ‘--with-input=python=python2’ is one of them, but ‘--with-input=gcc=gcc-toolchain@10’ is not (it fails to build for obscure reasons that I’ll fix in ‘core-updates’, and it rebuilds the world anyway, which is not practical). Another thing that I find interesting is: $ guix build hello --with-graft=glibc=glibc@2.29 /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10 $ /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello Saluton, mondo! $ LD_TRACE_LOADED_OBJECTS=yes /gnu/store/6jv7icpjbl3pvj24db2q2fmdly9vgp4d-hello-2.10/bin/hello linux-vdso.so.1 (0x00007ffcc87f8000) libgcc_s.so.1 => /gnu/store/1sqr5fa6jbksqmi7hibqaffixy3b1j0y-gcc-7.5.0-lib/lib/libgcc_s.so.1 (0x00007f3f36c3c000) libc.so.6 => /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/libc.so.6 (0x00007f3f36a82000) /gnu/store/i4iqkjx34r3nmwwblfmkbsbsd3pgapfp-glibc-2.29/lib/ld-linux-x86-64.so.2 (0x00007f3f36c57000) It “relinks” the package against a different libc, assuming the ABI is compatible (this particular example downgrades glibc, probably less useful in the real world than upgrading; it works for ‘hello’ but not for ‘inkscape’ due to ABI differences.) Feedback welcome! Ludo’. Ludovic Courtès (4): packages: 'package-mapping' can recurse on implicit inputs. packages: 'package-input-rewriting/spec' can rewrite implicit dependencies. packages: 'package-mapping' correctly recurses into 'replacement'. packages: 'package-input-rewriting' has a #:deep? parameter. doc/guix.texi | 28 ++++---- gnu/packages/guile.scm | 6 +- guix/packages.scm | 153 ++++++++++++++++++++++++++++------------ tests/guix-build.sh | 11 +++ tests/packages.scm | 149 ++++++++++++++++++++++++++++++++++++-- tests/scripts-build.scm | 12 +++- 6 files changed, 291 insertions(+), 68 deletions(-)