Commit graph

45 commits

Author SHA1 Message Date
Marco Trevisan (Treviño) ae9076ab19 Release power-profiles-daemon 0.21 2024-04-04 01:55:02 +02:00
Marco Trevisan (Treviño) 301af78dce build. Do not mention tests on python checks
They're generic now, and there's no need to add further comments
2024-04-04 01:50:48 +02:00
Marco Trevisan (Treviño) 5b74abb94f build: Unify the python dependencies lookup
And enable the dependency check when we need for dependencies
2024-04-03 19:30:18 +00:00
Marco Trevisan (Treviño) 02898fbd44 build: Downgrade python3-shtab warning to a simple message 2024-04-03 19:30:18 +00:00
Mario Limonciello 27a8dfc8e7 Show a summary at end of meson setup 2024-02-15 09:26:13 -06:00
Mario Limonciello e9f26f965f Convert pylint to a meson feature
Enable by default if it's found.
2024-02-15 09:26:13 -06:00
Mario Limonciello 3d509fa6d2 Generate bash-completion and zsh-completion using shtab 2024-02-15 09:26:13 -06:00
Marco Trevisan (Treviño) d225c197e8 build: Bump dependency on polkit-gobject-1 0.99
It's still old enough to work on old distros, but it's what debian's
automatic dependencies system (based on library exported symbols) tells
us, so we should trust it!
2024-02-15 06:10:18 +01:00
Marco Trevisan (Treviño) 7858623142 powerprofilectl: Generate manpage using argparse-manpage
Add an option to toggle this feature so that it can be either
required or not
2024-02-15 04:55:04 +01:00
Mario Limonciello 0d3030b610 Bump version to 0.20 2024-02-15 00:36:59 +01:00
Marco Trevisan (Treviño) a0ff4af7ef power-profiles-manager: Exit cleanly on SIGTERM and SIGINT
In case we get a SIGINT or SIGTERM signal, quit the main loop so that we
perform all the teardown operations, including notifying clients and cleaning
up all the allocated resources.
2024-02-14 22:07:30 +00:00
Marco Trevisan (Treviño) 44f000b5a7 build: Add valgrind setup
Add ability to run tests under valgrind using --setup=valgrind
2024-02-14 04:27:39 +01:00
Marco Trevisan (Treviño) 59ea84d061 tests: Allow tests running with address sanitizers
We need to manually preload the asan library, so read where that is
using some meson machinery inherited from fprintd.
2024-02-14 04:00:20 +01:00
Marco Trevisan (Treviño) d127ea3908 meson: Bump meson required version to 0.59
It's the first one providing scan-build support
2024-02-14 00:09:44 +00:00
Marco Trevisan (Treviño) 3b29b0e52b cleanup: Use UPower namespace as default DBus name preserving old one
Expose the daemon as 'org.freedesktop.UPower.PowerProfiles' by default
but we also own the old 'net.hadess.PowerProfiles' name for
compatibility resons.

Also dbus objects are now registered also in the path
/org/freedesktop/UPower/PowerProfiles and they implement the
org.freedesktop.UPower.PowerProfiles interface.

Even in this case we preserve the compatibility with the old ones.

To make this switch as most reliable as possible, the code is now
generated for dbus configuration files preserving the previous ones as
base.

Tests are now performed checking both names, to ensure again that we're
not breaking the expectations for the old APIs consumers.
2024-02-13 20:44:29 +00:00
Marco Trevisan (Treviño) 53115abf35 build: Bump meson requirement to 0.58
It's still quite old, but provides some features we may want to use in
future, so let's use a newer version since we're about to release a new
major version of p-p-d too.
2024-02-13 20:44:29 +00:00
Marco Trevisan (Treviño) f37b74b65a build: Support building with old polkit
Some distros as LTS ones may still have old versions of polkit
gobject.

Since we only depend on the new polkit because of auto-pointers,
let's add a tiny compatibility layer to make possible to get
p-p-d also working on older stable distros as OEMs may like.
2024-02-13 21:18:25 +01:00
Marco Trevisan (Treviño) 640a9f2609 ci, build: Use stricter meson builds, using -Werror and fatal meson warnings 2024-02-02 16:10:03 +01:00
Marco Trevisan (Treviño) 7c2619a13d build: Add python dependencies checks on required gi modules too
We do check if gi module is available but not if any requirement gi
module also is, so do this instead of early failing at test point.
2024-02-02 13:34:03 +01:00
Bastien Nocera c20e09a711 0.13 2023-04-26 14:53:07 +02:00
Bastien Nocera 1ddc98ecd8 0.12 2022-06-28 15:58:14 +02:00
Bastien Nocera b0f6aa5e85 build: Make tests optional
And check for dbusmock and gi being available.

Closes: #95
2022-06-28 15:36:03 +02:00
Bastien Nocera 915f3dfc92 build: Install D-Bus config in /usr
/etc should be left for sysadmin overrides.

Closes: #94
2022-06-28 15:32:04 +02:00
Bastien Nocera 8b6e96e727 tests: Disable MALLOC_PERTURB when running pylint 2022-06-23 17:28:51 +02:00
Bastien Nocera e83b4556bf 0.11.1 2022-05-02 17:07:24 +02:00
Bastien Nocera 29151898b6 0.11 2022-04-29 14:29:31 +02:00
Bastien Nocera fd1664dfe2 main: Error out on D-Bus communication errors
The bug reporting tool in Fedora, in its infinite wisdom, considers
innocuous exceptions that occur when system daemons aren't running
to be bug report worthy.

Catch all the D-Bus communication errors, print an error message
detailing the problem and exit with a return value of 1 when they occur
instead of printing an exception.

See:
https://bugzilla.redhat.com/show_bug.cgi?id=2019536
https://bugzilla.redhat.com/show_bug.cgi?id=2020251
https://bugzilla.redhat.com/show_bug.cgi?id=2020941
2021-11-08 16:27:56 +01:00
Bastien Nocera 0aef9d6a2f build: Require polkit 0.114
It's required for the g_autoptr() support we use. For older
distributions shipping older versions of polkit, it is recommended that
you backport the g_autoptr() support to your version of polkit and
amend the required version in this project.
2021-11-02 17:18:17 +01:00
Bastien Nocera 215690be0f 0.10.1 2021-10-28 11:25:13 +02:00
Bastien Nocera f83685732b build: Make pylint test optional
As power-profiles-daemon keeps getting built with slightly different
versions of pylint with newer warnings, disable pylint test by default
to avoid getting bug reports about it.

Closes: #52
2021-10-06 10:22:10 +02:00
Bastien Nocera ea3faa1eab 0.10.0 2021-10-04 16:01:30 +02:00
Bastien Nocera 3aca4e9d01 main: Check whether user is allowed to perform action
Check whether a particular user/D-Bus client is allowed to switch
or hold power profiles.

Closes: #47
2021-09-28 13:07:49 +02:00
Bastien Nocera 9d6e1735f3 data: Add polkit policy description
Describe and set defaults for switching and holding power profiles.
2021-09-28 12:55:59 +02:00
Bastien Nocera 30d85f1e9e 0.9.0 2021-07-20 15:26:16 +02:00
Luca Stefani 24755fec0a build: Start using common_cflags
- Remove -Wall it's implied by warning_level=1
- Remove -std as it's implied by c_std
- Remove -fvisibility=hidden, we aren't a library
2021-04-15 13:20:56 +02:00
Bastien Nocera c483794592 0.8.1 2021-04-01 10:31:54 +02:00
Bastien Nocera cea4e1a249 build: Add check-news.sh script 2021-04-01 10:30:39 +02:00
Bastien Nocera 510951ab6c 0.8 2021-03-22 11:45:05 +01:00
Bastien Nocera 3d1b91eb2c main: Run new script through pylint 2021-03-12 08:59:38 +01:00
Bastien Nocera 7f74321381 lenovo-dytc: Use new gudev helper 2020-09-15 15:29:05 +02:00
Bastien Nocera 3af71eb131 intel-pstate: Monitor battery status to choose right balanced pref
Prefer "balance_performance" p-state preference when the machine is on
mains, and "balance_power" when it's on battery.
2020-09-04 15:10:16 +02:00
Bastien Nocera f65f3cddd5 data: Make service D-Bus activatable 2020-08-10 11:42:31 +02:00
Bastien Nocera 0d7178f9d6 build: Make sure libexecdir is an absolute path 2020-08-07 11:23:06 +02:00
Bastien Nocera 46ea9c7875 tests: Add integration tests 2020-07-16 17:07:10 +02:00
Bastien Nocera 4ea7c96949 power-profiles-daemon 2020-07-10 17:29:23 +02:00