summaryrefslogtreecommitdiffstats
path: root/sysutils/consolekit
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-01-24 04:54:41 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-01-24 04:54:41 +0800
commit2e020818b10e1c025e4e2ca74c8c55ca05671129 (patch)
tree52896a22b677cdb098153993e7e164dec19cca2f /sysutils/consolekit
parent8bf6daa0650e24e0f78d2df544d0a9187e891458 (diff)
downloadmarcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar.gz
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar.bz2
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar.lz
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar.xz
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.tar.zst
marcuscom-ports-2e020818b10e1c025e4e2ca74c8c55ca05671129.zip
Update to 0.2.4, and add error correction to the code that waits for VTs
to become active. This shouldn't really be needed anymore since CK is no longer started out of rc.d. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10220 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/consolekit')
-rw-r--r--sysutils/consolekit/Makefile8
-rw-r--r--sysutils/consolekit/distinfo6
-rw-r--r--sysutils/consolekit/files/consolekit.in57
-rw-r--r--sysutils/consolekit/files/patch-src_ck-vt-monitor.c130
-rw-r--r--sysutils/consolekit/files/patch-tools_Makefile.in61
-rw-r--r--sysutils/consolekit/pkg-plist11
6 files changed, 169 insertions, 104 deletions
diff --git a/sysutils/consolekit/Makefile b/sysutils/consolekit/Makefile
index 00455587a..3cea6eedc 100644
--- a/sysutils/consolekit/Makefile
+++ b/sysutils/consolekit/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= consolekit
-PORTVERSION= 0.2.3
+PORTVERSION= 0.2.4
CATEGORIES= sysutils gnome
MASTER_SITES= http://people.freedesktop.org/~mccann/dist/
DISTFILES= ConsoleKit-${PORTVERSION}${EXTRACT_SUFX}
@@ -14,7 +14,8 @@ DISTFILES= ConsoleKit-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= gnome@FreeBSD.org
COMMENT= Framework for defining and tracking users
-LIB_DEPENDS= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib
+LIB_DEPENDS= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
+ polkit.2:${PORTSDIR}/sysutils/policykit
WRKSRC= ${WRKDIR}/ConsoleKit-${PORTVERSION}
USE_XORG= x11
@@ -26,9 +27,6 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-pid-file=/var/run/${PORTNAME}.pid
-USE_RC_SUBR= consolekit
-USE_GNOME_SUBR= yes
-
post-install:
${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-display-device \
${PREFIX}/libexec/ck-get-x11-display-device
diff --git a/sysutils/consolekit/distinfo b/sysutils/consolekit/distinfo
index 01599d871..a44031141 100644
--- a/sysutils/consolekit/distinfo
+++ b/sysutils/consolekit/distinfo
@@ -1,3 +1,3 @@
-MD5 (ConsoleKit-0.2.3.tar.gz) = dc4b3194ec583b03747ffc909a5571da
-SHA256 (ConsoleKit-0.2.3.tar.gz) = 1b9571f958d3c3be464a6261947c6f817948e878166bca4616f4ac3ac9f02e47
-SIZE (ConsoleKit-0.2.3.tar.gz) = 468591
+MD5 (ConsoleKit-0.2.4.tar.gz) = f153d01ab9baf520cbeed50743abbeda
+SHA256 (ConsoleKit-0.2.4.tar.gz) = 7a3f0c8611b4b9a24e60911e8afd0db69a418c6c8cfba4d212848829c6819e2a
+SIZE (ConsoleKit-0.2.4.tar.gz) = 506330
diff --git a/sysutils/consolekit/files/consolekit.in b/sysutils/consolekit/files/consolekit.in
deleted file mode 100644
index 7eada3e63..000000000
--- a/sysutils/consolekit/files/consolekit.in
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: consolekit
-# REQUIRE: DAEMON dbus
-#
-# Add the following line to /etc/rc.conf to enable the ConsoleKit daemon:
-#
-# consolekit_enable="YES"
-#
-
-. %%RC_SUBR%%
-. %%GNOME_SUBR%%
-
-consolekit_enable=${consolekit_enable-${gnome_enable}}
-
-name=consolekit
-rcvar=`set_rcvar`
-
-command="%%PREFIX%%/sbin/console-kit-daemon"
-pidfile="/var/run/${name}.pid"
-
-start_precmd="consolekit_precmd"
-stop_postcmd="consolekit_postcmd"
-
-local_force_depend()
-{
- _depend="$1"
- if [ -f %%LOCALBASE%%/etc/rc.d/${_depend}.sh ]; then
- _depend="${_depend}.sh"
- fi
-
- if ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestatus 1>/dev/null 2>&1 &&
- ! %%LOCALBASE%%/etc/rc.d/${_depend} forcestart; then
- return 1
- fi
- return 0
-}
-
-consolekit_precmd()
-{
- if ! checkyesno dbus_enable
- then
- local_force_depend dbus || return 1
- fi
-
- mkdir -p $(dirname $pidfile)
-}
-
-consolekit_postcmd()
-{
- rm -f $pidfile
-}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/sysutils/consolekit/files/patch-src_ck-vt-monitor.c b/sysutils/consolekit/files/patch-src_ck-vt-monitor.c
new file mode 100644
index 000000000..7db4a4682
--- /dev/null
+++ b/sysutils/consolekit/files/patch-src_ck-vt-monitor.c
@@ -0,0 +1,130 @@
+--- src/ck-vt-monitor.c.orig 2008-01-23 09:30:44.000000000 -0500
++++ src/ck-vt-monitor.c 2008-01-23 15:29:52.000000000 -0500
+@@ -54,6 +54,9 @@ struct CkVtMonitorPrivate
+
+ GAsyncQueue *event_queue;
+ guint process_queue_id;
++
++ GAsyncQueue *restart_queue;
++ guint restart_queue_id;
+ };
+
+ enum {
+@@ -72,6 +75,7 @@ static void ck_vt_monitor_init
+ static void ck_vt_monitor_finalize (GObject *object);
+
+ static void vt_add_watches (CkVtMonitor *vt_monitor);
++static void vt_add_watch_unlocked (CkVtMonitor *vt_monitor, gint32 num);
+
+ G_DEFINE_TYPE (CkVtMonitor, ck_vt_monitor, G_TYPE_OBJECT)
+
+@@ -254,6 +258,56 @@ process_queue (CkVtMonitor *vt_monitor)
+ return FALSE;
+ }
+
++static gboolean
++process_restart_queue (CkVtMonitor *vt_monitor)
++{
++ int i;
++ int queue_length;
++ EventData *data;
++ EventData *d;
++
++ g_async_queue_lock (vt_monitor->priv->restart_queue);
++
++ g_debug ("Processing VT restart queue");
++
++ queue_length = g_async_queue_length_unlocked (vt_monitor->priv->restart_queue);
++ data = NULL;
++
++ G_LOCK (hash_lock);
++
++ /* compress events in the queue */
++ for (i = 0; i < queue_length; i++) {
++ d = g_async_queue_try_pop_unlocked (vt_monitor->priv->restart_queue);
++ if (d == NULL) {
++ continue;
++
++ }
++
++ if (data != NULL) {
++ g_debug ("Compressing queue; skipping restart for VT %d", data->num);
++ event_data_free (data);
++ }
++
++ data = d;
++ }
++
++ if (data != NULL) {
++ vt_add_watch_unlocked (vt_monitor, data->num);
++ event_data_free (data);
++ }
++
++ G_UNLOCK (hash_lock);
++
++ G_LOCK (schedule_lock);
++ vt_monitor->priv->restart_queue_id = 0;
++ G_UNLOCK (schedule_lock);
++
++ g_async_queue_unlock (vt_monitor->priv->restart_queue);
++
++ return FALSE;
++}
++
++
+ static void
+ schedule_process_queue (CkVtMonitor *vt_monitor)
+ {
+@@ -264,6 +318,16 @@ schedule_process_queue (CkVtMonitor *vt_
+ G_UNLOCK (schedule_lock);
+ }
+
++static void
++schedule_process_restart_queue (CkVtMonitor *vt_monitor)
++{
++ G_LOCK (schedule_lock);
++ if (vt_monitor->priv->restart_queue_id == 0) {
++ vt_monitor->priv->restart_queue_id = g_idle_add ((GSourceFunc)process_restart_queue, vt_monitor);
++ }
++ G_UNLOCK (schedule_lock);
++}
++
+ static void *
+ vt_thread_start (ThreadData *data)
+ {
+@@ -277,7 +341,15 @@ vt_thread_start (ThreadData *data)
+
+ res = ck_wait_for_active_console_num (vt_monitor->priv->vfd, num);
+ if (! res) {
+- /* FIXME: what do we do if it fails? */
++ EventData *event;
++
++ event = g_new0 (EventData, 1);
++ event->num = num;
++ g_debug ("Failed to wait for active console %d: %s", num, g_strerror (errno));
++
++ g_async_queue_push (vt_monitor->priv->restart_queue, event);
++
++ schedule_process_restart_queue (vt_monitor);
+ } else {
+ EventData *event;
+
+@@ -414,6 +486,7 @@ ck_vt_monitor_init (CkVtMonitor *vt_moni
+
+ vt_monitor->priv->active_num = active;
+ vt_monitor->priv->event_queue = g_async_queue_new ();
++ vt_monitor->priv->restart_queue = g_async_queue_new ();
+ vt_monitor->priv->vt_thread_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+ vt_add_watches (vt_monitor);
+@@ -440,6 +513,10 @@ ck_vt_monitor_finalize (GObject *object)
+ g_async_queue_unref (vt_monitor->priv->event_queue);
+ }
+
++ if (vt_monitor->priv->restart_queue != NULL) {
++ g_async_queue_unref (vt_monitor->priv->restart_queue);
++ }
++
+ if (vt_monitor->priv->vt_thread_hash != NULL) {
+ g_hash_table_destroy (vt_monitor->priv->vt_thread_hash);
+ }
diff --git a/sysutils/consolekit/files/patch-tools_Makefile.in b/sysutils/consolekit/files/patch-tools_Makefile.in
index 3536e33ad..f78f68a25 100644
--- a/sysutils/consolekit/files/patch-tools_Makefile.in
+++ b/sysutils/consolekit/files/patch-tools_Makefile.in
@@ -1,49 +1,32 @@
---- tools/Makefile.in.orig 2007-11-08 15:03:07.000000000 -0500
-+++ tools/Makefile.in 2007-11-08 15:04:31.000000000 -0500
-@@ -38,9 +38,7 @@ build_triplet = @build@
- host_triplet = @host@
- @CK_COMPILE_LINUX_TRUE@am__append_1 = linux
- bin_PROGRAMS = ck-list-sessions$(EXEEXT) $(am__EXEEXT_1)
+--- tools/Makefile.in.orig 2008-01-23 15:12:35.000000000 -0500
++++ tools/Makefile.in 2008-01-23 15:14:23.000000000 -0500
+@@ -41,9 +41,7 @@ host_triplet = @host@
+ @CK_COMPILE_SOLARIS_TRUE@am__append_3 = solaris
+ bin_PROGRAMS = ck-list-sessions$(EXEEXT) ck-history$(EXEEXT) \
+ $(am__EXEEXT_1)
-libexec_PROGRAMS = ck-collect-session-info$(EXEEXT) \
- ck-get-x11-server-pid$(EXEEXT) \
- ck-get-x11-display-device$(EXEEXT) $(am__EXEEXT_1)
-+libexec_PROGRAMS = ck-collect-session-info$(EXEEXT) $(am__EXEEXT_1)
++libexec_PROGRAMS = ck-collect-session-info$(EXEEXT)
subdir = tools
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-@@ -64,17 +62,6 @@ ck_collect_session_info_OBJECTS = \
+@@ -67,14 +65,10 @@ ck_collect_session_info_OBJECTS = \
am__DEPENDENCIES_1 =
ck_collect_session_info_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
-am_ck_get_x11_display_device_OBJECTS = \
- ck-get-x11-display-device.$(OBJEXT) $(am__objects_1)
--ck_get_x11_display_device_OBJECTS = \
-- $(am_ck_get_x11_display_device_OBJECTS)
--ck_get_x11_display_device_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-- $(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
+ ck_get_x11_display_device_OBJECTS = \
+ $(am_ck_get_x11_display_device_OBJECTS)
+ ck_get_x11_display_device_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
-am_ck_get_x11_server_pid_OBJECTS = ck-get-x11-server-pid.$(OBJEXT) \
- $(am__objects_1)
--ck_get_x11_server_pid_OBJECTS = $(am_ck_get_x11_server_pid_OBJECTS)
--ck_get_x11_server_pid_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-- $(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
- am_ck_list_sessions_OBJECTS = list-sessions.$(OBJEXT) $(am__objects_1)
- ck_list_sessions_OBJECTS = $(am_ck_list_sessions_OBJECTS)
- ck_list_sessions_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-@@ -91,11 +78,9 @@ CCLD = $(CC)
- LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
- SOURCES = $(ck_collect_session_info_SOURCES) \
-- $(ck_get_x11_display_device_SOURCES) \
-- $(ck_get_x11_server_pid_SOURCES) $(ck_list_sessions_SOURCES)
-+ $(ck_list_sessions_SOURCES)
- DIST_SOURCES = $(ck_collect_session_info_SOURCES) \
-- $(ck_get_x11_display_device_SOURCES) \
-- $(ck_get_x11_server_pid_SOURCES) $(ck_list_sessions_SOURCES)
-+ $(ck_list_sessions_SOURCES)
- RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
-@@ -300,24 +285,6 @@ ck_collect_session_info_LDADD = \
+ ck_get_x11_server_pid_OBJECTS = $(am_ck_get_x11_server_pid_OBJECTS)
+ ck_get_x11_server_pid_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/libck.la $(am__DEPENDENCIES_1)
+@@ -326,24 +320,6 @@ ck_collect_session_info_LDADD = \
$(top_builddir)/src/libck.la \
$(NULL)
@@ -68,7 +51,7 @@
EXTRA_DIST = \
$(NULL)
-@@ -417,12 +384,6 @@ clean-libexecPROGRAMS:
+@@ -443,12 +419,6 @@ clean-libexecPROGRAMS:
ck-collect-session-info$(EXEEXT): $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_DEPENDENCIES)
@rm -f ck-collect-session-info$(EXEEXT)
$(LINK) $(ck_collect_session_info_LDFLAGS) $(ck_collect_session_info_OBJECTS) $(ck_collect_session_info_LDADD) $(LIBS)
@@ -78,15 +61,15 @@
-ck-get-x11-server-pid$(EXEEXT): $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_DEPENDENCIES)
- @rm -f ck-get-x11-server-pid$(EXEEXT)
- $(LINK) $(ck_get_x11_server_pid_LDFLAGS) $(ck_get_x11_server_pid_OBJECTS) $(ck_get_x11_server_pid_LDADD) $(LIBS)
- ck-list-sessions$(EXEEXT): $(ck_list_sessions_OBJECTS) $(ck_list_sessions_DEPENDENCIES)
- @rm -f ck-list-sessions$(EXEEXT)
- $(LINK) $(ck_list_sessions_LDFLAGS) $(ck_list_sessions_OBJECTS) $(ck_list_sessions_LDADD) $(LIBS)
-@@ -434,8 +395,6 @@ distclean-compile:
+ ck-history$(EXEEXT): $(ck_history_OBJECTS) $(ck_history_DEPENDENCIES)
+ @rm -f ck-history$(EXEEXT)
+ $(LINK) $(ck_history_LDFLAGS) $(ck_history_OBJECTS) $(ck_history_LDADD) $(LIBS)
+@@ -463,8 +433,6 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-collect-session-info.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-display-device.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-get-x11-server-pid.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ck-history.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-sessions.Po@am__quote@
- .c.o:
diff --git a/sysutils/consolekit/pkg-plist b/sysutils/consolekit/pkg-plist
index eba97e96b..556bc2ffc 100644
--- a/sysutils/consolekit/pkg-plist
+++ b/sysutils/consolekit/pkg-plist
@@ -1,7 +1,10 @@
+bin/ck-history
bin/ck-list-sessions
etc/ConsoleKit/seats.d/00-primary.seat
etc/dbus-1/system.d/ConsoleKit.conf
include/ConsoleKit/ck-connector/ck-connector.h
+lib/ConsoleKit/scripts/ck-system-restart
+lib/ConsoleKit/scripts/ck-system-stop
lib/libck-connector.la
lib/libck-connector.so
lib/libck-connector.so.0
@@ -10,7 +13,15 @@ libexec/ck-collect-session-info
libexec/ck-get-x11-display-device
libexec/ck-get-x11-server-pid
sbin/console-kit-daemon
+share/PolicyKit/policy/ConsoleKit.policy
+share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
+@exec %D/etc/ConsoleKit/run-session.d
+@exec mkdir -p %D/lib/ConsoleKit/run-session.d
+@dirrm lib/ConsoleKit/scripts
+@dirrmtry lib/ConsoleKit/run-session.d
+@dirrmtry lib/ConsoleKit
@dirrm include/ConsoleKit/ck-connector
@dirrm include/ConsoleKit
@dirrm etc/ConsoleKit/seats.d
+@dirrmtry etc/ConsoleKit/run-session.d
@dirrm etc/ConsoleKit