unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co.
@ 2020-09-23 16:12 Ludovic Courtès
  2020-09-23 16:23 ` [bug#43578] [PATCH 1/4] packages: 'package-mapping' can recurse on implicit inputs Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ludovic Courtès @ 2020-09-23 16:12 UTC (permalink / raw)
  To: 43578; +Cc: Ludovic Courtès

Hello Guix!

This patch set aims to hit two bird hunters with one stone:
initially my goal was to fix <https://issues.guix.gnu.org/42156>,
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
<https://issues.guix.gnu.org/42156> 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





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-26 16:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-23 16:12 [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co Ludovic Courtès
2020-09-23 16:23 ` [bug#43578] [PATCH 1/4] packages: 'package-mapping' can recurse on implicit inputs Ludovic Courtès
2020-09-23 16:23   ` [bug#43578] [PATCH 2/4] packages: 'package-input-rewriting/spec' can rewrite implicit dependencies Ludovic Courtès
2020-09-23 16:23   ` [bug#43578] [PATCH 3/4] packages: 'package-mapping' correctly recurses into 'replacement' Ludovic Courtès
2020-09-23 16:23   ` [bug#43578] [PATCH 4/4] packages: 'package-input-rewriting' has a #:deep? parameter Ludovic Courtès
2020-09-23 17:17 ` [bug#43578] [PATCH 0/4] Rewriting implicit inputs with 'package-input-rewriting' & co zimoun
2020-09-23 20:51   ` Ludovic Courtès
2020-09-24  6:28     ` Efraim Flashner
2020-09-25 22:38 ` zimoun
2020-09-26 13:53   ` Ludovic Courtès
2020-09-26 16:04     ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).