omarchy-settings: ship the platform guard on aarch64 only
No platform package is built for x86_64, so an x86 machine has nothing to guard. The check that 00-omarchy-hooks.conf has its detector copy follows it: without the copy, x86_64 keeps the busybox line it would have anyway, and leaving the check unscoped would fail every x86_64 build from a source that asks omarchy-hw-platform. Taken from #691, which keeps the -dev recipe.
This commit is contained in:
1 parent
2fecfe548e
commit
c2c3f0a4ed
2 files changed
+10
-6
No files matched your search
@@ -435,9 +435,11 @@ EOF
|
|||||||
# platform. It ships here, not in omarchy, so it is resident before the
|
# platform. It ships here, not in omarchy, so it is resident before the
|
||||||
# runtime and any hardware package install; the hook, the script it runs and
|
# runtime and any hardware package install; the hook, the script it runs and
|
||||||
# the script's own copy of the platform detector travel together (omarchy
|
# the script's own copy of the platform detector travel together (omarchy
|
||||||
# keeps /usr/bin/omarchy-hw-platform). Conditional until the pinned source
|
# keeps /usr/bin/omarchy-hw-platform). aarch64 only: no platform package is
|
||||||
# carries them.
|
# built for x86_64, so an x86 machine has nothing to guard, and its HOOKS
|
||||||
if [[ -f default/libalpm/hooks/00-omarchy-platform-guard.hook ]]; then
|
# baseline needs no detector. Conditional until the pinned source carries
|
||||||
|
# them.
|
||||||
|
if [[ $CARCH == aarch64 && -f default/libalpm/hooks/00-omarchy-platform-guard.hook ]]; then
|
||||||
install -Dm644 default/libalpm/hooks/00-omarchy-platform-guard.hook \
|
install -Dm644 default/libalpm/hooks/00-omarchy-platform-guard.hook \
|
||||||
"$pkgdir/usr/share/libalpm/hooks/00-omarchy-platform-guard.hook"
|
"$pkgdir/usr/share/libalpm/hooks/00-omarchy-platform-guard.hook"
|
||||||
install -Dm755 default/libalpm/scripts/omarchy-platform-guard \
|
install -Dm755 default/libalpm/scripts/omarchy-platform-guard \
|
||||||
@@ -447,7 +449,9 @@ EOF
|
|||||||
fi
|
fi
|
||||||
# 00-omarchy-hooks.conf places a Mac through this detector copy; without it
|
# 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.
|
# an Aurora Mac gets the busybox line and its initramfs cannot unlock root.
|
||||||
if grep -qs omarchy-hw-platform "$pkgdir/etc/mkinitcpio.conf.d/00-omarchy-hooks.conf" &&
|
# 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
|
[[ ! -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
|
echo "etc/mkinitcpio.conf.d/00-omarchy-hooks.conf needs the omarchy-hw-platform copy the source does not ship" >&2
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -178,10 +178,10 @@ for recipe in omarchy-settings; do
|
|||||||
# A runtime-profile source ships the same tree and metadata on both.
|
# A runtime-profile source ships the same tree and metadata on both.
|
||||||
package_as "$recipe" "$scratch/profile" x86_64 profile-x86_64 checkout
|
package_as "$recipe" "$scratch/profile" x86_64 profile-x86_64 checkout
|
||||||
package_as "$recipe" "$scratch/profile" aarch64 profile-aarch64 pinned
|
package_as "$recipe" "$scratch/profile" aarch64 profile-aarch64 pinned
|
||||||
# The pacman platform guard is the profile's one exception: aarch64 only
|
# The pacman platform guard is the profile's one exception: aarch64 only.
|
||||||
# where the recipe says so (omacom/omarchy-pkgs#691).
|
|
||||||
for path in "${platform_guard[@]}"; do
|
for path in "${platform_guard[@]}"; do
|
||||||
in_list "$path" "$scratch/profile-aarch64.files" || fail "aarch64 ships the platform guard's $path"
|
in_list "$path" "$scratch/profile-aarch64.files" || fail "aarch64 ships the platform guard's $path"
|
||||||
|
! in_list "$path" "$scratch/profile-x86_64.files" || fail "x86_64 leaves out the platform guard's $path"
|
||||||
done
|
done
|
||||||
grep -Fxv -f <(printf '%s\n' "${platform_guard[@]}") "$scratch/profile-x86_64.files" >"$scratch/profile-x86_64.compared"
|
grep -Fxv -f <(printf '%s\n' "${platform_guard[@]}") "$scratch/profile-x86_64.files" >"$scratch/profile-x86_64.compared"
|
||||||
grep -Fxv -f <(printf '%s\n' "${platform_guard[@]}") "$scratch/profile-aarch64.files" >"$scratch/profile-aarch64.compared"
|
grep -Fxv -f <(printf '%s\n' "${platform_guard[@]}") "$scratch/profile-aarch64.files" >"$scratch/profile-aarch64.compared"
|
||||||
|
|||||||
Reference in new issue
Block a user