Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 014927cb74 | |||
| d9a71de120 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
/upower-0.99.7.tar.xz
|
upower-v1.90.9.tar.bz2
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-8
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
|
||||||
@ -1,338 +0,0 @@
|
|||||||
From 91e9ccf69394d3c005f0386e92c8a84c158aa0c7 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 1/7] 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.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From dc2de4e321c34e62a784ac6d9971f7defbf4984f 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 2/7] 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.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From 4420273ca55a6f6e97dd5075bca63e8a012c8794 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
||||||
Date: Fri, 2 Nov 2018 09:49:33 -0700
|
|
||||||
Subject: [PATCH 3/7] integration-test: Define PENDING_CHARGE and
|
|
||||||
PENDING_DISCHARGE states
|
|
||||||
|
|
||||||
Add definitions for UP_DEVICE_STATE_PENDING_CHARGE and
|
|
||||||
UP_DEVICE_STATE_PENDING_DISCHARGE.
|
|
||||||
---
|
|
||||||
src/linux/integration-test | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/linux/integration-test b/src/linux/integration-test
|
|
||||||
index 81064dd..fbd95da 100755
|
|
||||||
--- a/src/linux/integration-test
|
|
||||||
+++ b/src/linux/integration-test
|
|
||||||
@@ -60,7 +60,9 @@ BATTERY_IFACE = 'org.bluez.Battery1'
|
|
||||||
UP_DEVICE_STATE_CHARGING,
|
|
||||||
UP_DEVICE_STATE_DISCHARGING,
|
|
||||||
UP_DEVICE_STATE_EMPTY,
|
|
||||||
- UP_DEVICE_STATE_FULLY_CHARGED) = (0, 1, 2, 3, 4)
|
|
||||||
+ UP_DEVICE_STATE_FULLY_CHARGED,
|
|
||||||
+ UP_DEVICE_STATE_PENDING_CHARGE,
|
|
||||||
+ UP_DEVICE_STATE_PENDING_DISCHARGE) = (0, 1, 2, 3, 4, 5, 6)
|
|
||||||
|
|
||||||
(UP_DEVICE_LEVEL_UNKNOWN,
|
|
||||||
UP_DEVICE_LEVEL_NONE,
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From ec968accf4038a48a1bc8a1a8c177a7550739233 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
||||||
Date: Fri, 2 Nov 2018 09:55:22 -0700
|
|
||||||
Subject: [PATCH 4/7] integration-test: Test DisplayDevice pending-charge
|
|
||||||
|
|
||||||
Test relaying the pending-charge state to the DisplayDevice. This commit
|
|
||||||
adds three tests: only one battery pending-charge, one battery
|
|
||||||
pending-charge and another one discharging, and one battery
|
|
||||||
pending-charge and another one charging.
|
|
||||||
---
|
|
||||||
src/linux/integration-test | 72 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 72 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/linux/integration-test b/src/linux/integration-test
|
|
||||||
index fbd95da..ad6dade 100755
|
|
||||||
--- a/src/linux/integration-test
|
|
||||||
+++ b/src/linux/integration-test
|
|
||||||
@@ -491,6 +491,78 @@ class Tests(dbusmock.DBusTestCase):
|
|
||||||
self.assertEqual(self.get_dbus_display_property('WarningLevel'), UP_DEVICE_LEVEL_NONE)
|
|
||||||
self.stop_daemon()
|
|
||||||
|
|
||||||
+ def test_display_pending_charge_one_battery(self):
|
|
||||||
+ '''One battery pending-charge'''
|
|
||||||
+
|
|
||||||
+ self.testbed.add_device('power_supply', 'BAT0', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Not charging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '40',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+
|
|
||||||
+ self.start_daemon()
|
|
||||||
+ devs = self.proxy.EnumerateDevices()
|
|
||||||
+ self.assertEqual(len(devs), 1)
|
|
||||||
+ self.assertEqual(self.get_dbus_display_property('State'), UP_DEVICE_STATE_PENDING_CHARGE)
|
|
||||||
+ self.stop_daemon()
|
|
||||||
+
|
|
||||||
+ def test_display_pending_charge_other_battery_discharging(self):
|
|
||||||
+ '''One battery pending-charge and another one discharging'''
|
|
||||||
+
|
|
||||||
+ self.testbed.add_device('power_supply', 'BAT0', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Not charging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '40',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+ self.testbed.add_device('power_supply', 'BAT1', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Discharging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '40',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ self.start_daemon()
|
|
||||||
+ devs = self.proxy.EnumerateDevices()
|
|
||||||
+ self.assertEqual(len(devs), 2)
|
|
||||||
+ self.assertEqual(self.get_dbus_display_property('State'), UP_DEVICE_STATE_DISCHARGING)
|
|
||||||
+ self.stop_daemon()
|
|
||||||
+
|
|
||||||
+ def test_display_pending_charge_other_battery_charging(self):
|
|
||||||
+ '''One battery pending-charge and another one charging'''
|
|
||||||
+
|
|
||||||
+ self.testbed.add_device('power_supply', 'BAT0', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Not charging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '40',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+ self.testbed.add_device('power_supply', 'BAT1', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Charging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '40',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ self.start_daemon()
|
|
||||||
+ devs = self.proxy.EnumerateDevices()
|
|
||||||
+ self.assertEqual(len(devs), 2)
|
|
||||||
+ self.assertEqual(self.get_dbus_display_property('State'), UP_DEVICE_STATE_CHARGING)
|
|
||||||
+ self.stop_daemon()
|
|
||||||
+
|
|
||||||
def test_battery_charge(self):
|
|
||||||
'''battery which reports charge instead of energy
|
|
||||||
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From 9318e73c8cd55522829970a74dc9d6ca59e4f828 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
||||||
Date: Fri, 2 Nov 2018 16:05:21 -0700
|
|
||||||
Subject: [PATCH 5/7] linux: Don't set out_state before state is final
|
|
||||||
|
|
||||||
Currently up_device_supply_refresh_battery sets out_state before the
|
|
||||||
state value is definitive, so the wrong state value is returned to the
|
|
||||||
caller. Luckily the only caller does not make use of this value at the
|
|
||||||
moment, so there are no user-visible consequences. Nonetheless this is a
|
|
||||||
bug, so this commit fixes it.
|
|
||||||
---
|
|
||||||
src/linux/up-device-supply.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
|
|
||||||
index 11a14e1..993cf12 100644
|
|
||||||
--- a/src/linux/up-device-supply.c
|
|
||||||
+++ b/src/linux/up-device-supply.c
|
|
||||||
@@ -664,7 +664,6 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply,
|
|
||||||
}
|
|
||||||
|
|
||||||
state = up_device_supply_get_state (native_path);
|
|
||||||
- *out_state = state;
|
|
||||||
|
|
||||||
/* reset unknown counter */
|
|
||||||
if (state != UP_DEVICE_STATE_UNKNOWN) {
|
|
||||||
@@ -834,6 +833,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply,
|
|
||||||
supply->priv->energy_old_first = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ *out_state = state;
|
|
||||||
+
|
|
||||||
g_object_set (device,
|
|
||||||
"energy", energy,
|
|
||||||
"energy-full", energy_full,
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From ebea310f15cb61a3f5558800a45951d3c885201d Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
||||||
Date: Mon, 26 Nov 2018 13:12:18 -0800
|
|
||||||
Subject: [PATCH 6/7] linux: Map pending-charge to fully-charged when charge is
|
|
||||||
100%
|
|
||||||
|
|
||||||
Some devices report "Not charging" when the battery is full and AC power
|
|
||||||
is connected. In this situation we should report fully-charged instead
|
|
||||||
of pending-charge.
|
|
||||||
|
|
||||||
Closes: #86.
|
|
||||||
---
|
|
||||||
src/linux/up-device-supply.c | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
|
|
||||||
index 993cf12..42971da 100644
|
|
||||||
--- a/src/linux/up-device-supply.c
|
|
||||||
+++ b/src/linux/up-device-supply.c
|
|
||||||
@@ -733,6 +733,12 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply,
|
|
||||||
percentage = CLAMP(percentage, 0.0f, 100.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Some devices report "Not charging" when the battery is full and AC
|
|
||||||
+ * power is connected. In this situation we should report fully-charged
|
|
||||||
+ * instead of pending-charge. */
|
|
||||||
+ if (state == UP_DEVICE_STATE_PENDING_CHARGE && percentage == 100.0)
|
|
||||||
+ state = UP_DEVICE_STATE_FULLY_CHARGED;
|
|
||||||
+
|
|
||||||
/* the battery isn't charging or discharging, it's just
|
|
||||||
* sitting there half full doing nothing: try to guess a state */
|
|
||||||
if (state == UP_DEVICE_STATE_UNKNOWN && supply->priv->is_power_supply) {
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
||||||
From b327348ac160b57430ba4d2662835513ea35c08c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= <jprvita@endlessm.com>
|
|
||||||
Date: Mon, 26 Nov 2018 13:13:00 -0800
|
|
||||||
Subject: [PATCH 7/7] integration-test: Test mapping pending-charge to
|
|
||||||
fully-charged
|
|
||||||
|
|
||||||
---
|
|
||||||
src/linux/integration-test | 25 +++++++++++++++++++++++++
|
|
||||||
1 file changed, 25 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/linux/integration-test b/src/linux/integration-test
|
|
||||||
index ad6dade..c6fb5c0 100755
|
|
||||||
--- a/src/linux/integration-test
|
|
||||||
+++ b/src/linux/integration-test
|
|
||||||
@@ -563,6 +563,31 @@ class Tests(dbusmock.DBusTestCase):
|
|
||||||
self.assertEqual(self.get_dbus_display_property('State'), UP_DEVICE_STATE_CHARGING)
|
|
||||||
self.stop_daemon()
|
|
||||||
|
|
||||||
+ def test_map_pending_charge_to_fully_charged(self):
|
|
||||||
+ '''Map pending-charge to fully-charged'''
|
|
||||||
+
|
|
||||||
+ bat0 = self.testbed.add_device('power_supply', 'BAT0', None,
|
|
||||||
+ ['type', 'Battery',
|
|
||||||
+ 'present', '1',
|
|
||||||
+ 'status', 'Not charging',
|
|
||||||
+ 'charge_full', '10500000',
|
|
||||||
+ 'charge_full_design', '11000000',
|
|
||||||
+ 'capacity', '100',
|
|
||||||
+ 'voltage_now', '12000000'], [])
|
|
||||||
+
|
|
||||||
+ self.start_daemon()
|
|
||||||
+ devs = self.proxy.EnumerateDevices()
|
|
||||||
+ self.assertEqual(len(devs), 1)
|
|
||||||
+ bat0_up = devs[0]
|
|
||||||
+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'), UP_DEVICE_STATE_FULLY_CHARGED)
|
|
||||||
+ self.stop_daemon()
|
|
||||||
+
|
|
||||||
+ # and make sure we still return pending-charge below 100%
|
|
||||||
+ self.testbed.set_attribute(bat0, 'capacity', '99')
|
|
||||||
+ self.start_daemon()
|
|
||||||
+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'), UP_DEVICE_STATE_PENDING_CHARGE)
|
|
||||||
+ self.stop_daemon()
|
|
||||||
+
|
|
||||||
def test_battery_charge(self):
|
|
||||||
'''battery which reports charge instead of energy
|
|
||||||
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (upower-0.99.7.tar.xz) = a1ad200e715284eae815580bba3faad480f7f13401f6ff1a2e7446172796a2413990ce2b553de713ddc530849b2dff1f0ddc12fbd2fd9b55510bbb644d2340a4
|
SHA512 (upower-v1.90.9.tar.bz2) = 7308e03125a5a888242253f9260f68283f5b53677c08dbc4d7e4d48cc6f600f50f8ab161d100f152138208d5119acddc90f0f19742aa8cca58e3a0ec54975110
|
||||||
|
|||||||
279
upower.spec
279
upower.spec
@ -1,99 +1,124 @@
|
|||||||
|
## START: Set by rpmautospec
|
||||||
|
## (rpmautospec version 0.6.5)
|
||||||
|
## RPMAUTOSPEC: autorelease, autochangelog
|
||||||
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||||
|
release_number = 1;
|
||||||
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||||
|
print(release_number + base_release_number - 1);
|
||||||
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||||
|
## END: Set by rpmautospec
|
||||||
|
|
||||||
Summary: Power Management Service
|
Summary: Power Management Service
|
||||||
Name: upower
|
Name: upower
|
||||||
Version: 0.99.7
|
Version: 1.90.9
|
||||||
Release: 4%{?dist}
|
Release: %autorelease
|
||||||
License: GPLv2+
|
License: GPL-2.0-or-later
|
||||||
Group: System Environment/Libraries
|
|
||||||
URL: http://upower.freedesktop.org/
|
URL: http://upower.freedesktop.org/
|
||||||
Source0: http://upower.freedesktop.org/releases/upower-%{version}.tar.xz
|
Source0: https://gitlab.freedesktop.org/upower/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
|
||||||
|
|
||||||
BuildRequires: sqlite-devel
|
BuildRequires: meson
|
||||||
BuildRequires: libtool
|
BuildRequires: git
|
||||||
BuildRequires: intltool
|
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: libgudev1-devel
|
BuildRequires: libgudev1-devel
|
||||||
|
%define idevice disabled
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
BuildRequires: libusbx-devel
|
%if ! 0%{?rhel}
|
||||||
|
%define idevice enabled
|
||||||
BuildRequires: libimobiledevice-devel
|
BuildRequires: libimobiledevice-devel
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
BuildRequires: glib2-devel >= 2.6.0
|
BuildRequires: glib2-devel >= 2.6.0
|
||||||
BuildRequires: gobject-introspection-devel
|
BuildRequires: gobject-introspection-devel
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
|
BuildRequires: polkit-devel
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
|
||||||
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: udev
|
Requires: udev
|
||||||
Requires: gobject-introspection
|
|
||||||
|
|
||||||
# 0.99.10 backport
|
# Patches
|
||||||
Patch0: pending-charge.patch
|
|
||||||
|
|
||||||
%if 0%{?fedora}
|
|
||||||
# From rhughes-f20-gnome-3-12 copr
|
|
||||||
Obsoletes: compat-upower09 < 0.99
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
UPower (formerly DeviceKit-power) provides a daemon, API and command
|
UPower (formerly DeviceKit-power) provides a daemon, API and command
|
||||||
line tools for managing power devices attached to the system.
|
line tools for managing power devices attached to the system.
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: Client libraries for UPower
|
||||||
|
Requires: gobject-introspection
|
||||||
|
Recommends: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Conflicts: %{name} < 0.99.20-4
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
Client libraries for UPower.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Headers and libraries for UPower
|
Summary: Headers and libraries for UPower
|
||||||
Group: Development/Libraries
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Headers and libraries for UPower.
|
Headers and libraries for UPower.
|
||||||
|
|
||||||
%package devel-docs
|
%package devel-docs
|
||||||
Summary: Developer documentation for for libupower-glib
|
Summary: Developer documentation for for libupower-glib
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description devel-docs
|
%description devel-docs
|
||||||
Developer documentation for for libupower-glib.
|
Developer documentation for for libupower-glib.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -n %{name}-v%{version} -p1 -S git
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%meson \
|
||||||
--enable-gtk-doc \
|
-Didevice=%{idevice} \
|
||||||
--disable-static \
|
-Dman=true \
|
||||||
--enable-introspection \
|
-Dgtk-doc=true \
|
||||||
%ifarch s390 s390x
|
-Dintrospection=enabled
|
||||||
--with-backend=dummy
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Disable SMP build, fails to build docs
|
%meson_build
|
||||||
make
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%meson_install
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
||||||
|
|
||||||
%find_lang upower
|
%find_lang upower
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post upower.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%systemd_preun upower.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%systemd_postun_with_restart upower.service
|
||||||
|
|
||||||
%files -f upower.lang
|
%files -f upower.lang
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc NEWS AUTHORS HACKING README
|
%doc NEWS AUTHORS HACKING.md README.md
|
||||||
%{_libdir}/libupower-glib.so.*
|
%{_datadir}/dbus-1/system.d/*.conf
|
||||||
%{_sysconfdir}/dbus-1/system.d/*.conf
|
%{_udevrulesdir}/*.rules
|
||||||
%ifnarch s390 s390x
|
%{_udevhwdbdir}/*.hwdb
|
||||||
/usr/lib/udev/rules.d/*.rules
|
%ghost %dir %{_localstatedir}/lib/upower
|
||||||
%endif
|
|
||||||
%dir %{_localstatedir}/lib/upower
|
|
||||||
%dir %{_sysconfdir}/UPower
|
%dir %{_sysconfdir}/UPower
|
||||||
%config %{_sysconfdir}/UPower/UPower.conf
|
%config %{_sysconfdir}/UPower/UPower.conf
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libexecdir}/*
|
%{_libexecdir}/*
|
||||||
%{_libdir}/girepository-1.0/*.typelib
|
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man7/*
|
%{_mandir}/man7/*
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
%{_datadir}/dbus-1/system-services/*.service
|
%{_datadir}/dbus-1/system-services/*.service
|
||||||
/usr/lib/systemd/system/*.service
|
%{_unitdir}/*.service
|
||||||
|
%{_datadir}/installed-tests/upower/upower-integration.test
|
||||||
|
%{_datadir}/polkit-1/actions/org.freedesktop.upower.policy
|
||||||
|
%{_datadir}/zsh/site-functions/_upower
|
||||||
|
|
||||||
|
%files libs
|
||||||
|
%license COPYING
|
||||||
|
%{_libdir}/libupower-glib.so.3{,.*}
|
||||||
|
%{_libdir}/girepository-1.0/*.typelib
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_datadir}/dbus-1/interfaces/*.xml
|
%{_datadir}/dbus-1/interfaces/*.xml
|
||||||
@ -105,14 +130,176 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|||||||
%{_includedir}/libupower-glib/upower.h
|
%{_includedir}/libupower-glib/upower.h
|
||||||
|
|
||||||
%files devel-docs
|
%files devel-docs
|
||||||
%{_datadir}/gtk-doc
|
%dir %{_datadir}/gtk-doc
|
||||||
%dir %{_datadir}/gtk-doc/html/UPower
|
%dir %{_datadir}/gtk-doc/html/UPower
|
||||||
%{_datadir}/gtk-doc/html/UPower/*
|
%{_datadir}/gtk-doc/html/UPower/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Dec 19 2022 Bastien Nocera <bnocera@redhat.com> - 0.99.7-4
|
## START: Generated by rpmautospec
|
||||||
- Fix pending-charge state on some laptops
|
* Tue Apr 15 2025 Kate Hsuan <hpa@redhat.com> - 1.90.9-1
|
||||||
Resolves: rhbz#2130664
|
- Update to the upstream version 1.90.9
|
||||||
|
- Fix unstable OnBattery status
|
||||||
|
|
||||||
|
* Tue Apr 01 2025 Kate Hsuan <hpa@redhat.com> - 1.90.8-1
|
||||||
|
- Update to the upstream version 1.90.8
|
||||||
|
- Update to 1.90.8
|
||||||
|
- README and HACKING were renamed to README.md and HACKING.md
|
||||||
|
- Support zsh-completion
|
||||||
|
- Resolve memory leak when connecting/disconnecting and refreshing the
|
||||||
|
battery info.
|
||||||
|
|
||||||
|
* Fri Mar 28 2025 Kate Hsuan <hpa@redhat.com> - 1.90.6-3
|
||||||
|
- test: Fix incorrect test script
|
||||||
|
|
||||||
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.90.6-2
|
||||||
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
|
||||||
|
* Tue Oct 15 2024 Kate Hsuan <hpa@redhat.com> - 1.90.6-1
|
||||||
|
- Update to upstream version 1.90.6
|
||||||
|
- Update to the upstream version 1.90.6
|
||||||
|
- Include a fix patch for "incorrect external device battery update" issue.
|
||||||
|
Link: https://gitlab.freedesktop.org/upower/upower/-
|
||||||
|
/commit/7d7bb84fde91bef9ee7eba924cbdfa74639cc4fe
|
||||||
|
|
||||||
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.90.4-3
|
||||||
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
|
* Tue May 28 2024 Kate Hsuan <hpa@redhat.com> - 1.90.4-2
|
||||||
|
- Add gating definition for RHEL-10
|
||||||
|
|
||||||
|
* Wed Apr 24 2024 Kate Hsuan <hpa@redhat.com> - 1.90.4-1
|
||||||
|
- RHEL-32340 Update to release 1.90.4
|
||||||
|
|
||||||
|
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.90.2-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 28 2023 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.90.2-3
|
||||||
|
- Rebuilt for libimobiledevice and libplist soname bump
|
||||||
|
|
||||||
|
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.90.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 06 2023 Bastien Nocera <hadess@hadess.net> - 1.90.2-1
|
||||||
|
- Update to 1.90.2
|
||||||
|
|
||||||
|
* Tue Jul 04 2023 Bastien Nocera <hadess@hadess.net> - 1.90.1-1
|
||||||
|
- Update to 1.90.1
|
||||||
|
|
||||||
|
* Wed Feb 22 2023 Richard Hughes <richard@hughsie.com> - 0.99.20-5
|
||||||
|
- migrated to SPDX license
|
||||||
|
|
||||||
|
* Sun Feb 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 0.99.20-4
|
||||||
|
- Separate libs package
|
||||||
|
|
||||||
|
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.20-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.20-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 15 2022 Benjamin Berg <bberg@redhat.com> - 0.99.20-1
|
||||||
|
- Update to 0.99.20
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Benjamin Berg <bberg@redhat.com> - 0.99.19-1
|
||||||
|
- Update to 0.99.19
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Benjamin Berg <bberg@redhat.com> - 0.99.14-6
|
||||||
|
- Remove sqlite build dependency
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Benjamin Berg <bberg@redhat.com> - 0.99.14-5
|
||||||
|
- Remove unused commit global
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Benjamin Berg <bberg@redhat.com> - 0.99.14-4
|
||||||
|
- Remove ancient Obsoletes: line
|
||||||
|
|
||||||
|
* Thu Jun 09 2022 Benjamin Berg <bberg@redhat.com> - 0.99.14-3
|
||||||
|
- Build linux backend on s390
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Bastien Nocera <bnocera@redhat.com> - 0.99.14-1
|
||||||
|
+ upower-0.99.14-1
|
||||||
|
- Update to 0.99.14
|
||||||
|
|
||||||
|
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.13-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 17 2021 Bastien Nocera <bnocera@redhat.com> - 0.99.13-1
|
||||||
|
+ upower-0.99.13-1
|
||||||
|
- Update to 0.99.13
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.12-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 17 2021 Bastien Nocera <bnocera@redhat.com> - 0.99.12-1
|
||||||
|
+ upower-0.99.12-1
|
||||||
|
- Update to 0.99.12
|
||||||
|
|
||||||
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.99.11-10
|
||||||
|
- Rebuilt for updated systemd-rpm-macros
|
||||||
|
See https://pagure.io/fesco/issue/2583.
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.11-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 19 2021 Bastien Nocera <bnocera@redhat.com> - 0.99.11-8
|
||||||
|
+ upower-0.99.11-8
|
||||||
|
- Remove USB dependency
|
||||||
|
|
||||||
|
* Tue Nov 24 2020 Bastien Nocera <bnocera@redhat.com> - 0.99.11-7
|
||||||
|
+ upower-0.99.11-7
|
||||||
|
- Disable libimobiledevice integration on RHEL
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.11-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 17 2020 Bastien Nocera <bnocera@redhat.com> - 0.99.11-5
|
||||||
|
+ upower-0.99.11-5
|
||||||
|
- Use upstreamed libplist patch
|
||||||
|
- Add support for iPhone XS,XR
|
||||||
|
|
||||||
|
* Tue Jun 16 2020 Adam Williamson <awilliam@redhat.com> - 0.99.11-4
|
||||||
|
- Fix imobiledevice support with new libplist, rebuild for soname bumps
|
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.11-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Sep 4 2019 Christian Kellner <ckellner@redhat.com> - 0.99.11-2
|
||||||
|
- Add systemd service snippets
|
||||||
|
- Use macros for _unitdir and _udevrulesdir
|
||||||
|
- Mark _datadir/gtk-doc as directory
|
||||||
|
|
||||||
|
* Tue Sep 3 2019 Christian Kellner <ckellner@redhat.com> - 0.99.11-1
|
||||||
|
- New upstream release 0.99.11
|
||||||
|
- Intltool has been replaced by gettext
|
||||||
|
- D-Bus configuration moved from sysconfdir to datadir
|
||||||
|
- Systemd is creating /var/lib/upower, so 'ghost' the dir
|
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.10-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 20 2019 Christian Kellner <ckellner@redhat.com> - 0.99.10-1
|
||||||
|
- New upstream release with the following changes:
|
||||||
|
- Set 'pending-charge' for DisplayDevice if at least one battery is in
|
||||||
|
the 'pending-charge' state
|
||||||
|
- Map pending-charge to fully-charged when charge is 100%
|
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.9-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Nov 20 2018 Christian Kellner <ckellner@redhat.com> - 0.99.9-1
|
||||||
|
- New upstream release
|
||||||
|
- Drop unneccessary patch to fix udev events access
|
||||||
|
- Fix daemon lockdown issues (keyboard backlight, AC status changes)
|
||||||
|
- Out-of-tree build fixes and documentation fixes
|
||||||
|
|
||||||
|
* Sun Oct 07 2018 Kalev Lember <klember@redhat.com> - 0.99.8-3
|
||||||
|
- Backport an upstream fix for upower not having access to udev events
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.8-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Bastien Nocera <bnocera@redhat.com> - 0.99.8-1
|
||||||
|
+ upower-0.99.8-1
|
||||||
|
- Update to 0.99.8
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.7-3
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.99.7-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
@ -312,3 +499,5 @@ Resolves: rhbz#2130664
|
|||||||
|
|
||||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-2
|
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.17-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
## END: Generated by rpmautospec
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user