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>
96 lines
4.5 KiB
Docker
96 lines
4.5 KiB
Docker
FROM archlinux:latest
|
|
|
|
# Disable pacman's alpm sandbox (seccomp-incompatible inside Docker/BuildKit)
|
|
RUN echo "DisableSandbox" >> /etc/pacman.conf
|
|
|
|
# Update and install archiso + OrionOS build dependencies
|
|
RUN pacman -Syu --noconfirm && \
|
|
pacman -S --noconfirm \
|
|
archiso \
|
|
syslinux \
|
|
base-devel \
|
|
git \
|
|
libx11 \
|
|
libxft \
|
|
libxfixes \
|
|
libxext \
|
|
libpng \
|
|
imlib2 \
|
|
dbus \
|
|
pam \
|
|
fontconfig \
|
|
freetype2 \
|
|
xorg-server \
|
|
xorg-xinit \
|
|
feh \
|
|
picom \
|
|
alsa-utils \
|
|
ttf-dejavu \
|
|
noto-fonts \
|
|
pkgconf && \
|
|
pacman -Scc --noconfirm
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy OrionOS source
|
|
COPY . /build/orionos
|
|
|
|
# Bootstrap boot loader configs from the installed archiso releng profile.
|
|
# Copy only the .c32 binary modules — our repo provides syslinux.cfg.
|
|
# 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 && \
|
|
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 \
|
|
/build/orionos/iso/profile/syslinux/ 2>/dev/null || true && \
|
|
if [ -d /usr/share/archiso/configs/releng/efiboot ]; then \
|
|
cp -r /usr/share/archiso/configs/releng/efiboot \
|
|
/build/orionos/iso/profile/; \
|
|
else \
|
|
mkdir -p /build/orionos/iso/profile/efiboot/loader/entries && \
|
|
printf 'timeout 4\ndefault arch-*\n' \
|
|
> /build/orionos/iso/profile/efiboot/loader/loader.conf; \
|
|
fi
|
|
|
|
# Build OrionOS components (full output — no tail so errors are visible)
|
|
RUN cd /build/orionos && make
|
|
|
|
# Install binaries into the staging root that archiso will include
|
|
RUN cd /build/orionos && \
|
|
install -Dm755 wm/orionwm /build/orionos/iso/profile/airootfs/usr/local/bin/orionwm && \
|
|
install -Dm755 deskbar/oriondeskbar /build/orionos/iso/profile/airootfs/usr/local/bin/oriondeskbar && \
|
|
install -Dm755 launcher/orionlauncher /build/orionos/iso/profile/airootfs/usr/local/bin/orionlauncher && \
|
|
install -Dm755 themes/orionwallpaper /build/orionos/iso/profile/airootfs/usr/local/bin/orionwallpaper && \
|
|
install -Dm755 orionnotify/orionnotify /build/orionos/iso/profile/airootfs/usr/local/bin/orionnotify && \
|
|
install -Dm755 orionlock/orionlock /build/orionos/iso/profile/airootfs/usr/local/bin/orionlock && \
|
|
install -Dm755 orionshot/orionshot /build/orionos/iso/profile/airootfs/usr/local/bin/orionshot && \
|
|
install -Dm755 orionclip/orionclip /build/orionos/iso/profile/airootfs/usr/local/bin/orionclip && \
|
|
install -Dm755 orionpkg/orionpkg /build/orionos/iso/profile/airootfs/usr/local/bin/orionpkg && \
|
|
mkdir -p /build/orionos/iso/profile/airootfs/usr/share/themes/ && \
|
|
cp -r themes/OrionOS /build/orionos/iso/profile/airootfs/usr/share/themes/ && \
|
|
install -Dm644 themes/picom.conf /build/orionos/iso/profile/airootfs/etc/orionos/picom.conf
|
|
|
|
# Generate default wallpaper
|
|
RUN mkdir -p /build/orionos/iso/profile/airootfs/usr/share/orionos/wallpapers && \
|
|
bash /build/orionos/themes/wallpapers/generate-default.sh 2>/dev/null && \
|
|
cp -f /build/orionos/themes/wallpapers/orionos-default.png \
|
|
/build/orionos/iso/profile/airootfs/usr/share/orionos/wallpapers/ 2>/dev/null || true
|
|
|
|
# Build the ISO at container runtime — mkarchiso needs --privileged (from docker run)
|
|
# Output goes to /dist which build-iso.sh mounts from the host.
|
|
CMD mkarchiso -v \
|
|
-w /tmp/iso-work \
|
|
-o /dist \
|
|
/build/orionos/iso/profile
|