From 2d320f93d91ee430b8011cb3395d360c0b849b72 Mon Sep 17 00:00:00 2001 From: Razvan Dimescu Date: Wed, 8 Apr 2026 19:31:11 +0300 Subject: [PATCH] fix: PKGBUILD compatibility with numa v0.10.1, fix QEMU action SHA pin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three small bug fixes that make this PR mergeable end-to-end against current main, without changing the package design (still numa-git, still pushed on every main commit, still tracking HEAD via pkgver()): 1. Simplified prepare() — drop the obsolete sed patching for /usr/local/bin/numa. That literal only appears in a comment in current main; the actual binary path is determined at runtime via std::env::current_exe(). Additionally, numa v0.10.1 ships PR #43 which makes numa FHS-compliant on Linux out of the box (/var/lib/numa for data dir), so no source patching is needed at all on Arch. 2. Fixed package() sed for the systemd unit. The previous sed targeted "ExecStart=/usr/local/bin/numa" but numa.service actually uses "{{exe_path}}" as a templating placeholder that's substituted at runtime by replace_exe_path() when `numa install` runs. The sed silently did nothing, and the AUR-installed unit file would have a literal "{{exe_path}}" that systemd cannot start. Fixed sed: sed 's|{{exe_path}}|/usr/bin/numa /etc/numa.toml|g' \ numa.service > numa.service.patched 3. Fixed broken docker/setup-qemu-action SHA pin in publish-aur.yml. The pinned SHA 6882732593b27c7f95a044d559b586a46371a68e doesn't exist as a commit in upstream docker/setup-qemu-action. Verified v3.0.0 SHA is 68827325e0b33c7199eb31dd4e31fbe9023e06e3. Without this fix the aarch64 validate job would fail to load the action at workflow start. Also refreshed the stale pkgver placeholder in PKGBUILD and .SRCINFO from 0.9.1.r0.g1234abc to 0.10.1.r0.g0000000 — purely cosmetic since pkgver() auto-overrides on every makepkg run, but at least the in-VC value reflects the current era. Co-Authored-By: Claude Opus 4.6 (1M context) --- .SRCINFO | 2 +- .github/workflows/publish-aur.yml | 2 +- PKGBUILD | 19 ++++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index a79aadb..6fb1dc3 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = numa-git pkgdesc = Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS - pkgver = 0.9.1.r0.g1234abc + pkgver = 0.10.1.r0.g0000000 pkgrel = 1 url = https://github.com/razvandimescu/numa arch = x86_64 diff --git a/.github/workflows/publish-aur.yml b/.github/workflows/publish-aur.yml index cece93a..fe2f321 100644 --- a/.github/workflows/publish-aur.yml +++ b/.github/workflows/publish-aur.yml @@ -44,7 +44,7 @@ jobs: # QEMU allows us to run ARM64 containers on x86_64 GitHub runners. - name: Set up QEMU if: matrix.arch == 'aarch64' - uses: docker/setup-qemu-action@6882732593b27c7f95a044d559b586a46371a68e # v3.0.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Build and Test Package timeout-minutes: 60 diff --git a/PKGBUILD b/PKGBUILD index b616dfc..0f5c19c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: razvandimescu pkgname=numa-git _pkgname=numa -pkgver=0.9.1.r0.g1234abc # Updated by pkgver() +pkgver=0.10.1.r0.g0000000 # Placeholder — pkgver() rewrites this on each makepkg run pkgrel=1 pkgdesc="Portable DNS resolver in Rust — .numa local domains, ad blocking, developer overrides, DNS-over-HTTPS" arch=('x86_64' 'aarch64') @@ -24,8 +24,10 @@ pkgver() { prepare() { cd "$srcdir/$_pkgname" - # Patch hardcoded paths to match Arch Linux standard (/usr/bin) - sed -i 's|/usr/local/bin/numa|/usr/bin/numa|g' src/system_dns.rs + # numa v0.10.1+ uses FHS-compliant paths on Linux by default + # (/var/lib/numa for data, journalctl for logs), so no source + # patching is needed. The earlier sed targeted /usr/local/bin/numa, + # which only appears in a comment in current main. export RUSTUP_TOOLCHAIN=stable cargo fetch --locked } @@ -45,11 +47,14 @@ check() { package() { cd "$srcdir/$_pkgname" install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname" - - # Install service file with patched path - sed 's|ExecStart=/usr/local/bin/numa|ExecStart=/usr/bin/numa /etc/numa.toml|g' numa.service > numa.service.patched + + # numa.service uses {{exe_path}} as a placeholder substituted by + # `numa install` at runtime via replace_exe_path(). For an AUR + # package install (no `numa install` step), we substitute it + # statically here so systemd gets a real ExecStart path. + sed 's|{{exe_path}}|/usr/bin/numa /etc/numa.toml|g' numa.service > numa.service.patched install -Dm644 "numa.service.patched" "$pkgdir/usr/lib/systemd/system/numa.service" - + install -Dm644 "numa.toml" "$pkgdir/etc/numa.toml" install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }