From b171b7bd78eacd277dafb82a8524cc224f97ba6b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 8 Jan 2025 23:43:15 +0100 Subject: [PATCH] package/dracut: use host-cross-ldd instead of host-prelink-cross This commit reworks the dracut package to use the cross-ldd installed by host-cross-ldd instead of prelink-rtld installed by host-prelink-cross. Indeed, prelink-cross is not maintained upstream, and its dependency on host-libiberty causes problems in Buildroot with other packages. The only change needed is that the dracut_wrapper script needs to be generated, as we now need to know the prefix of the cross-compilation tool (TARGET_CROSS). Tested by running the dracut tests of the test suite. Signed-off-by: Thomas Petazzoni Signed-off-by: Romain Naour --- package/dracut/dracut.mk | 8 +++++--- package/dracut/{dracut_wrapper => dracut_wrapper.in} | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) rename package/dracut/{dracut_wrapper => dracut_wrapper.in} (94%) diff --git a/package/dracut/dracut.mk b/package/dracut/dracut.mk index 8573e64055..cb6044415e 100644 --- a/package/dracut/dracut.mk +++ b/package/dracut/dracut.mk @@ -10,12 +10,14 @@ DRACUT_LICENSE = GPL-2.0 DRACUT_LICENSE_FILES = COPYING DRACUT_CPE_ID_VALID = YES -HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-prelink-cross +HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-cross-ldd define HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT mv $(HOST_DIR)/bin/dracut $(HOST_DIR)/bin/dracut.real - install -D -m 0755 $(HOST_DRACUT_PKGDIR)/dracut_wrapper \ - $(HOST_DIR)/bin/dracut + sed -e "s%@@TARGET_CROSS@@%$(TARGET_CROSS)%" \ + $(HOST_DRACUT_PKGDIR)/dracut_wrapper.in > \ + $(@D)/dracut_wrapper + install -D -m 0755 $(@D)/dracut_wrapper $(HOST_DIR)/bin/dracut endef HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT diff --git a/package/dracut/dracut_wrapper b/package/dracut/dracut_wrapper.in similarity index 94% rename from package/dracut/dracut_wrapper rename to package/dracut/dracut_wrapper.in index 968d65cbeb..33012853d5 100644 --- a/package/dracut/dracut_wrapper +++ b/package/dracut/dracut_wrapper.in @@ -34,7 +34,7 @@ topdir="$(dirname "$(realpath "$(dirname "${0}")")")" DRACUT_LDD="$(mktemp /tmp/dracut-ldd.XXXXXX)" cat >"${DRACUT_LDD}" <