Add ARM64 (aarch64) support for AppImage builds

This commit enables building AppImages for both x86_64 and aarch64
architectures, making Pallectrum accessible on ARM-based systems
This commit is contained in:
2026-01-11 09:24:00 +01:00
parent ec2790d138
commit 8feb651986
2 changed files with 35 additions and 13 deletions

View File

@@ -80,9 +80,11 @@ ARG UID=1000
RUN if [ "$UID" != "0" ] ; then useradd --uid $UID --create-home --shell /bin/bash "user" ; fi RUN if [ "$UID" != "0" ] ; then useradd --uid $UID --create-home --shell /bin/bash "user" ; fi
RUN usermod -append --groups sudo $(id -nu $UID || echo "user") RUN usermod -append --groups sudo $(id -nu $UID || echo "user")
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN HOME_DIR=$(getent passwd $UID | cut -d: -f6) RUN HOME_DIR=$(getent passwd $UID | cut -d: -f6) && \
ENV WORK_DIR="${HOME_DIR}/wspace" \ echo "WORK_DIR=${HOME_DIR}/wspace" >> /etc/environment && \
PATH="${HOME_DIR}/.local/bin:${PATH}" echo "PATH=${HOME_DIR}/.local/bin:${PATH}" >> /etc/environment
ENV WORK_DIR="/home/user/wspace" \
PATH="/home/user/.local/bin:${PATH}"
WORKDIR ${WORK_DIR} WORKDIR ${WORK_DIR}
RUN chown --recursive ${UID} ${WORK_DIR} RUN chown --recursive ${UID} ${WORK_DIR}
USER ${UID} USER ${UID}

View File

@@ -4,14 +4,16 @@ AppImage binary for Electrum
✓ _This binary should be reproducible, meaning you should be able to generate ✓ _This binary should be reproducible, meaning you should be able to generate
binaries that match the official releases._ binaries that match the official releases._
- _Minimum supported target system (i.e. what end-users need): x86_64, glibc 2.31_ - _Minimum supported target system (i.e. what end-users need):_
- _x86_64: glibc 2.31_
- _aarch64 (ARM64): glibc 2.31_
This assumes an Ubuntu host, but it should not be too hard to adapt to another This assumes an Ubuntu (or similar Debian-based) host, but it should not be too hard
similar system. The host architecture should be x86_64 (amd64). to adapt to another similar system.
We currently only build a single AppImage, for x86_64 architecture. We support building AppImages for both x86_64 (amd64) and aarch64 (ARM64) architectures.
Help to adapt these scripts to build for (some flavor of) ARM would be welcome, **Important**: The host architecture must match the target architecture (i.e., build
see [issue #5159](https://github.com/spesmilo/electrum/issues/5159). x86_64 AppImages on x86_64 hosts, and aarch64 AppImages on aarch64 hosts like Raspberry Pi).
1. Install Docker 1. Install Docker
@@ -22,28 +24,44 @@ see [issue #5159](https://github.com/spesmilo/electrum/issues/5159).
2. Build binary 2. Build binary
**For x86_64 (amd64):**
``` ```
$ ./build.sh $ ./build.sh
``` ```
If you want reproducibility, try instead e.g.: Or for reproducibility:
``` ```
$ ELECBUILD_COMMIT=HEAD ./build.sh $ ELECBUILD_COMMIT=HEAD ./build.sh
``` ```
**For aarch64 (ARM64):**
```
$ ARCH=aarch64 ./build.sh
```
Or for reproducibility:
```
$ ARCH=aarch64 ELECBUILD_COMMIT=HEAD ./build.sh
```
**Note**: By default, `ARCH` is set to `x86_64` if not specified.
3. The generated binary is in `./dist`. 3. The generated binary is in `./dist`.
Output files are named with the architecture suffix:
- `pallectrum-<version>-x86_64.AppImage`
- `pallectrum-<version>-aarch64.AppImage`
## FAQ ## FAQ
### How can I see what is included in the AppImage? ### How can I see what is included in the AppImage?
Execute the binary as follows: `./electrum*.AppImage --appimage-extract` Execute the binary as follows: `./pallectrum*.AppImage --appimage-extract`
### How to investigate diff between binaries if reproducibility fails? ### How to investigate diff between binaries if reproducibility fails?
``` ```
cd dist/ cd dist/
./electrum-*-x86_64.AppImage1 --appimage-extract ./pallectrum-*-x86_64.AppImage1 --appimage-extract
mv squashfs-root/ squashfs-root1/ mv squashfs-root/ squashfs-root1/
./electrum-*-x86_64.AppImage2 --appimage-extract ./pallectrum-*-x86_64.AppImage2 --appimage-extract
mv squashfs-root/ squashfs-root2/ mv squashfs-root/ squashfs-root2/
$(cd squashfs-root1; find -type f -exec sha256sum '{}' \; > ./../sha256sum1) $(cd squashfs-root1; find -type f -exec sha256sum '{}' \; > ./../sha256sum1)
$(cd squashfs-root2; find -type f -exec sha256sum '{}' \; > ./../sha256sum2) $(cd squashfs-root2; find -type f -exec sha256sum '{}' \; > ./../sha256sum2)
@@ -51,6 +69,8 @@ diff sha256sum1 sha256sum2 > d
cat d cat d
``` ```
(Replace `x86_64` with `aarch64` for ARM64 builds)
For file metadata, e.g. timestamps: For file metadata, e.g. timestamps:
``` ```
rsync -n -a -i --delete squashfs-root1/ squashfs-root2/ rsync -n -a -i --delete squashfs-root1/ squashfs-root2/