device-lenovo-21bx: add boot-deploy hook to remove EFI capsules file

Persisted_Captules.sh is huge (70 MB) and can cause boot-deploy failures
when doing transactions that do large modifications to `/boot/`, such as
switching kernel packages. Persisted_Capsules.sh is recreated on reboot
and we do not use it for anything currently, so it is safe to remove in a
hook.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8368>
This commit is contained in:
Aster Boese 2026-04-15 22:49:07 +02:00 committed by The Friendly Meow (merge) Bot
parent f0b0dff385
commit 283ff28eff
No known key found for this signature in database
2 changed files with 15 additions and 1 deletions

View file

@ -4,7 +4,7 @@
maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=device-lenovo-21bx
pkgdesc="Lenovo ThinkPad X13s"
pkgver=21
pkgver=22
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@ -29,6 +29,7 @@ source="
pipewire.conf
usbguard.conf
kernel-cmdline.conf
remove-capsules.sh
"
subpackages="
$pkgname-kernel-stable:kernel_stable
@ -53,6 +54,8 @@ package() {
-t "$pkgdir"/usr/share/mkinitfs/files
install -Dm644 "$srcdir"/pipewire.conf \
-t "$pkgdir"/usr/share/pipewire.conf.d
install -Dm755 "$srcdir"/remove-capsules.sh \
-t "$pkgdir"/usr/share/boot-deploy/hooks
install -Dm600 "$srcdir"/usbguard.conf \
"$pkgdir"/etc/usbguard/rules.d/"$pkgname".conf
}
@ -107,4 +110,5 @@ eabb3e9c6946bb065244f129f1a432842b09b0f2a9a4b41289c3c289f52076c63d51205dd7ccaa1a
52bbb9564ec713db5d46937701b121afe0c6c644fffe189a05766f491b4997b1bbc4c1f90229efb5764d795df8d40a57d4c840ee4b32d426e7a84520364b8bf5 pipewire.conf
0d0412eb1f01af39000c39391f622640461305d83dae1a53aa7eef640cc17fd265cabca4e4e57dea053c47a4e50f9feb90f12ee5310d5b6425783e83efc5f9d8 usbguard.conf
7e60772bdefc4fc9d459cf2daa9fe09f605240f261b2e8f046ec992593144d26e0c80863ea3b9cb67025fef8fad45dacf54e022d0d57afb321778a5bb2eadaf4 kernel-cmdline.conf
bf6d6e5cdd4942651eaa424445773e9475eb9b284a5be8e3eb131f6ffcb8a652ce963a04a1f1d44cdcc00a58e00dd1a9797d3e624ecde931f816026fbb583640 remove-capsules.sh
"

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Persisted_Capsules.bin is huge (70 MB) and can cause boot-deploy failures
# when doing transactions that do large modifications to `/boot/`, such as
# switching kernel packages. Persisted_Capsules.bin is recreated on reboot
# and we do not use it for anything currently, so it is safe to remove in a
# hook.
printf "Removing Persisted_Capsules.bin...\n"
rm -f /boot/Persisted_Capsules.bin >/dev/null 2>&1