Set zstd as recommented for kexec-tools
resolves: bz1896698
upstream: fedora
conflict: none
commit b8ec5cbda89610244fdd4711e5974350f78e63e3
Author: Tao Liu <ltao@redhat.com>
Date: Fri Jan 7 19:47:06 2022 +0800
Set zstd as recommented for kexec-tools
This patch will make zstd as recommended instead of required for
kexec-tools. If zstd command/package is unavaliable, it can failback to invoke
gzip when making kdump initramfs.
Fixes: 0311f6e
("Set zstd as the default compression method for kdump initrd")
Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
parent
35486b6030
commit
a501dcbd7b
@ -31,6 +31,11 @@ is_squash_available()
|
||||
done
|
||||
}
|
||||
|
||||
is_zstd_command_available()
|
||||
{
|
||||
[[ -x "$(command -v zstd)" ]]
|
||||
}
|
||||
|
||||
perror_exit()
|
||||
{
|
||||
derror "$@"
|
||||
|
@ -71,7 +71,7 @@ Requires: dracut >= 050
|
||||
Requires: dracut-network >= 050
|
||||
Requires: dracut-squash >= 050
|
||||
Requires: ethtool
|
||||
Requires: zstd
|
||||
Recommends: zstd
|
||||
Recommends: grubby
|
||||
BuildRequires: make
|
||||
BuildRequires: zlib-devel elfutils-devel glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel libzstd-devel
|
||||
|
5
mkdumprd
5
mkdumprd
@ -432,8 +432,13 @@ done <<< "$(kdump_read_conf)"
|
||||
handle_default_dump_target
|
||||
|
||||
if ! have_compression_in_dracut_args; then
|
||||
# Here zstd is set as the default compression method. If squash module
|
||||
# is available for dracut, libzstd will be used by mksquashfs. If
|
||||
# squash module is unavailable, command zstd will be used instead.
|
||||
if is_squash_available || is_zstd_command_available; then
|
||||
add_dracut_arg "--compress" "zstd"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $extra_modules ]]; then
|
||||
add_dracut_arg "--add-drivers" "$extra_modules"
|
||||
|
@ -62,9 +62,12 @@ if is_squash_available; then
|
||||
_dracut_isolate_args+=(--add squash)
|
||||
fi
|
||||
|
||||
# Same as setting zstd in mkdumprd
|
||||
if ! have_compression_in_dracut_args; then
|
||||
if is_squash_available || is_zstd_command_available; then
|
||||
_dracut_isolate_args+=(--compress zstd)
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! dracut --force --quiet "${_dracut_isolate_args[@]}" "$@" "$TARGET_INITRD"; then
|
||||
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
|
||||
|
Loading…
Reference in New Issue
Block a user