#4 Make dracut-squash a weak dep
Merged 3 years ago by kasong. Opened 3 years ago by jlebon.
rpms/ jlebon/kexec-tools pr/weak-dep  into  master

file modified
@@ -28,6 +28,9 @@ 

                  modprobe -S $KDUMP_KERNELVER --dry-run $kmodule &>/dev/null || return 1




+         # check that the dracut squash module is available

+         [ -d "$(dracut_module_path squash)" ] || return 1



      if is_squash_available && ! is_fadump_capable; then

file modified
+1 -1
@@ -58,7 +58,7 @@ 

  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

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

One small problem, currently in dracut-module-setup.sh:
is_squash_available() return true if kernel modules "squashfs overlay loop" are available. And kdump dracut module will declare a hard dependency on dracut-squash module, if that function return true.
So kdump will refuse to build the initramfs if kernel supports squashfs but the dracut-squash module is missing. And so kdump is broken.
Will need to make is_squash_available() also cover the case that squash-utils or dracut-squash module is missing.

rebased onto c9a0df1

3 years ago

Good catch. I've added a check for this now, but haven't tested it yet.

Pull-Request has been merged by kasong

3 years ago