From 71bd471bb77e528663534f2dd9d66a09e2a1d382 Mon Sep 17 00:00:00 2001 From: Murph Murphy Date: Tue, 14 Jul 2026 13:21:47 -0600 Subject: [PATCH] Update after trying to run as much as I could locally via docker --- .forgejo/workflows/build-debian.yml | 17 ++++++++++++++++- changelog.d/1235.feature | 1 + src/main/Cargo.toml | 5 ++++- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 changelog.d/1235.feature diff --git a/.forgejo/workflows/build-debian.yml b/.forgejo/workflows/build-debian.yml index 449911e00..637f9e3c5 100644 --- a/.forgejo/workflows/build-debian.yml +++ b/.forgejo/workflows/build-debian.yml @@ -75,7 +75,18 @@ jobs: if: matrix.arch == 'arm64' run: | dpkg --add-architecture arm64 - apt-get update + if ! apt-get update; then + # Older Ubuntu releases (e.g. noble) advertise arm64 in their + # Release files but only serve amd64/i386 from archive.ubuntu.com, + # so apt update 404s. Restrict the main sources to amd64 and + # fetch arm64 from ports.ubuntu.com instead. + CODENAME=$(lsb_release -sc) + sed -i '/^Components:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources + printf 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports %s main restricted universe multiverse\n' \ + "$CODENAME" "$CODENAME-updates" "$CODENAME-security" \ + > /etc/apt/sources.list.d/arm64-ports.list + apt-get update + fi apt-get install -y \ gcc-aarch64-linux-gnu \ g++-aarch64-linux-gnu \ @@ -97,6 +108,10 @@ jobs: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV + # rust-rocksdb's build script probes liburing via pkg-config, which + # refuses to run when host != target unless explicitly allowed + echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH_aarch64_unknown_linux_gnu=/usr/lib/aarch64-linux-gnu/pkgconfig" >> $GITHUB_ENV - name: Get package version and component id: package-meta diff --git a/changelog.d/1235.feature b/changelog.d/1235.feature new file mode 100644 index 000000000..e7bd6ec62 --- /dev/null +++ b/changelog.d/1235.feature @@ -0,0 +1 @@ +Build and publish arm64 .deb packages alongside amd64 for all supported Debian and Ubuntu releases. diff --git a/src/main/Cargo.toml b/src/main/Cargo.toml index 416a1686d..12ec761de 100644 --- a/src/main/Cargo.toml +++ b/src/main/Cargo.toml @@ -35,7 +35,10 @@ systemd-units = { unit-name = "conduwuit", start = false, unit-scripts = "../../ assets = [ ["../../pkg/debian/README.md", "usr/share/doc/conduwuit/README.Debian", "644"], ["../../README.md", "usr/share/doc/conduwuit/", "644"], - ["../../target/release/conduwuit", "usr/bin/conduwuit", "755"], + # cargo-deb only treats the exact prefix "target/release/" as the magic + # path that resolves to the real build dir (e.g. target//release + # when cross-compiling); a ../../ prefix would be read as a literal path + ["target/release/conduwuit", "usr/bin/conduwuit", "755"], ["../../conduwuit-example.toml", "etc/conduwuit/conduwuit.toml", "640"], ]