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 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebb61beaac
commit
a3beffae15
1 file changed
+8
-4
@@ -40,12 +40,16 @@ COPY . /build/orionos
|
|||||||
# efiboot/ is needed for systemd-boot UEFI; fall back to a minimal loader.conf.
|
# efiboot/ is needed for systemd-boot UEFI; fall back to a minimal loader.conf.
|
||||||
# Copy archiso initcpio hook files directly into airootfs so mkinitcpio
|
# Copy archiso initcpio hook files directly into airootfs so mkinitcpio
|
||||||
# finds them even if the package-based install path differs at build time.
|
# 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 \
|
RUN mkdir -p /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks \
|
||||||
/build/orionos/iso/profile/airootfs/usr/lib/initcpio/install && \
|
/build/orionos/iso/profile/airootfs/usr/lib/initcpio/install && \
|
||||||
cp /usr/lib/initcpio/hooks/archiso \
|
HOOK="$(find /usr -path "*/initcpio/hooks/archiso" 2>/dev/null | head -1)" && \
|
||||||
/build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks/archiso && \
|
INST="$(find /usr -path "*/initcpio/install/archiso" 2>/dev/null | head -1)" && \
|
||||||
cp /usr/lib/initcpio/install/archiso \
|
echo "Hook: ${HOOK:-NOT FOUND}" && echo "Install: ${INST:-NOT FOUND}" && \
|
||||||
/build/orionos/iso/profile/airootfs/usr/lib/initcpio/install/archiso
|
[ -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 && \
|
RUN mkdir -p /build/orionos/iso/profile/syslinux && \
|
||||||
cp /usr/share/archiso/configs/releng/syslinux/*.c32 \
|
cp /usr/share/archiso/configs/releng/syslinux/*.c32 \
|
||||||
|
|||||||
Reference in new issue
Block a user