tlp{,ui}: update to 1.9.0
Testing the changes
- I tested the changes in this PR: YES|briefly|NO
- (TLP Profiles Daemon needs testing/testers ?)
Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
Notes
tlpuihasn't caught up yet
cc @oreo639
I don't think conflicts is the right way to handle this, and the TLP docs encourage what would be accomplished in XBPS though "provides" and "replaces".
That being said, if they both can be installed together but only one can be running at a given time, not sure that is necessary? According to the docs, it should be able detect if both are being ran at the same time and print an error/warning? https://linrunner.de/tlp/faq/ppd.html#does-power-profiles-daemon-conflict-with-tlp
The way that power-profiles-daemon handles this is by adding a conflicts in the systemd service: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/blob/main/data/power-profiles-daemon.service.in#L3 A check could be added to the power-profiles-daemon service run script to ensure TLP isn't running when it starts, although that isn't exactly the same.
I interpreted the docs slightly differently:
To prevent conflicts, many Linux distributions do not allow TLP and power-profiles-daemon packages to be installed at the same time. This results in the uninstallation of power-profiles-daemon when TLP is installed (and vice versa). If your distribution’s package manager does not enforce this, it is advisable to uninstall power-profiles-daemon when using TLP.
EDIT: Our docs are rather vague regarding the conflicts variable, since it does not really explain entailing ramifications:
conflictsAn optional list of packages conflicting with this package. Conflicts can be specified with the following version comparators: <, >, <=, >= or foo-1.0_1 to match an exact version. If version comparator is not defined (just a package name), the version comparator is automatically set to >=0. Example: conflicts="foo blah>=0.42.3".
Suggestion:
#!/bin/sh
exec 2>&1
+
+# In order to prevent unpredictable behaviour,
+# we check whether 'tlp' is running
+sv check tlp >/dev/null && exit 1
+
sv check dbus >/dev/null || exit 1
exec /usr/libexec/power-profiles-daemon
and removing the conflicts bit..
Probably will have to reciprocate for tlp-pd-pkexec, as well, see also:
https://linrunner.de/tlp/developers/dependencies.html
EDIT2: Personally, I don't have a strong opinion about this, but replaces would seem more in line with what upstream suggests as well as "Void's focus on stability"..
@oreo639 Since tlp and power-profiles-daemon have co-existed in the repo w/o issues for quite some time now, my suggestion would be to at least follow upstream's advice regarding the new subpackage tlp-pd, which is similar to power-profiles-daemon functionality-wise, and simply make them replace each other:
https://linrunner.de/tlp/developers/dependencies.html#package-tlp-pd
EDIT: Both packages provide (and previoulsy removed alongside systemd libs):
/usr/share/dbus-1/system-services/net.hadess.PowerProfiles.service
/usr/share/dbus-1/system-services/org.freedesktop.UPower.PowerProfiles.service
/usr/share/dbus-1/system.d/net.hadess.PowerProfiles.conf
/usr/share/dbus-1/system.d/org.freedesktop.UPower.PowerProfiles.conf
I've opted for replaces
EDIT: Both packages provide (and previoulsy removed alongside systemd libs): ... I've opted for
replaces
Makes sense.
Lgtm.
I've made some small changes by adding a runit service for tlp-pd (this also allows to ignore polkit - like I do)
EDIT: Had to rebase for python