Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,16 @@ install: check-config
install -Dm755 $(call quote,$(ASSETS_DIR)/veshell-session) $(call quote,$(DESTDIR)$(BINDIR)/veshell-session)
install -Dm755 $(call quote,$(ASSETS_DIR)/veshell-session-stop) $(call quote,$(DESTDIR)$(BINDIR)/veshell-session-stop)
install -Dm644 $(call quote,$(ASSETS_DIR)/veshell.desktop) $(call quote,$(DESTDIR)$(SESSIONDIR)/veshell.desktop)
# The Exec value is intentionally left unquoted. SDDM, and its Plasma
# Login Manager successor plasmalogin, hand the raw Exec field to the
# wayland-session script, which runs `exec $@`: quoting the path makes it
# a relative path and the session dies with status 127. GDM parses the
# field per the desktop-entry spec either way, and no install prefix (nor
# a Nix store path) contains a space.
# Exec argument escaping precedes desktop-entry string escaping.
@bindir=$$(printf '%s' $(call quote,$(BINDIR)) | sed 's/[\\"$$`]/\\&/g; s/\\/\\\\/g; s/%/%%/g'); \
bindir=$$(printf '%s' "$$bindir" | sed 's/[\\&|]/\\&/g'); \
sed "s|^Exec=veshell-session$$|Exec=\"$$bindir/veshell-session\"|" $(call quote,$(ASSETS_DIR)/veshell.desktop) > $(call quote,$(DESTDIR)$(SESSIONDIR)/veshell.desktop)
sed "s|^Exec=veshell-session$$|Exec=$$bindir/veshell-session|" $(call quote,$(ASSETS_DIR)/veshell.desktop) > $(call quote,$(DESTDIR)$(SESSIONDIR)/veshell.desktop)
install -Dm644 $(call quote,$(ASSETS_DIR)/veshell-portals.conf) $(call quote,$(DESTDIR)$(PORTALDIR)/veshell-portals.conf)
install -Dm644 $(call quote,$(ASSETS_DIR)/veshell.portal) $(call quote,$(DESTDIR)$(PORTALDIR)/portals/veshell.portal)
install -Dm644 $(call quote,$(SERVICE_OUTPUT)) $(call quote,$(DESTDIR)$(SYSTEMD_USER_DIR)/veshell.service)
Expand Down
7 changes: 5 additions & 2 deletions extra/tests/packaging_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ for prefix in /usr '/opt/veshell prefix&pipe|' '/opt/percent%quote"back\ dollar$
fi
grep -Fx "ExecStart=\"$service_prefix/bin/veshell\" --session" "$root/lib/systemd/user/veshell.service"
grep -Fx "ExecStop=\"$service_prefix/bin/veshell-session-stop\"" "$root/lib/systemd/user/veshell.service"
grep -Fx "Exec=\"$desktop_prefix/bin/veshell-session\"" "$root/share/wayland-sessions/veshell.desktop"
grep -Fx "Exec=$desktop_prefix/bin/veshell-session" "$root/share/wayland-sessions/veshell.desktop"
# SDDM/plasmalogin run `exec $@` on the raw Exec field, so a quoted path
# becomes a relative one; guard against reintroducing the quotes.
if grep -F 'Exec="' "$root/share/wayland-sessions/veshell.desktop"; then exit 1; fi
if grep -F "$tmp/root" "$root/lib/systemd/user/veshell.service"; then exit 1; fi
if grep -F "$tmp/root" "$root/share/wayland-sessions/veshell.desktop"; then exit 1; fi
done
Expand All @@ -70,7 +73,7 @@ run package "DESTDIR=$tmp/custom" BINDIR=/custom/bin LIBDIR=/custom/lib SHAREDIR
test -f "$tmp/custom/custom/units/veshell.service"
test -f "$tmp/custom/custom/portals/portals/veshell.portal"
test -f "$tmp/custom/custom/lib/libplugin.so.1"
grep -Fx 'Exec="/custom/bin/veshell-session"' "$tmp/custom/custom/sessions/veshell.desktop"
grep -Fx 'Exec=/custom/bin/veshell-session' "$tmp/custom/custom/sessions/veshell.desktop"

# No bundle engine may overwrite a separately supplied runtime symlink.
ln -s "$fixture/engine.so" "$tmp/custom/custom/lib/libflutter_engine.so.runtime"
Expand Down
Loading