From f3381a43879d3b1d8dc54592de353033b69c990c Mon Sep 17 00:00:00 2001 From: ComixHe Date: Wed, 6 Sep 2023 15:28:50 +0800 Subject: [PATCH] feat: add dpkg post-invoke hook Signed-off-by: ComixHe --- .reuse/dep5 | 5 +++++ misc/CMakeLists.txt | 4 ++++ misc/dpkg/dpkg.cfg.d/am-update-hook | 1 + 3 files changed, 10 insertions(+) create mode 100644 misc/dpkg/dpkg.cfg.d/am-update-hook diff --git a/.reuse/dep5 b/.reuse/dep5 index ae6fcec..e5392d6 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -37,3 +37,8 @@ License: CC0-1.0 Files: tests/data/* Copyright: None License: CC0-1.0 + +# hook +Files: misc/dpkg/dpkg.cfg.d/* +Copyright: None +License: CC0-1.0 diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index 2e5c0ff..ce7c1a4 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -41,3 +41,7 @@ set(DBUS_APPLICATION_MANAGER_SERVICE_FILE # install to session service directory for now install(FILES ${DBUS_APPLICATION_MANAGER_SERVICE_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services) + +# install dpkg hook +install(FILES ${CMAKE_CURRENT_LIST_DIR}/dpkg/dpkg.cfg.d/am-update-hook + DESTINATION /etc/dpkg/dpkg.cfg.d) diff --git a/misc/dpkg/dpkg.cfg.d/am-update-hook b/misc/dpkg/dpkg.cfg.d/am-update-hook new file mode 100644 index 0000000..b386a28 --- /dev/null +++ b/misc/dpkg/dpkg.cfg.d/am-update-hook @@ -0,0 +1 @@ +post-invoke=busctl call org.desktopspec.ApplicationUpdateNotifier1 /org/desktopspec/ApplicationUpdateNotifier1 org.freedesktop.DBus.Peer Ping