Watch
1
0
Fork
You've already forked souveraine
0

upower: var/ is a legitimate prefix, not a leak

Run 1234 failed because the new stray check omitted var/lib/upower.
This commit is contained in:
Fimeg 2026-07-27 13:46:48 -04:00
commit 25d1e19246
2 changed files with 10 additions and 5 deletions

View file

@ -35,8 +35,10 @@ package() {
# would put /home/<user>/aarch64-sysroot/... on the device and leave udev
# with no rules (measured on the phone 2026-07-27). Fail loudly instead.
local stray
stray=$(find "$pkgdir" -mindepth 1 -maxdepth 1 ! -name usr ! -name etc -printf '%f\n')
[[ -z $stray ]] || { error "upower tree ships outside usr/ and etc/: %s" "$stray"; return 1; }
# usr/, etc/ (UPower.conf) and var/ (var/lib/upower) are all legitimate.
stray=$(find "$pkgdir" -mindepth 1 -maxdepth 1 \
! -name usr ! -name etc ! -name var -printf '%f\n')
[[ -z $stray ]] || { error "upower tree ships outside usr/, etc/ and var/: %s" "$stray"; return 1; }
# Keep the canonical interface XML discoverable for introspection.
install -Dm644 "$srcdir/org.freedesktop.UPower.Device.xml" \
"$pkgdir/usr/share/dbus-1/interfaces/org.freedesktop.UPower.Device.xml"