[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#31592] [PATCH 4/4] pack: Add support for squashfs images.
From: |
Ricardo Wurmus |
Subject: |
[bug#31592] [PATCH 4/4] pack: Add support for squashfs images. |
Date: |
Sun, 27 May 2018 20:17:46 +0200 |
User-agent: |
mu4e 1.0; emacs 25.3.1 |
Ludovic Courtès <address@hidden> writes:
> Woohoo!
>
> Ricardo Wurmus <address@hidden> skribis:
>
>> * guix/scripts/pack.scm (%formats): Add "squashfs" format.
>> (guix-pack): Adjust "archiver" dependent on pack-format.
>> (squashfs-image): New procedure.
>
> [...]
>
>> + (exit
>> + (and
>> + ;; Add all store items. Unfortunately mksquashfs throws away
>> all
>> + ;; ancestor directories and only keeps the basename. We fix
>> this
>> + ;; in the following invocations of mksquashfs.
>> + (zero? (apply system* "mksquashfs"
>
> This code should use ‘invoke’ everywhere, which would alleviate the need
> for the clumsy (exit (and …)) idiom.
Okay.
>> + (reverse (filter (negate string-null?)
>> + (string-split (%store-directory) #\/))))
>
> I think this is equivalent to:
>
> (reverse (string-tokenize (%store-directory)
> (char-set-complement (char-set #\/))))
>
> Alternately, you can use (remove …) instead of (filter (negate …) …).
Good points.
> One last thing: could you update guix.texi and the ‘--help’ output?
Absolutely!
> I suppose using the squashfs format allows us to bypass the bug
> described at
> <https://github.com/singularityware/singularity/issues/1487>, right?
I generated an image containing “emacs”, “bash”, and “coreutils” and
both “singularity shell” and “singularity exec” worked fine, so I think
this problem does not affect squashfs images.
Thanks for the review!
I’ll update the patches, write some documentation, and push them in the
coming days.
--
Ricardo
[bug#31592] [PATCH 3/4] pack: Rename "tar" to "archiver"., Ricardo Wurmus, 2018/05/25
[bug#31592] [PATCH 1/4] gnu: Add squashfs-tools-next., Ludovic Courtès, 2018/05/27
bug#31592: [PATCH 1/4] gnu: Add squashfs-tools-next., Ricardo Wurmus, 2018/05/28