From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:43536) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMHpj-0005ft-Dh for guix-patches@gnu.org; Wed, 08 Apr 2020 17:02:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMHpi-0004YJ-E2 for guix-patches@gnu.org; Wed, 08 Apr 2020 17:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMHpi-0004Y4-3V for guix-patches@gnu.org; Wed, 08 Apr 2020 17:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMHpi-00014o-0n for guix-patches@gnu.org; Wed, 08 Apr 2020 17:02:02 -0400 Subject: [bug#40514] [PATCH] vm: Transparently compress iso9660 images. References: <87zhblofwk.fsf@nckx> In-Reply-To: <87zhblofwk.fsf@nckx> Resent-Message-ID: Date: Wed, 8 Apr 2020 23:01:32 +0200 Message-Id: <20200408210132.23612-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via To: 40514@debbugs.gnu.org * 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" -- 2.25.2