From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-956150-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9B76A139695 for <garchives@archives.gentoo.org>; Sun, 18 Jun 2017 09:30:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC5F6E0BE2; Sun, 18 Jun 2017 09:30:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A5A83E0BE2 for <gentoo-commits@lists.gentoo.org>; Sun, 18 Jun 2017 09:30:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 096523419BC for <gentoo-commits@lists.gentoo.org>; Sun, 18 Jun 2017 09:30:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6D4BE7477 for <gentoo-commits@lists.gentoo.org>; Sun, 18 Jun 2017 09:30:46 +0000 (UTC) From: "Pacho Ramos" <pacho@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Pacho Ramos" <pacho@gentoo.org> Message-ID: <1497778237.32b0ec2c6ae435577dfcd98fdc3ac27f6c8d0eaa.pacho@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/upower/files/, sys-power/upower/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-power/upower/files/upower-0.99.4-copy-paste.patch sys-power/upower/files/upower-0.99.4-timer-stats.patch sys-power/upower/upower-0.99.4-r1.ebuild X-VCS-Directories: sys-power/upower/ sys-power/upower/files/ X-VCS-Committer: pacho X-VCS-Committer-Name: Pacho Ramos X-VCS-Revision: 32b0ec2c6ae435577dfcd98fdc3ac27f6c8d0eaa X-VCS-Branch: master Date: Sun, 18 Jun 2017 09:30:46 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e3e82088-5c1a-41a9-b785-2effbde90195 X-Archives-Hash: 4a4e02f31643e3311d6a4fc89f3cc697 commit: 32b0ec2c6ae435577dfcd98fdc3ac27f6c8d0eaa Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> AuthorDate: Sun Jun 18 09:28:45 2017 +0000 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> CommitDate: Sun Jun 18 09:30:37 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32b0ec2c sys-power/upower: Fix critical battery action being ignored (#618038 by Alex Guzman), not rely on /proc/timer_stats (#621090 by Maxim Britov). Package-Manager: Portage-2.3.6, Repoman-2.3.2 .../upower/files/upower-0.99.4-copy-paste.patch | 28 +++++++ .../upower/files/upower-0.99.4-timer-stats.patch | 42 ++++++++++ sys-power/upower/upower-0.99.4-r1.ebuild | 95 ++++++++++++++++++++++ 3 files changed, 165 insertions(+) diff --git a/sys-power/upower/files/upower-0.99.4-copy-paste.patch b/sys-power/upower/files/upower-0.99.4-copy-paste.patch new file mode 100644 index 00000000000..6afe9b7a983 --- /dev/null +++ b/sys-power/upower/files/upower-0.99.4-copy-paste.patch @@ -0,0 +1,28 @@ +From 28cee8e2845b094488c337c4ecfa84ada0b6be60 Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martin.pitt@ubuntu.com> +Date: Tue, 23 Feb 2016 09:51:07 +0100 +Subject: daemon: fix get_critical_action() + +Fix copy&paste error from e7e9156f that called the wrong _complete_ function +for up_daemon_get_critical_action(). + +https://bugs.freedesktop.org/show_bug.cgi?id=94262 + +diff --git a/src/up-daemon.c b/src/up-daemon.c +index be14cbe..e95f904 100644 +--- a/src/up-daemon.c ++++ b/src/up-daemon.c +@@ -435,8 +435,8 @@ up_daemon_get_critical_action (UpExportedDaemon *skeleton, + GDBusMethodInvocation *invocation, + UpDaemon *daemon) + { +- up_exported_daemon_complete_get_display_device (skeleton, invocation, +- up_backend_get_critical_action (daemon->priv->backend)); ++ up_exported_daemon_complete_get_critical_action (skeleton, invocation, ++ up_backend_get_critical_action (daemon->priv->backend)); + return TRUE; + } + +-- +cgit v0.10.2 + diff --git a/sys-power/upower/files/upower-0.99.4-timer-stats.patch b/sys-power/upower/files/upower-0.99.4-timer-stats.patch new file mode 100644 index 00000000000..2ac44205459 --- /dev/null +++ b/sys-power/upower/files/upower-0.99.4-timer-stats.patch @@ -0,0 +1,42 @@ +From 798588a480eaae50368bed75fc78f8314523b2a3 Mon Sep 17 00:00:00 2001 +From: Richard Hughes <richard@hughsie.com> +Date: Sun, 23 Apr 2017 20:22:02 +0100 +Subject: Do not spin in a loop when /proc/timer_stats cannot be written + +Only set up the polling once the write has succeeded. + +Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100626 + +diff --git a/src/up-wakeups.c b/src/up-wakeups.c +index 1bc3c7b..99433dd 100644 +--- a/src/up-wakeups.c ++++ b/src/up-wakeups.c +@@ -626,6 +626,13 @@ up_wakeups_timerstats_enable (UpWakeups *wakeups) + + g_debug ("enabling timer stats"); + ++ /* enable timer stats */ ++ file = fopen (UP_WAKEUPS_SOURCE_USERSPACE, "w"); ++ if (file == NULL) ++ return FALSE; ++ fprintf (file, "1\n"); ++ fclose (file); ++ + /* setup polls */ + wakeups->priv->poll_kernel_id = + g_timeout_add_seconds (UP_WAKEUPS_POLL_INTERVAL_KERNEL, +@@ -637,11 +644,6 @@ up_wakeups_timerstats_enable (UpWakeups *wakeups) + (GSourceFunc) up_wakeups_poll_userspace_cb, wakeups); + g_source_set_name_by_id (wakeups->priv->poll_userspace_id, "[upower] up_wakeups_poll_userspace_cb"); + +- file = fopen (UP_WAKEUPS_SOURCE_USERSPACE, "w"); +- if (file == NULL) +- return FALSE; +- fprintf (file, "1\n"); +- fclose (file); + wakeups->priv->polling_enabled = TRUE; + return TRUE; + } +-- +cgit v0.10.2 + diff --git a/sys-power/upower/upower-0.99.4-r1.ebuild b/sys-power/upower/upower-0.99.4-r1.ebuild new file mode 100644 index 00000000000..3d9123df0d9 --- /dev/null +++ b/sys-power/upower/upower-0.99.4-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit ltprune systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" +HOMEPAGE="https://upower.freedesktop.org/" +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 ~sparc ~x86 ~x86-fbsd" + +# 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? ( + virtual/libusb:1 + virtual/libgudev:= + 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=( + # Fix calling the wrong _complete_ function for up_daemon_get_critical_action() + # (from 'master') + "${FILESDIR}"/${P}-copy-paste.patch + + # Do not spin in a loop when /proc/timer_stats cannot be written + # (from 'master') + "${FILESDIR}"/${P}-timer-stats.patch +) + +src_prepare() { + default + sed -i -e '/DISABLE_DEPRECATED/d' configure || die +} + +src_configure() { + local backend myconf + + if use kernel_linux; then + backend=linux + elif use kernel_FreeBSD; then + backend=freebsd + else + backend=dummy + fi + + econf \ + $(use_enable doc gtk-doc) \ + --libexecdir="${EPREFIX}"/usr/lib/${PN} \ + --localstatedir="${EPREFIX}"/var \ + $(use_enable introspection) \ + --disable-static \ + ${myconf} \ + --enable-man-pages \ + --disable-tests \ + --with-backend=${backend} \ + $(use_with ios idevice) \ + --with-systemdutildir="$(systemd_get_utildir)" \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +}