fix(desktop): package updates that set file capabilities finish without proot (#3151)

This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-24 18:25:05 -05:00
1 parent 9be131cf6d
commit 826853fff5
7 files changed
+130 -7

No files matched your search

+2
View File
@@ -28,6 +28,8 @@ find "$XDG_RUNTIME_DIR" -mindepth 1 -maxdepth 1 ! -name 'wayland-0*' ! -name 'ke
chmod 700 "$XDG_RUNTIME_DIR" 2>/dev/null
mkdir -p /tmp/.X11-unix /tmp/.ICE-unix && chmod 1777 /tmp/.X11-unix /tmp/.ICE-unix 2>/dev/null
export DD_DESKTOP=1
sh /usr/local/bin/droiddeck-diversion-stub /usr/bin/pkexec /usr/local/bin/pkexec migrate
sh /usr/local/bin/droiddeck-diversion-stub /usr/lib/snapd/snap-confine /usr/local/bin/droiddeck-snap-confine migrate
ln -sf /usr/local/bin/droiddeck-steam-launch /usr/local/bin/steamdeck-steam 2>/dev/null
ln -sf /usr/local/bin/droiddeck-steam-shim /usr/local/bin/steam 2>/dev/null
python3 /usr/local/bin/droiddeck-desktop-games 2>&1 | sed 's/^/[games] /'
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
path=$1 target=$2 mode=$3
if [ "$mode" = migrate ]; then
resolved=$(readlink -f "$target") || exit 0
[ -n "$resolved" ] && [ -L "$path" ] && [ "$(readlink -f "$path")" = "$resolved" ] || exit 0
elif [ "$mode" != install ]; then
exit 1
fi
tmp=$(mktemp "${path}.XXXXXX")
trap 'rm -f "$tmp"' EXIT
printf '#!/bin/sh\nexec %s "$@"\n' "$target" > "$tmp"
chmod 755 "$tmp"
mv -f "$tmp" "$path"