rev 8962 - in trunk/packages/kdebase/debian: . patches
Fathi Boudra
fabo at alioth.debian.org
Tue Jan 15 09:31:18 UTC 2008
Author: fabo
Date: 2008-01-15 09:31:17 +0000 (Tue, 15 Jan 2008)
New Revision: 8962
Modified:
trunk/packages/kdebase/debian/changelog
trunk/packages/kdebase/debian/patches/70_kdm_consolekit.diff
Log:
* Update ConsoleKit support patch.
Modified: trunk/packages/kdebase/debian/changelog
===================================================================
--- trunk/packages/kdebase/debian/changelog 2008-01-14 22:03:15 UTC (rev 8961)
+++ trunk/packages/kdebase/debian/changelog 2008-01-15 09:31:17 UTC (rev 8962)
@@ -1,3 +1,9 @@
+kdebase (4:3.5.8.dfsg.1-7) UNRELEASED; urgency=low
+
+ * Update ConsoleKit support patch.
+
+ -- Fathi Boudra <fabo at debian.org> Tue, 15 Jan 2008 10:29:57 +0100
+
kdebase (4:3.5.8.dfsg.1-6) unstable; urgency=low
+++ Changes by Armin Berres:
Modified: trunk/packages/kdebase/debian/patches/70_kdm_consolekit.diff
===================================================================
--- trunk/packages/kdebase/debian/patches/70_kdm_consolekit.diff 2008-01-14 22:03:15 UTC (rev 8961)
+++ trunk/packages/kdebase/debian/patches/70_kdm_consolekit.diff 2008-01-15 09:31:17 UTC (rev 8962)
@@ -1,47 +1,186 @@
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/client.c kdebase-3.5.8.dfsg.1.new/kdm/backend/client.c
---- kdebase-3.5.8.dfsg.1/kdm/backend/client.c 2007-12-26 14:41:34.000000000 +0100
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/client.c 2007-12-26 14:41:46.000000000 +0100
-@@ -82,6 +82,10 @@
- # include <shadow.h>
- #endif
+--- a/kdm/configure.in.in
++++ b/kdm/configure.in.in
+@@ -240,4 +240,51 @@
+ AC_DEFINE(WITH_KDM_XCONSOLE, 1, [Build kdm with built-in xconsole])
+ fi
++########### Check for DBus
++
++ AC_MSG_CHECKING(for DBus)
++
++ dbus_inc=NOTFOUND
++ dbus_lib=NOTFOUND
++ dbus=NOTFOUND
++
++ search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
++ AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)
++
++ search_incs_arch_deps="$kde_includes $kde_extra_includes /usr/lib$kdelibsuff/dbus-1.0/include /usr/local/lib$kdelibsuff/dbus-1.0/include"
++ AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)
++
++ if test -r $dbus_incdir/dbus/dbus.h && test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h ; then
++ DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
++ dbus_inc=FOUND
++ fi
++
++ search_libs="$kde_libraries $kde_extra_libs /usr/lib$kdelibsuff /usr/local/lib$kdelibsuff"
++ AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)
++
++ if test -r $dbus_libdir/libdbus-1.so ; then
++ DBUS_LIBS="-L$dbus_libdir -ldbus-1"
++ dbus_lib=FOUND
++ fi
++
++ if test $dbus_inc != FOUND || test $dbus_lib != FOUND ; then
++ KDE_PKG_CHECK_MODULES( DBUS, "dbus-1", [ DBUS_INCS=$DBUS_CFLAGS; dbus_inc=FOUND; dbus_lib=FOUND; ] , AC_MSG_RESULT( Nothing found on PKG_CONFIG_PATH ) )
++ fi
++
++ dbus_bus_var=`pkg-config --variable=system_bus_default_address dbus-1 2>/dev/null`
++ if test -z "$dbus_bus_var"; then
++ dbus_bus_var="unix:path=/var/run/dbus/system_bus_socket"
++ fi
++ AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS, "$dbus_bus_var", [Define the unix domain path for dbus system bus])
++
++ if test $dbus_inc = FOUND && test $dbus_lib = FOUND ; then
++ AC_MSG_RESULT(headers $DBUS_INCS libraries $DBUS_LIBS)
++ dbus=FOUND
++ else
++ AC_MSG_RESULT(searched but not found)
++ fi
++
++ AC_SUBST(DBUS_INCS)
++ AC_SUBST(DBUS_LIBS)
++
+ dnl AC_OUTPUT(kdm/kfrontend/sessions/kde.desktop)
+--- /dev/null
++++ b/kdm/backend/consolekit.h
+@@ -0,0 +1,36 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2006 William Jon McCann <mccann at jhu.edu>
++ * Copyright (C) 2007 Kevin Kofler <Kevin at tigcc.ticalc.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ */
++
++
++#ifndef __CONSOLE_KIT_H
++#define __CONSOLE_KIT_H
++
++#include <pwd.h>
++
++struct display;
++
++char * open_ck_session (struct passwd *pwent,
++ struct display *display);
++void close_ck_session (const char *cookie);
++void unlock_ck_session (const char *user,
++ const char *x11_display);
++
++#endif /* __CONSOLE_KIT_H */
+--- a/kdm/backend/session.c
++++ b/kdm/backend/session.c
+@@ -45,6 +45,10 @@
+ #include <ctype.h>
+ #include <signal.h>
+
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
- /*
- * Session data, mostly what struct verify_info was for
- */
-@@ -1120,8 +1124,13 @@
- static int removeCreds;
- #endif
+ struct display *td;
+ const char *td_setup = "auto";
+@@ -530,6 +534,10 @@
+ int ex, cmd;
+ volatile int clientPid = 0;
+ volatile Time_t tdiff = 0;
+#ifdef WITH_CONSOLE_KIT
-+int
-+StartClient( const char *ck_session_cookie )
++ char *ck_session_cookie;
++#endif
++
+
+ td = d;
+ Debug( "ManageSession %s\n", d->name );
+@@ -626,7 +634,12 @@
+ if (td_setup)
+ SetupDisplay( td_setup );
+
++#ifdef WITH_CONSOLE_KIT
++ ck_session_cookie = open_ck_session (getpwnam(curuser), d);
++ if (!(clientPid = StartClient(ck_session_cookie))) {
+#else
- int
- StartClient()
+ if (!(clientPid = StartClient())) {
+#endif
- {
- const char *home, *sessargs, *desksess;
- char **env, *xma;
-@@ -1217,6 +1226,11 @@
- if (krbtkfile[0] != '\0')
- env = setEnv( env, "KRBTKFILE", krbtkfile );
- #endif
+ LogError( "Client start failed\n" );
+ SessionExit( EX_NORMAL ); /* XXX maybe EX_REMANAGE_DPY? -- enable in dm.c! */
+ }
+@@ -648,6 +661,14 @@
+ catchTerm( SIGTERM );
+ }
+ }
++
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
-+ env = setEnv ( env, "XDG_SESSION_COOKIE", ck_session_cookie );
++ close_ck_session (ck_session_cookie);
++ free (ck_session_cookie);
+ }
+#endif
- userEnviron = inheritEnv( env, envvars );
- env = systemEnv( p->pw_name );
- systemEnviron = setEnv( env, "HOME", p->pw_dir );
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/consolekit.c kdebase-3.5.8.dfsg.1.new/kdm/backend/consolekit.c
---- kdebase-3.5.8.dfsg.1/kdm/backend/consolekit.c 1970-01-01 01:00:00.000000000 +0100
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/consolekit.c 2007-12-26 14:41:46.000000000 +0100
-@@ -0,0 +1,552 @@
++
+ /*
+ * Sometimes the Xsession somehow manages to exit before
+ * a server crash is noticed - so we sleep a bit and wait
+--- a/kdm/backend/dm.h
++++ b/kdm/backend/dm.h
+@@ -37,6 +37,8 @@
+ #ifndef _DM_H_
+ #define _DM_H_ 1
+
++#define WITH_CONSOLE_KIT
++
+ #include "greet.h"
+ #include <config.ci>
+
+@@ -476,7 +478,11 @@
+ #define GCONV_BINARY 5
+ typedef char *(*GConvFunc)( int what, const char *prompt );
+ int Verify( GConvFunc gconv, int rootok );
++#ifdef WITH_CONSOLE_KIT
++int StartClient( const char *ck_session_cookie );
++#else
+ int StartClient( void );
++#endif
+ void SessionExit( int status ) ATTR_NORETURN;
+ int ReadDmrc( void );
+ extern char **userEnviron, **systemEnviron;
+--- a/kdm/backend/xdmcp.c
++++ b/kdm/backend/xdmcp.c
+@@ -924,6 +924,9 @@
+ }
+ d->clientAddr = clientAddress;
+ d->connectionType = connectionType;
++ d->remoteHost = NetworkAddressToHostname (pdpy->connectionType,
++ &pdpy->connectionAddress);
++
+ XdmcpDisposeARRAY8( &clientPort );
+ if (pdpy->fileAuthorization) {
+ d->authorizations = (Xauth **)Malloc( sizeof(Xauth *) );
+--- /dev/null
++++ b/kdm/backend/consolekit.c
+@@ -0,0 +1,557 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2006-2007 William Jon McCann <mccann at jhu.edu>
@@ -454,6 +593,11 @@
+
+ cookie = NULL;
+
++ if (pwent == NULL) {
++ Debug ("ConsoleKit: NULL user passed as parameter");
++ return NULL;
++ }
++
+ Debug ("ConsoleKit: Opening session for %s", pwent->pw_name);
+
+ dbus_error_init (&error);
@@ -594,73 +738,8 @@
+ dbus_connection_close (private_connection);
+ private_connection = NULL;
+}
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/consolekit.h kdebase-3.5.8.dfsg.1.new/kdm/backend/consolekit.h
---- kdebase-3.5.8.dfsg.1/kdm/backend/consolekit.h 1970-01-01 01:00:00.000000000 +0100
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/consolekit.h 2007-12-26 14:41:46.000000000 +0100
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2006 William Jon McCann <mccann at jhu.edu>
-+ * Copyright (C) 2007 Kevin Kofler <Kevin at tigcc.ticalc.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+ *
-+ */
-+
-+
-+#ifndef __CONSOLE_KIT_H
-+#define __CONSOLE_KIT_H
-+
-+#include <pwd.h>
-+
-+struct display;
-+
-+char * open_ck_session (struct passwd *pwent,
-+ struct display *display);
-+void close_ck_session (const char *cookie);
-+void unlock_ck_session (const char *user,
-+ const char *x11_display);
-+
-+#endif /* __CONSOLE_KIT_H */
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/dm.h kdebase-3.5.8.dfsg.1.new/kdm/backend/dm.h
---- kdebase-3.5.8.dfsg.1/kdm/backend/dm.h 2005-09-10 10:26:12.000000000 +0200
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/dm.h 2007-12-26 14:41:46.000000000 +0100
-@@ -37,6 +37,8 @@
- #ifndef _DM_H_
- #define _DM_H_ 1
-
-+#define WITH_CONSOLE_KIT
-+
- #include "greet.h"
- #include <config.ci>
-
-@@ -476,7 +478,11 @@
- #define GCONV_BINARY 5
- typedef char *(*GConvFunc)( int what, const char *prompt );
- int Verify( GConvFunc gconv, int rootok );
-+#ifdef WITH_CONSOLE_KIT
-+int StartClient( const char *ck_session_cookie );
-+#else
- int StartClient( void );
-+#endif
- void SessionExit( int status ) ATTR_NORETURN;
- int ReadDmrc( void );
- extern char **userEnviron, **systemEnviron;
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/Imakefile kdebase-3.5.8.dfsg.1.new/kdm/backend/Imakefile
---- kdebase-3.5.8.dfsg.1/kdm/backend/Imakefile 2005-09-10 10:26:12.000000000 +0200
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/Imakefile 2007-12-26 14:41:46.000000000 +0100
+--- a/kdm/backend/Imakefile
++++ b/kdm/backend/Imakefile
@@ -155,13 +155,13 @@
netaddr.c reset.c resource.c protodpy.c policy.c \
session.c socket.c streams.c util.c xdmcp.c \
@@ -677,9 +756,8 @@
$(XDMAUTHOBJS) $(RPCOBJS) $(KRB5OBJS)
SRCS1 = $(COMMSRCS) client.c
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/Makefile.am kdebase-3.5.8.dfsg.1.new/kdm/backend/Makefile.am
---- kdebase-3.5.8.dfsg.1/kdm/backend/Makefile.am 2007-10-08 11:51:33.000000000 +0200
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/Makefile.am 2007-12-26 14:41:46.000000000 +0100
+--- a/kdm/backend/Makefile.am
++++ b/kdm/backend/Makefile.am
@@ -1,9 +1,9 @@
# forcibly remove thread-related defines & flags
AUTOMAKE_OPTIONS = foreign
@@ -700,111 +778,42 @@
ctrl.c \
daemon.c \
dm.c \
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/backend/session.c kdebase-3.5.8.dfsg.1.new/kdm/backend/session.c
---- kdebase-3.5.8.dfsg.1/kdm/backend/session.c 2007-12-26 14:41:34.000000000 +0100
-+++ kdebase-3.5.8.dfsg.1.new/kdm/backend/session.c 2007-12-26 14:41:46.000000000 +0100
-@@ -45,6 +45,10 @@
- #include <ctype.h>
- #include <signal.h>
+--- a/kdm/backend/client.c
++++ b/kdm/backend/client.c
+@@ -82,6 +82,10 @@
+ # include <shadow.h>
+ #endif
+#ifdef WITH_CONSOLE_KIT
+#include "consolekit.h"
+#endif
+
- struct display *td;
- const char *td_setup = "auto";
+ /*
+ * Session data, mostly what struct verify_info was for
+ */
+@@ -1120,8 +1124,13 @@
+ static int removeCreds;
+ #endif
-@@ -531,6 +535,10 @@
- volatile int clientPid = 0;
- volatile Time_t tdiff = 0;
-
+#ifdef WITH_CONSOLE_KIT
-+ char *ck_session_cookie;
-+#endif
-+
- td = d;
- Debug( "ManageSession %s\n", d->name );
- if ((ex = Setjmp( abortSession ))) {
-@@ -626,7 +634,12 @@
- if (td_setup)
- SetupDisplay( td_setup );
-
-+#ifdef WITH_CONSOLE_KIT
-+ ck_session_cookie = open_ck_session (getpwnam(curuser), d);
-+ if (!(clientPid = StartClient(ck_session_cookie))) {
++int
++StartClient( const char *ck_session_cookie )
+#else
- if (!(clientPid = StartClient())) {
+ int
+ StartClient()
+#endif
- LogError( "Client start failed\n" );
- SessionExit( EX_NORMAL ); /* XXX maybe EX_REMANAGE_DPY? -- enable in dm.c! */
- }
-@@ -648,6 +661,14 @@
- catchTerm( SIGTERM );
- }
- }
-+
+ {
+ const char *home, *sessargs, *desksess;
+ char **env, *xma;
+@@ -1217,6 +1226,11 @@
+ if (krbtkfile[0] != '\0')
+ env = setEnv( env, "KRBTKFILE", krbtkfile );
+ #endif
+#ifdef WITH_CONSOLE_KIT
+ if (ck_session_cookie != NULL) {
-+ close_ck_session (ck_session_cookie);
-+ free (ck_session_cookie);
++ env = setEnv ( env, "XDG_SESSION_COOKIE", ck_session_cookie );
+ }
+#endif
-+
- /*
- * Sometimes the Xsession somehow manages to exit before
- * a server crash is noticed - so we sleep a bit and wait
-diff -Nur kdebase-3.5.8.dfsg.1/kdm/configure.in.in kdebase-3.5.8.dfsg.1.new/kdm/configure.in.in
---- kdebase-3.5.8.dfsg.1/kdm/configure.in.in 2006-01-19 18:03:15.000000000 +0100
-+++ kdebase-3.5.8.dfsg.1.new/kdm/configure.in.in 2007-12-26 14:41:43.000000000 +0100
-@@ -240,4 +240,51 @@
- AC_DEFINE(WITH_KDM_XCONSOLE, 1, [Build kdm with built-in xconsole])
- fi
-
-+########### Check for DBus
-+
-+ AC_MSG_CHECKING(for DBus)
-+
-+ dbus_inc=NOTFOUND
-+ dbus_lib=NOTFOUND
-+ dbus=NOTFOUND
-+
-+ search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
-+ AC_FIND_FILE(dbus/dbus.h, $search_incs, dbus_incdir)
-+
-+ search_incs_arch_deps="$kde_includes $kde_extra_includes /usr/lib$kdelibsuff/dbus-1.0/include /usr/local/lib$kdelibsuff/dbus-1.0/include"
-+ AC_FIND_FILE(dbus/dbus-arch-deps.h, $search_incs_arch_deps, dbus_incdir_arch_deps)
-+
-+ if test -r $dbus_incdir/dbus/dbus.h && test -r $dbus_incdir_arch_deps/dbus/dbus-arch-deps.h ; then
-+ DBUS_INCS="-I$dbus_incdir -I$dbus_incdir_arch_deps"
-+ dbus_inc=FOUND
-+ fi
-+
-+ search_libs="$kde_libraries $kde_extra_libs /usr/lib$kdelibsuff /usr/local/lib$kdelibsuff"
-+ AC_FIND_FILE(libdbus-1.so, $search_libs, dbus_libdir)
-+
-+ if test -r $dbus_libdir/libdbus-1.so ; then
-+ DBUS_LIBS="-L$dbus_libdir -ldbus-1"
-+ dbus_lib=FOUND
-+ fi
-+
-+ if test $dbus_inc != FOUND || test $dbus_lib != FOUND ; then
-+ KDE_PKG_CHECK_MODULES( DBUS, "dbus-1", [ DBUS_INCS=$DBUS_CFLAGS; dbus_inc=FOUND; dbus_lib=FOUND; ] , AC_MSG_RESULT( Nothing found on PKG_CONFIG_PATH ) )
-+ fi
-+
-+ dbus_bus_var=`pkg-config --variable=system_bus_default_address dbus-1 2>/dev/null`
-+ if test -z "$dbus_bus_var"; then
-+ dbus_bus_var="unix:path=/var/run/dbus/system_bus_socket"
-+ fi
-+ AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS, "$dbus_bus_var", [Define the unix domain path for dbus system bus])
-+
-+ if test $dbus_inc = FOUND && test $dbus_lib = FOUND ; then
-+ AC_MSG_RESULT(headers $DBUS_INCS libraries $DBUS_LIBS)
-+ dbus=FOUND
-+ else
-+ AC_MSG_RESULT(searched but not found)
-+ fi
-+
-+ AC_SUBST(DBUS_INCS)
-+ AC_SUBST(DBUS_LIBS)
-+
- dnl AC_OUTPUT(kdm/kfrontend/sessions/kde.desktop)
+ userEnviron = inheritEnv( env, envvars );
+ env = systemEnv( p->pw_name );
+ systemEnviron = setEnv( env, "HOME", p->pw_dir );
More information about the pkg-kde-commits
mailing list