From d7de269d9e1b934d9b8ec8791d3e20bfa5559d8e Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 20 Feb 2019 15:38:50 +0100 Subject: [PATCH 1/5] New upstream release (0.99.10) - 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% --- .gitignore | 1 + sources | 2 +- upower.spec | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6be58d6..b66659e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ upower-0.9.5.tar.bz2 /upower-0.99.7.tar.xz /upower-0.99.8.tar.xz /upower-0.99.9.tar.xz +/upower-0.99.10.tar.xz diff --git a/sources b/sources index 6cd3b01..e357a5c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upower-0.99.9.tar.xz) = 45eb587b0e5ffcce88bad8c56bc5efa30559748913016a55d58313280f5159378e5fbb4a9842c3a6409257bb97822d235f96b03704268b8471455c93eb05fe2f +SHA512 (upower-0.99.10.tar.xz) = aefe1b2ff5a390f1ea9676fe7e753750bebc56034365a9183e946a8463904047da0a4ac71340eb2efedc16bce6f6d9ef4609ddca37dc1fc31b56bcdbfbbfa59d diff --git a/upower.spec b/upower.spec index e4fc896..f8cb3d8 100644 --- a/upower.spec +++ b/upower.spec @@ -1,8 +1,8 @@ -%global commit 2282c7c0e53fb31816b824c9d1f547e8 +%global commit c438511024b9bc5a904f8775cfc8e4c4 Summary: Power Management Service Name: upower -Version: 0.99.9 -Release: 2%{?dist} +Version: 0.99.10 +Release: 1%{?dist} License: GPLv2+ URL: http://upower.freedesktop.org/ Source0: https://gitlab.freedesktop.org/upower/upower/uploads/%{commit}/%{name}-%{version}.tar.xz @@ -106,6 +106,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_datadir}/gtk-doc/html/UPower/* %changelog +* Wed Feb 20 2019 Christian Kellner - 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 - 0.99.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From fd01d4761d75d69d72da3d44b51f5005b05febfe Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 17 Jun 2019 14:40:20 +0200 Subject: [PATCH 2/5] CI: execute integration test suite Test the installed package by executing the integration test suite. --- .gitignore | 4 ++++ tests/run-it.sh | 18 ++++++++++++++++++ tests/tests.yml | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100755 tests/run-it.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index b66659e..e9a3704 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +#testing +tests/artifacts/ +tests/source/ + upower-0.9.5.tar.bz2 /upower-0.9.6.tar.bz2 /upower-0.9.7.tar.bz2 diff --git a/tests/run-it.sh b/tests/run-it.sh new file mode 100755 index 0000000..5db3a05 --- /dev/null +++ b/tests/run-it.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash +set -u + +# main script +IT="${1:-source/src/linux/integration-test}" + +# check if we need to install additional packages +# which is the case if we are on RHEL 8 +source /etc/os-release || exit 1 + +if [[ "$ID" = *"rhel"* ]] && [[ "$VERSION_ID" == *"8"* ]]; then + dnf config-manager -y --add-repo umockdev.repo + dnf install -y umockdev-devel python3-gobject-base + pip3 install python-dbusmock +fi + +# execute the integration test via umockdev-wrapper +exec umockdev-wrapper "$IT" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..627611a --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,23 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - upower + - pygobject3-devel + - python3-dbus + - python3-dbusmock + - umockdev-devel + tests: + - smoke: + dir: smoke + run: upower -d + - integration: + dir: . + run: ./run-it.sh source/src/linux/integration-test From 881847b6f40a2a88cff84873331bbf96d4c6da38 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 02:35:34 +0000 Subject: [PATCH 3/5] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upower.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upower.spec b/upower.spec index f8cb3d8..26028c1 100644 --- a/upower.spec +++ b/upower.spec @@ -2,7 +2,7 @@ Summary: Power Management Service Name: upower Version: 0.99.10 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://upower.freedesktop.org/ Source0: https://gitlab.freedesktop.org/upower/upower/uploads/%{commit}/%{name}-%{version}.tar.xz @@ -106,6 +106,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_datadir}/gtk-doc/html/UPower/* %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 0.99.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Feb 20 2019 Christian Kellner - 0.99.10-1 - New upstream release with the following changes: - Set 'pending-charge' for DisplayDevice if at least one battery is in From 9c448ed61072449d1fb6f1d8e7960afe88bbc5de Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Tue, 3 Sep 2019 22:48:08 +0200 Subject: [PATCH 4/5] New upstream release (0.99.11) Following changes to the package: - Intltool has been replaced by gettext - D-Bus configuration moved from sysconfdir to datadir - systemd is creating /var/lib/upower, so 'ghost' the dir --- .gitignore | 1 + sources | 2 +- upower.spec | 17 +++++++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e9a3704..cc5db30 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ upower-0.9.5.tar.bz2 /upower-0.99.8.tar.xz /upower-0.99.9.tar.xz /upower-0.99.10.tar.xz +/upower-0.99.11.tar.xz diff --git a/sources b/sources index e357a5c..e475161 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upower-0.99.10.tar.xz) = aefe1b2ff5a390f1ea9676fe7e753750bebc56034365a9183e946a8463904047da0a4ac71340eb2efedc16bce6f6d9ef4609ddca37dc1fc31b56bcdbfbbfa59d +SHA512 (upower-0.99.11.tar.xz) = 67219a0beb98c97ac4512e4fe8ba83fc80a1035d1edb5367dda6911da50c672b047051f2f528e8703be29ab47547d92b6c71a7ef695226a1bdb5bc33e6d18803 diff --git a/upower.spec b/upower.spec index 26028c1..197faeb 100644 --- a/upower.spec +++ b/upower.spec @@ -1,15 +1,14 @@ -%global commit c438511024b9bc5a904f8775cfc8e4c4 +%global commit 93cfe7c8d66ed486001c4f3f55399b7a Summary: Power Management Service Name: upower -Version: 0.99.10 -Release: 2%{?dist} +Version: 0.99.11 +Release: 1%{?dist} License: GPLv2+ URL: http://upower.freedesktop.org/ Source0: https://gitlab.freedesktop.org/upower/upower/uploads/%{commit}/%{name}-%{version}.tar.xz BuildRequires: sqlite-devel BuildRequires: libtool -BuildRequires: intltool BuildRequires: gettext BuildRequires: libgudev1-devel %ifnarch s390 s390x @@ -75,11 +74,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %license COPYING %doc NEWS AUTHORS HACKING README %{_libdir}/libupower-glib.so.* -%{_sysconfdir}/dbus-1/system.d/*.conf +%{_datadir}/dbus-1/system.d/*.conf %ifnarch s390 s390x /usr/lib/udev/rules.d/*.rules %endif -%dir %{_localstatedir}/lib/upower +%ghost %dir %{_localstatedir}/lib/upower %dir %{_sysconfdir}/UPower %config %{_sysconfdir}/UPower/UPower.conf %{_bindir}/* @@ -106,6 +105,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_datadir}/gtk-doc/html/UPower/* %changelog +* Tue Sep 3 2019 Christian Kellner - 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 - 0.99.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From e11a3be7f3b1801a4efd609ce3023c7921f7655d Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Wed, 4 Sep 2019 14:49:06 +0200 Subject: [PATCH 5/5] Add systemd snippets and use macros for paths Add the required systemd snippets[1] and use macros for the udev rules and unit directories. Also mark "%{_datadir}/gtk-doc" as directory as to avoid warnings about duplicated entries, e.g: "warning: File listed twice: /usr/share/gtk-doc/html/UPower" [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#Systemd --- upower.spec | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/upower.spec b/upower.spec index 197faeb..1ddfebe 100644 --- a/upower.spec +++ b/upower.spec @@ -2,7 +2,7 @@ Summary: Power Management Service Name: upower Version: 0.99.11 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://upower.freedesktop.org/ Source0: https://gitlab.freedesktop.org/upower/upower/uploads/%{commit}/%{name}-%{version}.tar.xz @@ -69,6 +69,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %ldconfig_scriptlets +%post +%systemd_post upower.service + +%preun +%systemd_preun upower.service + +%postun +%systemd_postun_with_restart upower.service + %files -f upower.lang %{!?_licensedir:%global license %%doc} %license COPYING @@ -76,7 +85,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_libdir}/libupower-glib.so.* %{_datadir}/dbus-1/system.d/*.conf %ifnarch s390 s390x -/usr/lib/udev/rules.d/*.rules +%{_udevrulesdir}/*.rules %endif %ghost %dir %{_localstatedir}/lib/upower %dir %{_sysconfdir}/UPower @@ -88,7 +97,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_mandir}/man7/* %{_mandir}/man8/* %{_datadir}/dbus-1/system-services/*.service -/usr/lib/systemd/system/*.service +%{_unitdir}/*.service %files devel %{_datadir}/dbus-1/interfaces/*.xml @@ -100,11 +109,16 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_includedir}/libupower-glib/upower.h %files devel-docs -%{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html/UPower %{_datadir}/gtk-doc/html/UPower/* %changelog +* Wed Sep 4 2019 Christian Kellner - 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 - 0.99.11-1 - New upstream release 0.99.11 - Intltool has been replaced by gettext