Skip to content
Open
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
7 changes: 7 additions & 0 deletions build/deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ DeclareDependency(
INCLUDES "${HEADERS_PATH_BASE}/libpng/"
)

# Runtime only: appstamp shells out to rsvg-convert for SVG-only icon themes
# (most modern apps ship scalable/ only). Not linked, so no LIBRARIES/PACKAGES.
DeclareDependency(
RSVG
RUNTIMES "librsvg2-bin"
)

DeclareDependency(
TIFF
LIBRARIES "tiff"
Expand Down
3 changes: 2 additions & 1 deletion build/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${VITRUVIAN_TARGET_ARCH})
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${CMAKE_CURRENT_SOURCE_DIR}/data/debian/postinst"
"${CMAKE_CURRENT_SOURCE_DIR}/data/debian/prerm"
"${CMAKE_CURRENT_SOURCE_DIR}/data/debian/postrm")
"${CMAKE_CURRENT_SOURCE_DIR}/data/debian/postrm"
"${CMAKE_CURRENT_SOURCE_DIR}/data/debian/triggers")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "The Vitruvian Project")
INCLUDE(CPack)

Expand Down
1 change: 1 addition & 0 deletions build/profiles/bin.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(BIN_DIRECTORY
addattr
appstamp
keystore
linkcatkeys
dumpcatalog
Expand Down
1 change: 1 addition & 0 deletions build/profiles/data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(SYSTEMD_SERVICES
data/systemd/tracker.service
data/systemd/userbootscript@.service
data/systemd/vos-login.target
data/systemd/appstamp-icons.service
)

install(FILES data/tmpfiles.d/vos.conf
Expand Down
11 changes: 9 additions & 2 deletions data/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ set -e

case "$1" in
configure) ;;
abort-upgrade|abort-remove|abort-deconfigure|triggered) exit 0 ;;
triggered)
# A .desktop entry changed (see debian/triggers): restamp Deskbar
# icons. Guarded on nexus (absent in the build chroot); never fails.
if [ -e /dev/nexus_node_monitor ] && command -v appstamp >/dev/null 2>&1; then
appstamp --all >/dev/null 2>&1 || true
fi
exit 0 ;;
abort-upgrade|abort-remove|abort-deconfigure) exit 0 ;;
*) echo "postinst: unknown action $1" >&2; exit 0 ;;
esac

Expand Down Expand Up @@ -200,7 +207,7 @@ fi

# Enable system services

systemctl enable janus.service registrar.service app_server.service input_server.service mount_server.service notification_server.service deskbar.service tracker.service userbootscript@vos-live.service
systemctl enable janus.service registrar.service app_server.service input_server.service mount_server.service notification_server.service deskbar.service tracker.service userbootscript@vos-live.service appstamp-icons.service

install -m 0644 -D /usr/share/vos/systemd/vos-session.service \
/etc/systemd/user/vos-session.service 2>/dev/null || true
Expand Down
4 changes: 4 additions & 0 deletions data/debian/triggers
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Restamp Deskbar icons/names whenever a package adds or removes a .desktop
# entry. noawait: do not hold up the package that caused the change — the
# postinst `triggered` branch runs appstamp --all asynchronously afterwards.
interest-noawait /usr/share/applications
25 changes: 25 additions & 0 deletions data/systemd/appstamp-icons.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[Unit]
Description=Stamp Deskbar icons and names onto installed applications
# Applications baked into the image are not stamped at build time: the dpkg
# trigger runs in the chroot where nexus is absent and skips. This sweep does
# it on every boot — idempotent (already-stamped binaries are skipped in
# milliseconds), so the cost is negligible and it also catches anything the
# trigger missed or that was installed outside dpkg.
DefaultDependencies=no
After=systemd-modules-load.service local-fs.target
Before=graphical.target
ConditionPathExists=/bin/appstamp

[Service]
Type=oneshot
RemainAfterExit=yes
# appstamp writes attributes through libroot2 -> /dev/nexus_node_monitor,
# which udev (60-nexus.rules) creates AFTER systemd-modules-load issues the
# modprobe. Wait briefly for the node, then sweep regardless — never block
# boot on its absence.
ExecStartPre=/bin/sh -c 'for i in $(seq 1 30); do [ -e /dev/nexus_node_monitor ] && break; sleep 0.2; done'
ExecStart=/bin/appstamp --all
StandardOutput=journal

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions src/bin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Application(dstcheck SOURCES dstcheck.cpp LIBS localestub RDEF dstc
Application(hey SOURCES hey.cpp RDEF hey.rdef)
Application(reindex SOURCES reindex.cpp)
Application(resattr SOURCES resattr.cpp)
Application(appstamp SOURCES appstamp.cpp LIBS ${PNG_LIBRARIES} INCLUDES ${PNG_INCLUDES})
Application(screeninfo SOURCES screeninfo.cpp)
Application(setcontrollook SOURCES setcontrollook.cpp)
Application(setdecor SOURCES setdecor.cpp)
Expand Down
Loading