diff options
| author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-04-06 17:48:21 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-04-10 16:05:19 +0200 |
| commit | e830c2a8de0a4b6fbc334c648d976872034b5997 (patch) | |
| tree | ef19aee2d695f94c77d9304be340460a3a0f2f0c | |
| parent | 08b14ab20ebe181690df6210a0b3f95bad494af5 (diff) | |
vm: Transparently compress iso9660 images.
* gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso
filter at the highest compression settings for supported directories.
| -rw-r--r-- | gnu/build/vm.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 79eed48c1f1..9caa110463b 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> | 5 | ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> |
| 6 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> | 6 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
| 7 | ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> | 7 | ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> |
| 8 | ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> | ||
| 8 | ;;; | 9 | ;;; |
| 9 | ;;; This file is part of GNU Guix. | 10 | ;;; This file is part of GNU Guix. |
| 10 | ;;; | 11 | ;;; |
| @@ -533,6 +534,24 @@ GRUB configuration and OS-DRV as the stuff in it." | |||
| 533 | ;; Set all timestamps to 1. | 534 | ;; Set all timestamps to 1. |
| 534 | "-volume_date" "all_file_dates" "=1" | 535 | "-volume_date" "all_file_dates" "=1" |
| 535 | 536 | ||
| 537 | ;; ‘zisofs’ compression reduces the total image size by ~60%. | ||
| 538 | "-zisofs" "level=9:block_size=128k" ; highest compression | ||
| 539 | ;; It's transparent to our Linux-Libre kernel but not to GRUB. | ||
| 540 | ;; Don't compress the kernel, initrd, and other files read by | ||
| 541 | ;; grub.cfg, as well as common already-compressed file names. | ||
| 542 | "-find" "/" "-type" "f" | ||
| 543 | ;; XXX Even after "--" above, and despite documentation claiming | ||
| 544 | ;; otherwise, "-or" is stolen by grub-mkrescue which then chokes | ||
| 545 | ;; on it (as ‘-o …’) and dies. Don't use "-or". | ||
| 546 | "-not" "-wholename" "/boot/*" | ||
| 547 | "-not" "-wholename" "/System/*" | ||
| 548 | "-not" "-name" "unicode.pf2" | ||
| 549 | "-not" "-name" "bzImage" | ||
| 550 | "-not" "-name" "*.gz" ; initrd & all man pages | ||
| 551 | "-not" "-name" "*.png" ; includes grub-image.png | ||
| 552 | "-exec" "set_filter" "--zisofs" | ||
| 553 | "--" | ||
| 554 | |||
| 536 | "-volid" (string-upcase volume-id) | 555 | "-volid" (string-upcase volume-id) |
| 537 | (if volume-uuid | 556 | (if volume-uuid |
| 538 | `("-volume_date" "uuid" | 557 | `("-volume_date" "uuid" |
