Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgbuilds/qemu-user-static/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"source": "local"
}
73 changes: 73 additions & 0 deletions pkgbuilds/qemu-user-static/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# aarch64-only build: Arch Linux ARM builds qemu without the static user-mode
# binaries, so the Omarchy default set (qemu-user-static-binfmt, used for
# foreign-architecture containers) repackages Debian's statically linked
# qemu-user build. On x86_64 both packages come from the Arch extra repository.

pkgbase=qemu-user-static
pkgname=('qemu-user-static' 'qemu-user-static-binfmt')
# One-time epoch moves from upstream-only to full Debian revision ordering.
# pkgver records Debian epoch.upstream.revision. Updates are reviewed pins:
# bump _debver, pkgver, _snapshot and the checksum together.
epoch=1
pkgver=1.10.0.13+ds.0+deb13u1
_debver=1:10.0.13+ds-0+deb13u1
_snapshot=02b553a4532192bc999d15408d1e56d7b254906f
pkgrel=1
pkgdesc="A generic and open source machine emulator and virtualizer - static user-mode emulation"
arch=('aarch64')
url="https://www.qemu.org"
license=('GPL-2.0-only' 'LGPL-2.1-only')
source=("qemu-binfmt-conf.sh")
# Debian removes superseded pool files. Pin the official archive snapshot so
# the same checksum-verified binary remains rebuildable. _snapshot is the
# content-addressed snapshot SHA1; SHA256 below remains the integrity check.
source_aarch64=("qemu-user_${pkgver}_arm64.deb::https://snapshot.debian.org/file/$_snapshot")
sha256sums=('5e12ef484b8364e1ba7bae4acda837d2e6320ffbeb7fab341034124553cdb137')
sha256sums_aarch64=('c73711af02b97cd5e2667e735d9c06890c57165517110ca4e646c95a7083158d')
noextract=("qemu-user_${pkgver}_arm64.deb")

prepare() {
mkdir -p deb
bsdtar -C deb -xf "qemu-user_${pkgver}_arm64.deb" data.tar.xz
bsdtar -C deb -xf deb/data.tar.xz ./usr/bin ./usr/share/doc/qemu-user/copyright
}

package_qemu-user-static() {
pkgdesc="A generic and open source machine emulator and virtualizer - static user-mode emulation"
depends=('glibc')
optdepends=('qemu-user-static-binfmt: binary format rules for foreign-architecture binaries')
provides=('qemu-user-static')
conflicts=('qemu-user-static-bin')

install -dm755 "$pkgdir/usr/bin"
local binary
for binary in deb/usr/bin/qemu-*; do
install -Dm755 "$binary" "$pkgdir/usr/bin/$(basename "$binary")-static"
done
install -Dm644 deb/usr/share/doc/qemu-user/copyright "$pkgdir/usr/share/licenses/$pkgname/copyright"
}

package_qemu-user-static-binfmt() {
pkgdesc="Binary format rules for the static QEMU user-mode emulators"
depends=('qemu-user-static')
provides=('qemu-user-binfmt-provider')
conflicts=('qemu-user-binfmt-provider' 'binfmt-qemu-static')

install -dm755 "$pkgdir/usr/lib/binfmt.d"
# HOST_ARCH keeps the native architecture out of the rule set regardless
# of the build host, so the package is identical under native and QEMU builds.
# --ignore-family keeps 32-bit ARM: the script groups it with aarch64, but
# Apple Silicon cannot execute AArch32 natively.
HOST_ARCH=aarch64 sh "$srcdir/qemu-binfmt-conf.sh" \
--systemd ALL \
--exportdir "$pkgdir/usr/lib/binfmt.d/" \
--qemu-path /usr/bin \
--qemu-suffix -static \
--persistent yes \
--preserve-argv0 yes \
--ignore-family yes
local conf
for conf in "$pkgdir"/usr/lib/binfmt.d/*.conf; do
mv "$conf" "${conf%.conf}-static.conf"
done
}
11 changes: 11 additions & 0 deletions pkgbuilds/qemu-user-static/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ARM static QEMU

This aarch64-only split recipe provides qemu-user-static and qemu-user-static-binfmt using Debian’s static ARM64 binaries. It preserves Marcelo’s recipe, imported through omarchy-mac/omarchy-pkgs-aarch64#61, including licensing and binfmt behavior. It does not change x86 packages or the build workers.

## Updates

Updates are reviewed pins, not automatic. To move to a new Debian 13 revision, update `_debver`, `pkgver` (Debian epoch.upstream.revision), `_snapshot` (the snapshot.debian.org SHA1 of the ARM64 `qemu-user` archive) and `sha256sums_aarch64` together, and confirm both Debian ordering and `vercmp` advance. A one-time Arch epoch of 1 moves away from the previous upstream-only version.

## binfmt rules

The rules are generated with `--ignore-family yes`, so 32-bit ARM binaries are registered even though the script groups them with aarch64; Apple Silicon has no AArch32 execution. Native aarch64 stays excluded. Rules use the persistent and preserve-argv0 flags and never the credential flag.
Loading
Loading