summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit user2024-05-06 14:06:21 +0200
committergit user2024-05-06 14:06:21 +0200
commit98fa587d6ed4209127df46802457d8cd97652da5 (patch)
treea73a6298801f3d2286fb1aff500105cef40acbf5
parent6f279c33b69582a2da50cd5d1ba79353f734cb9a (diff)
downloadaur-98fa587d6ed4209127df46802457d8cd97652da5.tar.gz
* Corrected `0001-Add-a-critical-action-Ignore.patch` to cater for the added `Suspend` action.
* Upstream version bump.
-rw-r--r--.SRCINFO22
-rw-r--r--0001-Add-a-critical-action-Ignore.patch47
-rw-r--r--PKGBUILD8
3 files changed, 32 insertions, 45 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5a643a4b5ef8..e2009f2a0f55 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = upower-nocritical-nosystemd-git
pkgdesc = Abstraction for enumerating power devices, listening to device events and querying history and statistics (With a patch to disable low battery action). Built without systemd dependencies. Latest Git checkout.
- pkgver = 1.90.2+24.r1695.20240309.1e58e82
- pkgrel = 1
+ pkgver = 1.90.4+6.r1704.20240424.544eba5
+ pkgrel = 2
url = http://upower.freedesktop.org
arch = i686
arch = x86_64
@@ -24,17 +24,17 @@ pkgbase = upower-nocritical-nosystemd-git
optdepends = python-gobject: For For /usr/lib/upower/integration-test.py.
optdepends = python-packaging: For /usr/lib/upower/integration-test.py.
optdepends = umockdev: For For /usr/lib/upower/integration-test.py.
- provides = upower=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-nocritical=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-nosystemd=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-git=1.90.2+24.r1695.20240309.1e58e82
+ provides = upower=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-nocritical=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-nosystemd=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-git=1.90.4+6.r1704.20240424.544eba5
conflicts = upower
options = emptydirs
backup = etc/UPower/UPower.conf
source = upower::git+https://gitlab.freedesktop.org/upower/upower.git
source = 0001-Add-a-critical-action-Ignore.patch
sha256sums = SKIP
- sha256sums = bf82acf436db8ab06aa90ff2f8841cb977439937b955a92644da785dc612dde3
+ sha256sums = 04b87837be843ebd07a1d39ae95f77e883208fef0145fa3086690fdb61b81c10
pkgname = upower-nocritical-nosystemd-git
depends = gcc-libs
@@ -45,8 +45,8 @@ pkgname = upower-nocritical-nosystemd-git
depends = libglib-2.0.so
depends = libgobject-2.0.so
depends = libgio-2.0.so
- provides = upower=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-nocritical=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-nosystemd=1.90.2+24.r1695.20240309.1e58e82
- provides = upower-git=1.90.2+24.r1695.20240309.1e58e82
+ provides = upower=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-nocritical=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-nosystemd=1.90.4+6.r1704.20240424.544eba5
+ provides = upower-git=1.90.4+6.r1704.20240424.544eba5
provides = libupower-glib.so
diff --git a/0001-Add-a-critical-action-Ignore.patch b/0001-Add-a-critical-action-Ignore.patch
index 6575a9b12e4f..3f0e6f888ff3 100644
--- a/0001-Add-a-critical-action-Ignore.patch
+++ b/0001-Add-a-critical-action-Ignore.patch
@@ -1,50 +1,37 @@
-From 1ba6e724dabf3a91e59b871750e22d420a4b1238 Mon Sep 17 00:00:00 2001
-From: Star Brilliant <m13253@hotmail.com>
-Date: Wed, 5 Oct 2016 22:02:36 +0800
-Subject: [PATCH] Add a critical action: Ignore
-
----
- etc/UPower.conf | 3 ++-
- src/linux/up-backend.c | 5 +++++
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/etc/UPower.conf b/etc/UPower.conf
-index e2c6a69..2bda528 100644
---- a/etc/UPower.conf
-+++ b/etc/UPower.conf
-@@ -88,7 +88,8 @@ TimeAction=120
- # PowerOff
+diff -rU3 upower.orig/etc/UPower.conf upower/etc/UPower.conf
+--- upower.orig/etc/UPower.conf 2024-05-06 13:57:43.520236008 +0200
++++ upower/etc/UPower.conf 2024-05-06 13:58:36.086904557 +0200
+@@ -96,8 +96,9 @@
# Hibernate
# HybridSleep
+ # Suspend (AllowRiskyCriticalPowerAction should be true to use this option but risky)
+# Ignore
#
+ # If Suspend isn't available or AllowRiskyCriticalPowerAction=false, HybridSleep will be used
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
-CriticalPowerAction=HybridSleep
+CriticalPowerAction=Ignore
-diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c
-index 2ba201a..ade64e9 100644
---- a/src/linux/up-backend.c
-+++ b/src/linux/up-backend.c
-@@ -392,6 +392,7 @@ up_backend_get_critical_action (UpBackend *backend)
+diff -rU3 upower.orig/src/linux/up-backend.c upower/src/linux/up-backend.c
+--- upower.orig/src/linux/up-backend.c 2024-05-06 13:57:43.523569342 +0200
++++ upower/src/linux/up-backend.c 2024-05-06 14:03:10.736914407 +0200
+@@ -557,6 +557,7 @@
{ "HybridSleep", "CanHybridSleep" },
{ "Hibernate", "CanHibernate" },
{ "PowerOff", NULL },
+ { "Ignore", NULL },
};
- guint i = 0;
- char *action;
-@@ -447,6 +448,10 @@ up_backend_take_action (UpBackend *backend)
+ g_autofree gchar *action = NULL;
+ gboolean can_risky = FALSE;
+@@ -622,6 +623,11 @@
method = up_backend_get_critical_action (backend);
g_assert (method != NULL);
-+ if (g_strcmp0 (method, "Ignore") == 0) {
-+ return;
-+ }
++ /* Do nothing if the action is set to "Ignore" */
++ if (g_strcmp0 (method, "Ignore") == 0) {
++ return;
++ }
+
/* Take action */
g_debug ("About to call logind method %s", method);
g_dbus_proxy_call (backend->priv->logind_proxy,
---
-2.10.0
-
diff --git a/PKGBUILD b/PKGBUILD
index 037e4b236f44..5889570413b3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,8 +5,8 @@
_pkgname=upower
pkgname="${_pkgname}-nocritical-nosystemd-git"
-pkgver=1.90.2+24.r1695.20240309.1e58e82
-pkgrel=1
+pkgver=1.90.4+6.r1704.20240424.544eba5
+pkgrel=2
pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics (With a patch to disable low battery action). Built without systemd dependencies. Latest Git checkout."
arch=(
'i686'
@@ -65,8 +65,8 @@ source=(
"0001-Add-a-critical-action-Ignore.patch"
)
sha256sums=(
- "SKIP"
- "bf82acf436db8ab06aa90ff2f8841cb977439937b955a92644da785dc612dde3"
+ "SKIP" # Upstream source
+ "04b87837be843ebd07a1d39ae95f77e883208fef0145fa3086690fdb61b81c10" # 0001-Add-a-critical-action-Ignore.patch
)
options+=('emptydirs')