Add omarchy-mac-boot for aarch64 edge
The Apple Silicon boot package (Mac initramfs, in-place encryption, first boot and the Limine activation gate) now builds from packages/omarchy-mac/boot in omacom/omarchy-mac at a pinned commit: the recipe runs the source's tests and install staging, and keeps only metadata, backup= and the pacman scriptlet from the fork recipe. aarch64 and edge only; 20260925-1 upgrades the fork's 20260921-10. It needs the Apple-gated limine-mkinitcpio-hook 1.39.0-2.
This commit is contained in:
1 parent
d6be5b09b3
commit
865aaa3f65
4 files changed
+126
No files matched your search
@@ -0,0 +1 @@
|
||||
{ "source": "local", "channels": ["edge"] }
|
||||
@@ -0,0 +1,52 @@
|
||||
# Maintainer: Marcelo Alcantara <maralc@gmail.com>
|
||||
# Recipe from maralcbr/omarchy-pkgs asahi-quattro pkgbuilds/omarchy-mac-boot
|
||||
# (20260921-10 at 0a55baeddecf59687c32b4bd4e1dee743605c183); the payload now
|
||||
# builds from packages/omarchy-mac/boot in omacom/omarchy-mac.
|
||||
|
||||
pkgname=omarchy-mac-boot
|
||||
# pkgver is the UTC commit date of _commit, so it sorts above the fork's
|
||||
# 20260921-N. Reset pkgrel to 1 when pkgver changes; bump it to re-pin or
|
||||
# rebuild on the same day.
|
||||
pkgver=20260925
|
||||
pkgrel=1
|
||||
pkgdesc='Apple Silicon boot support for Omarchy: initramfs, in-place encryption, first boot and Limine activation'
|
||||
arch=('aarch64')
|
||||
url='https://github.com/omacom/omarchy-mac'
|
||||
license=('MIT')
|
||||
makedepends=('git')
|
||||
provides=('omarchy-apple-boot' 'omarchy-first-boot')
|
||||
conflicts=('omarchy-apple-boot' 'omarchy-first-boot')
|
||||
replaces=('omarchy-apple-boot' 'omarchy-first-boot')
|
||||
install=omarchy-mac-boot.install
|
||||
# An exact omarchy-mac commit, never a branch.
|
||||
_commit=1855e11294c7bb82f5832822a7a1185b23ff8492
|
||||
source=("omarchy-mac::git+https://github.com/omacom/omarchy-mac.git#commit=${_commit}")
|
||||
sha256sums=('e16c9765bf0f8a8f230021850d503e11edd4579857e9239c464f4f50d1104d0a')
|
||||
|
||||
prepare() {
|
||||
# Tests and staging must not be able to read the surrounding desktop source.
|
||||
rm -rf "$srcdir/boot"
|
||||
cp -a "$srcdir/omarchy-mac/packages/omarchy-mac/boot" "$srcdir/boot"
|
||||
[[ $(git -C "$srcdir/omarchy-mac" rev-parse HEAD) == "$_commit" ]]
|
||||
[[ $(TZ=UTC0 git -C "$srcdir/omarchy-mac" show -s --format=%cd --date=format-local:%Y%m%d HEAD) == "$pkgver" ]]
|
||||
}
|
||||
|
||||
check() {
|
||||
"$srcdir/boot/test/all"
|
||||
}
|
||||
|
||||
package() {
|
||||
# Runtime-only, so the builder stages and tests the payload without the
|
||||
# desktop or a boot chain. 1.39.0-2 is the first limine-mkinitcpio-hook that
|
||||
# leaves a Mac's /boot to mkinitcpio until Limine is activated.
|
||||
depends=('omarchy' 'limine' 'limine-mkinitcpio-hook>=1.39.0-2' 'limine-snapper-sync' 'asahi-scripts'
|
||||
'bash' 'btrfs-progs' 'coreutils' 'cpio' 'cryptsetup' 'diffutils' 'gawk' 'gnupg' 'grep' 'gum'
|
||||
'gzip' 'kbd' 'mkinitcpio' 'sed' 'systemd' 'util-linux')
|
||||
|
||||
"$srcdir/boot/install" "$pkgdir"
|
||||
printf '%s\n' "$_commit" | install -Dm644 /dev/stdin "$pkgdir/usr/share/omarchy-mac/boot-source-revision"
|
||||
|
||||
# Administrator-editable: every /etc path and the initramfs helpers an image
|
||||
# may rewrite.
|
||||
mapfile -t backup < <(cd "$pkgdir" && find etc usr/lib/omarchy/initcpio -type f | sort)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
# omarchy-mac-boot
|
||||
|
||||
Apple Silicon boot support for Omarchy: the Mac mkinitcpio drop-ins and initcpio hooks, in-place LUKS conversion in the initramfs, vendor firmware in early boot, first boot of a Mac image, the Limine activation gate and the boot check. The source is `packages/omarchy-mac/boot/` in omacom/omarchy-mac, with its own tests. The recipe pins an exact omarchy-mac commit, copies that directory away from the surrounding desktop tree in `prepare()`, runs its `test/all` in `check()` and stages the package with its `install` script. The recipe itself holds only metadata, `backup=` and the pacman scriptlet.
|
||||
|
||||
It follows the fork recipe in maralcbr/omarchy-pkgs (`asahi-quattro`, `pkgbuilds/omarchy-mac-boot` at 20260921-10), which carried the payload as files in the recipe.
|
||||
|
||||
## Scope
|
||||
|
||||
The package is aarch64-only and published to edge only. It widens to rc and stable only after M1 and M2 cold-boot qualification. It depends only on generic packages, and its only provides are the retired Apple-only names, so nothing generic can pull it onto non-Apple aarch64 machines.
|
||||
|
||||
It requires `limine-mkinitcpio-hook` 1.39.0-2 or newer: that is the first build whose hooks leave a Mac's `/boot` to mkinitcpio until Limine is activated. With an older hook, Limine's kernel hook replaces mkinitcpio's by name, and this package's `limine-ready` gate stops it on a Mac that still boots GRUB, so a kernel update would never reach `/boot`.
|
||||
|
||||
## Transition
|
||||
|
||||
- It provides, conflicts with and replaces `omarchy-apple-boot` and `omarchy-first-boot`. The scriptlet moves a pending `omarchy-first-boot` marker to `omarchy-mac-first-boot`, drops the replaced unit's dangling enable link and points at a customised `90-omarchy-asahi.conf.pacsave`.
|
||||
- `pkgver` is the UTC commit date of the pin, so `20260925-1` upgrades the fork's `20260921-10` on mx-mac Macs. The files the fork shipped that the source no longer does (the image finalize tools, the upstream ARM repository key and the GRUB snapshot-menu hook) are removed by that upgrade.
|
||||
- `backup=` covers every `/etc` path and `/usr/lib/omarchy/initcpio`. It includes `/etc/default/update-m1n1`, which pins update-m1n1's device-tree order to the C locale. On a Mac that already has its own unowned copy, pacman keeps it and installs the shipped one as `.pacnew`.
|
||||
|
||||
## Updates
|
||||
|
||||
Updates are reviewed pins, never a branch:
|
||||
|
||||
1. Set `_commit` to the full omarchy-mac SHA and `pkgver` to its UTC commit date (`TZ=UTC0 git show -s --format=%cd --date=format-local:%Y%m%d <sha>`); `prepare()` checks both.
|
||||
2. Reset `pkgrel` to 1 when `pkgver` changes; bump it for a second pin on the same date or a rebuild.
|
||||
3. Refresh `sha256sums` with `makepkg -g`.
|
||||
@@ -0,0 +1,48 @@
|
||||
_omarchy_mac_boot_asahi_pacsave_notice() {
|
||||
local pacsave=/etc/mkinitcpio.conf.d/90-omarchy-asahi.conf.pacsave
|
||||
local shipped=/etc/mkinitcpio.conf.d/90-omarchy-mac.conf
|
||||
|
||||
[[ -f $pacsave && -f $shipped ]] || return 0
|
||||
cmp -s "$pacsave" "$shipped" && return 0
|
||||
|
||||
cat <<EOF
|
||||
==> omarchy-mac-boot: a customized 90-omarchy-asahi.conf was preserved as:
|
||||
$pacsave
|
||||
The active mkinitcpio drop-in is now:
|
||||
$shipped
|
||||
Merge any remaining local changes into the new file.
|
||||
EOF
|
||||
}
|
||||
|
||||
_omarchy_mac_boot_migrate_legacy_first_boot() {
|
||||
local legacy=/var/lib/omarchy/first-boot/pending
|
||||
local successor=/var/lib/omarchy/mac-first-boot/pending
|
||||
|
||||
[[ -e $legacy ]] || return 0
|
||||
install -Dm644 /dev/null "$successor"
|
||||
rm -f "$legacy"
|
||||
systemctl --no-reload enable omarchy-mac-first-boot.service 2>/dev/null || {
|
||||
install -d /etc/systemd/system/multi-user.target.wants
|
||||
ln -sfr /usr/lib/systemd/system/omarchy-mac-first-boot.service \
|
||||
/etc/systemd/system/multi-user.target.wants/omarchy-mac-first-boot.service
|
||||
}
|
||||
}
|
||||
|
||||
post_install() {
|
||||
_omarchy_mac_boot_asahi_pacsave_notice
|
||||
_omarchy_mac_boot_migrate_legacy_first_boot
|
||||
_omarchy_mac_boot_drop_legacy_wants
|
||||
}
|
||||
|
||||
_omarchy_mac_boot_drop_legacy_wants() {
|
||||
# The replaced omarchy-first-boot left its preset-enabled link behind.
|
||||
local link=/etc/systemd/system/multi-user.target.wants/omarchy-first-boot.service
|
||||
[[ -L $link && ! -e $link ]] && rm -f "$link"
|
||||
return 0
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
_omarchy_mac_boot_asahi_pacsave_notice
|
||||
_omarchy_mac_boot_migrate_legacy_first_boot
|
||||
_omarchy_mac_boot_drop_legacy_wants
|
||||
}
|
||||
Reference in new issue
Block a user