From a3beffae156c140d20fb40a7402f36052ccbbc02 Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Mon, 31 Aug 2026 11:14:05 -0400 Subject: [PATCH] Find archiso initcpio hooks by path rather than hardcoded location Current archiso package version may place hooks at a non-standard path. Use find to locate hooks/archiso and install/archiso anywhere under /usr and copy to the canonical initcpio location in airootfs. Prints found paths so build output shows where they came from. Co-Authored-By: Claude Sonnet 4.6 --- iso/docker/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/iso/docker/Dockerfile b/iso/docker/Dockerfile index ef38418..a4a48b6 100644 --- a/iso/docker/Dockerfile +++ b/iso/docker/Dockerfile @@ -40,12 +40,16 @@ COPY . /build/orionos # efiboot/ is needed for systemd-boot UEFI; fall back to a minimal loader.conf. # Copy archiso initcpio hook files directly into airootfs so mkinitcpio # finds them even if the package-based install path differs at build time. +# Use find to locate the files regardless of exact path in current archiso version. RUN mkdir -p /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks \ /build/orionos/iso/profile/airootfs/usr/lib/initcpio/install && \ - cp /usr/lib/initcpio/hooks/archiso \ - /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks/archiso && \ - cp /usr/lib/initcpio/install/archiso \ - /build/orionos/iso/profile/airootfs/usr/lib/initcpio/install/archiso + HOOK="$(find /usr -path "*/initcpio/hooks/archiso" 2>/dev/null | head -1)" && \ + INST="$(find /usr -path "*/initcpio/install/archiso" 2>/dev/null | head -1)" && \ + echo "Hook: ${HOOK:-NOT FOUND}" && echo "Install: ${INST:-NOT FOUND}" && \ + [ -n "$HOOK" ] && cp "$HOOK" /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks/archiso || \ + (echo "ERROR: archiso initcpio hook not found in any path" && exit 1) && \ + [ -n "$INST" ] && cp "$INST" /build/orionos/iso/profile/airootfs/usr/lib/initcpio/install/archiso || \ + (echo "ERROR: archiso initcpio install not found in any path" && exit 1) RUN mkdir -p /build/orionos/iso/profile/syslinux && \ cp /usr/share/archiso/configs/releng/syslinux/*.c32 \