From fd7576910e164846f98ba8d484421e968c4453f0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 24 Oct 2010 21:56:57 +0200 Subject: [PATCH] gdm: update to 2.32.0. --- .../gdm/patches/gdm-vt-allocation-hack.patch | 118 ++++++++++++++++++ srcpkgs/gdm/template | 8 +- 2 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/gdm/patches/gdm-vt-allocation-hack.patch diff --git a/srcpkgs/gdm/patches/gdm-vt-allocation-hack.patch b/srcpkgs/gdm/patches/gdm-vt-allocation-hack.patch new file mode 100644 index 0000000000..184223d257 --- /dev/null +++ b/srcpkgs/gdm/patches/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 +--- daemon/gdm-server.c.old ++++ daemon/gdm-server.c +@@ -33,6 +33,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -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; diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template index 4d2de892d5..a91af2c919 100644 --- a/srcpkgs/gdm/template +++ b/srcpkgs/gdm/template @@ -1,7 +1,7 @@ # Template file for 'gdm' pkgname=gdm -version=2.30.2 -distfiles="${GNOME_SITE}/$pkgname/2.30/$pkgname-$version.tar.bz2" +version=2.32.0 +distfiles="${GNOME_SITE}/$pkgname/2.32/$pkgname-$version.tar.bz2" build_style=gnu_configure configure_args="--disable-schemas-install --disable-scrollkeeper --with-gconf-schema-file-dir=/usr/share/gconf/schemas @@ -10,7 +10,7 @@ configure_args="--disable-schemas-install --disable-scrollkeeper --with-user=gdm --with-group=gdm --with-xevie" short_desc="GNOME Display Manager" maintainer="Juan RP " -checksum=884f4816a78f8f1eece8f1468f19dc01c5350d4a3513d3c0e854f45f870c1ec5 +checksum=f47acd19ed10d6fbb37c3e2b54f5b392c7020db67f71db3f75567ead30ab2fa4 long_desc=" GDM is the GNOME Display Manager, it is the little proggie that runs in the background, runs your X sessions, presents you with a login box @@ -49,6 +49,8 @@ Add_dependency run libgnomecanvas Add_dependency run libgnome Add_dependency run popt Add_dependency run libart +Add_dependency run libpng +Add_dependency run gdk-pixbuf Add_dependency run gtk+ Add_dependency run atk Add_dependency run pango