[Frugalware-git] bouleetbilgnome224: consolekit-0.3.0-1-i686

bouleetbil bouleetbil at frogdev.info
Mon Oct 6 21:38:28 CEST 2008


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=bouleetbilgnome224.git;a=commitdiff;h=919e504a5252291e4079930a46bbf6c33a54a8cb

commit 919e504a5252291e4079930a46bbf6c33a54a8cb
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Mon Oct 6 21:35:28 2008 +0200

consolekit-0.3.0-1-i686
*new package

diff --git a/source/xapps-extra/consolekit/FrugalBuild b/source/xapps-extra/consolekit/FrugalBuild
new file mode 100644
index 0000000..c839735
--- /dev/null
+++ b/source/xapps-extra/consolekit/FrugalBuild
@@ -0,0 +1,30 @@
+# Compiling time: 0.38 SBU
+# Maintainer: bouleetbil <bouleetbil at frogdev.info>
+
+pkgname=consolekit
+_F_archive_name="ConsoleKit"
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Framework for defining and tracking users, login sessions and seats."
+url="http://www.freedesktop.org/wiki/Software/ConsoleKit"
+source=(http://people.freedesktop.org/~mccann/dist/$_F_archive_name-$pkgver.tar.bz2 rc.xconsolekit \
+	consolekit-0.3.0-shutdown.patch close_log.diff)
+up2date="lynx -dump http://people.freedesktop.org/~mccann/dist/ | Flasttar"
+depends=('libx11' 'dbus-glib' 'zlib')
+install="$pkgname.install"
+groups=('xapps-extra')
+archs=('i686' 'x86_64')
+sha1sums=('e3b6156622cc14ebca7382a55b8ed15f2f2bad98' \
+          '5efcbfa507b4b5a1aff2670b3b2b507b50ba2d77' \
+          'f02205b3273047afdfe4438fac4f71f50655112b' \
+          'f05ccbcab5cc768edfe76307066c88dc721b9448')
+
+#If you bump this package think to verify if gnome-session can reboot or shutdown
+#for now this package is only use by gnome-session but the next gnome* could use.
+
+build() {
+	Fbuild
+	Frcd2 xconsolekit
+}
+
+# optimization OK
diff --git a/source/xapps-extra/consolekit/close_log.diff b/source/xapps-extra/consolekit/close_log.diff
new file mode 100755
index 0000000..3f23533
--- /dev/null
+++ b/source/xapps-extra/consolekit/close_log.diff
@@ -0,0 +1,27 @@
+/*Fixes #17866*/
+--- a/src/ck-event-logger.c
++++ b/src/ck-event-logger.c
+@@ -180,8 +180,10 @@ retry:
+ static void
+ reopen_file_stream (CkEventLogger *event_logger)
+ {
+-        close (event_logger->priv->fd);
+-        fclose (event_logger->priv->file);
++        /* fclose will also close the underlying fd */
++        if (event_logger->priv->file != NULL) {
++                fclose (event_logger->priv->file);
++        }
+
+         /* FIXME: retries */
+         open_log_file (event_logger);
+@@ -420,8 +422,8 @@ ck_event_logger_finalize (GObject *objec
+                 g_async_queue_unref (event_logger->priv->event_queue);
+         }
+
+-        if (event_logger->priv->fd != -1) {
+-                close (event_logger->priv->fd);
++        if (event_logger->priv->file != NULL) {
++                fclose (event_logger->priv->file);
+         }
+
+         g_free (event_logger->priv->log_filename);
diff --git a/source/xapps-extra/consolekit/consolekit-0.3.0-shutdown.patch b/source/xapps-extra/consolekit/consolekit-0.3.0-shutdown.patch
new file mode 100755
index 0000000..682f820
--- /dev/null
+++ b/source/xapps-extra/consolekit/consolekit-0.3.0-shutdown.patch
@@ -0,0 +1,32 @@
+From b09ddd0f5c9de463ad0d1ebd329a9d16b084e192 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva at gentoo.org>
+Date: Wed, 1 Oct 2008 22:27:24 +0200
+Subject: [PATCH] allow shutdown without policykit or RBAC intervention.
+
+---
+ src/ck-manager.c |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/src/ck-manager.c b/src/ck-manager.c
+index bcb9350..54a78e6 100644
+--- a/src/ck-manager.c
++++ b/src/ck-manager.c
+@@ -1349,7 +1349,6 @@ ck_manager_restart (CkManager             *manager,
+         }
+ #else
+         g_warning ("Compiled without PolicyKit or RBAC support!");
+-        goto out;
+ #endif
+
+         g_debug ("ConsoleKit preforming Restart: %s", action);
+@@ -1409,7 +1408,6 @@ ck_manager_stop (CkManager             *manager,
+         }
+ #else
+         g_warning ("Compiled without PolicyKit or RBAC support!");
+-        goto out;
+ #endif
+
+         g_debug ("Stopping system");
+--
+1.6.0.2
+
diff --git a/source/xapps-extra/consolekit/consolekit.install b/source/xapps-extra/consolekit/consolekit.install
new file mode 100644
index 0000000..64093a1
--- /dev/null
+++ b/source/xapps-extra/consolekit/consolekit.install
@@ -0,0 +1,28 @@
+post_install()
+{
+	/usr/sbin/chkconfig --add rc.xconsolekit
+}
+
+pre_upgrade()
+{
+	/sbin/service xconsolekit stop
+}
+
+post_upgrade()
+{
+	post_install $1
+	/sbin/service xconsolekit start
+}
+
+pre_remove()
+{
+	/sbin/service xconsolekit stop
+	/usr/sbin/chkconfig --del rc.xconsolekit
+}
+
+op=$1
+shift
+
+$op $*
+
+# vim: ft=sh
diff --git a/source/xapps-extra/consolekit/rc.xconsolekit b/source/xapps-extra/consolekit/rc.xconsolekit
new file mode 100755
index 0000000..4b8aa8f
--- /dev/null
+++ b/source/xapps-extra/consolekit/rc.xconsolekit
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# (c) 2008 bouleetbil <bouleetbil at frogdev.info>
+# rc.xconsolekit for FrugalWare
+# distributed under GPL License
+
+# chkconfig: 2345 99 02
+# description: Framework for defining and tracking users, login sessions and seats.
+
+source /lib/initscripts/functions
+TEXTDOMAIN=xconsolekit
+TEXTDOMAINDIR=/lib/initscripts/messages
+
+actions=(restart start status stop)
+
+pid="pidof console-kit-daemon 2> /dev/null"
+
+rc_start()
+{
+	start_msg
+	if [ -z "$(eval $pid)" ]; then
+		/usr/sbin/console-kit-daemon -- 2>/dev/null 1>/dev/null
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_stop()
+{
+	stop_msg
+	if [ ! -z "$(eval $pid)" ] ;then
+		kill $(eval $pid) 2>/dev/null 1>/dev/null
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_exec $1


More information about the Frugalware-git mailing list