all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 61853@debbugs.gnu.org
Subject: bug#61853: ‘guix pack’ shell tests fail
Date: Mon, 27 Feb 2023 21:15:18 -0500	[thread overview]
Message-ID: <87v8jmilhl.fsf@gmail.com> (raw)
In-Reply-To: <87wn42emh8.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 28 Feb 2023 00:07:31 +0100")

Hi Ludovic,

Ludovic Courtès <ludo@gnu.org> writes:

> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> In both cases this is because $test_directory is read-only:
>
> This in turn is due to a permission change in generated tarballs:
>
> $ guix describe
> Generation 248  Feb 27 2023 16:36:12    (current)
>   guix cf9e050
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: cf9e0508b26196dc985302776d860a0359652c59
> $ guix pack hello
> /gnu/store/k0mjzvv76s0yn4r4mwzy6mvf71wxpbg2-hello-tarball-pack.tar.gz
> ludo@ribbon ~/src/guix$ tar tzvf /gnu/store/k0mjzvv76s0yn4r4mwzy6mvf71wxpbg2-hello-tarball-pack.tar.gz |head
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/include/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/
> -r--r--r-- root/root      2056 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/crtbegin.o
>
>
> Compared to:
>
> $ guix time-machine --commit=v1.4.0 -- pack hello
> /gnu/store/vjjavmn16mxzgrlfawjcgq5j4iqm7609-hello-tarball-pack.tar.gz
> $ tar tzvf /gnu/store/vjjavmn16mxzgrlfawjcgq5j4iqm7609-hello-tarball-pack.tar.gz | head
> drwxr-xr-x root/root         0 1970-01-01 01:00 ./
> drwxr-xr-x root/root         0 1970-01-01 01:00 ./gnu/
> drwxrwxr-t root/root         0 1970-01-01 01:00 ./gnu/store/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/include/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/
> dr-xr-xr-x root/root         0 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/
> -r--r--r-- root/root      2056 1970-01-01 01:00 ./gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/gcc/x86_64-unknown-linux-gnu/10.3.0/crtbegin.o
> tar: stdout: write error
>
> That’s an acceptable change IMO, introduced in
> 68380db4c40a2ee1156349a87254fd7b1f1a52d5.  However, the tests were
> evidently not run after that change, which is problematic.

Interesting.  I had done all my testing using tests/pack.scm (and the
new tests/rpm.scm), and overlooked tests/pack.sh.

> Anyway, fixed in 92a0e60a963a54230e400c5c2ae585205489bf35.  Both tests
> now pass for me.

Thanks (again)!

> One issue with 68380db4c40a2ee1156349a87254fd7b1f1a52d5, though, is that
> it introduces a copy of the profile being built to the store
> (“profile-directory”).  This was purposefully avoided before because
> it’s very I/O-intensive, space-consuming, and puts more pressure on the
> store.  It’s a pattern we avoided for system images too, having noticed
> its cost (commit 7f75a7ec08975eb6d6e01db61bd6b91f447f655e for instance.)
>
> We may need to come back to a single derivation well or creating packs
> for big profiles will be too costly.

I agree it's expensive; we're trading IO for storage though, so the case
of generating the same pack in multiple format, it could be beneficial
by only computing the union directory once.  The real motivation was
avoiding code duplication though; perhaps this could be accomplished by
moving the common logic to (guix build pack-utils)?

-- 
Thanks,
Maxim




  reply	other threads:[~2023-02-28  2:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 21:46 bug#61853: ‘guix pack’ shell tests fail Ludovic Courtès
2023-02-27 23:07 ` Ludovic Courtès
2023-02-28  2:15   ` Maxim Cournoyer [this message]
2023-03-03 10:43     ` Ludovic Courtès
2023-03-04  3:22       ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8jmilhl.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=61853@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.