From 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 17 Jul 2021 19:04:28 +0100 Subject: gentoo resync : 17.07.2021 --- sys-power/Manifest.gz | Bin 5073 -> 5079 bytes sys-power/upower/Manifest | 7 +- ....99.12-fix-power_now-energy_rate-readings.patch | 43 +++++++++ .../files/upower-0.99.9-pending-charge1.patch | 33 ------- .../files/upower-0.99.9-pending-charge2.patch | 48 ---------- sys-power/upower/upower-0.99.12.ebuild | 102 +++++++++++++++++++++ sys-power/upower/upower-0.99.9-r1.ebuild | 98 -------------------- 7 files changed, 148 insertions(+), 183 deletions(-) create mode 100644 sys-power/upower/files/upower-0.99.12-fix-power_now-energy_rate-readings.patch delete mode 100644 sys-power/upower/files/upower-0.99.9-pending-charge1.patch delete mode 100644 sys-power/upower/files/upower-0.99.9-pending-charge2.patch create mode 100644 sys-power/upower/upower-0.99.12.ebuild delete mode 100644 sys-power/upower/upower-0.99.9-r1.ebuild (limited to 'sys-power') diff --git a/sys-power/Manifest.gz b/sys-power/Manifest.gz index 2af1423c030e..5c99c53b7ef4 100644 Binary files a/sys-power/Manifest.gz and b/sys-power/Manifest.gz differ diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest index a331584ed52d..4ba0c6aa2738 100644 --- a/sys-power/upower/Manifest +++ b/sys-power/upower/Manifest @@ -1,7 +1,6 @@ -AUX upower-0.99.9-pending-charge1.patch 1351 BLAKE2B 719581956d7bed9efb148bb84a83b0b90cabadf1113fece846416b980c1919895bd1e85575bba0198d856d5a39209ab7c919e2142361ee2cf6361f631f312fc9 SHA512 f100c9cb06c8407fdb8cc2ea27651f3e1eb563e40b98b2a0d7589577652d5c14d824a4de3d503cb858fa5d4360993f63da49cd5f4c8caaec43fde4f20e075f47 -AUX upower-0.99.9-pending-charge2.patch 2016 BLAKE2B 87a3078acf6c95dd8237f894aa25dbf803d42f766682e3e53f5ec30fcd7725178ebab94111945fbf0b4d0e16b656e8723240b14358d1c6e5285086b30da541d2 SHA512 15aa04bcd892feec125508d6a9edb8df98cd5317fce27d9c8907994f1d735be32934c5010566f0a38221ef20b48d8faf73841df6e35447ef0efccdaab371fb0b +AUX upower-0.99.12-fix-power_now-energy_rate-readings.patch 1636 BLAKE2B e61167d5a1f6b65cdb611f6cf7b9b5879de58d692176079041a785ca6ecf799b728b32a37e0e3ed7cb0ad06e03db2f16c3eac84d3879398f9be8d9f4fff22d72 SHA512 7aa880a8fd6887a0a9e7d118ef7fa2cde59f9d9b1f16dec17ac7ac013346f9e06f9ae55c343b7830b370f500da201cd2b107f8f586f90d4f7b5695fd33389565 DIST upower-0.99.11.tar.xz 430128 BLAKE2B 77604d02a69de98e4c7b268d11d189aa42ace2d62b982fda9bc41131ce383ede32953ada31eae0bbfd1121600af5863924d48c636e60a28f505a6998dcac227c SHA512 67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803 -DIST upower-0.99.9.tar.xz 448408 BLAKE2B 5fa2436f33c94cffb736d8e3fad433acf58954cf06ccd403a0361214be5afc45d79ea279f3c5c48dcd58b92ccaf995777c95987d1749fd8c8c8958317e439570 SHA512 45eb587b0e5ffcce88bad8c56bc5efa30559748913016a55d58313280f5159378e5fbb4a9842c3a6409257bb97822d235f96b03704268b8471455c93eb05fe2f +DIST upower-0.99.12.tar.xz 423640 BLAKE2B 4c5c6357f0a2f8d721ebae9736912b1871a898c7ce65708626f9a9465cde87036ba6ab8050d97f5b9074d92e2700d8ed1e71b67f43cd6305eb4e89336f1b628f SHA512 9858a0e5f65271522cc5f36b0cd8722a5fb3effba37dbc5b22f08606701d4242ee54329d07460768004a24dc42705a84140ac6d9691afb7f09584b2e61fe3413 EBUILD upower-0.99.11.ebuild 2105 BLAKE2B c94253f904dba7fa27380996fa645218c34342d55e3b4a43cd38614d60176c3140ae4ac520d4c1ad05ada307f860a373bd8397915c7c644792c3a934b303bd68 SHA512 d778181809780a53677aa234ea64d5c4ba840b9f7ab465a1160d1efc1c4b26427032f1b09739333387406ed62a61cc9626e3e72da756869d0a1707fc8c45d45e -EBUILD upower-0.99.9-r1.ebuild 2344 BLAKE2B 3b286baaa33786c5964f86e0153900c1614f5ad37f5ecdd0d3d1c9587bd14ca1759169e3f3bab6f71f2347f7c0453f5b4903f6deb935b0ac3c196e21f139f33f SHA512 05292d9d5f90fbc9c0478db5d2b8b96fb17725cdae9411f4d5fd653d27e2402e50c07feb52b373754330e03210dd1f6735b144a5361c9c004c989a1fda19868a +EBUILD upower-0.99.12.ebuild 2784 BLAKE2B 18938d1b0df3c95ff2adfde2e08b95f3dc6a8df7406dacf3189a74f48afbed79f23ceee21e67f22713a4a9dd178f92be0117121b75f93c236f89b48e82cf74a6 SHA512 4f3df68697b4d1523f3cc1f88ca3119b8373e48225302ed2f87d259a97c0376c409b74eebb31d8775913d1b5f9e3760a6fd404eadabebb005bdc36cc1f2cb260 MISC metadata.xml 228 BLAKE2B 6b6559027915d8578c02e363cc855e812c338acf7716fe4108a8b85c09152a086cb578e7361f4613a44e8b550d7e205ff43aea39dd9488951fa18c6e15042278 SHA512 4f5e63f918a0f8790db49c5b12173c673f86935f00796a04acfed573f618379b73b05b1869941e11f881fe69d4958f5287ce815fd710eadb6ac9f2680894caae diff --git a/sys-power/upower/files/upower-0.99.12-fix-power_now-energy_rate-readings.patch b/sys-power/upower/files/upower-0.99.12-fix-power_now-energy_rate-readings.patch new file mode 100644 index 000000000000..c3dd864a6b1d --- /dev/null +++ b/sys-power/upower/files/upower-0.99.12-fix-power_now-energy_rate-readings.patch @@ -0,0 +1,43 @@ +From 2949136b152e94aa3b57da5130bcb9022724debe Mon Sep 17 00:00:00 2001 +From: Philipp Zabel +Date: Thu, 17 Jun 2021 18:14:53 +0200 +Subject: [PATCH] linux: Fix < 0.01 W energy-rate readings from power_now sysfs + property + +Currently, if a power supplies' power_now sysfs file reports discharge +rates < 0.01 W, the code will try to calculate the discharge rate from +the legacy sysfs files. On new kernels where those don't exist, this +produces wrong results. + +For example, on a dual-battery Thinkpad T450s, while the external +battery is discharging, the internal battery reports power_now = 0, +but the corresponding upower energy-rate field incorrectly reads +about 2.3 W. + +This patch fixes the issue by falling back to the legacy code only if +the legacy current_now sysfs file exists. + +Closes: #7, #44 +--- + src/linux/up-device-supply.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c +index 3ebbd88..4236ce4 100644 +--- a/src/linux/up-device-supply.c ++++ b/src/linux/up-device-supply.c +@@ -682,8 +682,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply, + state = up_device_supply_get_state (native); + + /* this is the new value in uW */ +- energy_rate = fabs (g_udev_device_get_sysfs_attr_as_double_uncached (native, "power_now") / 1000000.0); +- if (energy_rate < 0.01) { ++ if (g_udev_device_has_sysfs_attr (native, "power_now")) { ++ energy_rate = fabs (g_udev_device_get_sysfs_attr_as_double_uncached (native, "power_now") / 1000000.0); ++ } else { + gdouble charge_full; + + /* convert charge to energy */ +-- +GitLab + diff --git a/sys-power/upower/files/upower-0.99.9-pending-charge1.patch b/sys-power/upower/files/upower-0.99.9-pending-charge1.patch deleted file mode 100644 index 9ce91c10a66e..000000000000 --- a/sys-power/upower/files/upower-0.99.9-pending-charge1.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a074a5462ab9749ad4aaca52e0202602897660aa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= -Date: Thu, 1 Nov 2018 14:45:28 -0700 -Subject: [PATCH] daemon: Make comment more succinct - -This will help make it more clear when adding an extra state on the -following commit. It also makes the language consistent between the -different lines. There are no changes on the meaning of these lines nor -any functional changes on this commit. ---- - src/up-daemon.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/up-daemon.c b/src/up-daemon.c -index 1a5dddc..95fff6b 100644 ---- a/src/up-daemon.c -+++ b/src/up-daemon.c -@@ -209,9 +209,9 @@ up_daemon_update_display_battery (UpDaemon *daemon) - power_supply == FALSE) - continue; - -- /* If one battery is charging, then the composite is charging -- * If all batteries are discharging, then the composite is discharging -- * If all batteries are fully charged, then they're all fully charged -+ /* If one battery is charging, the composite is charging -+ * If all batteries are discharging, the composite is discharging -+ * If all batteries are fully charged, the composite is fully charged - * Everything else is unknown */ - if (state == UP_DEVICE_STATE_CHARGING) - state_total = UP_DEVICE_STATE_CHARGING; --- -2.18.1 - diff --git a/sys-power/upower/files/upower-0.99.9-pending-charge2.patch b/sys-power/upower/files/upower-0.99.9-pending-charge2.patch deleted file mode 100644 index a79ebac7ed18..000000000000 --- a/sys-power/upower/files/upower-0.99.9-pending-charge2.patch +++ /dev/null @@ -1,48 +0,0 @@ -From a074631c0b1748c8a791c4f0dad99da75805a328 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= -Date: Mon, 15 Oct 2018 17:05:27 -0700 -Subject: [PATCH] daemon: Consider pending-charge when calculating the display - state - -Without this change if all batteries in the system are in the -pending-charge state, the display device state is set to unknown, and -its icon to battery-missing-symbolic. - -This change makes the pending-charge state be considered when -calculating the DisplayDevice state, setting it to pending-charge if at -least one battery in the system is pending-charge and no other is -charging or discharging. - -Closes: #81 -Closes: #19 ---- - src/up-daemon.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/up-daemon.c b/src/up-daemon.c -index 95fff6b..690f379 100644 ---- a/src/up-daemon.c -+++ b/src/up-daemon.c -@@ -210,14 +210,18 @@ up_daemon_update_display_battery (UpDaemon *daemon) - continue; - - /* If one battery is charging, the composite is charging -- * If all batteries are discharging, the composite is discharging -+ * If all batteries are discharging or pending-charge, the composite is discharging - * If all batteries are fully charged, the composite is fully charged -+ * If one battery is pending-charge and no other is charging or discharging, then the composite is pending-charge - * Everything else is unknown */ - if (state == UP_DEVICE_STATE_CHARGING) - state_total = UP_DEVICE_STATE_CHARGING; - else if (state == UP_DEVICE_STATE_DISCHARGING && - state_total != UP_DEVICE_STATE_CHARGING) - state_total = UP_DEVICE_STATE_DISCHARGING; -+ else if (state == UP_DEVICE_STATE_PENDING_CHARGE && -+ (state_total == UP_DEVICE_STATE_UNKNOWN || state_total == UP_DEVICE_STATE_PENDING_CHARGE)) -+ state_total = UP_DEVICE_STATE_PENDING_CHARGE; - else if (state == UP_DEVICE_STATE_FULLY_CHARGED && - state_total == UP_DEVICE_STATE_UNKNOWN) - state_total = UP_DEVICE_STATE_FULLY_CHARGED; --- -2.18.1 - diff --git a/sys-power/upower/upower-0.99.12.ebuild b/sys-power/upower/upower-0.99.12.ebuild new file mode 100644 index 000000000000..7701fb98f1cc --- /dev/null +++ b/sys-power/upower/upower-0.99.12.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd xdg-utils + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +COMMIT="244f5966c58773bbd3b4c507c549560f" +SRC_URI="https://gitlab.freedesktop.org/upower/upower/uploads/${COMMIT}/${P}.tar.xz" +# No tarball released at the usual location +#SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0/3" # based on SONAME of libupower-glib.so +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +# gtk-doc files are not available as prebuilt in the tarball +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" + +DEPEND=" + >=dev-libs/glib-2.38:2 + sys-apps/dbus:= + introspection? ( dev-libs/gobject-introspection:= ) + kernel_linux? ( + dev-libs/libgudev:= + virtual/udev + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-2:= + ) + ) +" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-devicekit ) +" +BDEPEND=" + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + >=sys-devel/gettext-0.19.8 + virtual/pkgconfig + doc? ( dev-util/gtk-doc ) +" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS=( AUTHORS HACKING NEWS README ) + +PATCHES=( "${FILESDIR}/${P}-fix-power_now-energy_rate-readings.patch" ) # bug 796896 + +src_prepare() { + default + xdg_environment_reset + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend + + if use kernel_linux ; then + backend=linux + elif use kernel_FreeBSD ; then + backend=freebsd + else + backend=dummy + fi + + local myeconfargs=( + --disable-tests + --enable-man-pages + --libexecdir="${EPREFIX}"/usr/lib/${PN} + --localstatedir="${EPREFIX}"/var + --with-backend=${backend} + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + --with-systemdutildir="$(systemd_get_utildir)" + $(use_enable doc gtk-doc) + $(use_enable introspection) + $(use_with ios idevice) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + find "${ED}" -type f -name '*.la' -delete || die + keepdir /var/lib/upower #383091 +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -lt 0.99.12; then + elog "Support for Logitech Unifying Receiver battery state readout was" + elog "removed in version 0.99.12, these devices have been directly" + elog "supported by the Linux kernel since version >=3.2." + elog + elog "Support for CSR devices battery state was removed from udev rules" + elog "in version 0.99.12. This concerns the following Logitech products" + elog "from the mid 2000s:" + elog "Mouse/Dual/Keyboard+Mouse Receiver, Freedom Optical, Elite Duo," + elog "MX700/MX1000, Optical TrackMan, Click! Mouse, Presenter." + fi +} diff --git a/sys-power/upower/upower-0.99.9-r1.ebuild b/sys-power/upower/upower-0.99.9-r1.ebuild deleted file mode 100644 index a67c244bb30d..000000000000 --- a/sys-power/upower/upower-0.99.9-r1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit systemd xdg-utils - -DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" -HOMEPAGE="https://upower.freedesktop.org/" - -# No tarball released, use the same commit as Fedora -#SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz" -COMMIT="2282c7c0e53fb31816b824c9d1f547e8" -SRC_URI="https://gitlab.freedesktop.org/upower/upower/uploads/${COMMIT}/${P}.tar.xz" - -LICENSE="GPL-2" -SLOT="0/3" # based on SONAME of libupower-glib.so -KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86" - -# gtk-doc files are not available as prebuilt in the tarball -IUSE="doc +introspection ios kernel_FreeBSD kernel_linux selinux" - -COMMON_DEPS=" - >=dev-libs/dbus-glib-0.100 - >=dev-libs/glib-2.34:2 - sys-apps/dbus:= - introspection? ( dev-libs/gobject-introspection:= ) - kernel_linux? ( - dev-libs/libgudev:= - virtual/libusb:1 - virtual/udev - ios? ( - >=app-pda/libimobiledevice-1:= - >=app-pda/libplist-1:= - ) - ) -" -RDEPEND=" - ${COMMON_DEPS} - selinux? ( sec-policy/selinux-devicekit ) -" -DEPEND="${COMMON_DEPS} - doc? ( dev-util/gtk-doc ) - dev-libs/libxslt - app-text/docbook-xsl-stylesheets - dev-util/intltool - >=sys-devel/gettext-0.17 - virtual/pkgconfig -" - -QA_MULTILIB_PATHS="usr/lib/${PN}/.*" - -DOCS=( AUTHORS HACKING NEWS README ) - -PATCHES=( - # daemon: Consider pending-charge when calculating the display state - # (from 'master') - "${FILESDIR}/${P}-pending-charge1.patch" - "${FILESDIR}/${P}-pending-charge2.patch" -) - -src_prepare() { - default - xdg_environment_reset - sed -i -e '/DISABLE_DEPRECATED/d' configure || die -} - -src_configure() { - local backend - - if use kernel_linux ; then - backend=linux - elif use kernel_FreeBSD ; then - backend=freebsd - else - backend=dummy - fi - - local myeconfargs=( - --disable-static - --disable-tests - --enable-man-pages - --libexecdir="${EPREFIX}"/usr/lib/${PN} - --localstatedir="${EPREFIX}"/var - --with-backend=${backend} - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - --with-systemdutildir="$(systemd_get_utildir)" - $(use_enable doc gtk-doc) - $(use_enable introspection) - $(use_with ios idevice) - ) - econf "${myeconfargs[@]}" -} - -src_install() { - default - find "${ED}" -name '*.la' -delete || die - keepdir /var/lib/upower #383091 -} -- cgit v1.2.3