diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-11-09 04:20:53 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-11-09 04:20:53 +0800 |
commit | 772a0d5ed2c615e91a0ee54a094730e32d893b83 (patch) | |
tree | 57c19f43c46ce366237af763d8fa9c32a5f79701 /sysutils | |
parent | 58f855b257a23b542b5866468a7a5b84d0e27602 (diff) | |
download | marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar.gz marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar.bz2 marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar.lz marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar.xz marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.tar.zst marcuscom-ports-772a0d5ed2c615e91a0ee54a094730e32d893b83.zip |
Update to 0.2.3.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@9917 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/consolekit/Makefile | 38 | ||||
-rw-r--r-- | sysutils/consolekit/distinfo | 3 | ||||
-rw-r--r-- | sysutils/consolekit/files/ck-get-x11-display-device | 35 | ||||
-rw-r--r-- | sysutils/consolekit/files/ck-get-x11-server-pid | 17 | ||||
-rw-r--r-- | sysutils/consolekit/files/consolekit.in | 57 | ||||
-rw-r--r-- | sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c | 18 | ||||
-rw-r--r-- | sysutils/consolekit/files/patch-src_main.c | 33 | ||||
-rw-r--r-- | sysutils/consolekit/files/patch-src_test-vt-monitor.c | 33 | ||||
-rw-r--r-- | sysutils/consolekit/files/patch-tools_Makefile.in | 92 | ||||
-rw-r--r-- | sysutils/consolekit/pkg-descr | 6 | ||||
-rw-r--r-- | sysutils/consolekit/pkg-plist | 16 |
11 files changed, 348 insertions, 0 deletions
diff --git a/sysutils/consolekit/Makefile b/sysutils/consolekit/Makefile new file mode 100644 index 000000000..837c173cb --- /dev/null +++ b/sysutils/consolekit/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: ConsoleKit +# Date Created: 26 Aug 2006 +# Whom: Florent Thoumie <flz@FreeBSD.org> +# +# $FreeBSD: ports/sysutils/consolekit/Makefile,v 1.3 2007/09/06 10:07:40 flz Exp $ +# + +PORTNAME= consolekit +PORTVERSION= 0.2.3 +CATEGORIES= sysutils gnome +MASTER_SITES= http://people.freedesktop.org/~mccann/dist/ +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 + +WRKSRC= ${WRKDIR}/ConsoleKit-${PORTVERSION} +USE_XORG= x11 +USE_GNOME= gnomehack gnometarget +USE_GMAKE= yes +GNU_CONFIGURE= yes +USE_LDCONFIG= yes +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 + ${INSTALL_SCRIPT} ${FILESDIR}/ck-get-x11-server-pid \ + ${PREFIX}/libexec/ck-get-x11-server-pid + +.include <bsd.port.mk> diff --git a/sysutils/consolekit/distinfo b/sysutils/consolekit/distinfo new file mode 100644 index 000000000..01599d871 --- /dev/null +++ b/sysutils/consolekit/distinfo @@ -0,0 +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 diff --git a/sysutils/consolekit/files/ck-get-x11-display-device b/sysutils/consolekit/files/ck-get-x11-display-device new file mode 100644 index 000000000..6fc508360 --- /dev/null +++ b/sysutils/consolekit/files/ck-get-x11-display-device @@ -0,0 +1,35 @@ +#!/bin/sh + +FSTAT="/usr/bin/fstat" +GREP="/usr/bin/grep" +AWK="/usr/bin/awk" +SED="/usr/bin/sed" +CAT="/bin/cat" +HEAD="/usr/bin/head" + +dispnum=0 +if [ x"$1" = x"--display" ]; then + if [ $# != 2 ]; then + echo "usage: $0 [--display DISPLAY]" + exit 1 + fi + DISPLAY=$2 +fi +if [ ! -z "${DISPLAY}" ]; then + dispnum=$(echo ${DISPLAY} | ${SED} -E -e 's|:([0-9]+).*|\1|') +fi + +if [ ! -f "/tmp/.X${dispnum}-lock" ]; then + echo "ERROR: Failed to find X lock file for display ${dispnum}" + exit 1 +fi +pid=$(${CAT} "/tmp/.X${dispnum}-lock") + +device=$(${FSTAT} -p ${pid} | ${GREP} ttyv | ${HEAD} -1 | ${AWK} '{print $8}') + +if [ -z "${device}" ]; then + echo "ERROR: Failed to find TTY device for X server on display ${dispnum}" + exit 1 +fi + +echo "/dev/${device}" diff --git a/sysutils/consolekit/files/ck-get-x11-server-pid b/sysutils/consolekit/files/ck-get-x11-server-pid new file mode 100644 index 000000000..05c433e01 --- /dev/null +++ b/sysutils/consolekit/files/ck-get-x11-server-pid @@ -0,0 +1,17 @@ +#!/bin/sh + +SED="/usr/bin/sed" +CAT="/bin/cat" + +dispnum=0 +if [ ! -z "${DISPLAY}" ]; then + dispnum=$(echo ${DISPLAY} | ${SED} -E -e 's|:([0-9]+).*|\1|') +fi + +if [ ! -f "/tmp/.X${dispnum}-lock" ]; then + echo "ERROR: Failed to find X lock file for display ${dispnum}" + exit 1 +fi +pid=$(${CAT} "/tmp/.X${dispnum}-lock") + +echo ${pid} diff --git a/sysutils/consolekit/files/consolekit.in b/sysutils/consolekit/files/consolekit.in new file mode 100644 index 000000000..e42d8a1df --- /dev/null +++ b/sysutils/consolekit/files/consolekit.in @@ -0,0 +1,57 @@ +#!/bin/sh +# +# $FreeBSD: ports/sysutils/consolekit/files/consolekit.in,v 1.1 2007/08/27 13:52:48 flz Exp $ +# +# 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-sysdeps-freebsd.c b/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c new file mode 100644 index 000000000..83f6b76e5 --- /dev/null +++ b/sysutils/consolekit/files/patch-src_ck-sysdeps-freebsd.c @@ -0,0 +1,18 @@ +--- src/ck-sysdeps-freebsd.c.orig 2007-11-08 15:14:35.000000000 -0500 ++++ src/ck-sysdeps-freebsd.c 2007-11-08 15:14:45.000000000 -0500 +@@ -202,7 +202,6 @@ ck_process_stat_new_for_unix_pid (pid_t + GError **error) + { + gboolean res; +- GError *local_error; + CkProcessStat *proc; + + g_return_val_if_fail (pid > 1, FALSE); +@@ -217,7 +216,6 @@ ck_process_stat_new_for_unix_pid (pid_t + if (res) { + *stat = proc; + } else { +- g_propagate_error (error, local_error); + *stat = NULL; + } + diff --git a/sysutils/consolekit/files/patch-src_main.c b/sysutils/consolekit/files/patch-src_main.c new file mode 100644 index 000000000..b1a661aa3 --- /dev/null +++ b/sysutils/consolekit/files/patch-src_main.c @@ -0,0 +1,33 @@ +--- src/main.c.orig 2007-11-08 15:05:55.000000000 -0500 ++++ src/main.c 2007-11-08 15:07:39.000000000 -0500 +@@ -226,6 +226,21 @@ sigusr1_handler (int sig) + } + + static void ++setup_termination_signals (void) ++{ ++ struct sigaction sa; ++ ++ sa.sa_handler = SIG_DFL; ++ sigemptyset (&sa.sa_mask); ++ sa.sa_flags = 0; ++ ++ sigaction (SIGTERM, &sa, NULL); ++ sigaction (SIGQUIT, &sa, NULL); ++ sigaction (SIGINT, &sa, NULL); ++ sigaction (SIGHUP, &sa, NULL); ++} ++ ++static void + setup_debug_log_signals (void) + { + struct sigaction sa; +@@ -300,6 +315,8 @@ main (int argc, + + setup_debug_log (debug); + ++ setup_termination_signals (); ++ + connection = get_system_bus (); + if (connection == NULL) { + goto out; diff --git a/sysutils/consolekit/files/patch-src_test-vt-monitor.c b/sysutils/consolekit/files/patch-src_test-vt-monitor.c new file mode 100644 index 000000000..6fb9740f5 --- /dev/null +++ b/sysutils/consolekit/files/patch-src_test-vt-monitor.c @@ -0,0 +1,33 @@ +--- src/test-vt-monitor.c.orig 2007-08-17 13:08:55.000000000 -0400 ++++ src/test-vt-monitor.c 2007-11-08 15:11:37.000000000 -0500 +@@ -31,6 +31,7 @@ + #include <pwd.h> + #include <string.h> + #include <errno.h> ++#include <signal.h> + + #include <locale.h> + +@@ -55,12 +56,22 @@ main (int argc, char **argv) + GError *error; + guint num; + gboolean res; ++ struct sigaction sa; + + if (! g_thread_supported ()) { + g_thread_init (NULL); + } + g_type_init (); + ++ sa.sa_handler = SIG_DFL; ++ sigemptyset (&sa.sa_mask); ++ sa.sa_flags = 0; ++ ++ sigaction (SIGINT, &sa, NULL); ++ sigaction (SIGTERM, &sa, NULL); ++ sigaction (SIGQUIT, &sa, NULL); ++ sigaction (SIGHUP, &sa, NULL); ++ + if (! ck_is_root_user ()) { + g_warning ("Must be run as root"); + exit (1); diff --git a/sysutils/consolekit/files/patch-tools_Makefile.in b/sysutils/consolekit/files/patch-tools_Makefile.in new file mode 100644 index 000000000..3536e33ad --- /dev/null +++ b/sysutils/consolekit/files/patch-tools_Makefile.in @@ -0,0 +1,92 @@ +--- 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) +-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) + 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 = \ + 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) +-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 = \ + $(top_builddir)/src/libck.la \ + $(NULL) + +-ck_get_x11_server_pid_SOURCES = \ +- ck-get-x11-server-pid.c \ +- $(NULL) +- +-ck_get_x11_server_pid_LDADD = \ +- $(TOOLS_LIBS) \ +- $(top_builddir)/src/libck.la \ +- $(NULL) +- +-ck_get_x11_display_device_SOURCES = \ +- ck-get-x11-display-device.c \ +- $(NULL) +- +-ck_get_x11_display_device_LDADD = \ +- $(TOOLS_LIBS) \ +- $(top_builddir)/src/libck.la \ +- $(NULL) +- + EXTRA_DIST = \ + $(NULL) + +@@ -417,12 +384,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) +-ck-get-x11-display-device$(EXEEXT): $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_DEPENDENCIES) +- @rm -f ck-get-x11-display-device$(EXEEXT) +- $(LINK) $(ck_get_x11_display_device_LDFLAGS) $(ck_get_x11_display_device_OBJECTS) $(ck_get_x11_display_device_LDADD) $(LIBS) +-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: + -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)/list-sessions.Po@am__quote@ + + .c.o: diff --git a/sysutils/consolekit/pkg-descr b/sysutils/consolekit/pkg-descr new file mode 100644 index 000000000..31ea86e35 --- /dev/null +++ b/sysutils/consolekit/pkg-descr @@ -0,0 +1,6 @@ +ConsoleKit is a framework for defining and tracking users, login +sessions, and seats. The primary motivations for this framework are to +facilitate fast-user-switching and multi-seat capabilities, and to +enable more sophisticated policy decisions for desktop sessions. + +WWW: http://www.freedesktop.org/Software/hal diff --git a/sysutils/consolekit/pkg-plist b/sysutils/consolekit/pkg-plist new file mode 100644 index 000000000..eba97e96b --- /dev/null +++ b/sysutils/consolekit/pkg-plist @@ -0,0 +1,16 @@ +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/libck-connector.la +lib/libck-connector.so +lib/libck-connector.so.0 +libdata/pkgconfig/ck-connector.pc +libexec/ck-collect-session-info +libexec/ck-get-x11-display-device +libexec/ck-get-x11-server-pid +sbin/console-kit-daemon +@dirrm include/ConsoleKit/ck-connector +@dirrm include/ConsoleKit +@dirrm etc/ConsoleKit/seats.d +@dirrm etc/ConsoleKit |