diff --git a/pkgbuilds/omarchy-settings-dev/PKGBUILD b/pkgbuilds/omarchy-settings-dev/PKGBUILD index 8514217..9947e89 100644 --- a/pkgbuilds/omarchy-settings-dev/PKGBUILD +++ b/pkgbuilds/omarchy-settings-dev/PKGBUILD @@ -439,15 +439,6 @@ EOF install -Dm755 bin/omarchy-hw-platform \ "$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform" fi - # 00-omarchy-hooks.conf places a Mac through this detector copy; without it - # an Aurora Mac gets the busybox line and its initramfs cannot unlock root. - # x86_64 keeps the busybox line either way. - if [[ $CARCH == aarch64 ]] && - grep -qs omarchy-hw-platform "$pkgdir/etc/mkinitcpio.conf.d/00-omarchy-hooks.conf" && - [[ ! -x $pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform ]]; then - echo "etc/mkinitcpio.conf.d/00-omarchy-hooks.conf needs the omarchy-hw-platform copy the source does not ship" >&2 - return 1 - fi # Branding assets (logos, icons). install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt" diff --git a/pkgbuilds/omarchy-settings/PKGBUILD b/pkgbuilds/omarchy-settings/PKGBUILD index 990627e..9f13a4a 100644 --- a/pkgbuilds/omarchy-settings/PKGBUILD +++ b/pkgbuilds/omarchy-settings/PKGBUILD @@ -447,15 +447,6 @@ EOF install -Dm755 bin/omarchy-hw-platform \ "$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform" fi - # 00-omarchy-hooks.conf places a Mac through this detector copy; without it - # an Aurora Mac gets the busybox line and its initramfs cannot unlock root. - # x86_64 keeps the busybox line either way. - if [[ $CARCH == aarch64 ]] && - grep -qs omarchy-hw-platform "$pkgdir/etc/mkinitcpio.conf.d/00-omarchy-hooks.conf" && - [[ ! -x $pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform ]]; then - echo "etc/mkinitcpio.conf.d/00-omarchy-hooks.conf needs the omarchy-hw-platform copy the source does not ship" >&2 - return 1 - fi # Branding assets (logos, icons). install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt" diff --git a/tests/fixtures/settings-boot/omarchy-13362/00-omarchy-hooks.conf b/tests/fixtures/settings-boot/omarchy-13362/00-omarchy-hooks.conf index 8789786..f48e2da 100644 --- a/tests/fixtures/settings-boot/omarchy-13362/00-omarchy-hooks.conf +++ b/tests/fixtures/settings-boot/omarchy-13362/00-omarchy-hooks.conf @@ -3,15 +3,12 @@ # after it add their hooks to it instead of being overwritten by it. # # Apple Silicon boots a systemd initramfs, and its platform package adds the -# firmware and encryption hooks. Every other machine keeps the busybox line. The -# runtime's detector answers, or else the copy omarchy-settings ships for its -# platform guard, so a settings package newer than the runtime still places a -# Mac. Without either, the busybox line stays. A detector that cannot place the +# firmware and encryption hooks. Every other machine keeps the busybox line, as +# does one without the runtime's detector. A detector that cannot place the # machine stops the build rather than let it produce an image for the wrong # platform. _omarchy_platform="" -_omarchy_detector=$(command -v omarchy-hw-platform) || _omarchy_detector=/usr/share/libalpm/scripts/omarchy-hw-platform -if [[ -x $_omarchy_detector ]]; then +if _omarchy_detector=$(command -v omarchy-hw-platform); then _omarchy_platform=$("$_omarchy_detector") || return 1 fi diff --git a/tests/settings-boot-config.sh b/tests/settings-boot-config.sh index 5528925..8c003a3 100755 --- a/tests/settings-boot-config.sh +++ b/tests/settings-boot-config.sh @@ -217,19 +217,15 @@ split=$scratch/split/omarchy mkdir -p "$scratch/split" cp -a "$fixture" "$split" cp "$fixtures"/omarchy-13362/*.conf "$split/etc/mkinitcpio.conf.d/" -# Its 00-omarchy-hooks.conf asks the detector copy the platform guard ships. -for path in default/libalpm/hooks/00-omarchy-platform-guard.hook \ - default/libalpm/scripts/omarchy-platform-guard bin/omarchy-hw-platform; do - mkdir -p "$(dirname "$split/$path")" - printf 'fixture for %s\n' "$path" > "$split/$path" -done +# Its 00-omarchy-hooks.conf asks the runtime's own detector (omarchy-hw-platform +# on PATH), so the package builds without a copy of it and ships none. for recipe in omarchy-settings omarchy-settings-dev; do package_aarch64 "$recipe" "$split" "$scratch/split-$recipe" >/dev/null for conf in 00-omarchy-hooks.conf omarchy_hooks.conf; do cmp "$fixtures/omarchy-13362/$conf" "$scratch/split-$recipe/etc/mkinitcpio.conf.d/$conf" done grep -Fxq etc/mkinitcpio.conf.d/00-omarchy-hooks.conf "$scratch/split-$recipe.backup" - [[ -x $scratch/split-$recipe/usr/share/libalpm/scripts/omarchy-hw-platform ]] + [[ ! -e $scratch/split-$recipe/usr/share/libalpm/scripts/omarchy-hw-platform ]] done layout="omacom/omarchy#13362 (00-omarchy-hooks.conf)" packaged=$scratch/split-omarchy-settings/etc/mkinitcpio.conf.d @@ -275,8 +271,6 @@ refuse "a hooks file that sets no HOOKS" "$unsafe" omarchy_hooks.conf 'FILES+=(/ refuse "a HOOKS line with a trailing comment" "$unguardable" omarchy_hooks.conf "HOOKS=($omarchy_hooks) # local" refuse "a HOOKS line split over lines" "$unguardable" omarchy_hooks.conf "HOOKS=(base udev"$'\n'" block encrypt filesystems)" refuse "an indented HOOKS that ignores asahi" "$unsafe" 00-omarchy-hooks.conf "if true; then"$'\n'" HOOKS=($omarchy_hooks)"$'\n'"fi" -refuse "#13362's hooks without the platform detector" "needs the omarchy-hw-platform copy" \ - 00-omarchy-hooks.conf "$(cat "$fixtures/omarchy-13362/00-omarchy-hooks.conf")" # Upgrades: pacman replaces an unmodified hooks file, keeps a modified one and # leaves the guarded version as .pacnew, and installs it where it was absent.