Skip to content

url-lib module assumes host and target curl are the same #2766

Description

@airtower-luna

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions