diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | lib/MGA/DrakISO/BuildLoop.pm | 9 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,6 @@ +- allow user to select compression type/level for mksquashfs + - default to zstd, level 18 + 1.13 - bootloader: in grub 2.04 linux16/linuxefi are included in linux module diff --git a/lib/MGA/DrakISO/BuildLoop.pm b/lib/MGA/DrakISO/BuildLoop.pm index ebaef11..d47b6e9 100644 --- a/lib/MGA/DrakISO/BuildLoop.pm +++ b/lib/MGA/DrakISO/BuildLoop.pm @@ -1,6 +1,6 @@ # Copyright (C) 2005 Mandriva # Olivier Blin <oblin@mandriva.com> -# Copyright (C) 2017-2018 Mageia +# Copyright (C) 2017-2020 Mageia # Martin Whitaker <mageia@martin-whitaker.me.uk> # # This program is free software; you can redistribute it and/or modify @@ -58,12 +58,17 @@ sub build_live_loopback_file { my @excluded_files = expand_file_list($build, @{$build->{loopbacks}{exclude} || []}); output_p($exclude_list, map { $root . "$_\n" } grep { run_as_root('test', '-e', $root . $_) } @excluded_files); + my ($compress_type, $compress_level) = split(':', $build->{loopbacks}{compression} || 'zstd:18'); + my $sort = $build->{settings}{config_root} . '/config/distrib.sort'; run_as_root(join(' ', 'mksquashfs', $root, $dest, '-noappend', - '-comp', 'xz', + '-comp', $compress_type, + if_($compress_type eq 'zstd' && $compress_level, + '-Xcompression-level', $compress_level + ), '-b', '1048576', '-ef', $exclude_list, if_(-f $sort, '-sort', $sort), |