pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gdm GDM is "special". If automatic VT allocation i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc903403abc4
branches:  trunk
changeset: 550529:dc903403abc4
user:      jmcneill <jmcneill%pkgsrc.org@localhost>
date:      Sun Nov 23 22:06:49 2008 +0000

description:
GDM is "special". If automatic VT allocation is not enabled, in order to
determine the VT it is using it will attempt to parse the X server's log
file looking for the string 'using VT number '. If GDM doesn't know what
VT it's using, it is unable to pass that information to ConsoleKit, so the
session is treated as always inactive.

Enable automatic VT allocation by default, and piggyback on the Linux/SunOS
VT switching code using wsdisplay usl emulation for NetBSD.

Also, PKGREVISION++

diffstat:

 x11/gdm/Makefile         |   6 ++-
 x11/gdm/distinfo         |   5 ++-
 x11/gdm/patches/patch-ar |  16 +++++++++
 x11/gdm/patches/patch-as |  15 +++++++++
 x11/gdm/patches/patch-at |  78 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 117 insertions(+), 3 deletions(-)

diffs (160 lines):

diff -r 6ae502f18f66 -r dc903403abc4 x11/gdm/Makefile
--- a/x11/gdm/Makefile  Sun Nov 23 21:54:15 2008 +0000
+++ b/x11/gdm/Makefile  Sun Nov 23 22:06:49 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.147 2008/11/23 02:24:36 jmcneill Exp $
+# $NetBSD: Makefile,v 1.148 2008/11/23 22:06:49 jmcneill Exp $
 #
 
 DISTNAME=      gdm-2.20.7
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    x11 gnome
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/gdm/2.20/}
 EXTRACT_SUFX=  .tar.bz2
@@ -72,6 +72,8 @@
 SUBST_SED.desktop+=    -e 's|^User=gdm$$|User=${GDMOWN}|g'
 SUBST_SED.desktop+=    -e 's|^Group=gdm$$|Group=${GDMGRP}|g'
 SUBST_SED.desktop+=    -e 's|^\#GtkTheme=.*$$|GtkTheme=Clearlooks|g'
+SUBST_SED.desktop+=    -e 's|^\#FirstVT=.*$$|FirstVT=5|g'
+SUBST_SED.desktop+=    -e 's|^\#VTAllocation=.*$$|VTAllocation=true|g'
 .if ${OPSYS} == "NetBSD"
 SUBST_SED.desktop+=    -e 's|^\#Logo=.*$$|Logo=${PREFIX}/share/pixmaps/NetBSD.xpm|g'
 .endif
diff -r 6ae502f18f66 -r dc903403abc4 x11/gdm/distinfo
--- a/x11/gdm/distinfo  Sun Nov 23 21:54:15 2008 +0000
+++ b/x11/gdm/distinfo  Sun Nov 23 22:06:49 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.57 2008/07/16 20:13:29 drochner Exp $
+$NetBSD: distinfo,v 1.58 2008/11/23 22:06:49 jmcneill Exp $
 
 SHA1 (gdm-2.20.7.tar.bz2) = 349a5a2e60a3e2e229afe99e1342f75e321e53e9
 RMD160 (gdm-2.20.7.tar.bz2) = 1b9321a81aa5984e76715fec9ce7e01f161b8bcb
@@ -12,3 +12,6 @@
 SHA1 (patch-ao) = 70aead2c0452a99a1036c07f22c5641e8cdc092c
 SHA1 (patch-ap) = 2fc5050893ef7794b84a66d107b90e14c79015cc
 SHA1 (patch-aq) = 4417636865d45212a7fd9ad33d907eb8916a95b7
+SHA1 (patch-ar) = 9783e336cd11b34e990291c25f0b70752edec012
+SHA1 (patch-as) = 13135a44949dac9ff23be4c8efb15baffd18b58b
+SHA1 (patch-at) = 4be192597cf1bb129e5b69f27d9d388bcd00b4e0
diff -r 6ae502f18f66 -r dc903403abc4 x11/gdm/patches/patch-ar
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gdm/patches/patch-ar  Sun Nov 23 22:06:49 2008 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ar,v 1.3 2008/11/23 22:06:49 jmcneill Exp $
+
+--- daemon/gdmconsolekit.c.orig        2008-11-23 14:20:12.000000000 -0500
++++ daemon/gdmconsolekit.c     2008-11-23 14:21:02.000000000 -0500
+@@ -457,7 +457,11 @@
+               char *device;
+ 
+               /* FIXME: how does xorg construct this */
++#ifdef __NetBSD__
++              device = g_strdup_printf ("/dev/ttyE%d", d->vt - 1);
++#else
+               device = g_strdup_printf ("/dev/tty%d", d->vt);
++#endif
+               add_param_string (&iter_struct, "x11-display-device", device);
+               g_free (device);
+       }
diff -r 6ae502f18f66 -r dc903403abc4 x11/gdm/patches/patch-as
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gdm/patches/patch-as  Sun Nov 23 22:06:49 2008 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-as,v 1.1 2008/11/23 22:06:49 jmcneill Exp $
+
+--- daemon/getvt.h.orig        2008-11-23 16:08:55.000000000 -0500
++++ daemon/getvt.h     2008-11-23 16:09:13.000000000 -0500
+@@ -31,6 +31,10 @@
+ #define GDM_USE_CONSIO_VT
+ #endif
+ 
++#if defined(__NetBSD__)
++#define GDM_USE_WSCONS_VT
++#endif
++
+ /* gets an argument we should pass to the X server, on
+  * linux for example we get the first empty vt (higher than
+  * or equal to GDM_KEY_FIRST_VT) and then return vt<number>
diff -r 6ae502f18f66 -r dc903403abc4 x11/gdm/patches/patch-at
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gdm/patches/patch-at  Sun Nov 23 22:06:49 2008 +0000
@@ -0,0 +1,78 @@
+$NetBSD: patch-at,v 1.1 2008/11/23 22:06:49 jmcneill Exp $
+
+--- daemon/getvt.c.orig        2008-06-30 13:53:13.000000000 -0400
++++ daemon/getvt.c     2008-11-23 16:21:46.000000000 -0500
+@@ -107,6 +107,8 @@ gdm_get_current_vtnum (Display *display)
+ 
+ #if defined (GDM_USE_SYS_VT)
+ #include <sys/vt.h>
++#elif defined (GDM_USE_WSCONS_VT)
++#include <dev/wscons/wsdisplay_usl_io.h>
+ #elif defined (GDM_USE_CONSIO_VT)
+ #include <sys/consio.h>
+ 
+@@ -139,12 +141,14 @@ gdm_get_vt_device (int vtno)
+ #endif
+ #elif defined (GDM_USE_CONSIO_VT)
+      vtname = g_strdup_printf ("/dev/ttyv%s", __itovty (vtno - 1));
++#elif defined (GDM_USE_WSCONS_VT)
++     vtname = g_strdup_printf ("/dev/ttyE%d", vtno - 1);
+ #endif
+ 
+    return vtname;
+ }
+ 
+-#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_CONSIO_VT)
++#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_CONSIO_VT) || defined(GDM_USE_WSCONS_VT)
+ 
+ #ifdef __sun
+ #define GDMCONSOLEDEVICE "/dev/vt/0"
+@@ -175,7 +179,7 @@ open_vt (int vtno)
+       return fd;
+ }
+ 
+-#if defined (GDM_USE_SYS_VT)
++#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_WSCONS_VT)
+ 
+ static int 
+ get_free_vt_sys (int *vtfd)
+@@ -295,7 +299,7 @@ gdm_get_empty_vt_argument (int *fd, int 
+               return NULL;
+       }
+ 
+-#if defined (GDM_USE_SYS_VT)
++#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_WSCONS_VT)
+       *vt = get_free_vt_sys (fd);
+ #elif defined (GDM_USE_CONSIO_VT)
+       *vt = get_free_vt_consio (fd);
+@@ -337,7 +341,7 @@ gdm_change_vt (int vt)
+ int
+ gdm_get_current_vt (void)
+ {
+-#if defined (GDM_USE_SYS_VT)
++#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_WSCONS_VT)
+       struct vt_stat s;
+ #elif defined (GDM_USE_CONSIO_VT)
+       int vtno;
+@@ -355,7 +359,7 @@ gdm_get_current_vt (void)
+       } while G_UNLIKELY (errno == EINTR);
+       if (fd < 0)
+               return -1;
+-#if defined (GDM_USE_SYS_VT)
++#if defined (GDM_USE_SYS_VT) || defined (GDM_USE_WSCONS_VT)
+       ioctl (fd, VT_GETSTATE, &s);
+ 
+       VE_IGNORE_EINTR (close (fd));
+@@ -383,9 +387,9 @@ VE_IGNORE_EINTR (close (fd));
+ #endif
+ }
+ 
+-#else /* GDM_USE_SYS_VT || GDM_USE_CONSIO_VT - Here this is just
+-       * a stub, we do not know how to support this on other
+-       * platforms
++#else /* GDM_USE_SYS_VT || GDM_USE_CONSIO_VT || GDM_USE_WSCONS_VT -
++       * Here this is just a stub, we do not know how to support
++       * this on other platforms
+        */
+ 
+ char *



Home | Main Index | Thread Index | Old Index