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 ms11 with LMTPS id YHb1C4B2a19ifAAA0tVLHw (envelope-from ) for ; Wed, 23 Sep 2020 16:23:28 +0000 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 +E7KB4B2a18TbAAAbx9fmQ (envelope-from ) for ; Wed, 23 Sep 2020 16:23:28 +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 5DD8A940390 for ; Wed, 23 Sep 2020 16:23:27 +0000 (UTC) Received: from localhost ([::1]:49492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL7YC-00011C-E0 for larch@yhetil.org; Wed, 23 Sep 2020 12:23:24 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -0.01 X-TUID: jOxEh91f6vL9 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(-) -- 2.28.0