[arch-commits] Commit in xorg-xdm/repos (14 files)

Dave Reisner dreisner at archlinux.org
Wed Jul 4 13:21:33 UTC 2012


    Date: Wednesday, July 4, 2012 @ 09:21:33
  Author: dreisner
Revision: 162974

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  xorg-xdm/repos/testing-i686/
  xorg-xdm/repos/testing-i686/PKGBUILD
    (from rev 162972, xorg-xdm/trunk/PKGBUILD)
  xorg-xdm/repos/testing-i686/Xsession-loginshell.patch
    (from rev 162972, xorg-xdm/trunk/Xsession-loginshell.patch)
  xorg-xdm/repos/testing-i686/Xsession-xsm.patch
    (from rev 162972, xorg-xdm/trunk/Xsession-xsm.patch)
  xorg-xdm/repos/testing-i686/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch
    (from rev 162972, xorg-xdm/trunk/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch)
  xorg-xdm/repos/testing-i686/xdm-consolekit.patch
    (from rev 162972, xorg-xdm/trunk/xdm-consolekit.patch)
  xorg-xdm/repos/testing-i686/xdm.pam
    (from rev 162972, xorg-xdm/trunk/xdm.pam)
  xorg-xdm/repos/testing-x86_64/
  xorg-xdm/repos/testing-x86_64/PKGBUILD
    (from rev 162972, xorg-xdm/trunk/PKGBUILD)
  xorg-xdm/repos/testing-x86_64/Xsession-loginshell.patch
    (from rev 162972, xorg-xdm/trunk/Xsession-loginshell.patch)
  xorg-xdm/repos/testing-x86_64/Xsession-xsm.patch
    (from rev 162972, xorg-xdm/trunk/Xsession-xsm.patch)
  xorg-xdm/repos/testing-x86_64/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch
    (from rev 162972, xorg-xdm/trunk/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch)
  xorg-xdm/repos/testing-x86_64/xdm-consolekit.patch
    (from rev 162972, xorg-xdm/trunk/xdm-consolekit.patch)
  xorg-xdm/repos/testing-x86_64/xdm.pam
    (from rev 162972, xorg-xdm/trunk/xdm.pam)

-----------------------------------------------------------+
 testing-i686/PKGBUILD                                     |   64 +++
 testing-i686/Xsession-loginshell.patch                    |   15 
 testing-i686/Xsession-xsm.patch                           |   22 +
 testing-i686/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch   |    8 
 testing-i686/xdm-consolekit.patch                         |  225 ++++++++++++
 testing-i686/xdm.pam                                      |   10 
 testing-x86_64/PKGBUILD                                   |   64 +++
 testing-x86_64/Xsession-loginshell.patch                  |   15 
 testing-x86_64/Xsession-xsm.patch                         |   22 +
 testing-x86_64/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch |    8 
 testing-x86_64/xdm-consolekit.patch                       |  225 ++++++++++++
 testing-x86_64/xdm.pam                                    |   10 
 12 files changed, 688 insertions(+)

Copied: xorg-xdm/repos/testing-i686/PKGBUILD (from rev 162972, xorg-xdm/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Alexander Baldeck <alexander at archlinux.org>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+pkgname=xorg-xdm
+pkgver=1.1.11
+pkgrel=3
+pkgdesc="X Display Manager"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('pam' 'libxaw' 'libxinerama' 'xorg-xrdb' 'xorg-sessreg' 'libxft' 'consolekit')
+makedepends=('pkgconfig' 'xorg-util-macros' 'systemd' 'xtrans')
+backup=(etc/X11/xdm/Xaccess etc/X11/xdm/Xresources etc/X11/xdm/Xservers etc/X11/xdm/xdm-config etc/pam.d/xdm etc/X11/xdm/Xsetup_0 etc/X11/xdm/Xsession)
+options=('!libtool')
+source=(${url}/releases/individual/app/xdm-${pkgver}.tar.bz2
+        Xsession-loginshell.patch
+        Xsession-xsm.patch
+        xdm-consolekit.patch
+        xdm-1.0.5-sessreg-utmp-fix-bug177890.patch
+        xdm.pam)
+md5sums=('64a1af1f7eb69feae12e75d4cc3aaf19'
+         '234ae568e7b22cbc09433bb396ff3d80'
+         '2c30078c50bc653d72eb5114506eb313'
+         '25c6d8adeed0796d432b2bbf1d83a7e9'
+         '13032add23a0a8d48a638418094bfc00'
+         '6de9362b1bf0835026270b20d8029909')
+sha256sums=('d4da426ddea0124279a3f2e00a26db61944690628ee818a64df9d27352081c47'
+            'fd3e7c20837b42a8ab111369fd6dc9612f9edb91c1f6904cca1d6a1fa3cfa0ff'
+            '77a1ce9bdf363591b72798db08b4df3589bd4e64737fd32cf9028f9245450edb'
+            '10ce850e6a93c6ba68b5d71104b1fd6680ad9760274068512f43a694b1edda76'
+            '5f380a2d6f77feb910d77f7f6843fce9b00ff7610c159fc029ee44cc6c23a48a'
+            '7d6818a1c1a44e9bd38774c035e03b0b831f6646681bc2bf556761aec7baf418')
+
+build() {
+  cd "${srcdir}/xdm-${pkgver}"
+  patch -Np0 -i "${srcdir}/Xsession-loginshell.patch"
+  patch -Np1 -i "${srcdir}/Xsession-xsm.patch"
+  patch -Np1 -i "${srcdir}/xdm-consolekit.patch"
+  patch -Np0 -i "${srcdir}/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch"
+
+  autoreconf -fi
+  ./configure --prefix=/usr \
+      --disable-xdm-auth \
+      --disable-static \
+      --with-xdmconfigdir=/etc/X11/xdm \
+      --with-xdmscriptdir=/etc/X11/xdm \
+      --with-pixmapdir=/usr/share/xdm/pixmaps
+  make
+}
+
+package() {
+  cd "${srcdir}/xdm-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  install -m755 -d "${pkgdir}/var/lib/xdm"
+  install -m755 -d "${pkgdir}/etc/pam.d"
+  install -m644 "${srcdir}/xdm.pam" "${pkgdir}/etc/pam.d/xdm"
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+  sed -i -e 's/\/X11R6//g' "${pkgdir}"/etc/X11/xdm/*
+
+  sed -i 's|^Alias=.*|Alias=display-manager.service|' \
+    "$pkgdir/usr/lib/systemd/system/xdm.service"
+}

Copied: xorg-xdm/repos/testing-i686/Xsession-loginshell.patch (from rev 162972, xorg-xdm/trunk/Xsession-loginshell.patch)
===================================================================
--- testing-i686/Xsession-loginshell.patch	                        (rev 0)
+++ testing-i686/Xsession-loginshell.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,15 @@
+--- config/Xsession.cpp.orig	2008-06-21 13:57:36.000000000 +0000
++++ config/Xsession.cpp	2008-06-21 14:01:25.000000000 +0000
+@@ -56,11 +56,7 @@
+ resources=$HOME/.Xresources
+ 
+ if [ -s "$startup" ]; then
+-	if [ -x "$startup" ]; then
+-		exec "$startup"
+-	else
+-		exec /bin/sh "$startup"
+-	fi
++	exec /bin/sh -ls -c "$startup"
+ else
+ 	if [ -r "$resources" ]; then
+ 		BINDIR/xrdb -load "$resources"

Copied: xorg-xdm/repos/testing-i686/Xsession-xsm.patch (from rev 162972, xorg-xdm/trunk/Xsession-xsm.patch)
===================================================================
--- testing-i686/Xsession-xsm.patch	                        (rev 0)
+++ testing-i686/Xsession-xsm.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,22 @@
+diff -Naur xdm-1.1.8-orig/config/Xsession.cpp xdm-1.1.8/config/Xsession.cpp
+--- xdm-1.1.8-orig/config/Xsession.cpp	2008-05-21 14:08:45.000000000 -0400
++++ xdm-1.1.8/config/Xsession.cpp	2009-04-28 02:56:11.000000000 -0400
+@@ -54,6 +54,7 @@
+ 
+ startup=$HOME/.xsession
+ resources=$HOME/.Xresources
++xinitrc=$HOME/.xinitrc
+ 
+ if [ -s "$startup" ]; then
+ 	if [ -x "$startup" ]; then
+@@ -83,5 +84,9 @@
+                 exec `eval $XDESKTOP`
+         }
+ #endif
+-	exec BINDIR/xsm
++	if [ -r "$xinitrc" ]; then
++		exec /bin/sh -ls -c "$xinitrc"
++	else
++		exec /bin/sh -l /etc/X11/xinit/xinitrc
++        fi
+ fi

Copied: xorg-xdm/repos/testing-i686/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch (from rev 162972, xorg-xdm/trunk/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch)
===================================================================
--- testing-i686/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch	                        (rev 0)
+++ testing-i686/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,8 @@
+--- config/GiveConsole.sessreg-utmp-fix-bug177890	2006-07-24 04:20:10.000000000 -0400
++++ config/GiveConsole	2006-07-24 04:21:16.000000000 -0400
+@@ -8,3 +8,5 @@
+ # causing serious grief.
+ #
+ chown $USER /dev/console
++exec /usr/bin/sessreg  -a -w "/var/log/wtmp" -u "/run/utmp" \
++        -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER

Copied: xorg-xdm/repos/testing-i686/xdm-consolekit.patch (from rev 162972, xorg-xdm/trunk/xdm-consolekit.patch)
===================================================================
--- testing-i686/xdm-consolekit.patch	                        (rev 0)
+++ testing-i686/xdm-consolekit.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,225 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -362,6 +362,20 @@
+ 
+ AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes)
+ 
++# ConsoleKit support
++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]),
++	[USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes])
++if test x"$USE_CONSOLEKIT" != xno; then
++	PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector,
++		[USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no])
++	if test x"$USE_CONSOLEKIT" = xyes; then
++		AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit])
++		XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT"
++		XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS"
++	fi
++fi
++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes)
++
+ #
+ #  XDM
+ #
+--- a/xdm/session.c
++++ b/xdm/session.c
+@@ -66,6 +66,11 @@
+ #endif
+ #endif /* USE_PAM */
+ 
++#ifdef USE_CONSOLEKIT
++#include <ck-connector.h>
++#include <dbus/dbus.h>
++#endif
++
+ #ifdef __SCO__
+ #include <prot.h>
+ #endif
+@@ -472,6 +477,97 @@
+     }
+ }
+ 
++#ifdef USE_CONSOLEKIT
++
++static CkConnector *connector;
++
++static int openCKSession(struct verify_info *verify, struct display *d)
++{
++    int ret;
++    DBusError error;
++    char  *remote_host_name = "";
++    dbus_bool_t is_local;
++    char *display_name = "";
++    char *display_device = "";
++    char devtmp[16];
++
++    if (!use_consolekit)
++	return 1;
++
++    is_local = d->displayType.location == Local;
++    if (d->peerlen > 0 && d->peer)
++	remote_host_name = d->peer;
++    if (d->name)
++	display_name = d->name;
++    /* how can we get the corresponding tty at best...? */
++    if (d->windowPath) {
++	display_device = strchr(d->windowPath, ':');
++	if (display_device && display_device[1])
++	    display_device++;
++	else
++	    display_device = d->windowPath;
++	snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device);
++	display_device = devtmp;
++    }
++
++    connector = ck_connector_new();
++    if (!connector) {
++	LogOutOfMem("ck_connector");
++	return 0;
++    }
++
++    dbus_error_init(&error);
++    ret = ck_connector_open_session_with_parameters(
++		connector, &error,
++		"unix-user", &verify->uid,
++		"x11-display", &display_name,
++		"x11-display-device", &display_device,
++		"remote-host-name", &remote_host_name,
++		"is-local", &is_local,
++		NULL);
++    if (!ret) {
++	if (dbus_error_is_set(&error)) {
++	    LogError("Dbus error: %s\n", error.message);
++	    dbus_error_free(&error);
++	} else {
++	    LogError("ConsoleKit error\n");
++	}
++	LogError("console-kit-daemon not running?\n");
++	ck_connector_unref(connector);
++	connector = NULL;
++	return 1;
++    }
++
++    verify->userEnviron = setEnv(verify->userEnviron,
++		"XDG_SESSION_COOKIE", ck_connector_get_cookie(connector));
++    return 1;
++}
++
++static void closeCKSession(void)
++{
++    DBusError error;
++
++    if (!connector)
++	return;
++
++    dbus_error_init(&error);
++    if (!ck_connector_close_session(connector, &error)) {
++	if (dbus_error_is_set(&error)) {
++	    LogError("Dbus error: %s\n", error.message);
++	    dbus_error_free(&error);
++	} else {
++	    LogError("ConsoleKit close error\n");
++	}
++	LogError("console-kit-daemon not running?\n");
++    }
++    ck_connector_unref(connector);
++    connector = NULL;
++}
++#else
++#define openCKSession(v,d)	1
++#define closeCKSession()
++#endif
++
+ void
+ SessionExit (struct display *d, int status, int removeAuth)
+ {
+@@ -486,6 +580,8 @@
+     }
+ #endif
+ 
++    closeCKSession();
++
+     /* make sure the server gets reset after the session is over */
+     if (d->serverPid >= 2 && d->resetSignal)
+ 	kill (d->serverPid, d->resetSignal);
+@@ -568,6 +664,10 @@
+ #ifdef USE_PAM
+     if (pamh) pam_open_session(pamh, 0);
+ #endif
++
++    if (!openCKSession(verify, d))
++	return 0;
++
+     switch (pid = fork ()) {
+     case 0:
+ 	CleanUpChild ();
+--- a/include/dm.h
++++ b/include/dm.h
+@@ -325,6 +325,9 @@
+ extern char	*prngdSocket;
+ extern int	prngdPort;
+ # endif
++#ifdef USE_CONSOLEKIT
++extern int	use_consolekit;
++#endif
+ 
+ extern char	*greeterLib;
+ extern char	*willing;
+--- a/xdm/resource.c
++++ b/xdm/resource.c
+@@ -68,6 +68,9 @@
+ char	*prngdSocket;
+ int	prngdPort;
+ #endif
++#ifdef USE_CONSOLEKIT
++int	use_consolekit;
++#endif
+ 
+ char	*greeterLib;
+ char	*willing;
+@@ -258,6 +261,10 @@
+ 				"false"} ,
+ { "willing",	"Willing",	DM_STRING,	&willing,
+ 				""} ,
++#ifdef USE_CONSOLEKIT
++{ "consoleKit",	"ConsoleKit",	DM_BOOL,	(char **) &use_consolekit,
++				"true"} ,
++#endif
+ };
+ 
+ # define NUM_DM_RESOURCES	(sizeof DmResources / sizeof DmResources[0])
+@@ -440,7 +447,11 @@
+ {"-debug",	"*debugLevel",		XrmoptionSepArg,	(caddr_t) NULL },
+ {"-xrm",	NULL,			XrmoptionResArg,	(caddr_t) NULL },
+ {"-daemon",	".daemonMode",		XrmoptionNoArg,		"true"         },
+-{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        }
++{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        },
++#ifdef USE_CONSOLEKIT
++{"-consolekit",	".consoleKit",		XrmoptionNoArg,		"true"  },
++{"-noconsolekit", ".consoleKit",	XrmoptionNoArg,		"false" }
++#endif
+ };
+ 
+ static int	originalArgc;
+--- a/man/xdm.man
++++ b/man/xdm.man
+@@ -51,6 +51,8 @@
+ ] [
+ .B \-session
+ .I session_program
++] [
++.B \-noconsolekit
+ ]
+ .SH DESCRIPTION
+ .I Xdm
+@@ -218,6 +220,10 @@
+ .IP "\fB\-xrm\fP \fIresource_specification\fP"
+ Allows an arbitrary resource to be specified, as in most
+ X Toolkit applications.
++.IP "\fB\-noconsolekit\fP"
++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP
++resource.
++This suppresses the session management using ConsoleKit.
+ .SH RESOURCES
+ At many stages the actions of
+ .I xdm

Copied: xorg-xdm/repos/testing-i686/xdm.pam (from rev 162972, xorg-xdm/trunk/xdm.pam)
===================================================================
--- testing-i686/xdm.pam	                        (rev 0)
+++ testing-i686/xdm.pam	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth		required	pam_unix.so
+auth		required	pam_nologin.so
+auth		required	pam_env.so
+account		required	pam_unix.so
+password	required	pam_unix.so
+session		required	pam_unix.so
+session		required	pam_limits.so
+session		required	pam_loginuid.so
+-session	optional	pam_systemd.so

Copied: xorg-xdm/repos/testing-x86_64/PKGBUILD (from rev 162972, xorg-xdm/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,64 @@
+# $Id$
+# Maintainer: Alexander Baldeck <alexander at archlinux.org>
+# Contributor: Jan de Groot <jgc at archlinux.org>
+pkgname=xorg-xdm
+pkgver=1.1.11
+pkgrel=3
+pkgdesc="X Display Manager"
+arch=(i686 x86_64)
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('pam' 'libxaw' 'libxinerama' 'xorg-xrdb' 'xorg-sessreg' 'libxft' 'consolekit')
+makedepends=('pkgconfig' 'xorg-util-macros' 'systemd' 'xtrans')
+backup=(etc/X11/xdm/Xaccess etc/X11/xdm/Xresources etc/X11/xdm/Xservers etc/X11/xdm/xdm-config etc/pam.d/xdm etc/X11/xdm/Xsetup_0 etc/X11/xdm/Xsession)
+options=('!libtool')
+source=(${url}/releases/individual/app/xdm-${pkgver}.tar.bz2
+        Xsession-loginshell.patch
+        Xsession-xsm.patch
+        xdm-consolekit.patch
+        xdm-1.0.5-sessreg-utmp-fix-bug177890.patch
+        xdm.pam)
+md5sums=('64a1af1f7eb69feae12e75d4cc3aaf19'
+         '234ae568e7b22cbc09433bb396ff3d80'
+         '2c30078c50bc653d72eb5114506eb313'
+         '25c6d8adeed0796d432b2bbf1d83a7e9'
+         '13032add23a0a8d48a638418094bfc00'
+         '6de9362b1bf0835026270b20d8029909')
+sha256sums=('d4da426ddea0124279a3f2e00a26db61944690628ee818a64df9d27352081c47'
+            'fd3e7c20837b42a8ab111369fd6dc9612f9edb91c1f6904cca1d6a1fa3cfa0ff'
+            '77a1ce9bdf363591b72798db08b4df3589bd4e64737fd32cf9028f9245450edb'
+            '10ce850e6a93c6ba68b5d71104b1fd6680ad9760274068512f43a694b1edda76'
+            '5f380a2d6f77feb910d77f7f6843fce9b00ff7610c159fc029ee44cc6c23a48a'
+            '7d6818a1c1a44e9bd38774c035e03b0b831f6646681bc2bf556761aec7baf418')
+
+build() {
+  cd "${srcdir}/xdm-${pkgver}"
+  patch -Np0 -i "${srcdir}/Xsession-loginshell.patch"
+  patch -Np1 -i "${srcdir}/Xsession-xsm.patch"
+  patch -Np1 -i "${srcdir}/xdm-consolekit.patch"
+  patch -Np0 -i "${srcdir}/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch"
+
+  autoreconf -fi
+  ./configure --prefix=/usr \
+      --disable-xdm-auth \
+      --disable-static \
+      --with-xdmconfigdir=/etc/X11/xdm \
+      --with-xdmscriptdir=/etc/X11/xdm \
+      --with-pixmapdir=/usr/share/xdm/pixmaps
+  make
+}
+
+package() {
+  cd "${srcdir}/xdm-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  install -m755 -d "${pkgdir}/var/lib/xdm"
+  install -m755 -d "${pkgdir}/etc/pam.d"
+  install -m644 "${srcdir}/xdm.pam" "${pkgdir}/etc/pam.d/xdm"
+  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+
+  sed -i -e 's/\/X11R6//g' "${pkgdir}"/etc/X11/xdm/*
+
+  sed -i 's|^Alias=.*|Alias=display-manager.service|' \
+    "$pkgdir/usr/lib/systemd/system/xdm.service"
+}

Copied: xorg-xdm/repos/testing-x86_64/Xsession-loginshell.patch (from rev 162972, xorg-xdm/trunk/Xsession-loginshell.patch)
===================================================================
--- testing-x86_64/Xsession-loginshell.patch	                        (rev 0)
+++ testing-x86_64/Xsession-loginshell.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,15 @@
+--- config/Xsession.cpp.orig	2008-06-21 13:57:36.000000000 +0000
++++ config/Xsession.cpp	2008-06-21 14:01:25.000000000 +0000
+@@ -56,11 +56,7 @@
+ resources=$HOME/.Xresources
+ 
+ if [ -s "$startup" ]; then
+-	if [ -x "$startup" ]; then
+-		exec "$startup"
+-	else
+-		exec /bin/sh "$startup"
+-	fi
++	exec /bin/sh -ls -c "$startup"
+ else
+ 	if [ -r "$resources" ]; then
+ 		BINDIR/xrdb -load "$resources"

Copied: xorg-xdm/repos/testing-x86_64/Xsession-xsm.patch (from rev 162972, xorg-xdm/trunk/Xsession-xsm.patch)
===================================================================
--- testing-x86_64/Xsession-xsm.patch	                        (rev 0)
+++ testing-x86_64/Xsession-xsm.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,22 @@
+diff -Naur xdm-1.1.8-orig/config/Xsession.cpp xdm-1.1.8/config/Xsession.cpp
+--- xdm-1.1.8-orig/config/Xsession.cpp	2008-05-21 14:08:45.000000000 -0400
++++ xdm-1.1.8/config/Xsession.cpp	2009-04-28 02:56:11.000000000 -0400
+@@ -54,6 +54,7 @@
+ 
+ startup=$HOME/.xsession
+ resources=$HOME/.Xresources
++xinitrc=$HOME/.xinitrc
+ 
+ if [ -s "$startup" ]; then
+ 	if [ -x "$startup" ]; then
+@@ -83,5 +84,9 @@
+                 exec `eval $XDESKTOP`
+         }
+ #endif
+-	exec BINDIR/xsm
++	if [ -r "$xinitrc" ]; then
++		exec /bin/sh -ls -c "$xinitrc"
++	else
++		exec /bin/sh -l /etc/X11/xinit/xinitrc
++        fi
+ fi

Copied: xorg-xdm/repos/testing-x86_64/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch (from rev 162972, xorg-xdm/trunk/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch)
===================================================================
--- testing-x86_64/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch	                        (rev 0)
+++ testing-x86_64/xdm-1.0.5-sessreg-utmp-fix-bug177890.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,8 @@
+--- config/GiveConsole.sessreg-utmp-fix-bug177890	2006-07-24 04:20:10.000000000 -0400
++++ config/GiveConsole	2006-07-24 04:21:16.000000000 -0400
+@@ -8,3 +8,5 @@
+ # causing serious grief.
+ #
+ chown $USER /dev/console
++exec /usr/bin/sessreg  -a -w "/var/log/wtmp" -u "/run/utmp" \
++        -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER

Copied: xorg-xdm/repos/testing-x86_64/xdm-consolekit.patch (from rev 162972, xorg-xdm/trunk/xdm-consolekit.patch)
===================================================================
--- testing-x86_64/xdm-consolekit.patch	                        (rev 0)
+++ testing-x86_64/xdm-consolekit.patch	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,225 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -362,6 +362,20 @@
+ 
+ AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes)
+ 
++# ConsoleKit support
++AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]),
++	[USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes])
++if test x"$USE_CONSOLEKIT" != xno; then
++	PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector,
++		[USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no])
++	if test x"$USE_CONSOLEKIT" = xyes; then
++		AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit])
++		XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT"
++		XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS"
++	fi
++fi
++dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes)
++
+ #
+ #  XDM
+ #
+--- a/xdm/session.c
++++ b/xdm/session.c
+@@ -66,6 +66,11 @@
+ #endif
+ #endif /* USE_PAM */
+ 
++#ifdef USE_CONSOLEKIT
++#include <ck-connector.h>
++#include <dbus/dbus.h>
++#endif
++
+ #ifdef __SCO__
+ #include <prot.h>
+ #endif
+@@ -472,6 +477,97 @@
+     }
+ }
+ 
++#ifdef USE_CONSOLEKIT
++
++static CkConnector *connector;
++
++static int openCKSession(struct verify_info *verify, struct display *d)
++{
++    int ret;
++    DBusError error;
++    char  *remote_host_name = "";
++    dbus_bool_t is_local;
++    char *display_name = "";
++    char *display_device = "";
++    char devtmp[16];
++
++    if (!use_consolekit)
++	return 1;
++
++    is_local = d->displayType.location == Local;
++    if (d->peerlen > 0 && d->peer)
++	remote_host_name = d->peer;
++    if (d->name)
++	display_name = d->name;
++    /* how can we get the corresponding tty at best...? */
++    if (d->windowPath) {
++	display_device = strchr(d->windowPath, ':');
++	if (display_device && display_device[1])
++	    display_device++;
++	else
++	    display_device = d->windowPath;
++	snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device);
++	display_device = devtmp;
++    }
++
++    connector = ck_connector_new();
++    if (!connector) {
++	LogOutOfMem("ck_connector");
++	return 0;
++    }
++
++    dbus_error_init(&error);
++    ret = ck_connector_open_session_with_parameters(
++		connector, &error,
++		"unix-user", &verify->uid,
++		"x11-display", &display_name,
++		"x11-display-device", &display_device,
++		"remote-host-name", &remote_host_name,
++		"is-local", &is_local,
++		NULL);
++    if (!ret) {
++	if (dbus_error_is_set(&error)) {
++	    LogError("Dbus error: %s\n", error.message);
++	    dbus_error_free(&error);
++	} else {
++	    LogError("ConsoleKit error\n");
++	}
++	LogError("console-kit-daemon not running?\n");
++	ck_connector_unref(connector);
++	connector = NULL;
++	return 1;
++    }
++
++    verify->userEnviron = setEnv(verify->userEnviron,
++		"XDG_SESSION_COOKIE", ck_connector_get_cookie(connector));
++    return 1;
++}
++
++static void closeCKSession(void)
++{
++    DBusError error;
++
++    if (!connector)
++	return;
++
++    dbus_error_init(&error);
++    if (!ck_connector_close_session(connector, &error)) {
++	if (dbus_error_is_set(&error)) {
++	    LogError("Dbus error: %s\n", error.message);
++	    dbus_error_free(&error);
++	} else {
++	    LogError("ConsoleKit close error\n");
++	}
++	LogError("console-kit-daemon not running?\n");
++    }
++    ck_connector_unref(connector);
++    connector = NULL;
++}
++#else
++#define openCKSession(v,d)	1
++#define closeCKSession()
++#endif
++
+ void
+ SessionExit (struct display *d, int status, int removeAuth)
+ {
+@@ -486,6 +580,8 @@
+     }
+ #endif
+ 
++    closeCKSession();
++
+     /* make sure the server gets reset after the session is over */
+     if (d->serverPid >= 2 && d->resetSignal)
+ 	kill (d->serverPid, d->resetSignal);
+@@ -568,6 +664,10 @@
+ #ifdef USE_PAM
+     if (pamh) pam_open_session(pamh, 0);
+ #endif
++
++    if (!openCKSession(verify, d))
++	return 0;
++
+     switch (pid = fork ()) {
+     case 0:
+ 	CleanUpChild ();
+--- a/include/dm.h
++++ b/include/dm.h
+@@ -325,6 +325,9 @@
+ extern char	*prngdSocket;
+ extern int	prngdPort;
+ # endif
++#ifdef USE_CONSOLEKIT
++extern int	use_consolekit;
++#endif
+ 
+ extern char	*greeterLib;
+ extern char	*willing;
+--- a/xdm/resource.c
++++ b/xdm/resource.c
+@@ -68,6 +68,9 @@
+ char	*prngdSocket;
+ int	prngdPort;
+ #endif
++#ifdef USE_CONSOLEKIT
++int	use_consolekit;
++#endif
+ 
+ char	*greeterLib;
+ char	*willing;
+@@ -258,6 +261,10 @@
+ 				"false"} ,
+ { "willing",	"Willing",	DM_STRING,	&willing,
+ 				""} ,
++#ifdef USE_CONSOLEKIT
++{ "consoleKit",	"ConsoleKit",	DM_BOOL,	(char **) &use_consolekit,
++				"true"} ,
++#endif
+ };
+ 
+ # define NUM_DM_RESOURCES	(sizeof DmResources / sizeof DmResources[0])
+@@ -440,7 +447,11 @@
+ {"-debug",	"*debugLevel",		XrmoptionSepArg,	(caddr_t) NULL },
+ {"-xrm",	NULL,			XrmoptionResArg,	(caddr_t) NULL },
+ {"-daemon",	".daemonMode",		XrmoptionNoArg,		"true"         },
+-{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        }
++{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        },
++#ifdef USE_CONSOLEKIT
++{"-consolekit",	".consoleKit",		XrmoptionNoArg,		"true"  },
++{"-noconsolekit", ".consoleKit",	XrmoptionNoArg,		"false" }
++#endif
+ };
+ 
+ static int	originalArgc;
+--- a/man/xdm.man
++++ b/man/xdm.man
+@@ -51,6 +51,8 @@
+ ] [
+ .B \-session
+ .I session_program
++] [
++.B \-noconsolekit
+ ]
+ .SH DESCRIPTION
+ .I Xdm
+@@ -218,6 +220,10 @@
+ .IP "\fB\-xrm\fP \fIresource_specification\fP"
+ Allows an arbitrary resource to be specified, as in most
+ X Toolkit applications.
++.IP "\fB\-noconsolekit\fP"
++Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP
++resource.
++This suppresses the session management using ConsoleKit.
+ .SH RESOURCES
+ At many stages the actions of
+ .I xdm

Copied: xorg-xdm/repos/testing-x86_64/xdm.pam (from rev 162972, xorg-xdm/trunk/xdm.pam)
===================================================================
--- testing-x86_64/xdm.pam	                        (rev 0)
+++ testing-x86_64/xdm.pam	2012-07-04 13:21:33 UTC (rev 162974)
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth		required	pam_unix.so
+auth		required	pam_nologin.so
+auth		required	pam_env.so
+account		required	pam_unix.so
+password	required	pam_unix.so
+session		required	pam_unix.so
+session		required	pam_limits.so
+session		required	pam_loginuid.so
+-session	optional	pam_systemd.so




More information about the arch-commits mailing list