Build settings for #13362's HOOKS baseline without a detector copy
omacom/omarchy#13362 (d0b94d98c) dropped the omarchy-hw-platform copy omarchy-settings shipped beside its platform guard. Its 00-omarchy-hooks.conf now asks the runtime's own detector on PATH, and keeps the busybox line where there is none. The aarch64 settings recipes still refused any source whose baseline names omarchy-hw-platform without that copy, so every aarch64 build of quattro would fail once #13362 merges. Both recipes drop that check. The copy is still installed when a source ships the guard, as before. The test fixture follows #13362's current baseline, and the split-layout test checks the package builds from it and ships no copy.
This commit is contained in:
1 parent
8d4ef2dbcf
commit
6711b64f8f
4 files changed
+6
-33
No files matched your search
@@ -439,15 +439,6 @@ EOF
|
|||||||
install -Dm755 bin/omarchy-hw-platform \
|
install -Dm755 bin/omarchy-hw-platform \
|
||||||
"$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform"
|
"$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform"
|
||||||
fi
|
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).
|
# Branding assets (logos, icons).
|
||||||
install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt"
|
install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt"
|
||||||
|
|||||||
@@ -447,15 +447,6 @@ EOF
|
|||||||
install -Dm755 bin/omarchy-hw-platform \
|
install -Dm755 bin/omarchy-hw-platform \
|
||||||
"$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform"
|
"$pkgdir/usr/share/libalpm/scripts/omarchy-hw-platform"
|
||||||
fi
|
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).
|
# Branding assets (logos, icons).
|
||||||
install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt"
|
install -Dm644 logo.txt "$pkgdir/usr/share/omarchy/logo.txt"
|
||||||
|
|||||||
@@ -3,15 +3,12 @@
|
|||||||
# after it add their hooks to it instead of being overwritten by it.
|
# 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
|
# Apple Silicon boots a systemd initramfs, and its platform package adds the
|
||||||
# firmware and encryption hooks. Every other machine keeps the busybox line. The
|
# firmware and encryption hooks. Every other machine keeps the busybox line, as
|
||||||
# runtime's detector answers, or else the copy omarchy-settings ships for its
|
# does one without the runtime's detector. A detector that cannot place the
|
||||||
# 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
|
|
||||||
# machine stops the build rather than let it produce an image for the wrong
|
# machine stops the build rather than let it produce an image for the wrong
|
||||||
# platform.
|
# platform.
|
||||||
_omarchy_platform=""
|
_omarchy_platform=""
|
||||||
_omarchy_detector=$(command -v omarchy-hw-platform) || _omarchy_detector=/usr/share/libalpm/scripts/omarchy-hw-platform
|
if _omarchy_detector=$(command -v omarchy-hw-platform); then
|
||||||
if [[ -x $_omarchy_detector ]]; then
|
|
||||||
_omarchy_platform=$("$_omarchy_detector") || return 1
|
_omarchy_platform=$("$_omarchy_detector") || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -217,19 +217,15 @@ split=$scratch/split/omarchy
|
|||||||
mkdir -p "$scratch/split"
|
mkdir -p "$scratch/split"
|
||||||
cp -a "$fixture" "$split"
|
cp -a "$fixture" "$split"
|
||||||
cp "$fixtures"/omarchy-13362/*.conf "$split/etc/mkinitcpio.conf.d/"
|
cp "$fixtures"/omarchy-13362/*.conf "$split/etc/mkinitcpio.conf.d/"
|
||||||
# Its 00-omarchy-hooks.conf asks the detector copy the platform guard ships.
|
# Its 00-omarchy-hooks.conf asks the runtime's own detector (omarchy-hw-platform
|
||||||
for path in default/libalpm/hooks/00-omarchy-platform-guard.hook \
|
# on PATH), so the package builds without a copy of it and ships none.
|
||||||
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
|
|
||||||
for recipe in omarchy-settings omarchy-settings-dev; do
|
for recipe in omarchy-settings omarchy-settings-dev; do
|
||||||
package_aarch64 "$recipe" "$split" "$scratch/split-$recipe" >/dev/null
|
package_aarch64 "$recipe" "$split" "$scratch/split-$recipe" >/dev/null
|
||||||
for conf in 00-omarchy-hooks.conf omarchy_hooks.conf; do
|
for conf in 00-omarchy-hooks.conf omarchy_hooks.conf; do
|
||||||
cmp "$fixtures/omarchy-13362/$conf" "$scratch/split-$recipe/etc/mkinitcpio.conf.d/$conf"
|
cmp "$fixtures/omarchy-13362/$conf" "$scratch/split-$recipe/etc/mkinitcpio.conf.d/$conf"
|
||||||
done
|
done
|
||||||
grep -Fxq etc/mkinitcpio.conf.d/00-omarchy-hooks.conf "$scratch/split-$recipe.backup"
|
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
|
done
|
||||||
layout="omacom/omarchy#13362 (00-omarchy-hooks.conf)"
|
layout="omacom/omarchy#13362 (00-omarchy-hooks.conf)"
|
||||||
packaged=$scratch/split-omarchy-settings/etc/mkinitcpio.conf.d
|
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 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 "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 "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
|
# 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.
|
# leaves the guarded version as .pacnew, and installs it where it was absent.
|
||||||
|
|||||||
Reference in new issue
Block a user