commit upower for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package upower for openSUSE:Factory checked in at 2024-07-11 20:29:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/upower (Old) and /work/SRC/openSUSE:Factory/.upower.new.17339 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "upower" Thu Jul 11 20:29:25 2024 rev:87 rq:1186607 version:1.90.4 Changes: -------- --- /work/SRC/openSUSE:Factory/upower/upower.changes 2024-02-28 19:44:33.552238854 +0100 +++ /work/SRC/openSUSE:Factory/.upower.new.17339/upower.changes 2024-07-11 20:29:38.209060520 +0200 @@ -1,0 +2,12 @@ +Sat Jul 6 13:17:39 UTC 2024 - Enrico Belleri <kilgore.trout@idesmi.eu> + +- Update to version 1.90.4: + * Resolved high disk and CPU rate. + * Stop guessing the unknown battery as a power supply. + * Continue to support lid handling. + * Fix org.freedesktop.UPower: EnergyRate is a positive value. + * Fix uni-test python script. +- Switch to tagged release. +- Update BuildRequires minimum versions + +------------------------------------------------------------------- Old: ---- upower-1.90.2+15.obscpio New: ---- upower-1.90.4.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ upower.spec ++++++ --- /var/tmp/diff_new_pack.LdRPN6/_old 2024-07-11 20:29:41.405178632 +0200 +++ /var/tmp/diff_new_pack.LdRPN6/_new 2024-07-11 20:29:41.409178780 +0200 @@ -22,7 +22,7 @@ %define libplist2 0 %endif Name: upower -Version: 1.90.2+15 +Version: 1.90.4 Release: 0 Summary: Power Device Enumeration Framework License: GPL-2.0-or-later @@ -36,13 +36,13 @@ BuildRequires: gtk-doc >= 1.11 BuildRequires: intltool BuildRequires: libtool -BuildRequires: meson >= 0.49.0 +BuildRequires: meson >= 0.60.0 BuildRequires: pkgconfig BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(gio-2.0) >= 2.16.1 -BuildRequires: pkgconfig(gio-unix-2.0) -BuildRequires: pkgconfig(glib-2.0) >= 2.34.0 -BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gio-2.0) >= 2.66.0 +BuildRequires: pkgconfig(gio-unix-2.0) >= 2.66.0 +BuildRequires: pkgconfig(glib-2.0) >= 2.66.0 +BuildRequires: pkgconfig(gobject-2.0) >= 2.66.0 BuildRequires: pkgconfig(gudev-1.0) >= 235 BuildRequires: pkgconfig(libimobiledevice-1.0) >= 0.9.7 BuildRequires: pkgconfig(libusb-1.0) >= 1.0.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.LdRPN6/_old 2024-07-11 20:29:41.433179667 +0200 +++ /var/tmp/diff_new_pack.LdRPN6/_new 2024-07-11 20:29:41.437179815 +0200 @@ -3,8 +3,8 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.freedesktop.org/upower/upower.git</param> - <param name="revision">be82397</param> - <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> + <param name="revision">v1.90.4</param> + <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v?(.*)(\+0)?</param> <param name="versionrewrite-replacement">\1</param> </service> @@ -13,7 +13,6 @@ <param name="file">*.tar</param> <param name="compression">zst</param> </service> - <service name="set_version" mode="manual" /> + <service name="set_version" mode="manual"/> </services> - ++++++ upower-1.90.2+15.obscpio -> upower-1.90.4.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/NEWS new/upower-1.90.4/NEWS --- old/upower-1.90.2+15/NEWS 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/NEWS 2024-04-08 17:36:47.000000000 +0200 @@ -1,3 +1,26 @@ +Version 1.90.4 +-------------- +Released: 2024-04-08 + +- Update the information for version 1.90.3. +- Resolved high disk and CPU rate. (#256) +- Update glib2 requirement to 2.66.0. +- Stop guessing the unknown battery as a power supply. +- Continue to support lid handling. +- Fix org.freedesktop.UPower: EnergyRate is a positive value. (#252) +- Fix uni-test python script. (!205) + +Version 1.90.3 +-------------- +Released: 2024-04-08 + +- Resolved high disk and CPU rate. (#256) +- Update glib2 requirement to 2.66.0. +- Stop guessing the unknown battery as a power supply. +- Continue to support lid handling. +- Fix org.freedesktop.UPower: EnergyRate is a positive value. (#252) +- Fix uni-test python script. (!205) + Version 1.90.2 -------------- Released: 2023-07-06 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/README new/upower-1.90.4/README --- old/upower-1.90.2+15/README 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/README 2024-04-08 17:36:47.000000000 +0200 @@ -4,7 +4,7 @@ Requirements: - glib-2.0 >= 2.34.0 + glib-2.0 >= 2.66.0 gio-2.0 >= 2.16.1 gudev-1.0 >= 235 (Linux) libimobiledevice-1.0 >= 0.9.7 (optional) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/dbus/org.freedesktop.UPower.Device.xml new/upower-1.90.4/dbus/org.freedesktop.UPower.Device.xml --- old/upower-1.90.2+15/dbus/org.freedesktop.UPower.Device.xml 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/dbus/org.freedesktop.UPower.Device.xml 2024-04-08 17:36:47.000000000 +0200 @@ -335,6 +335,66 @@ <doc:item> <doc:term>8</doc:term><doc:definition>Phone</doc:definition> </doc:item> + <doc:item> + <doc:term>9</doc:term><doc:definition>Media Player</doc:definition> + </doc:item> + <doc:item> + <doc:term>10</doc:term><doc:definition>Tablet</doc:definition> + </doc:item> + <doc:item> + <doc:term>11</doc:term><doc:definition>Computer</doc:definition> + </doc:item> + <doc:item> + <doc:term>12</doc:term><doc:definition>Gaming Input</doc:definition> + </doc:item> + <doc:item> + <doc:term>13</doc:term><doc:definition>Pen</doc:definition> + </doc:item> + <doc:item> + <doc:term>14</doc:term><doc:definition>Touchpad</doc:definition> + </doc:item> + <doc:item> + <doc:term>15</doc:term><doc:definition>Modem</doc:definition> + </doc:item> + <doc:item> + <doc:term>16</doc:term><doc:definition>Network</doc:definition> + </doc:item> + <doc:item> + <doc:term>17</doc:term><doc:definition>Headset</doc:definition> + </doc:item> + <doc:item> + <doc:term>18</doc:term><doc:definition>Speakers</doc:definition> + </doc:item> + <doc:item> + <doc:term>19</doc:term><doc:definition>Headphones</doc:definition> + </doc:item> + <doc:item> + <doc:term>20</doc:term><doc:definition>Video</doc:definition> + </doc:item> + <doc:item> + <doc:term>21</doc:term><doc:definition>Other Audio</doc:definition> + </doc:item> + <doc:item> + <doc:term>22</doc:term><doc:definition>Remote Control</doc:definition> + </doc:item> + <doc:item> + <doc:term>23</doc:term><doc:definition>Printer</doc:definition> + </doc:item> + <doc:item> + <doc:term>24</doc:term><doc:definition>Scanner</doc:definition> + </doc:item> + <doc:item> + <doc:term>25</doc:term><doc:definition>Camera</doc:definition> + </doc:item> + <doc:item> + <doc:term>26</doc:term><doc:definition>Wearable</doc:definition> + </doc:item> + <doc:item> + <doc:term>27</doc:term><doc:definition>Toy</doc:definition> + </doc:item> + <doc:item> + <doc:term>28</doc:term><doc:definition>Bluetooth Genreic</doc:definition> + </doc:item> </doc:list> <doc:para> If the value is set to "Battery", you will need to verify that the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/libupower-glib/up-history-item.c new/upower-1.90.4/libupower-glib/up-history-item.c --- old/upower-1.90.2+15/libupower-glib/up-history-item.c 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/libupower-glib/up-history-item.c 2024-04-08 17:36:47.000000000 +0200 @@ -116,12 +116,12 @@ void up_history_item_set_time_to_present (UpHistoryItem *history_item) { - GTimeVal timeval; + guint64 time_now; g_return_if_fail (UP_IS_HISTORY_ITEM (history_item)); - g_get_current_time (&timeval); - history_item->priv->time = timeval.tv_sec; + time_now = g_get_real_time (); + history_item->priv->time = time_now / 1000000; g_object_notify (G_OBJECT(history_item), "time"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/meson.build new/upower-1.90.4/meson.build --- old/upower-1.90.2+15/meson.build 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/meson.build 2024-04-08 17:36:47.000000000 +0200 @@ -1,12 +1,12 @@ project('upower', 'c', - version: '1.90.2', + version: '1.90.4', license: 'GPLv2+', default_options: [ 'buildtype=debugoptimized', 'warning_level=1', 'c_std=gnu99', ], - meson_version: '>= 0.56.0') + meson_version: '>= 0.60.0') soversion = 3 current = 1 @@ -30,7 +30,7 @@ cdata.set_quoted('VERSION', meson.project_version()) cdata.set_quoted('PACKAGE_SYSCONF_DIR', get_option('sysconfdir')) -glib_min_version = '2.58' +glib_min_version = '2.66' glib_version_def = 'GLIB_VERSION_@0@_@1@'.format( glib_min_version.split('.')[0], glib_min_version.split('.')[1]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/rules/95-upower-hid.hwdb new/upower-1.90.4/rules/95-upower-hid.hwdb --- old/upower-1.90.2+15/rules/95-upower-hid.hwdb 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/rules/95-upower-hid.hwdb 2024-04-08 17:36:47.000000000 +0200 @@ -38,6 +38,7 @@ # ST Microelectronics usb:v0483pA113* +usb:v0483pA430* UPOWER_BATTERY_TYPE=ups UPOWER_VENDOR=ST Microelectronics @@ -152,7 +153,9 @@ UPOWER_VENDOR=PowerCOM # Liebert +usb:v10AFp0000* usb:v10AFp0001* +usb:v10AFp0002* usb:v10AFp0004* usb:v10AFp0008* UPOWER_BATTERY_TYPE=ups diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/src/linux/up-device-supply-battery.c new/upower-1.90.4/src/linux/up-device-supply-battery.c --- old/upower-1.90.2+15/src/linux/up-device-supply-battery.c 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/src/linux/up-device-supply-battery.c 2024-04-08 17:36:47.000000000 +0200 @@ -47,10 +47,10 @@ struct _UpDeviceSupplyBattery { + UpDeviceBattery parent; gboolean has_coldplug_values; gboolean coldplug_units; gdouble *energy_old; - GTimeVal *energy_old_timespec; guint energy_old_first; gdouble rate_old; gboolean shown_invalid_voltage_warning; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/src/meson.build new/upower-1.90.4/src/meson.build --- old/upower-1.90.2+15/src/meson.build 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/src/meson.build 2024-04-08 17:36:47.000000000 +0200 @@ -81,7 +81,7 @@ # Data/Config files ############# -install_subdir('does-not-exist', install_dir: historydir, strip_directory : true) +install_emptydir(historydir) cdata = configuration_data() cdata.set('libexecdir', get_option('prefix') / get_option('libexecdir')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/src/up-device.c new/upower-1.90.4/src/up-device.c --- old/upower-1.90.2+15/src/up-device.c 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/src/up-device.c 2024-04-08 17:36:47.000000000 +0200 @@ -183,6 +183,19 @@ up_history_set_id (priv->history, id); } +static gboolean +up_device_history_filter (UpDevice *device, UpHistory *history) +{ + UpExportedDevice *skeleton = UP_EXPORTED_DEVICE (device); + + if (up_exported_device_get_state (skeleton) == UP_DEVICE_STATE_UNKNOWN) { + g_debug ("device %s has unknown state, not saving history", + up_exported_device_get_native_path (skeleton)); + return FALSE; + } + return TRUE; +} + static void update_history (UpDevice *device) { @@ -191,6 +204,9 @@ ensure_history (device); + if (!up_device_history_filter (device, priv->history)) + return; + /* save new history */ up_history_set_state (priv->history, up_exported_device_get_state (skeleton)); up_history_set_charge_data (priv->history, up_exported_device_get_percentage (skeleton)); @@ -214,12 +230,16 @@ if (g_strcmp0 (pspec->name, "type") == 0 || g_strcmp0 (pspec->name, "is-present") == 0) { update_icon_name (device); - /* Clearing the history object will force lazily loading. */ - g_clear_object (&priv->history); + /* Clearing the history object for lazily loading when device id was changed. */ + if (priv->history != NULL && + !up_history_is_device_id_equal (priv->history, up_device_get_id(device))) + g_clear_object (&priv->history); } else if (g_strcmp0 (pspec->name, "vendor") == 0 || g_strcmp0 (pspec->name, "model") == 0 || g_strcmp0 (pspec->name, "serial") == 0) { - g_clear_object (&priv->history); + if (priv->history != NULL && + !up_history_is_device_id_equal (priv->history, up_device_get_id(device))) + g_clear_object (&priv->history); } else if (g_strcmp0 (pspec->name, "power-supply") == 0 || g_strcmp0 (pspec->name, "time-to-empty") == 0) { update_warning_level (device); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/src/up-history.c new/upower-1.90.4/src/up-history.c --- old/upower-1.90.2+15/src/up-history.c 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/src/up-history.c 2024-04-08 17:36:47.000000000 +0200 @@ -203,7 +203,7 @@ guint i; UpHistoryItem *item; GPtrArray *array_new; - GTimeVal timeval; + gint64 time_now; /* no data */ if (array->len == 0) @@ -217,14 +217,14 @@ /* new data */ array_new = g_ptr_array_new (); - g_get_current_time (&timeval); + time_now = g_get_real_time (); g_debug ("limiting data to last %i seconds", timespan); /* treat the timespan like a range, and search backwards */ timespan *= 0.95f; for (i=array->len-1; i>0; i--) { item = (UpHistoryItem *) g_ptr_array_index (array, i); - if (timeval.tv_sec - up_history_item_get_time (item) < timespan) + if ((time_now / 1000000) - up_history_item_get_time (item) < timespan) g_ptr_array_add (array_new, g_object_ref (item)); } out: @@ -429,12 +429,12 @@ GString *string; gboolean ret = TRUE; GError *error = NULL; - GTimeVal time_now; + gint64 time_now; guint time_item; guint cull_count = 0; /* get current time */ - g_get_current_time (&time_now); + time_now = g_get_real_time (); /* generate data */ string = g_string_new (""); @@ -443,7 +443,7 @@ /* only save entries for the last 24 hours */ time_item = up_history_item_get_time (item); - if (time_now.tv_sec - time_item > history->priv->max_data_age) { + if ((time_now / 1000000) - time_item > history->priv->max_data_age) { cull_count++; continue; } @@ -871,6 +871,20 @@ } /** + * up_history_is_device_id_equal: + **/ +gboolean +up_history_is_device_id_equal(UpHistory *history, const gchar *id) +{ + g_return_val_if_fail (UP_IS_HISTORY (history), FALSE); + + if (!g_strcmp0 (history->priv->id, id)) + return TRUE; + + return FALSE; +} + +/** * up_history_class_init: * @klass: The UpHistoryClass **/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/upower-1.90.2+15/src/up-history.h new/upower-1.90.4/src/up-history.h --- old/upower-1.90.2+15/src/up-history.h 2024-02-09 08:07:21.000000000 +0100 +++ new/upower-1.90.4/src/up-history.h 2024-04-08 17:36:47.000000000 +0200 @@ -60,6 +60,7 @@ GType up_history_get_type (void); +gboolean up_history_is_device_id_equal (UpHistory *history, const gchar *id); UpHistory *up_history_new (void); GPtrArray *up_history_get_data (UpHistory *history, ++++++ upower.obsinfo ++++++ --- /var/tmp/diff_new_pack.LdRPN6/_old 2024-07-11 20:29:41.613186319 +0200 +++ /var/tmp/diff_new_pack.LdRPN6/_new 2024-07-11 20:29:41.617186467 +0200 @@ -1,5 +1,5 @@ name: upower -version: 1.90.2+15 -mtime: 1707462441 -commit: be823973672297be949fcb9ab70db22b0f5fcc6d +version: 1.90.4 +mtime: 1712590607 +commit: c8385cb08a2ec5f6df1f14aebd8e976bca3d3042
participants (1)
-
Source-Sync