diff options
author | 2014-03-14 13:40:16 +0000 | |
---|---|---|
committer | 2014-03-14 13:40:16 +0000 | |
commit | a5ef27c80b31bad2638bf961ce3f8fcdd68b0be7 (patch) | |
tree | ed1502ca61a94f899cad954e7b57affefd3ceaba /sys-power | |
parent | old (diff) | |
download | gentoo-2-a5ef27c80b31bad2638bf961ce3f8fcdd68b0be7.tar.gz gentoo-2-a5ef27c80b31bad2638bf961ce3f8fcdd68b0be7.tar.bz2 gentoo-2-a5ef27c80b31bad2638bf961ce3f8fcdd68b0be7.zip |
Create the history directory in /var at runtime. Fix segmentation fault. Since it might take a while 0.99.0 can be keyworded.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/upower/ChangeLog | 10 | ||||
-rw-r--r-- | sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch | 34 | ||||
-rw-r--r-- | sys-power/upower/files/upower-0.9.23-fix-segfault.patch | 24 | ||||
-rw-r--r-- | sys-power/upower/upower-0.9.23-r1.ebuild | 92 |
4 files changed, 159 insertions, 1 deletions
diff --git a/sys-power/upower/ChangeLog b/sys-power/upower/ChangeLog index 9aa4fd725adb..28e316c8e6bd 100644 --- a/sys-power/upower/ChangeLog +++ b/sys-power/upower/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-power/upower # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.139 2014/03/14 10:07:37 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.140 2014/03/14 13:40:16 ssuominen Exp $ + +*upower-0.9.23-r1 (14 Mar 2014) + + 14 Mar 2014; Samuli Suominen <ssuominen@gentoo.org> + +files/upower-0.9.23-create-dir-runtime.patch, + +files/upower-0.9.23-fix-segfault.patch, +upower-0.9.23-r1.ebuild: + Create the history directory in /var at runtime. Fix segmentation fault. Since + it might take a while 0.99.0 can be keyworded. 14 Mar 2014; Agostino Sarubbo <ago@gentoo.org> upower-0.9.23.ebuild: Stable for ppc64, wrt bug #496532 diff --git a/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch b/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch new file mode 100644 index 000000000000..34340d44ec30 --- /dev/null +++ b/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch @@ -0,0 +1,34 @@ +From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 +From: Cosimo Cecchi <cosimo@endlessm.com> +Date: Tue, 25 Feb 2014 09:43:04 +0000 +Subject: Create the history directory at runtime + +In addition to build time - this increases compatibilty with OSTree, +which starts out with an empty /var. + +Signed-off-by: Richard Hughes <richard@hughsie.com> +--- +diff --git a/src/up-history.c b/src/up-history.c +index f9d0fdf..795b093 100644 +--- a/src/up-history.c ++++ b/src/up-history.c +@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir) + { + g_free (history->priv->dir); + history->priv->dir = g_strdup (dir); ++ g_mkdir_with_parents (dir, 0755); + } + + /** +@@ -887,7 +888,8 @@ up_history_init (UpHistory *history) + history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); + history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE; +- history->priv->dir = g_build_filename (HISTORY_DIR, NULL); ++ ++ up_history_set_directory (history, HISTORY_DIR); + } + + /** +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-power/upower/files/upower-0.9.23-fix-segfault.patch b/sys-power/upower/files/upower-0.9.23-fix-segfault.patch new file mode 100644 index 000000000000..3e8976320777 --- /dev/null +++ b/sys-power/upower/files/upower-0.9.23-fix-segfault.patch @@ -0,0 +1,24 @@ +From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinpitt@gnome.org> +Date: Fri, 08 Nov 2013 13:59:50 +0000 +Subject: lib: Fix segfault on getting property when daemon is not running + +This fixes "upower --version" when the daemon is not running, and thus the +client proxy is NULL. +--- +diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c +index 35d7b5d..17fb02d 100644 +--- a/libupower-glib/up-client.c ++++ b/libupower-glib/up-client.c +@@ -322,6 +322,9 @@ up_client_get_property (GObject *object, + UpClient *client; + client = UP_CLIENT (object); + ++ if (client->priv->proxy == NULL) ++ return; ++ + switch (prop_id) { + case PROP_DAEMON_VERSION: + g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy)); +-- +cgit v0.9.0.2-2-gbebe diff --git a/sys-power/upower/upower-0.9.23-r1.ebuild b/sys-power/upower/upower-0.9.23-r1.ebuild new file mode 100644 index 000000000000..170aaec9deb6 --- /dev/null +++ b/sys-power/upower/upower-0.9.23-r1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.23-r1.ebuild,v 1.1 2014/03/14 13:40:16 ssuominen Exp $ + +EAPI=5 +inherit eutils systemd + +DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics" +HOMEPAGE="http://upower.freedesktop.org/" +SRC_URI="http://${PN}.freedesktop.org/releases/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="doc +introspection ios kernel_FreeBSD kernel_linux systemd" + +COMMON_DEPEND=">=dev-libs/dbus-glib-0.100 + >=dev-libs/glib-2.22 + sys-apps/dbus + >=sys-auth/polkit-0.110 + introspection? ( dev-libs/gobject-introspection ) + kernel_linux? ( + virtual/libusb:1 + >=virtual/udev-200[gudev] + ios? ( + >=app-pda/libimobiledevice-1:= + >=app-pda/libplist-1:= + ) + )" +RDEPEND="${COMMON_DEPEND} + kernel_linux? ( + !systemd? ( >=sys-power/pm-utils-1.4.1 ) + systemd? ( + app-shells/bash + >=sys-apps/systemd-200 + ) + )" +DEPEND="${COMMON_DEPEND} + dev-libs/libxslt + app-text/docbook-xsl-stylesheets + dev-util/intltool + virtual/pkgconfig + doc? ( + dev-util/gtk-doc + app-text/docbook-xml-dtd:4.1.2 + )" + +QA_MULTILIB_PATHS="usr/lib/${PN}/.*" + +DOCS="AUTHORS HACKING NEWS README" + +src_prepare() { + sed -i -e '/DISABLE_DEPRECATED/d' configure || die + + epatch \ + "${FILESDIR}"/${P}-create-dir-runtime.patch \ + "${FILESDIR}"/${P}-fix-segfault.patch +} + +src_configure() { + local backend myconf + + if use kernel_linux; then + backend=linux + myconf="$(use_enable !systemd deprecated)" + elif use kernel_FreeBSD; then + backend=freebsd + else + backend=dummy + fi + + econf \ + --libexecdir="${EPREFIX}"/usr/lib/${PN} \ + --localstatedir="${EPREFIX}"/var \ + $(use_enable introspection) \ + --disable-static \ + ${myconf} \ + --enable-man-pages \ + $(use_enable doc gtk-doc) \ + --disable-tests \ + --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \ + --with-backend=${backend} \ + $(use_with ios idevice) \ + "$(systemd_with_utildir)" \ + "$(systemd_with_unitdir)" +} + +src_install() { + default + keepdir /var/lib/upower #383091 + prune_libtool_files +} |