Hello all,
I'm trying to figure out the best way to handle cross-architecture
installations. Right now, I can create a pretty much bootable RPi 3
image with KDE using this command:
apk --arch aarch64 --root /path/to/sdcard -X
https://distfiles.adelielinux.org/adelie/1.0/system -X
https://distfiles.adelielinux.org/adelie/1.0/user --initdb add
adelie-base-posix kde x11
However, some packages fail to install properly if the host computer
isn't aarch64. Notably, this includes D-Bus, which needs to generate a
machine ID during installation:
== user/dbus/dbus.post-install ==
#!/bin/sh
exec dbus-uuidgen --ensure
This doesn't work because dbus-uuidgen is in the SD card root. It is an
ARM binary, not a PowerPC binary as my host system expects. So we end
up with: Exec format error.
It's possible to pass --no-scripts to apk to avoid the attempted
execution of these scripts, which would then prevent world from being
marked broken on the SD card. This would silently break D-Bus, though.
Alternatively, one could set up a oneshot service to run 'apk fix' on
first system boot. My concern is that it would have to pull the apks
off the network, which could be slow or even non-existent.
As you can see, neither of these options are very appealing.
Does anyone have any ideas on how we could handle this usage? One idea
I had was to add a --scripts-only flag to apk fix, to avoid redownload
and reinstall of the package and simply re-run any scripts that have
failed execution.
I suppose some scripts may need to be reworked to handle being called
multiple times, but this shouldn't be a large issue and is probably a
good idea from a correctness perspective anyway.
However, I'm open to other ideas. Let's discuss!
Best,
--arw
--
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org