public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/
@ 2021-07-16 11:27 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-07-16 11:27 UTC (permalink / raw
  To: gentoo-commits

commit:     052c810f21548e913e83f9e6d335ec5047a0eba0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 16 10:03:58 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Jul 16 11:23:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=052c810f

sys-power/upower: 0.99.12 version bump

- EAPI-8 bump
- Raise app-pda/libplist minimum version to >=2
- Drop virtual/libusb dependency
- Add notice about dropped support for old devices

Reported-by: Joakim Tjernlund <joakim.tjernlund <AT> infinera.com>
Closes: https://bugs.gentoo.org/796896
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-power/upower/Manifest                          |   1 +
 ....99.12-fix-power_now-energy_rate-readings.patch |  43 +++++++++
 sys-power/upower/upower-0.99.12.ebuild             | 102 +++++++++++++++++++++
 3 files changed, 146 insertions(+)

diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
index 1a8569d7b78..5c19d802df7 100644
--- a/sys-power/upower/Manifest
+++ b/sys-power/upower/Manifest
@@ -1,2 +1,3 @@
 DIST upower-0.99.11.tar.xz 430128 BLAKE2B 77604d02a69de98e4c7b268d11d189aa42ace2d62b982fda9bc41131ce383ede32953ada31eae0bbfd1121600af5863924d48c636e60a28f505a6998dcac227c SHA512 67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803
+DIST upower-0.99.12.tar.xz 423640 BLAKE2B 4c5c6357f0a2f8d721ebae9736912b1871a898c7ce65708626f9a9465cde87036ba6ab8050d97f5b9074d92e2700d8ed1e71b67f43cd6305eb4e89336f1b628f SHA512 9858a0e5f65271522cc5f36b0cd8722a5fb3effba37dbc5b22f08606701d4242ee54329d07460768004a24dc42705a84140ac6d9691afb7f09584b2e61fe3413
 DIST upower-0.99.9.tar.xz 448408 BLAKE2B 5fa2436f33c94cffb736d8e3fad433acf58954cf06ccd403a0361214be5afc45d79ea279f3c5c48dcd58b92ccaf995777c95987d1749fd8c8c8958317e439570 SHA512 45eb587b0e5ffcce88bad8c56bc5efa30559748913016a55d58313280f5159378e5fbb4a9842c3a6409257bb97822d235f96b03704268b8471455c93eb05fe2f

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 00000000000..c3dd864a6b1
--- /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 <p.zabel@pengutronix.de>
+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/upower-0.99.12.ebuild b/sys-power/upower/upower-0.99.12.ebuild
new file mode 100644
index 00000000000..7701fb98f1c
--- /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
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/
@ 2021-07-16 11:27 Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-07-16 11:27 UTC (permalink / raw
  To: gentoo-commits

commit:     17712222fa4fd3359ca5d542b42c3954ecb5409f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 16 10:14:47 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Jul 16 11:23:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17712222

sys-power/upower: Drop 0.99.9-r1

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-power/upower/Manifest                          |  1 -
 .../files/upower-0.99.9-pending-charge1.patch      | 33 --------
 .../files/upower-0.99.9-pending-charge2.patch      | 48 -----------
 sys-power/upower/upower-0.99.9-r1.ebuild           | 98 ----------------------
 4 files changed, 180 deletions(-)

diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
index 5c19d802df7..5153b69a5b8 100644
--- a/sys-power/upower/Manifest
+++ b/sys-power/upower/Manifest
@@ -1,3 +1,2 @@
 DIST upower-0.99.11.tar.xz 430128 BLAKE2B 77604d02a69de98e4c7b268d11d189aa42ace2d62b982fda9bc41131ce383ede32953ada31eae0bbfd1121600af5863924d48c636e60a28f505a6998dcac227c SHA512 67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803
 DIST upower-0.99.12.tar.xz 423640 BLAKE2B 4c5c6357f0a2f8d721ebae9736912b1871a898c7ce65708626f9a9465cde87036ba6ab8050d97f5b9074d92e2700d8ed1e71b67f43cd6305eb4e89336f1b628f SHA512 9858a0e5f65271522cc5f36b0cd8722a5fb3effba37dbc5b22f08606701d4242ee54329d07460768004a24dc42705a84140ac6d9691afb7f09584b2e61fe3413
-DIST upower-0.99.9.tar.xz 448408 BLAKE2B 5fa2436f33c94cffb736d8e3fad433acf58954cf06ccd403a0361214be5afc45d79ea279f3c5c48dcd58b92ccaf995777c95987d1749fd8c8c8958317e439570 SHA512 45eb587b0e5ffcce88bad8c56bc5efa30559748913016a55d58313280f5159378e5fbb4a9842c3a6409257bb97822d235f96b03704268b8471455c93eb05fe2f

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 9ce91c10a66..00000000000
--- 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?= <jprvita@endlessm.com>
-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 a79ebac7ed1..00000000000
--- 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?= <jprvita@endlessm.com>
-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.9-r1.ebuild b/sys-power/upower/upower-0.99.9-r1.ebuild
deleted file mode 100644
index a67c244bb30..00000000000
--- 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
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/
@ 2022-05-30 17:41 Matt Turner
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2022-05-30 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     7b62cbd27a588cff0eb0b200718f3f83d2679a3e
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 17:39:52 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon May 30 17:40:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b62cbd2

sys-power/upower: Add patch to build without dev-python/python-dbusmock

Closes: https://bugs.gentoo.org/848525
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...18-meson-Allow-unittest-inspector-to-fail.patch | 31 ++++++++++++++++++++++
 sys-power/upower/upower-0.99.18.ebuild             |  4 +++
 2 files changed, 35 insertions(+)

diff --git a/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch b/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch
new file mode 100644
index 000000000000..feafa87e9705
--- /dev/null
+++ b/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch
@@ -0,0 +1,31 @@
+Bug: https://bugs.gentoo.org/848525
+
+From aa646fa0ca3e164b09949c546796ec50433b748d Mon Sep 17 00:00:00 2001
+From: Benjamin Berg <bberg@redhat.com>
+Date: Tue, 17 May 2022 16:02:49 +0200
+Subject: [PATCH] meson: Allow unittest inspector to fail
+
+It is only used to make the test output nicer, and it is completely fine
+to fail.
+
+Closes: #187
+---
+ src/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/meson.build b/src/meson.build
+index b49d5f0..2e1edd1 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -124,7 +124,7 @@ if os_backend == 'linux' and gobject_introspection.found()
+ 
+     python3 = find_program('python3')
+     unittest_inspector = find_program('linux/unittest_inspector.py')
+-    r = run_command(unittest_inspector, files('linux/integration-test.py'), check: true)
++    r = run_command(unittest_inspector, files('linux/integration-test.py'), check: false)
+     unit_tests = r.stdout().strip().split('\n')
+ 
+     foreach ut: unit_tests
+-- 
+2.35.1
+

diff --git a/sys-power/upower/upower-0.99.18.ebuild b/sys-power/upower/upower-0.99.18.ebuild
index 8f405f8489e8..760dcd025ded 100644
--- a/sys-power/upower/upower-0.99.18.ebuild
+++ b/sys-power/upower/upower-0.99.18.ebuild
@@ -54,6 +54,10 @@ S="${WORKDIR}/${PN}-v${PV}"
 
 QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
 
+PATCHES=(
+	"${FILESDIR}"/${PV}-meson-Allow-unittest-inspector-to-fail.patch
+)
+
 python_check_deps() {
 	python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
 	python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/
@ 2022-09-01  1:29 Matt Turner
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2022-09-01  1:29 UTC (permalink / raw
  To: gentoo-commits

commit:     56b055845d1c14d8e8171cefe8453fc521dc534a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 01:24:15 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 01:28:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56b05584

sys-power/upower: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 sys-power/upower/Manifest                          |   4 -
 ...18-meson-Allow-unittest-inspector-to-fail.patch |  31 ------
 ....99.12-fix-power_now-energy_rate-readings.patch |  43 --------
 ...eson-Don-t-search-for-gtk-doc-if-disabled.patch |  60 -----------
 sys-power/upower/upower-0.99.12-r1.ebuild          | 100 ------------------
 sys-power/upower/upower-0.99.17.ebuild             | 117 ---------------------
 sys-power/upower/upower-0.99.18.ebuild             | 117 ---------------------
 sys-power/upower/upower-0.99.19.ebuild             | 117 ---------------------
 8 files changed, 589 deletions(-)

diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
index 1d7d74184043..1f9e6dd964b8 100644
--- a/sys-power/upower/Manifest
+++ b/sys-power/upower/Manifest
@@ -1,5 +1 @@
-DIST upower-0.99.12.tar.xz 423640 BLAKE2B 4c5c6357f0a2f8d721ebae9736912b1871a898c7ce65708626f9a9465cde87036ba6ab8050d97f5b9074d92e2700d8ed1e71b67f43cd6305eb4e89336f1b628f SHA512 9858a0e5f65271522cc5f36b0cd8722a5fb3effba37dbc5b22f08606701d4242ee54329d07460768004a24dc42705a84140ac6d9691afb7f09584b2e61fe3413
-DIST upower-v0.99.17.tar.bz2 139108 BLAKE2B de48a8058752f3e2bcefe83fe049ae9181517276f6d2930c402089291d935ecbdc6f7759d811467c537801c422f5d32a02366f3e3d57bea9e73e311b13df046a SHA512 fcb2f344e82f04af85eee3a4ef42a4d119f7b55fd4e1c6bc2633845135bf524957b54c849bf6501d89cfbd285a7e1fbeecb8e846aa108e2b36d1550347150c04
-DIST upower-v0.99.18.tar.bz2 141140 BLAKE2B 2e6acfaf58f6e0031326c269ad58bfcdac84a25f952ef3169e6ee85889696c5c83d10aaf67b8244a2378150fd591ddbd3101d21d1e7534e5d7f2f69ee070a174 SHA512 f33a2ca35209d69fa7ddf614c6a390973c998c6473448acb00ca86114f7bfc05beb8f904010ed7b5a440209fe503e759682459893fdc9690c4b79d516e7f9de1
-DIST upower-v0.99.19.tar.bz2 141661 BLAKE2B 4c117927d17f118cd06165160b407190ab86fff6bc194204038fd334dc879726c1f83fa23c89c2574cf8de6211ce6a884cc103f8292618818b1bc60e5ba8f1e8 SHA512 1462a64bc642bd6c5c235742f5a8fa9e3440846d90061889b568fc0a91f7b24d56d1f5a3d33bff8d6d35f78aa8bc8c15f9c4a51a2cb40f1ee3b2a822ad60ca33
 DIST upower-v0.99.20.tar.bz2 126098 BLAKE2B 670a2ad746c5cf8b2aca332f1f8c36fc96cd82b3ad8a7a5337dd3edce60cd73b1a83e807ec3f257d5216b3b4873f1bcf6cc9c434c195f75680e891c653f44fe1 SHA512 50e5b03f1319da3869b0caba4fbe78c8eabf1df6f783f1463b06394bee58bae42ad411780faa503965c5fdb983d723c0b5ae0731fae4220997a17875f4850b1e

diff --git a/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch b/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch
deleted file mode 100644
index feafa87e9705..000000000000
--- a/sys-power/upower/files/0.99.18-meson-Allow-unittest-inspector-to-fail.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Bug: https://bugs.gentoo.org/848525
-
-From aa646fa0ca3e164b09949c546796ec50433b748d Mon Sep 17 00:00:00 2001
-From: Benjamin Berg <bberg@redhat.com>
-Date: Tue, 17 May 2022 16:02:49 +0200
-Subject: [PATCH] meson: Allow unittest inspector to fail
-
-It is only used to make the test output nicer, and it is completely fine
-to fail.
-
-Closes: #187
----
- src/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/meson.build b/src/meson.build
-index b49d5f0..2e1edd1 100644
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -124,7 +124,7 @@ if os_backend == 'linux' and gobject_introspection.found()
- 
-     python3 = find_program('python3')
-     unittest_inspector = find_program('linux/unittest_inspector.py')
--    r = run_command(unittest_inspector, files('linux/integration-test.py'), check: true)
-+    r = run_command(unittest_inspector, files('linux/integration-test.py'), check: false)
-     unit_tests = r.stdout().strip().split('\n')
- 
-     foreach ut: unit_tests
--- 
-2.35.1
-

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
deleted file mode 100644
index c3dd864a6b1d..000000000000
--- a/sys-power/upower/files/upower-0.99.12-fix-power_now-energy_rate-readings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 2949136b152e94aa3b57da5130bcb9022724debe Mon Sep 17 00:00:00 2001
-From: Philipp Zabel <p.zabel@pengutronix.de>
-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.17-meson-Don-t-search-for-gtk-doc-if-disabled.patch b/sys-power/upower/files/upower-0.99.17-meson-Don-t-search-for-gtk-doc-if-disabled.patch
deleted file mode 100644
index ead41d2e64c8..000000000000
--- a/sys-power/upower/files/upower-0.99.17-meson-Don-t-search-for-gtk-doc-if-disabled.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-https://gitlab.freedesktop.org/upower/upower/-/merge_requests/123
-
-From 1003d5c2a69e6c28dcf68adf10181b5180b5defa Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Sun, 20 Mar 2022 15:32:55 -0700
-Subject: [PATCH] meson: Don't search for gtk-doc if disabled
-
----
- doc/meson.build | 38 ++++++++++++++++++++------------------
- 1 file changed, 20 insertions(+), 18 deletions(-)
-
-diff --git a/doc/meson.build b/doc/meson.build
-index dc93a16..5fc253c 100644
---- a/doc/meson.build
-+++ b/doc/meson.build
-@@ -27,21 +27,23 @@ version_xml = configure_file(
-     input: 'version.xml.in',
-     configuration: cdata)
- 
--gnome.gtkdoc('UPower',
--    main_xml: 'upower-docs.xml',
--    src_dir: meson.source_root() / 'libupower-glib',
--    dependencies: [ libupower_glib_dep ],
--    scan_args: ['--rebuild-types', '--rebuild-sections'],
--    content_files: [
--        version_xml,
--        ifaces_refs,
--        'man/UPower.xml',
--        'man/upowerd.xml',
--        'man/upower.xml',
--        '../COPYING',
--    ],
--    ignore_headers: [
--        'config.h',
--    ],
--    install: get_option('gtk-doc')
--)
-+if get_option('gtk-doc')
-+  gnome.gtkdoc('UPower',
-+      main_xml: 'upower-docs.xml',
-+      src_dir: meson.source_root() / 'libupower-glib',
-+      dependencies: [ libupower_glib_dep ],
-+      scan_args: ['--rebuild-types', '--rebuild-sections'],
-+      content_files: [
-+          version_xml,
-+          ifaces_refs,
-+          'man/UPower.xml',
-+          'man/upowerd.xml',
-+          'man/upower.xml',
-+          '../COPYING',
-+      ],
-+      ignore_headers: [
-+          'config.h',
-+      ],
-+      install: true
-+  )
-+endif
--- 
-2.34.1
-

diff --git a/sys-power/upower/upower-0.99.12-r1.ebuild b/sys-power/upower/upower-0.99.12-r1.ebuild
deleted file mode 100644
index d894dcb5bdf8..000000000000
--- a/sys-power/upower/upower-0.99.12-r1.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2022 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 selinux"
-
-DEPEND="
-	>=dev-libs/glib-2.38:2
-	sys-apps/dbus:=
-	introspection? ( dev-libs/gobject-introspection:= )
-	kernel_linux? (
-		>=dev-libs/libgudev-236:=
-		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
-	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.17.ebuild b/sys-power/upower/upower-0.99.17.ebuild
deleted file mode 100644
index eaa60751fe3f..000000000000
--- a/sys-power/upower/upower-0.99.17.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit meson python-any-r1 systemd udev xdg-utils
-
-DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics"
-HOMEPAGE="https://upower.freedesktop.org/"
-SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
-
-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 selinux test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	>=dev-libs/glib-2.56:2
-	sys-apps/dbus:=
-	introspection? ( dev-libs/gobject-introspection:= )
-	kernel_linux? (
-		>=dev-libs/libgudev-236:=
-		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
-	dev-util/gdbus-codegen
-	>=sys-devel/gettext-0.19.8
-	virtual/pkgconfig
-	doc? ( dev-util/gtk-doc )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/python-dbusmock[${PYTHON_USEDEP}]
-		')
-		dev-util/umockdev
-	)
-"
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-meson-Don-t-search-for-gtk-doc-if-disabled.patch
-)
-
-python_check_deps() {
-	python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	xdg_environment_reset
-}
-
-src_configure() {
-	local backend
-
-	if use kernel_linux ; then
-		backend=linux
-	else
-		backend=dummy
-	fi
-
-	local emesonargs=(
-		--localstatedir "${EPREFIX}"/var
-
-		-Dman=true
-		$(meson_use doc gtk-doc)
-		$(meson_feature introspection)
-		-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
-		-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
-		-Dos_backend="${backend}"
-		$(meson_feature ios idevice)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-	keepdir /var/lib/upower #383091
-}
-
-pkg_postinst() {
-	udev_reload
-
-	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.18.ebuild b/sys-power/upower/upower-0.99.18.ebuild
deleted file mode 100644
index 760dcd025ded..000000000000
--- a/sys-power/upower/upower-0.99.18.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-inherit meson python-any-r1 systemd udev xdg-utils
-
-DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics"
-HOMEPAGE="https://upower.freedesktop.org/"
-SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
-
-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 selinux test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	>=dev-libs/glib-2.58:2
-	sys-apps/dbus:=
-	introspection? ( dev-libs/gobject-introspection:= )
-	kernel_linux? (
-		>=dev-libs/libgudev-236:=
-		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
-	dev-util/gdbus-codegen
-	>=sys-devel/gettext-0.19.8
-	virtual/pkgconfig
-	doc? ( dev-util/gtk-doc )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/python-dbusmock[${PYTHON_USEDEP}]
-		')
-		dev-util/umockdev
-	)
-"
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
-
-PATCHES=(
-	"${FILESDIR}"/${PV}-meson-Allow-unittest-inspector-to-fail.patch
-)
-
-python_check_deps() {
-	python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	xdg_environment_reset
-}
-
-src_configure() {
-	local backend
-
-	if use kernel_linux ; then
-		backend=linux
-	else
-		backend=dummy
-	fi
-
-	local emesonargs=(
-		--localstatedir "${EPREFIX}"/var
-
-		-Dman=true
-		$(meson_use doc gtk-doc)
-		$(meson_feature introspection)
-		-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
-		-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
-		-Dos_backend="${backend}"
-		$(meson_feature ios idevice)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-	keepdir /var/lib/upower #383091
-}
-
-pkg_postinst() {
-	udev_reload
-
-	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.19.ebuild b/sys-power/upower/upower-0.99.19.ebuild
deleted file mode 100644
index 5554b4d5e0a6..000000000000
--- a/sys-power/upower/upower-0.99.19.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-inherit meson python-any-r1 systemd udev xdg-utils
-
-DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics"
-HOMEPAGE="https://upower.freedesktop.org/"
-SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0/3" # based on SONAME of libupower-glib.so
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-
-# gtk-doc files are not available as prebuilt in the tarball
-IUSE="doc +introspection ios selinux test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	>=dev-libs/glib-2.58:2
-	sys-apps/dbus:=
-	introspection? ( dev-libs/gobject-introspection:= )
-	kernel_linux? (
-		>=dev-libs/libgudev-236:=
-		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
-	dev-util/gdbus-codegen
-	>=sys-devel/gettext-0.19.8
-	virtual/pkgconfig
-	doc? ( dev-util/gtk-doc )
-	test? (
-		$(python_gen_any_dep '
-			dev-python/dbus-python[${PYTHON_USEDEP}]
-			dev-python/python-dbusmock[${PYTHON_USEDEP}]
-		')
-		dev-util/umockdev
-	)
-"
-
-S="${WORKDIR}/${PN}-v${PV}"
-
-QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
-
-python_check_deps() {
-	python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" &&
-	python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-	xdg_environment_reset
-}
-
-src_configure() {
-	local backend
-
-	if use kernel_linux ; then
-		backend=linux
-	else
-		backend=dummy
-	fi
-
-	local emesonargs=(
-		--localstatedir "${EPREFIX}"/var
-
-		-Dman=true
-		$(meson_use doc gtk-doc)
-		$(meson_feature introspection)
-		-Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d"
-		-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
-		-Dos_backend="${backend}"
-		$(meson_feature ios idevice)
-	)
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-	keepdir /var/lib/upower #383091
-}
-
-pkg_postinst() {
-	udev_reload
-
-	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
-}
-
-pkg_postrm() {
-	udev_reload
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/
@ 2024-05-02 18:50 Arthur Zamarin
  0 siblings, 0 replies; 5+ messages in thread
From: Arthur Zamarin @ 2024-05-02 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     0263b7feec67229456d2ecd613c5812afec53f12
Author:     Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Tue Apr 16 22:15:11 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu May  2 18:49:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0263b7fe

sys-power/upower: fix tests with >=dev-python/python-dbusmock-0.30.1

Test-only fix so no revbump.

Bug: https://bugs.gentoo.org/923794
Bug: https://bugs.gentoo.org/927405
See: https://gitlab.freedesktop.org/upower/upower/-/merge_requests/207
See: https://bugs.debian.org/1059467
See: https://github.com/martinpitt/python-dbusmock/pull/192
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/36287
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../files/upower-1.90.2-backport-pr207.patch       | 43 ++++++++++++++++++++++
 sys-power/upower/upower-1.90.2.ebuild              |  2 +
 2 files changed, 45 insertions(+)

diff --git a/sys-power/upower/files/upower-1.90.2-backport-pr207.patch b/sys-power/upower/files/upower-1.90.2-backport-pr207.patch
new file mode 100644
index 000000000000..dd47e4c8926a
--- /dev/null
+++ b/sys-power/upower/files/upower-1.90.2-backport-pr207.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/923794
+https://bugs.gentoo.org/927405
+https://gitlab.freedesktop.org/upower/upower/-/merge_requests/207
+https://bugs.debian.org/1059467
+https://github.com/martinpitt/python-dbusmock/pull/192
+
+From bd1e4698f480c6b94afa0536fc02e211ae5a87fb Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin@piware.de>
+Date: Thu, 28 Dec 2023 21:13:15 +0100
+Subject: [PATCH] linux: Adjust test_bluetooth_le_device for dbusmock 0.30.1
+
+dbusmock 0.30.1 changed the BlueZ template to set the default "Class"
+property to `MOCK_PHONE_CLASS` right away instead of in PairDevice() [1].
+
+test_bluetooth_le_device() relied on the previous implicit default of a
+"0" Class value. Set this explicitly to expect a "generic" device. This
+makes the test work with old and current dbusmock versions.
+
+https://bugs.debian.org/1059467
+
+[1] https://github.com/martinpitt/python-dbusmock/pull/192
+---
+ src/linux/integration-test.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py
+index e6861253..4c071e85 100755
+--- a/src/linux/integration-test.py
++++ b/src/linux/integration-test.py
+@@ -2162,7 +2162,9 @@ class Tests(dbusmock.DBusTestCase):
+ 
+         alias = 'Satechi M1 Mouse'
+         battery_level = 99
+-        device_properties = None
++        device_properties = {
++            'Class': dbus.UInt32(0, variant_level=1)
++        }
+ 
+         devs = self._add_bluez_battery_device(alias, device_properties, battery_level)
+         self.assertEqual(len(devs), 1)
+-- 
+GitLab
+

diff --git a/sys-power/upower/upower-1.90.2.ebuild b/sys-power/upower/upower-1.90.2.ebuild
index d07fa60bc00a..8b5b884e28e6 100644
--- a/sys-power/upower/upower-1.90.2.ebuild
+++ b/sys-power/upower/upower-1.90.2.ebuild
@@ -51,6 +51,8 @@ BDEPEND="
 	)
 "
 
+PATCHES=( "${FILESDIR}/${PN}-1.90.2-backport-pr207.patch" )
+
 QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
 
 python_check_deps() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-02 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-16 11:27 [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/, sys-power/upower/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2021-07-16 11:27 Andreas Sturmlechner
2022-05-30 17:41 Matt Turner
2022-09-01  1:29 Matt Turner
2024-05-02 18:50 Arthur Zamarin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox