From c9a0df1ccbd35807753ed99343eb53129f5191c3 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 27 Oct 2020 10:46:50 -0400 Subject: [PATCH] Make dracut-squash a weak dep The dracut module is opportunistic about using the built-in squashfs support only when available, but the spec file hard requires it. Demote it to a weak dep to truly make it optional. This caters to environments which strive to stay minimal, like FCOS and RHCOS. See https://github.com/coreos/fedora-coreos-config/pull/708 for details. --- dracut-module-setup.sh | 3 +++ kexec-tools.spec | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index fbbd21a..474847d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -28,6 +28,9 @@ depends() { modprobe -S $KDUMP_KERNELVER --dry-run $kmodule &>/dev/null || return 1 fi done + + # check that the dracut squash module is available + [ -d "$(dracut_module_path squash)" ] || return 1 } if is_squash_available && ! is_fadump_capable; then diff --git a/kexec-tools.spec b/kexec-tools.spec index 8505c78..dcf99ed 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -58,7 +58,7 @@ Requires(postun): systemd-units Requires(pre): coreutils sed zlib Requires: dracut >= 050 Requires: dracut-network >= 050 -Requires: dracut-squash >= 050 +Recommends: dracut-squash >= 050 Requires: ethtool BuildRequires: zlib-devel elfutils-devel glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel BuildRequires: pkgconfig intltool gettext