Skip to content

Commit

Permalink
v9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng committed Jan 19, 2025
1 parent 9c27a6f commit 86227b7
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 64 deletions.
11 changes: 7 additions & 4 deletions .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,17 @@ G_EXEC_OUTPUT=1 G_EXEC e2fsck -fp "${FP_LOOP}p1"
G_EXEC mkdir rootfs
G_EXEC mount "${FP_LOOP}p1" rootfs

# Enforce ARMv6 arch on Raspbian
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'
# Enforce target ARM arch in containers with newer host/emulated ARM version
if (( $arch < 3 && $G_HW_ARCH != $arch ))
then
# shellcheck disable=SC2015
echo -e "#/bin/dash\n[ \"\$*\" = -m ] && echo $ARCH || /bin/uname \"\$@\"" > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname || Error_Exit "Failed to generate /usr/local/bin/uname for $ARCH"
fi

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
# - Workaround for failing systemd services and hence missing autologin in emulated Trixie containers: https://gitlab.com/qemu-project/qemu/-/issues/1962, https://github.com/systemd/systemd/issues/31219
if [[ $DISTRO == 'trixie' ]] && (( $G_HW_ARCH != $arch && ( $G_HW_ARCH > 9 || $G_HW_ARCH < $arch ) ))
if [[ $DISTRO == 'trixie' && $emulation == 1 ]]
then
for i in rootfs/usr/lib/systemd/system/*.service
do
Expand Down
4 changes: 2 additions & 2 deletions .build/software/vaultwarden/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ done
G_DIETPI-NOTIFY 2 'Installing Rust via rustup'
# - ARMv6: Set default target explicitly, otherwise it compiles for ARMv7 in emulated container
grep -q '^ID=raspbian' /etc/os-release && G_HW_ARCH_NAME='armv6l' host=('--default-host' 'arm-unknown-linux-gnueabihf') || host=()
# - ARMv7: Apply workaround for failing crates index update in in emulated 32-bit ARM environments: https://github.com/rust-lang/cargo/issues/8719. CARGO_REGISTRIES_CRATES_IO_PROTOCOL='sparse' does not solve everything: https://github.com/rust-lang/cargo/issues/8719#issuecomment-1928540617
# - ARMv7: Apply workaround for failing crates index update in emulated 32-bit ARM environments: https://github.com/rust-lang/cargo/issues/8719. CARGO_REGISTRIES_CRATES_IO_PROTOCOL='sparse' does not solve everything: https://github.com/rust-lang/cargo/issues/8719#issuecomment-1928540617
# - ARMv8: Apply workaround for increased cargo fetch RAM usage: https://github.com/rust-lang/cargo/issues/10583
export HOME=$(mktemp -d) CARGO_NET_GIT_FETCH_WITH_CLI='true'
#export HOME=$(mktemp -d) CARGO_NET_GIT_FETCH_WITH_CLI='true'
G_EXEC cd "$HOME"
G_EXEC curl -sSfo rustup-init.sh 'https://sh.rustup.rs'
G_EXEC chmod +x rustup-init.sh
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/dietpi-software-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ jobs:
- { arch: x86_64, name: gogs }
fail-fast: false
name: "${{ matrix.name }} - ${{ matrix.arch }} - ${{ matrix.dist }}"
# aarch64 build in QEMU-emulated Bullseye containers on Ubuntu Noble hosts fail:
# Processing triggers for libc-bin (2.31-13+deb11u10) ...
# qemu: uncaught target signal 11 (Segmentation fault) - core dumped
runs-on: ${{ matrix.dist == 'bullseye' && matrix.arch == 'aarch64' && 'ubuntu-22.04' || 'ubuntu-24.04' }}
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
steps:
- name: Build
run: sudo bash -c "G_GITOWNER=$GITHUB_REPOSITORY_OWNER G_GITBRANCH=$GITHUB_REF_NAME; $(curl -sSf "https://raw.githubusercontent.com/$GITHUB_REPOSITORY_OWNER/DietPi/$GITHUB_REF_NAME/.build/software/dietpi-software-build.bash")" -- -n '${{ matrix.name }}' -a '${{ matrix.arch }}' -d '${{ matrix.dist }}'
Expand Down
Loading

0 comments on commit 86227b7

Please sign in to comment.