In its install function the module calls curl --version, with the clear assumption that the result describes the binary to be installed into the initrd, as it is used to decide whether to install certain libraries:
|
if curl --version | grep -qi '\bNSS\b'; then |
|
# also install libs for curl https |
|
inst_libdir_file "libnsspem.so*" |
|
inst_libdir_file "libnsssysinit.so*" |
|
inst_libdir_file "libsoftokn3.so*" |
|
inst_libdir_file "libsqlite3.so*" |
|
fi |
This does not work with --sysroot: The curl binary in the sysroot may be different from the one in PATH, and in case of a cross-compiled sysroot it may not be executable at all while building the initrd.
If possible the libraries to install should be determined without calling the binary, if this is not possible the binary in the sysroot (if any) needs to be called, with an override for cross-sysroot where that cannot work (see the busybox module for an example).
In its
installfunction the module callscurl --version, with the clear assumption that the result describes the binary to be installed into the initrd, as it is used to decide whether to install certain libraries:dracut/modules.d/45url-lib/module-setup.sh
Lines 22 to 28 in 8453799
This does not work with
--sysroot: Thecurlbinary in the sysroot may be different from the one inPATH, and in case of a cross-compiled sysroot it may not be executable at all while building the initrd.If possible the libraries to install should be determined without calling the binary, if this is not possible the binary in the sysroot (if any) needs to be called, with an override for cross-sysroot where that cannot work (see the
busyboxmodule for an example).