[neon/kde/powerdevil/Neon/stable] debian/patches: patch out systemd not doing ambient capabilities until ubuntu releases a version that does
Carlos De Maine
null at kde.org
Fri May 23 11:53:17 BST 2025
Git commit 78009b21f5a69e87504fc5b19e55ae3b3ad615de by Carlos De Maine.
Committed on 23/05/2025 at 10:53.
Pushed by carlosdem into branch 'Neon/stable'.
patch out systemd not doing ambient capabilities until ubuntu releases a version that does
A +50 -0 debian/patches/no_ambient_capabilities
M +1 -0 debian/patches/series
https://invent.kde.org/neon/kde/powerdevil/-/commit/78009b21f5a69e87504fc5b19e55ae3b3ad615de
diff --git a/debian/patches/no_ambient_capabilities b/debian/patches/no_ambient_capabilities
new file mode 100644
index 0000000..b826fd9
--- /dev/null
+++ b/debian/patches/no_ambient_capabilities
@@ -0,0 +1,50 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8c71334597d45ef00a807fa162a326ea96588979..a129a2cb41352327a6cb059ce60d58b9e0d7a501 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -67,6 +67,13 @@ set_package_properties(KF6DocTools PROPERTIES
+ TYPE OPTIONAL
+ )
+
++find_package(Libcap)
++set_package_properties(Libcap PROPERTIES
++ TYPE OPTIONAL
++ PURPOSE "Needed for scheduled wakeup which can wake from suspend (CAP_WAKE_ALARM)"
++)
++set(HAVE_LIBCAP ${Libcap_FOUND})
++
+ find_package(DDCUtil)
+ if(DDCUtil_FOUND)
+ add_definitions(-DWITH_DDCUTIL)
+diff --git a/daemon/CMakeLists.txt b/daemon/CMakeLists.txt
+index b0dc9397f8a61cc0ace52b1443a01f7055fbaa07..2d656f515e7e382bd5ee5172dad324f57855c977 100644
+--- a/daemon/CMakeLists.txt
++++ b/daemon/CMakeLists.txt
+@@ -191,6 +191,15 @@ endif ()
+ target_link_libraries(powerdevil ${UDEV_LIBS})
+
+ install(TARGETS powerdevil DESTINATION ${KDE_INSTALL_FULL_LIBEXECDIR})
++if (HAVE_LIBCAP)
++ install(
++ CODE "execute_process(
++ COMMAND
++ ${SETCAP_EXECUTABLE}
++ CAP_WAKE_ALARM=+ep
++ \$ENV{DESTDIR}${KDE_INSTALL_FULL_LIBEXECDIR}/org_kde_powerdevil)"
++ )
++endif()
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/powerdevil.desktop
+ DESTINATION ${KDE_INSTALL_AUTOSTARTDIR})
+diff --git a/daemon/plasma-powerdevil.service.in b/daemon/plasma-powerdevil.service.in
+index 73700ebc4c6bec5fb7d670e479816fc5f25e98a7..e1c8a64f58c08824580676a6655b6e891e171d9b 100644
+--- a/daemon/plasma-powerdevil.service.in
++++ b/daemon/plasma-powerdevil.service.in
+@@ -4,7 +4,6 @@ PartOf=graphical-session.target
+ After=plasma-core.target
+
+ [Service]
+-AmbientCapabilities=CAP_WAKE_ALARM
+ ExecStart=@KDE_INSTALL_FULL_LIBEXECDIR@/org_kde_powerdevil
+ Type=dbus
+ BusName=org.kde.Solid.PowerManagement
diff --git a/debian/patches/series b/debian/patches/series
index d0bad47..b30373e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
fix_compile
+no_ambient_capabilities
More information about the Neon-commits
mailing list