omarchy-settings-dev: ship the full set on aarch64 for runtime-profile sources
#638 gave omarchy-settings this and -dev was never ported, so edge, the only channel aarch64 machines are qualified for, still stripped zram, oomd, zswap, the sysctl tuning and USB autosuspend there: on Snapdragon, migration 1790328426 installs zram-generator, finds no dev-zram0.swap and completes without zram. A source with default/settings-runtime-profile now gets the same files, backup and optdepends on aarch64 as on x86_64, Thunderbolt drop-in included, and its HOOKS files ship as they are. Older sources, including the current quattro pin, keep today's aarch64 package. The platform guard and its detector check stay aarch64-only (#691, #694). The keyboard backlight unit first-run enables ships whenever the source has it, as in omarchy-settings. tests/settings-runtime-profile.sh now runs both recipes. pkgrel 5 so the recipe change builds; the payload from the current pin is unchanged.
This commit is contained in:
1 parent
47a3024683
commit
ea7738975a
2 files changed
+61
-32
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Ryan Hughes <ryan@omarchy.org>
|
# Maintainer: Ryan Hughes <ryan@omarchy.org>
|
||||||
pkgname='omarchy-settings-dev'
|
pkgname='omarchy-settings-dev'
|
||||||
pkgver=4.0.0.r6663.g3faafba
|
pkgver=4.0.0.r6663.g3faafba
|
||||||
pkgrel=4
|
pkgrel=5
|
||||||
# Pinned by the upstream watch in .omarchy/package.json (bin/sync-upstream):
|
# Pinned by the upstream watch in .omarchy/package.json (bin/sync-upstream):
|
||||||
# every quattro tip becomes a commit pin here, so the package is versioned,
|
# every quattro tip becomes a commit pin here, so the package is versioned,
|
||||||
# checksummed and built exactly like a release, just more often. The r-number
|
# checksummed and built exactly like a release, just more often. The r-number
|
||||||
@@ -10,11 +10,14 @@ pkgrel=4
|
|||||||
_commit=3faafba234e530b0986196b98dc2c38951e7dd6f
|
_commit=3faafba234e530b0986196b98dc2c38951e7dd6f
|
||||||
pkgdesc='Omarchy user defaults, /etc/skel content, fonts, plymouth theme, and support helpers (quattro branch tip)'
|
pkgdesc='Omarchy user defaults, /etc/skel content, fonts, plymouth theme, and support helpers (quattro branch tip)'
|
||||||
# Arch-specific because the shipped /etc tree is not the same on every
|
# Arch-specific because the shipped /etc tree is not the same on every
|
||||||
# architecture: the zram and oomd drop-ins belong to the x86_64 memory stack
|
# architecture for older sources: their zram and oomd drop-ins belong to the
|
||||||
# and are left out of the aarch64 package (see package()). The Limine and
|
# x86_64 memory stack and are left out of the aarch64 package (see package()).
|
||||||
# mkinitcpio drop-ins ship on both: UEFI aarch64 installs (DGX Spark,
|
# The Limine and mkinitcpio drop-ins ship on both: UEFI aarch64 installs (DGX
|
||||||
# Snapdragon X) boot with Limine and an encrypted root exactly like x86_64.
|
# Spark, Snapdragon X) boot with Limine and an encrypted root exactly like
|
||||||
# makepkg only honours the arch-suffixed arrays below on arch-specific packages.
|
# x86_64. A source with default/settings-runtime-profile decides at runtime
|
||||||
|
# which platform-specific files apply, and its aarch64 package ships the same
|
||||||
|
# files as x86_64. makepkg only honours the arch-suffixed arrays below on
|
||||||
|
# arch-specific packages.
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
url='https://github.com/basecamp/omarchy'
|
url='https://github.com/basecamp/omarchy'
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
@@ -81,14 +84,16 @@ backup+=(
|
|||||||
'etc/limine-entry-tool.d/omarchy-uki.conf'
|
'etc/limine-entry-tool.d/omarchy-uki.conf'
|
||||||
)
|
)
|
||||||
# backup has no arch-suffixed form, so the x86_64-only drop-ins join it here.
|
# backup has no arch-suffixed form, so the x86_64-only drop-ins join it here.
|
||||||
# Each of these paths is removed from the aarch64 package in package().
|
# Each of these paths is removed from an older source's aarch64 package in
|
||||||
|
# package(), which adds them back for a runtime-profile source.
|
||||||
|
_x86_64_backup=(
|
||||||
|
'etc/mkinitcpio.conf.d/thunderbolt_module.conf'
|
||||||
|
'etc/modprobe.d/omarchy-usb-autosuspend.conf'
|
||||||
|
'etc/systemd/oomd.conf.d/10-omarchy.conf'
|
||||||
|
'etc/systemd/zram-generator.conf'
|
||||||
|
)
|
||||||
if [[ $CARCH == x86_64 ]]; then
|
if [[ $CARCH == x86_64 ]]; then
|
||||||
backup+=(
|
backup+=("${_x86_64_backup[@]}")
|
||||||
'etc/mkinitcpio.conf.d/thunderbolt_module.conf'
|
|
||||||
'etc/modprobe.d/omarchy-usb-autosuspend.conf'
|
|
||||||
'etc/systemd/oomd.conf.d/10-omarchy.conf'
|
|
||||||
'etc/systemd/zram-generator.conf'
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
optdepends=(
|
optdepends=(
|
||||||
@@ -155,6 +160,20 @@ _omarchy_settings_hooks_after() {
|
|||||||
package() {
|
package() {
|
||||||
cd "$srcdir/omarchy"
|
cd "$srcdir/omarchy"
|
||||||
|
|
||||||
|
# A source that decides at runtime which platform-specific files apply (see
|
||||||
|
# default/settings-runtime-profile in it) ships its whole tree on aarch64,
|
||||||
|
# with the same backup and optdepends as x86_64. Older sources still leave
|
||||||
|
# the x86_64 memory stack out there.
|
||||||
|
local legacy_aarch64=0
|
||||||
|
if [[ $CARCH == aarch64 ]]; then
|
||||||
|
if [[ -f default/settings-runtime-profile ]]; then
|
||||||
|
backup+=("${_x86_64_backup[@]}")
|
||||||
|
optdepends+=("${optdepends_x86_64[@]}")
|
||||||
|
else
|
||||||
|
legacy_aarch64=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# /etc/skel/.config from config/** — system-wide default user config.
|
# /etc/skel/.config from config/** — system-wide default user config.
|
||||||
# Package-owned defaults that live elsewhere in the system belong under
|
# Package-owned defaults that live elsewhere in the system belong under
|
||||||
# default/** or etc/** instead.
|
# default/** or etc/** instead.
|
||||||
@@ -197,12 +216,16 @@ package() {
|
|||||||
install -Dm644 default/systemd/user/omarchy-tailscale-receive.service "$pkgdir/usr/lib/systemd/user/omarchy-tailscale-receive.service"
|
install -Dm644 default/systemd/user/omarchy-tailscale-receive.service "$pkgdir/usr/lib/systemd/user/omarchy-tailscale-receive.service"
|
||||||
install -Dm644 default/systemd/user/omarchy-fcitx5.service "$pkgdir/usr/lib/systemd/user/omarchy-fcitx5.service"
|
install -Dm644 default/systemd/user/omarchy-fcitx5.service "$pkgdir/usr/lib/systemd/user/omarchy-fcitx5.service"
|
||||||
install -Dm644 default/systemd/user/omarchy-crash-watch.service "$pkgdir/usr/lib/systemd/user/omarchy-crash-watch.service"
|
install -Dm644 default/systemd/user/omarchy-crash-watch.service "$pkgdir/usr/lib/systemd/user/omarchy-crash-watch.service"
|
||||||
|
# First-run enables this unit, so it ships wherever the source has it.
|
||||||
|
if [[ -f default/systemd/user/omarchy-brightness-keyboard-auto.service ]]; then
|
||||||
|
install -Dm644 default/systemd/user/omarchy-brightness-keyboard-auto.service "$pkgdir/usr/lib/systemd/user/omarchy-brightness-keyboard-auto.service"
|
||||||
|
fi
|
||||||
# Marks app.slice (and only app.slice) as a systemd-oomd kill candidate, so
|
# Marks app.slice (and only app.slice) as a systemd-oomd kill candidate, so
|
||||||
# memory pressure costs one app scope instead of the compositor session.
|
# memory pressure costs one app scope instead of the compositor session.
|
||||||
# Thresholds live in etc/systemd/oomd.conf.d/10-omarchy.conf. Both this and
|
# Thresholds live in etc/systemd/oomd.conf.d/10-omarchy.conf. Both this and
|
||||||
# the zram vendor drop-in belong to the x86_64 memory stack: the aarch64
|
# the zram vendor drop-in belong to the x86_64 memory stack: an older
|
||||||
# install neither enables systemd-oomd nor configures zram swap.
|
# source's aarch64 install neither enables systemd-oomd nor configures zram.
|
||||||
if [[ $CARCH == x86_64 ]]; then
|
if (( ! legacy_aarch64 )); then
|
||||||
install -Dm644 default/systemd/user/app.slice.d/10-oomd.conf "$pkgdir/usr/lib/systemd/user/app.slice.d/10-oomd.conf"
|
install -Dm644 default/systemd/user/app.slice.d/10-oomd.conf "$pkgdir/usr/lib/systemd/user/app.slice.d/10-oomd.conf"
|
||||||
install -Dm644 default/systemd/zram-generator.conf.d/90-omarchy.conf "$pkgdir/usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf"
|
install -Dm644 default/systemd/zram-generator.conf.d/90-omarchy.conf "$pkgdir/usr/lib/systemd/zram-generator.conf.d/90-omarchy.conf"
|
||||||
fi
|
fi
|
||||||
@@ -226,22 +249,25 @@ package() {
|
|||||||
if [[ $CARCH == aarch64 ]]; then
|
if [[ $CARCH == aarch64 ]]; then
|
||||||
# Keep omarchy_hooks.conf and the Limine entry-tool config: without them a
|
# Keep omarchy_hooks.conf and the Limine entry-tool config: without them a
|
||||||
# kernel update on an encrypted aarch64 install rebuilds an initramfs with
|
# kernel update on an encrypted aarch64 install rebuilds an initramfs with
|
||||||
# no encrypt hook and the machine cannot unlock its root. Only the
|
# no encrypt hook and the machine cannot unlock its root. An older source's
|
||||||
# Thunderbolt module request is x86-specific; ARM kernels lack the module
|
# Thunderbolt module request is x86-specific; ARM kernels lack the module
|
||||||
# and mkinitcpio treats a missing explicit module as an error.
|
# and mkinitcpio treats a missing explicit module as an error. A
|
||||||
rm -f "$pkgdir/etc/mkinitcpio.conf.d/thunderbolt_module.conf"
|
# runtime-profile source adds it only where the kernel has the module.
|
||||||
|
(( ! legacy_aarch64 )) || rm -f "$pkgdir/etc/mkinitcpio.conf.d/thunderbolt_module.conf"
|
||||||
# Apple Silicon Macs install this package too. Their initramfs needs the
|
# Apple Silicon Macs install this package too. Their initramfs needs the
|
||||||
# asahi hook, which omarchy-mac-boot's 90-94 fragments (Aurora) or
|
# asahi hook, which omarchy-mac-boot's 90-94 fragments (Aurora) or
|
||||||
# mkinitcpio.conf (legacy GRUB Macs) set, and an unconditional HOOKS= here
|
# mkinitcpio.conf (legacy GRUB Macs) set, and an unconditional HOOKS= here
|
||||||
# would replace it. A source that sets HOOKS outright (v4.0.4) gets its line
|
# would replace it. An older source that sets HOOKS outright (v4.0.4) gets
|
||||||
# wrapped so it applies only when the hooks loaded so far lack asahi; one that
|
# its line wrapped so it applies only when the hooks loaded so far lack
|
||||||
# already decides per platform (omacom/omarchy#13362) ships as it is. The
|
# asahi; one that already decides per platform (omacom/omarchy#13362), and
|
||||||
# wrapper reads configuration, not the running machine, so it also holds
|
# every runtime-profile source, ships as it is. The wrapper reads
|
||||||
# when the image is built in a chroot.
|
# configuration, not the running machine, so it also holds when the image
|
||||||
|
# is built in a chroot.
|
||||||
local hooks_conf hooks_confs=()
|
local hooks_conf hooks_confs=()
|
||||||
for hooks_conf in "$pkgdir"/etc/mkinitcpio.conf.d/{00-omarchy-hooks,omarchy_hooks}.conf; do
|
for hooks_conf in "$pkgdir"/etc/mkinitcpio.conf.d/{00-omarchy-hooks,omarchy_hooks}.conf; do
|
||||||
[[ -f $hooks_conf ]] || continue
|
[[ -f $hooks_conf ]] || continue
|
||||||
hooks_confs+=("$hooks_conf")
|
hooks_confs+=("$hooks_conf")
|
||||||
|
(( legacy_aarch64 )) || continue
|
||||||
sed -i 's/^\(HOOKS=([^#]*)\)[[:space:]]*$/if [[ " ${HOOKS[*]:-} " != *" asahi "* ]]; then\n \1\nfi/' "$hooks_conf"
|
sed -i 's/^\(HOOKS=([^#]*)\)[[:space:]]*$/if [[ " ${HOOKS[*]:-} " != *" asahi "* ]]; then\n \1\nfi/' "$hooks_conf"
|
||||||
if grep -q '^HOOKS=' "$hooks_conf"; then
|
if grep -q '^HOOKS=' "$hooks_conf"; then
|
||||||
echo "${hooks_conf#"$pkgdir"/}: cannot guard this HOOKS= line for Apple Silicon" >&2
|
echo "${hooks_conf#"$pkgdir"/}: cannot guard this HOOKS= line for Apple Silicon" >&2
|
||||||
@@ -258,9 +284,12 @@ package() {
|
|||||||
echo "etc/mkinitcpio.conf.d: the aarch64 hooks must keep a Mac's asahi line and set everyone else's" >&2
|
echo "etc/mkinitcpio.conf.d: the aarch64 hooks must keep a Mac's asahi line and set everyone else's" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# Memory stack: no zram device or zswap on the aarch64 install, and
|
fi
|
||||||
# systemd-oomd is not enabled there, so the vm.* reclaim tuning written
|
if (( legacy_aarch64 )); then
|
||||||
# for zram would be wrong for it. Keep only the network tuning.
|
# Memory stack: no zram device or zswap on an older source's aarch64
|
||||||
|
# install, and systemd-oomd is not enabled there, so the vm.* reclaim
|
||||||
|
# tuning written for zram would be wrong for it. Keep only the network
|
||||||
|
# tuning.
|
||||||
rm -rf "$pkgdir/etc/systemd/oomd.conf.d"
|
rm -rf "$pkgdir/etc/systemd/oomd.conf.d"
|
||||||
rm -f "$pkgdir/etc/systemd/zram-generator.conf" "$pkgdir/etc/tmpfiles.d/omarchy-zswap.conf"
|
rm -f "$pkgdir/etc/systemd/zram-generator.conf" "$pkgdir/etc/tmpfiles.d/omarchy-zswap.conf"
|
||||||
cat >"$pkgdir/etc/sysctl.d/99-omarchy-sysctl.conf" <<'EOF'
|
cat >"$pkgdir/etc/sysctl.d/99-omarchy-sysctl.conf" <<'EOF'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Run the omarchy-settings recipe's package() against synthetic source trees:
|
# Run the omarchy-settings and omarchy-settings-dev recipes' package() against
|
||||||
# an older source keeps today's per-architecture package, and a source that
|
# synthetic source trees: an older source keeps today's per-architecture
|
||||||
# selects its platform profile at runtime ships the same files, backup and
|
# package, and a source that selects its platform profile at runtime ships the
|
||||||
# optdepends on aarch64 as on x86_64.
|
# same files, backup and optdepends on aarch64 as on x86_64.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ cp "$fixtures/omarchy_hooks-v4.0.4.conf" "$scratch/legacy/etc/mkinitcpio.conf.d/
|
|||||||
make_source "$scratch/profile" default/settings-runtime-profile "$keyboard_unit"
|
make_source "$scratch/profile" default/settings-runtime-profile "$keyboard_unit"
|
||||||
cp "$fixtures"/omarchy-13362/*.conf "$scratch/profile/etc/mkinitcpio.conf.d/"
|
cp "$fixtures"/omarchy-13362/*.conf "$scratch/profile/etc/mkinitcpio.conf.d/"
|
||||||
|
|
||||||
for recipe in omarchy-settings; do
|
for recipe in omarchy-settings omarchy-settings-dev; do
|
||||||
rm -rf "${scratch:?}"/legacy-* "${scratch:?}"/profile-*
|
rm -rf "${scratch:?}"/legacy-* "${scratch:?}"/profile-*
|
||||||
# An older source keeps the per-architecture package it has always had.
|
# An older source keeps the per-architecture package it has always had.
|
||||||
package_as "$recipe" "$scratch/legacy" x86_64 legacy-x86_64 pinned
|
package_as "$recipe" "$scratch/legacy" x86_64 legacy-x86_64 pinned
|
||||||
|
|||||||
Reference in new issue
Block a user