Date: Tuesday, February 25, 2014 @ 11:43:10 Author: jgc Revision: 206395
archrelease: copy trunk to gnome-unstable-i686, gnome-unstable-x86_64 Added: upower/repos/gnome-unstable-i686/ upower/repos/gnome-unstable-i686/PKGBUILD (from rev 206394, upower/trunk/PKGBUILD) upower/repos/gnome-unstable-i686/create-dir-runtime.patch (from rev 206394, upower/trunk/create-dir-runtime.patch) upower/repos/gnome-unstable-i686/fix-segfault.patch (from rev 206394, upower/trunk/fix-segfault.patch) upower/repos/gnome-unstable-x86_64/ upower/repos/gnome-unstable-x86_64/PKGBUILD (from rev 206394, upower/trunk/PKGBUILD) upower/repos/gnome-unstable-x86_64/create-dir-runtime.patch (from rev 206394, upower/trunk/create-dir-runtime.patch) upower/repos/gnome-unstable-x86_64/fix-segfault.patch (from rev 206394, upower/trunk/fix-segfault.patch) ------------------------------------------------+ gnome-unstable-i686/PKGBUILD | 40 +++++++++++++++++++++++ gnome-unstable-i686/create-dir-runtime.patch | 34 +++++++++++++++++++ gnome-unstable-i686/fix-segfault.patch | 24 +++++++++++++ gnome-unstable-x86_64/PKGBUILD | 40 +++++++++++++++++++++++ gnome-unstable-x86_64/create-dir-runtime.patch | 34 +++++++++++++++++++ gnome-unstable-x86_64/fix-segfault.patch | 24 +++++++++++++ 6 files changed, 196 insertions(+) Copied: upower/repos/gnome-unstable-i686/PKGBUILD (from rev 206394, upower/trunk/PKGBUILD) =================================================================== --- gnome-unstable-i686/PKGBUILD (rev 0) +++ gnome-unstable-i686/PKGBUILD 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,40 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> + +pkgname=upower +pkgver=0.99.0 +pkgrel=1 +pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics" +arch=('i686' 'x86_64') +url="http://upower.freedesktop.org" +license=('GPL') +depends=('systemd-tools' 'systemd' 'libusb' 'polkit' 'dbus-glib' 'libimobiledevice') +makedepends=('intltool' 'docbook-xsl' 'gobject-introspection' 'systemd') +backup=('etc/UPower/UPower.conf') +source=($url/releases/$pkgname-$pkgver.tar.xz + create-dir-runtime.patch + fix-segfault.patch) +md5sums=('14f43bc13353e23e7280863f33ac50d2' + '74901767f9c94451083b3d92396454ab' + 'fa2f37eec44703e4c10edb5d9abb0f6b') + +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../create-dir-runtime.patch + patch -Np1 -i ../fix-segfault.patch +} + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/$pkgname \ + --disable-static + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} Copied: upower/repos/gnome-unstable-i686/create-dir-runtime.patch (from rev 206394, upower/trunk/create-dir-runtime.patch) =================================================================== --- gnome-unstable-i686/create-dir-runtime.patch (rev 0) +++ gnome-unstable-i686/create-dir-runtime.patch 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,34 @@ +From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 +From: Cosimo Cecchi <cos...@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 <rich...@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 Copied: upower/repos/gnome-unstable-i686/fix-segfault.patch (from rev 206394, upower/trunk/fix-segfault.patch) =================================================================== --- gnome-unstable-i686/fix-segfault.patch (rev 0) +++ gnome-unstable-i686/fix-segfault.patch 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,24 @@ +From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinp...@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 Copied: upower/repos/gnome-unstable-x86_64/PKGBUILD (from rev 206394, upower/trunk/PKGBUILD) =================================================================== --- gnome-unstable-x86_64/PKGBUILD (rev 0) +++ gnome-unstable-x86_64/PKGBUILD 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,40 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> + +pkgname=upower +pkgver=0.99.0 +pkgrel=1 +pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics" +arch=('i686' 'x86_64') +url="http://upower.freedesktop.org" +license=('GPL') +depends=('systemd-tools' 'systemd' 'libusb' 'polkit' 'dbus-glib' 'libimobiledevice') +makedepends=('intltool' 'docbook-xsl' 'gobject-introspection' 'systemd') +backup=('etc/UPower/UPower.conf') +source=($url/releases/$pkgname-$pkgver.tar.xz + create-dir-runtime.patch + fix-segfault.patch) +md5sums=('14f43bc13353e23e7280863f33ac50d2' + '74901767f9c94451083b3d92396454ab' + 'fa2f37eec44703e4c10edb5d9abb0f6b') + +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../create-dir-runtime.patch + patch -Np1 -i ../fix-segfault.patch +} + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/$pkgname \ + --disable-static + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} Copied: upower/repos/gnome-unstable-x86_64/create-dir-runtime.patch (from rev 206394, upower/trunk/create-dir-runtime.patch) =================================================================== --- gnome-unstable-x86_64/create-dir-runtime.patch (rev 0) +++ gnome-unstable-x86_64/create-dir-runtime.patch 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,34 @@ +From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001 +From: Cosimo Cecchi <cos...@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 <rich...@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 Copied: upower/repos/gnome-unstable-x86_64/fix-segfault.patch (from rev 206394, upower/trunk/fix-segfault.patch) =================================================================== --- gnome-unstable-x86_64/fix-segfault.patch (rev 0) +++ gnome-unstable-x86_64/fix-segfault.patch 2014-02-25 10:43:10 UTC (rev 206395) @@ -0,0 +1,24 @@ +From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinp...@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