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

@ -255,7 +255,9 @@ jobs:
# /usr/lib/udev and present only under the junk path — so the fork's
# udev quirks had never once been applied on the device.
# Fold any leaked tree back before the tar, then refuse to ship a
# tree containing anything but usr/ and etc/.
# tree containing anything but the three prefixes upower legitimately
# installs into: usr/, etc/ (UPower.conf) and var/ (var/lib/upower).
# Leaving var/ out of that list is what failed run 1234.
DEST="$GITHUB_WORKSPACE/src/upower/dest-aarch64"
LEAK="$DEST$HOME/aarch64-sysroot"
if [ -d "$LEAK" ]; then
@ -263,9 +265,10 @@ jobs:
cp -a "$LEAK/." "$DEST/"
rm -rf "$LEAK"
fi
stray=$(find "$DEST" -mindepth 1 -maxdepth 1 ! -name usr ! -name etc -printf '%f\n')
stray=$(find "$DEST" -mindepth 1 -maxdepth 1 \
! -name usr ! -name etc ! -name var -printf '%f\n')
if [ -n "$stray" ]; then
echo "upower tree would ship outside usr/ and etc/: $stray" >&2
echo "upower tree would ship outside usr/, etc/ and var/: $stray" >&2
exit 1
fi
# And the rules must have landed where udev actually reads them.