Skip to content

Commit 0039e8e

Browse files
committed
mkiso: don't install void-installer on aarch64
aarch64 is full of special cases that void-installer doesn't know about, especially for real platforms. Users should just do chroot installs for now.
1 parent c99cafb commit 0039e8e

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

mkiso.sh

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ cleanup() {
5656
rm -rf "$INCLUDEDIR"
5757
}
5858

59+
include_installer() {
60+
if [ -x installer.sh ]; then
61+
MKLIVE_VERSION="$(PROGNAME='' version)"
62+
installer=$(mktemp)
63+
sed "s/@@MKLIVE_VERSION@@/${MKLIVE_VERSION}/" installer.sh > "$installer"
64+
install -Dm755 "$installer" "$INCLUDEDIR"/usr/bin/void-installer
65+
rm "$installer"
66+
else
67+
echo installer.sh not found >&2
68+
exit 1
69+
fi
70+
}
71+
5972
setup_pipewire() {
6073
PKGS="$PKGS pipewire alsa-pipewire"
6174
mkdir -p "$INCLUDEDIR"/etc/xdg/autostart
@@ -72,10 +85,16 @@ build_variant() {
7285
variant="$1"
7386
shift
7487
IMG=void-live-${ARCH}-${DATE}-${variant}.iso
88+
89+
# el-cheapo installer is unsupported on arm because arm doesn't install a kernel by default
90+
# and to work around that would add too much complexity to it
91+
# thus everyone should just do a chroot install anyways
92+
WANT_INSTALLER=no
7593
case "$ARCH" in
76-
x86_64*|i686*) GRUB_PKGS="grub-i386-efi grub-x86_64-efi" ;;
94+
x86_64*|i686*) GRUB_PKGS="grub-i386-efi grub-x86_64-efi"; WANT_INSTALLER=yes ;;
7795
aarch64*) GRUB_PKGS="grub-arm64-efi" ;;
7896
esac
97+
7998
A11Y_PKGS="espeakup void-live-audio brltty"
8099
PKGS="dialog cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror chrony tmux $A11Y_PKGS $GRUB_PKGS"
81100
XORG_PKGS="xorg-minimal xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf orca"
@@ -140,6 +159,14 @@ indicators = ~host;~spacer;~clock;~spacer;~layout;~session;~a11y;~power
140159
EOF
141160
fi
142161

162+
if [ "$WANT_INSTALLER" = yes ]; then
163+
include_installer
164+
else
165+
mkdir -p "$INCLUDEDIR"/usr/bin
166+
printf "#!/bin/sh\necho 'void-installer is not supported on this live image'\n" > "$INCLUDEDIR"/usr/bin/void-installer
167+
chmod 755 "$INCLUDEDIR"/usr/bin/void-installer
168+
fi
169+
143170
if [ "$variant" != base ]; then
144171
setup_pipewire
145172
fi
@@ -154,17 +181,6 @@ if [ ! -x mklive.sh ]; then
154181
exit 1
155182
fi
156183

157-
if [ -x installer.sh ]; then
158-
MKLIVE_VERSION="$(PROGNAME='' version)"
159-
installer=$(mktemp)
160-
sed "s/@@MKLIVE_VERSION@@/${MKLIVE_VERSION}/" installer.sh > "$installer"
161-
install -Dm755 "$installer" "$INCLUDEDIR"/usr/bin/void-installer
162-
rm "$installer"
163-
else
164-
echo installer.sh not found >&2
165-
exit 1
166-
fi
167-
168184
if [ -n "$TRIPLET" ]; then
169185
VARIANT="${TRIPLET##*-}"
170186
REST="${TRIPLET%-*}"

0 commit comments

Comments
 (0)