diff options
Diffstat (limited to 'community/gnome-settings-daemon-updates')
-rw-r--r-- | community/gnome-settings-daemon-updates/PKGBUILD | 25 | ||||
-rw-r--r-- | community/gnome-settings-daemon-updates/arch.patch | 58 | ||||
-rw-r--r-- | community/gnome-settings-daemon-updates/systemd-fallback.patch | 154 |
3 files changed, 198 insertions, 39 deletions
diff --git a/community/gnome-settings-daemon-updates/PKGBUILD b/community/gnome-settings-daemon-updates/PKGBUILD index ad529b974..8fb68594c 100644 --- a/community/gnome-settings-daemon-updates/PKGBUILD +++ b/community/gnome-settings-daemon-updates/PKGBUILD @@ -1,33 +1,38 @@ -# $Id: PKGBUILD 68092 2012-03-17 19:45:14Z giovanni $ +# $Id: PKGBUILD 69734 2012-04-23 09:07:27Z ibiru $ # Maintainer: Jonathan Conder <jonno.conder@gmail.com> _pkgname=gnome-settings-daemon pkgname=$_pkgname-updates -pkgver=3.2.0 -pkgrel=2 +pkgver=3.4.0 +pkgrel=1 pkgdesc="Updates plugin for the GNOME Settings daemon" arch=('i686' 'x86_64') -url="http://www.gnome.org" license=('GPL') depends=('gnome-packagekit' "$_pkgname") -makedepends=('intltool' 'gtk-doc' 'gnome-desktop') +makedepends=('intltool' 'gtk-doc' 'gnome-desktop' 'gnome-common' 'xf86-input-wacom') options=('!emptydirs' '!libtool') install=$_pkgname.install +url="http://www.gnome.org" source=("http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz" + 'systemd-fallback.patch' 'arch.patch') -sha256sums=('a85242ce60b9c9bb3fbad124ee06430a408f39fa31d2d4ea29dc179db724447b' - 'e5029915c423f72256c4170f917363c385b6fcd180b87ceba0d7bb11a841d7e9') +sha256sums=('5639cbba28caa7b3e33990f49aeed11ed9325e78e76af2175d9ccd5ff298401d' + '82b721d0e274af15ed2770052d550d3162d2d37e5e9ee5e6fcebac1ed6cb8199' + '727ab3e8181464af32ba604b2931b77cd6d4fbf34e10bbba99bb213eb992466e') build() { cd "$srcdir/$_pkgname-$pkgver" + patch -Np1 -i "$srcdir/arch.patch" - ./configure --prefix=/usr \ + patch -Np1 -i "$srcdir/systemd-fallback.patch" + + gnome-autogen.sh --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --libexecdir=/usr/lib/gnome-settings-daemon \ --disable-static \ - --enable-pulse \ - --with-pnpids=/usr/share/libgnome-desktop-3.0/pnp.ids + --enable-systemd + #https://bugzilla.gnome.org/show_bug.cgi?id=656231 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make -s diff --git a/community/gnome-settings-daemon-updates/arch.patch b/community/gnome-settings-daemon-updates/arch.patch index f405d7593..6718e4db9 100644 --- a/community/gnome-settings-daemon-updates/arch.patch +++ b/community/gnome-settings-daemon-updates/arch.patch @@ -36,7 +36,7 @@ index 9510c65..191092d 100644 libupdates_la_CPPFLAGS = \ -I$(top_srcdir)/gnome-settings-daemon \ diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c -index 90ea246..d79455c 100644 +index 4ed046c..9842b32 100644 --- a/plugins/updates/gsd-updates-manager.c +++ b/plugins/updates/gsd-updates-manager.c @@ -32,6 +32,7 @@ @@ -55,7 +55,7 @@ index 90ea246..d79455c 100644 GSettings *settings_ftp; GSettings *settings_gsd; GSettings *settings_http; -@@ -1359,6 +1361,9 @@ gsd_updates_manager_start (GsdUpdatesManager *manager, +@@ -1358,6 +1360,9 @@ gsd_updates_manager_start (GsdUpdatesManager *manager, g_signal_connect (manager->priv->refresh, "get-updates", G_CALLBACK (due_get_updates_cb), manager); @@ -65,7 +65,7 @@ index 90ea246..d79455c 100644 /* get http settings */ manager->priv->settings_http = g_settings_new ("org.gnome.system.proxy.http"); g_signal_connect (manager->priv->settings_http, "changed", -@@ -1464,6 +1469,10 @@ gsd_updates_manager_stop (GsdUpdatesManager *manager) +@@ -1463,6 +1468,10 @@ gsd_updates_manager_stop (GsdUpdatesManager *manager) g_object_unref (manager->priv->firmware); manager->priv->firmware = NULL; } @@ -78,7 +78,7 @@ index 90ea246..d79455c 100644 manager->priv->proxy_session = NULL; diff --git a/plugins/updates/gsd-updates-watch.c b/plugins/updates/gsd-updates-watch.c new file mode 100644 -index 0000000..892acad +index 0000000..37d8778 --- /dev/null +++ b/plugins/updates/gsd-updates-watch.c @@ -0,0 +1,179 @@ @@ -125,13 +125,13 @@ index 0000000..892acad +static void +gsd_updates_watch_message_cb (PkMessage *item, GsdUpdatesWatch *watch) +{ -+ NotifyNotification *notification; ++ NotifyNotification *notification; + gchar *details = NULL; + const gchar *title, *message; + GError *error = NULL; + + g_return_if_fail (PK_IS_MESSAGE (item)); -+ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); + + g_object_get (item, "details", &details, NULL); + title = _("More information"); @@ -148,15 +148,15 @@ index 0000000..892acad + } + + /* display a notification */ -+ notification = notify_notification_new (title, message, NULL); ++ notification = notify_notification_new (title, message, NULL); + notify_notification_set_app_name (notification, _("Software Updates")); -+ notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER); -+ notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); ++ notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER); ++ notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + -+ if (!notify_notification_show (notification, &error)) { -+ g_warning ("error: %s", error->message); -+ g_error_free (error); -+ } ++ if (!notify_notification_show (notification, &error)) { ++ g_warning ("error: %s", error->message); ++ g_error_free (error); ++ } + + g_free (details); +} @@ -170,9 +170,9 @@ index 0000000..892acad + GPtrArray *array; + GError *error = NULL; + -+ g_return_if_fail (PK_IS_CLIENT (client)); ++ g_return_if_fail (PK_IS_CLIENT (client)); + g_return_if_fail (G_IS_ASYNC_RESULT (res)); -+ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); + + results = pk_client_generic_finish (client, res, &error); + if (results == NULL) { @@ -206,9 +206,9 @@ index 0000000..892acad +static void +gsd_updates_watch_tlist_added_cb (PkTransactionList *tlist, const gchar *tid, GsdUpdatesWatch *watch) +{ -+ g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist)); -+ g_return_if_fail (tid != NULL); -+ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist)); ++ g_return_if_fail (tid != NULL); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); + + /* listen for messages */ + pk_client_adopt_async (watch->priv->client, tid, NULL, NULL, NULL, @@ -218,9 +218,9 @@ index 0000000..892acad +static void +gsd_updates_watch_init (GsdUpdatesWatch *watch) +{ -+ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); + -+ watch->priv = GSD_UPDATES_WATCH_GET_PRIVATE (watch); ++ watch->priv = GSD_UPDATES_WATCH_GET_PRIVATE (watch); + watch->priv->tlist = pk_transaction_list_new (); + watch->priv->client = pk_client_new (); + @@ -231,12 +231,12 @@ index 0000000..892acad +static void +gsd_updates_watch_finalize (GObject *object) +{ -+ GsdUpdatesWatch *watch; ++ GsdUpdatesWatch *watch; + -+ g_return_if_fail (GSD_IS_UPDATES_WATCH (object)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (object)); + -+ watch = GSD_UPDATES_WATCH (object); -+ g_return_if_fail (watch->priv != NULL); ++ watch = GSD_UPDATES_WATCH (object); ++ g_return_if_fail (watch->priv != NULL); + + if (watch->priv->tlist != NULL) { + g_object_unref (watch->priv->tlist); @@ -245,21 +245,21 @@ index 0000000..892acad + g_object_unref (watch->priv->client); + } + -+ G_OBJECT_CLASS (gsd_updates_watch_parent_class)->finalize (object); ++ G_OBJECT_CLASS (gsd_updates_watch_parent_class)->finalize (object); +} + +GsdUpdatesWatch * +gsd_updates_watch_new (void) +{ -+ return GSD_UPDATES_WATCH (g_object_new (GSD_TYPE_UPDATES_WATCH, NULL)); ++ return GSD_UPDATES_WATCH (g_object_new (GSD_TYPE_UPDATES_WATCH, NULL)); +} + +static void +gsd_updates_watch_class_init (GsdUpdatesWatchClass *klass) +{ -+ GObjectClass *object_class = G_OBJECT_CLASS (klass); -+ object_class->finalize = gsd_updates_watch_finalize; -+ g_type_class_add_private (klass, sizeof (GsdUpdatesWatchPrivate)); ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ object_class->finalize = gsd_updates_watch_finalize; ++ g_type_class_add_private (klass, sizeof (GsdUpdatesWatchPrivate)); +} diff --git a/plugins/updates/gsd-updates-watch.h b/plugins/updates/gsd-updates-watch.h new file mode 100644 diff --git a/community/gnome-settings-daemon-updates/systemd-fallback.patch b/community/gnome-settings-daemon-updates/systemd-fallback.patch new file mode 100644 index 000000000..ffe953c63 --- /dev/null +++ b/community/gnome-settings-daemon-updates/systemd-fallback.patch @@ -0,0 +1,154 @@ +commit b9ded09387f0b99ece97baee18595eb9e86a5b9b +Author: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +Date: Mon Mar 12 01:52:54 2012 +0100 + + Fallback to CK if systemd is not available + + Be nice to distributions where systemd is optional. This will select + the code path at runtime depending on whether the system was booted + using systemd. + +diff --git a/configure.ac b/configure.ac +index 3b4789f..d522852 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -299,7 +299,7 @@ AC_ARG_ENABLE([systemd], + [with_systemd=$enableval], + [with_systemd=no]) + if test "$with_systemd" = "yes" ; then +- PKG_CHECK_MODULES(SYSTEMD, [libsystemd-login]) ++ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon libsystemd-login]) + AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used for session tracking]) + SESSION_TRACKING=systemd + else +diff --git a/gnome-settings-daemon/gnome-settings-session.c b/gnome-settings-daemon/gnome-settings-session.c +index 5786300..83fe21e 100644 +--- a/gnome-settings-daemon/gnome-settings-session.c ++++ b/gnome-settings-daemon/gnome-settings-session.c +@@ -30,6 +30,7 @@ + #include "gnome-settings-session.h" + + #ifdef HAVE_SYSTEMD ++#include <systemd/sd-daemon.h> + #include <systemd/sd-login.h> + + typedef struct +@@ -130,10 +131,9 @@ struct GnomeSettingsSessionPrivate + { + #ifdef HAVE_SYSTEMD + GSource *sd_source; +-#else ++#endif + GDBusProxy *proxy_session; + GCancellable *cancellable; +-#endif + gchar *session_id; + GnomeSettingsSessionState state; + }; +@@ -237,7 +237,7 @@ sessions_changed (gpointer user_data) + return TRUE; + } + +-#else /* HAVE_SYSTEMD */ ++#endif /* HAVE_SYSTEMD */ + + static void + gnome_settings_session_proxy_signal_cb (GDBusProxy *proxy, +@@ -371,22 +371,25 @@ got_manager_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_d + g_object_unref (proxy_manager); + } + +-#endif /* HAVE_SYSTEMD */ +- + static void + gnome_settings_session_init (GnomeSettingsSession *session) + { + session->priv = GNOME_SETTINGS_SESSION_GET_PRIVATE (session); + + #ifdef HAVE_SYSTEMD +- sd_pid_get_session (getpid(), &session->priv->session_id); ++ session->priv->sd_source = NULL; ++ ++ if (sd_booted () > 0) { ++ sd_pid_get_session (getpid(), &session->priv->session_id); + +- session->priv->sd_source = sd_source_new (); +- g_source_set_callback (session->priv->sd_source, sessions_changed, session, NULL); +- g_source_attach (session->priv->sd_source, NULL); ++ session->priv->sd_source = sd_source_new (); ++ g_source_set_callback (session->priv->sd_source, sessions_changed, session, NULL); ++ g_source_attach (session->priv->sd_source, NULL); + +- sessions_changed (session); +-#else ++ sessions_changed (session); ++ return; ++ } ++#endif + session->priv->cancellable = g_cancellable_new (); + + /* connect to ConsoleKit */ +@@ -399,7 +402,6 @@ gnome_settings_session_init (GnomeSettingsSession *session) + session->priv->cancellable, + got_manager_proxy_cb, + session); +-#endif + } + + static void +@@ -415,15 +417,17 @@ gnome_settings_session_finalize (GObject *object) + if (session->priv->sd_source != NULL) { + g_source_destroy (session->priv->sd_source); + g_source_unref (session->priv->sd_source); ++ goto out; + } +-#else ++#endif ++ + g_cancellable_cancel (session->priv->cancellable); + + if (session->priv->proxy_session != NULL) + g_object_unref (session->priv->proxy_session); + g_object_unref (session->priv->cancellable); +-#endif + ++out: + G_OBJECT_CLASS (gnome_settings_session_parent_class)->finalize (object); + } + +diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c +index 8db04e5..9883d76 100644 +--- a/plugins/power/gsd-power-manager.c ++++ b/plugins/power/gsd-power-manager.c +@@ -2031,7 +2031,7 @@ systemd_stop (void) + g_object_unref (bus); + } + +-#else ++#endif + + static void + consolekit_stop_cb (GObject *source_object, +@@ -2081,7 +2081,6 @@ consolekit_stop (void) + consolekit_stop_cb, NULL); + g_object_unref (proxy); + } +-#endif + + static void + upower_sleep_cb (GObject *source_object, +@@ -2135,10 +2134,11 @@ do_power_action_type (GsdPowerManager *manager, + * hibernate is not available and is marginally better + * than just powering down the computer mid-write */ + #ifdef HAVE_SYSTEMD +- systemd_stop (); +-#else +- consolekit_stop (); ++ if (sd_booted () > 0) ++ systemd_stop (); ++ else + #endif ++ consolekit_stop (); + break; + case GSD_POWER_ACTION_BLANK: + ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen, |