summaryrefslogtreecommitdiff
path: root/gnome-unstable/gdm
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-28 23:14:32 +0000
committerroot <root@rshg054.dnsready.net>2011-09-28 23:14:32 +0000
commitf8db5d1487e8e0ceeb97a396e357c1540a047ed8 (patch)
tree7ad8dee5bda1fe535c9139770dc7316f9b780818 /gnome-unstable/gdm
parentccb9d72bbf1ee4f7a54113eac76a16b0b5014869 (diff)
Wed Sep 28 23:14:32 UTC 2011
Diffstat (limited to 'gnome-unstable/gdm')
-rw-r--r--gnome-unstable/gdm/PKGBUILD10
-rw-r--r--gnome-unstable/gdm/gdm-vt-allocation-hack.patch118
2 files changed, 125 insertions, 3 deletions
diff --git a/gnome-unstable/gdm/PKGBUILD b/gnome-unstable/gdm/PKGBUILD
index e7ce7f125..4cd728c8f 100644
--- a/gnome-unstable/gdm/PKGBUILD
+++ b/gnome-unstable/gdm/PKGBUILD
@@ -1,7 +1,7 @@
-# $Id: PKGBUILD 138396 2011-09-21 14:24:14Z ibiru $
+# $Id: PKGBUILD 138715 2011-09-27 17:37:42Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gdm
-pkgver=3.1.92
+pkgver=3.2.0
pkgrel=1
pkgdesc="Gnome Display Manager (a reimplementation of xdm)"
arch=('i686' 'x86_64')
@@ -17,10 +17,12 @@ optdepends=('gnome-shell: new login interface')
install=gdm.install
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz
fix_external_program_directories.patch
+ gdm-vt-allocation-hack.patch
gdm
gdm-autologin.pam gdm-fingerprint.pam gdm.pam gdm-password.pam gdm-smartcard.pam gdm-welcome.pam)
-sha256sums=('0cb9dd720b1d2782c9b5108f0d9778d64ee4f9a8825cfa11a44a1368f7850f03'
+sha256sums=('f827f5500827acef94ad2d60f02ec489bc35cb6392d8f4a60ec814599c2991b7'
'55654861b14fea344bc7a43fa265c9aaffcd16f5cf56360483fff5d4dc83cf15'
+ '3c8b588d4af08d94dc93bcd5e4c2a983c3f4fbbbe40833bceac2a1df4f1e8215'
'272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550'
'b30dfa217718b43ff3aa4e8af08985963175b79ff30698ec54e8396d2905922d'
'5bc3ff3ea7b31219dfcb7d9fc0eb2819eca1c5573a0f426d288a17560a69633e'
@@ -32,6 +34,7 @@ sha256sums=('0cb9dd720b1d2782c9b5108f0d9778d64ee4f9a8825cfa11a44a1368f7850f03'
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -Np1 -i "${srcdir}/fix_external_program_directories.patch"
+ patch -Np1 -i "${srcdir}/gdm-vt-allocation-hack.patch"
./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/gdm \
@@ -40,6 +43,7 @@ build() {
--disable-scrollkeeper \
--disable-static \
--without-tcp-wrappers
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
make
}
diff --git a/gnome-unstable/gdm/gdm-vt-allocation-hack.patch b/gnome-unstable/gdm/gdm-vt-allocation-hack.patch
new file mode 100644
index 000000000..56fa5a151
--- /dev/null
+++ b/gnome-unstable/gdm/gdm-vt-allocation-hack.patch
@@ -0,0 +1,118 @@
+diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
+index 39def47..03488fd 100644
+--- a/daemon/gdm-server.c
++++ b/daemon/gdm-server.c
+@@ -33,6 +33,8 @@
+ #include <grp.h>
+ #include <signal.h>
+ #include <sys/resource.h>
++#include <sys/ioctl.h>
++#include <sys/vt.h>
+
+ #include <glib.h>
+ #include <glib/gi18n.h>
+@@ -150,6 +152,92 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
+ return out;
+ }
+
++#ifndef O_NOCTTY
++# define O_NOCTTY 0
++#endif
++
++static int
++open_vt (int vtno)
++{
++ char *vtname;
++ int fd;
++
++ vtname = g_strdup_printf ("/dev/tty%d", vtno);
++
++ do {
++ errno = 0;
++ fd = open (vtname, O_RDWR | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ g_free (vtname);
++ return fd;
++}
++
++static gint
++find_first_probably_free_vt (void)
++{
++ int fd, fdv;
++ int vtno;
++ unsigned short vtmask;
++ struct vt_stat vtstat;
++ guint v_state;
++
++ fdv = -1;
++
++ do {
++ errno = 0;
++ fd = open ("/dev/console", O_WRONLY | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ if (fd >= 0) {
++ if (ioctl (fd, VT_GETSTATE, &vtstat) >= 0) {
++ v_state = vtstat.v_state;
++ } else {
++ close (fd);
++ v_state = 0;
++ fd = -1;
++ }
++ } else {
++ v_state = 0;
++ }
++
++ if (fd < 0) {
++ do {
++ errno = 0;
++ fd = open ("/dev/console", O_RDONLY | O_NOCTTY, 0);
++ } while (errno == EINTR);
++
++ if (fd >= 0) {
++ if (ioctl (fd, VT_GETSTATE, &vtstat) >= 0)
++ v_state = vtstat.v_state;
++ }
++ }
++
++ for (vtno = 7, vtmask = 1 << vtno; vtmask; vtno++, vtmask <<= 1) {
++ /* Is this console in use? */
++ if (v_state & vtmask)
++ continue;
++
++ /* No, try to open it */
++ fdv = open_vt (vtno);
++ if (fdv >= 0)
++ break;
++
++ /* If we're here, kernel indicated that the console was free,
++ * but we failed to open it. Just go on to higher VTs. */
++ }
++
++ if (fdv >= 0)
++ close (fdv);
++ else
++ vtno = -1;
++
++ if (fd >= 0)
++ close (fd);
++
++ return vtno;
++}
++
+ char *
+ gdm_server_get_display_device (GdmServer *server)
+ {
+@@ -310,6 +398,11 @@ gdm_server_resolve_command_line (GdmServer *server,
+
+ if (vtarg != NULL && ! gotvtarg) {
+ argv[len++] = g_strdup (vtarg);
++ } else if (!query_in_arglist && !gotvtarg) {
++ gint vtnum = find_first_probably_free_vt ();
++
++ if (vtnum > 0)
++ argv [len++] = g_strdup_printf ("vt%d", vtnum);
+ }
+
+ argv[len++] = NULL;