unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 40514@debbugs.gnu.org
Cc: me@tobias.gr
Subject: [bug#40514] [PATCH] vm: Transparently compress iso9660 images.
Date: Thu, 9 Apr 2020 23:34:39 +0200	[thread overview]
Message-ID: <20200409233439.69bf8943@scratchpost.org> (raw)
In-Reply-To: <20200408210132.23612-1-me@tobias.gr>

[-- Attachment #1: Type: text/plain, Size: 2016 bytes --]

Hi T G-R,

On Wed,  8 Apr 2020 23:01:32 +0200
Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:

> * gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso
> filter at the highest compression settings for supported directories.
> ---
>  gnu/build/vm.scm | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
> index 79eed48c1f..972eb4bdf9 100644
> --- a/gnu/build/vm.scm
> +++ b/gnu/build/vm.scm
> @@ -533,6 +533,24 @@ GRUB configuration and OS-DRV as the stuff in it."
>                  ;; Set all timestamps to 1.
>                  "-volume_date" "all_file_dates" "=1"
>  
> +                ;; ‘zisofs’ compression reduces the total image size by ~60%.
> +                "-zisofs" "level=9:block_size=128k" ; highest compression
> +                ;; It's transparent to our Linux-Libre kernel but not to GRUB.
> +                ;; Don't compress the kernel, initrd, and other files read by
> +                ;; grub.cfg, as well as common already-compressed file names.
> +                "-find" "/" "-type" "f"
> +                ;; XXX Even after "--" above, and despite documentation claiming
> +                ;; otherwise, "-or" is stolen by grub-mkrescue which then chokes
> +                ;; on it (as ‘-o …’) and dies.  Don't use "-or".
> +                "-not" "-wholename" "/boot/*"
> +                "-not" "-wholename" "/System/*"
> +                "-not" "-name" "unicode.pf2"
> +                "-not" "-name" "bzImage"
> +                "-not" "-name" "*.gz"   ; initrd & all man pages
> +                "-not" "-name" "*.png"  ; includes grub-image.png
> +                "-exec" "set_filter" "--zisofs"
> +                "--"
> +
>                  "-volid" (string-upcase volume-id)
>                  (if volume-uuid
>                      `("-volume_date" "uuid"

LGTM!

Tested it and it works, and I see no downside either.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-04-09 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 20:56 [bug#40514] Should we shrink the installer by a gig or so? Tobias Geerinckx-Rice via Guix-patches via
2020-04-08 21:01 ` [bug#40514] [PATCH] vm: Transparently compress iso9660 images Tobias Geerinckx-Rice via Guix-patches via
2020-04-09 21:34   ` Danny Milosavljevic [this message]
2020-04-10  0:02     ` bug#40514: " Tobias Geerinckx-Rice via Guix-patches via

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20200409233439.69bf8943@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=40514@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /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 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).