WEFT_OS/infra/systemd/weft-appd.service
Marco Allegretti 1928ffb661
fix(pack): never delete a data directory that was not moved
weft-pack uninstall moved earlier app data only when the package
manifest could be read and declared an app-data capability, and only
when the store path was spelled exactly as the user store; otherwise it
removed the package directory with the data in it. A directory left
holding only data by an earlier weft-appd, which has no manifest, was
deleted that way.

A data directory is now never removed with a package. In the user
store, recognised by its real location rather than its spelling, it is
moved when the package declares app data or its manifest cannot be
read; in every other case uninstall stops and changes nothing. Tests
cover a directory holding only data, a store reached through '..', a
symbolically linked home, an app without the capability and another
store.

weft-appd reports both locations when a move fails with an I/O error and
creates the data directory with mode 0700 instead of tightening it
afterwards.
2026-10-09 09:01:28 +00:00

24 lines
969 B
Desktop File

[Unit]
Description=WEFT Application Daemon
Documentation=https://github.com/weft-os/weft
Requires=weft-compositor.service
After=weft-compositor.service servo-shell.service
[Service]
Type=notify
Environment=WEFT_RUNTIME_BIN=/packages/system/weft-runtime/active/bin/weft-runtime
Environment=WEFT_APP_SHELL_BIN=/packages/system/weft-app-shell/active/bin/weft-app-shell
Environment=WEFT_FILE_PORTAL_BIN=/packages/system/weft-file-portal/active/bin/weft-file-portal
Environment=WEFT_MOUNT_HELPER=/packages/system/weft-mount-helper/active/bin/weft-mount-helper
PassEnvironment=WAYLAND_DISPLAY XDG_RUNTIME_DIR DISPLAY
ExecStart=/packages/system/weft-appd/active/bin/weft-appd
Restart=on-failure
RestartSec=1s
ProtectSystem=strict
PrivateTmp=true
# App data and the user package store, where earlier versions kept app data.
# %h is the home of the user the unit runs as; run it as the session user.
ReadWritePaths=%t -%h/.local/share/weft
[Install]
WantedBy=graphical.target