Date: Friday, September 2, 2011 @ 10:23:08 Author: ibiru Revision: 136868
archrelease: copy trunk to gnome-unstable-i686, gnome-unstable-x86_64 Added: gdm/repos/gnome-unstable-i686/ gdm/repos/gnome-unstable-i686/2.91_fix_external_program_directories.patch (from rev 136866, gdm/trunk/2.91_fix_external_program_directories.patch) gdm/repos/gnome-unstable-i686/PKGBUILD (from rev 136866, gdm/trunk/PKGBUILD) gdm/repos/gnome-unstable-i686/fix_external_program_directories.patch (from rev 136866, gdm/trunk/fix_external_program_directories.patch) gdm/repos/gnome-unstable-i686/gdm (from rev 136866, gdm/trunk/gdm) gdm/repos/gnome-unstable-i686/gdm-autologin.pam (from rev 136866, gdm/trunk/gdm-autologin.pam) gdm/repos/gnome-unstable-i686/gdm-vt-allocation-hack.patch (from rev 136866, gdm/trunk/gdm-vt-allocation-hack.patch) gdm/repos/gnome-unstable-i686/gdm.install (from rev 136866, gdm/trunk/gdm.install) gdm/repos/gnome-unstable-i686/gdm.pam (from rev 136866, gdm/trunk/gdm.pam) gdm/repos/gnome-unstable-x86_64/ gdm/repos/gnome-unstable-x86_64/2.91_fix_external_program_directories.patch (from rev 136866, gdm/trunk/2.91_fix_external_program_directories.patch) gdm/repos/gnome-unstable-x86_64/PKGBUILD (from rev 136866, gdm/trunk/PKGBUILD) gdm/repos/gnome-unstable-x86_64/fix_external_program_directories.patch (from rev 136866, gdm/trunk/fix_external_program_directories.patch) gdm/repos/gnome-unstable-x86_64/gdm (from rev 136866, gdm/trunk/gdm) gdm/repos/gnome-unstable-x86_64/gdm-autologin.pam (from rev 136867, gdm/trunk/gdm-autologin.pam) gdm/repos/gnome-unstable-x86_64/gdm-vt-allocation-hack.patch (from rev 136867, gdm/trunk/gdm-vt-allocation-hack.patch) gdm/repos/gnome-unstable-x86_64/gdm.install (from rev 136867, gdm/trunk/gdm.install) gdm/repos/gnome-unstable-x86_64/gdm.pam (from rev 136867, gdm/trunk/gdm.pam) -------------------------------------------------------------------+ gnome-unstable-i686/2.91_fix_external_program_directories.patch | 48 ++++ gnome-unstable-i686/PKGBUILD | 58 ++++ gnome-unstable-i686/fix_external_program_directories.patch | 24 ++ gnome-unstable-i686/gdm | 36 +++ gnome-unstable-i686/gdm-autologin.pam | 8 gnome-unstable-i686/gdm-vt-allocation-hack.patch | 118 ++++++++++ gnome-unstable-i686/gdm.install | 29 ++ gnome-unstable-i686/gdm.pam | 10 gnome-unstable-x86_64/2.91_fix_external_program_directories.patch | 48 ++++ gnome-unstable-x86_64/PKGBUILD | 58 ++++ gnome-unstable-x86_64/fix_external_program_directories.patch | 24 ++ gnome-unstable-x86_64/gdm | 36 +++ gnome-unstable-x86_64/gdm-autologin.pam | 8 gnome-unstable-x86_64/gdm-vt-allocation-hack.patch | 118 ++++++++++ gnome-unstable-x86_64/gdm.install | 29 ++ gnome-unstable-x86_64/gdm.pam | 10 16 files changed, 662 insertions(+) Copied: gdm/repos/gnome-unstable-i686/2.91_fix_external_program_directories.patch (from rev 136866, gdm/trunk/2.91_fix_external_program_directories.patch) =================================================================== --- gnome-unstable-i686/2.91_fix_external_program_directories.patch (rev 0) +++ gnome-unstable-i686/2.91_fix_external_program_directories.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,48 @@ +diff -Nur gdm-2.91.91.orig/daemon/gdm-server.c gdm-2.91.91/daemon/gdm-server.c +--- gdm-2.91.91.orig/daemon/gdm-server.c 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/daemon/gdm-server.c 2011-02-27 16:56:51.283347074 -0800 +@@ -131,7 +131,7 @@ + g_return_val_if_fail (GDM_IS_SERVER (server), NULL); + + error = NULL; +- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s", ++ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s", + server->priv->display_name); + + g_debug ("GdmServer: Running helper %s", command); +diff -Nur gdm-2.91.91.orig/data/greeter-autostart/gnome-settings-daemon.desktop.in.in gdm-2.91.91/data/greeter-autostart/gnome-settings-daemon.desktop.in.in +--- gdm-2.91.91.orig/data/greeter-autostart/gnome-settings-daemon.desktop.in.in 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/data/greeter-autostart/gnome-settings-daemon.desktop.in.in 2011-02-26 08:43:28.700009251 -0800 +@@ -1,8 +1,8 @@ + [Desktop Entry] + Type=Application + _Name=GNOME Settings Daemon +-TryExec=@LIBEXECDIR@/gnome-settings-daemon +-Exec=@LIBEXECDIR@/gnome-settings-daemon ++TryExec=/usr/bin/gnome-settings-daemon ++Exec=/usr/bin/gnome-settings-daemon + OnlyShowIn=GNOME; + X-GNOME-Autostart-Phase=Initialization + X-GNOME-Autostart-Notify=true +diff -Nur gdm-2.91.91.orig/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in gdm-2.91.91/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in +--- gdm-2.91.91.orig/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in 2011-02-26 08:44:06.810009153 -0800 +@@ -1,5 +1,5 @@ + [Desktop Entry] + Type=Application + _Name=PolicyKit Authentication Agent +-Exec=@LIBEXECDIR@/polkit-gnome-authentication-agent-1 ++Exec=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + OnlyShowIn=GNOME; +diff -Nur gdm-2.91.91.orig/gui/simple-chooser/gdm-chooser-session.c gdm-2.91.91/gui/simple-chooser/gdm-chooser-session.c +--- gdm-2.91.91.orig/gui/simple-chooser/gdm-chooser-session.c 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/gui/simple-chooser/gdm-chooser-session.c 2011-02-26 08:45:01.946675918 -0800 +@@ -131,7 +131,7 @@ + ret = FALSE; + + error = NULL; +- g_spawn_command_line_async (LIBEXECDIR "/gnome-settings-daemon", &error); ++ g_spawn_command_line_async ("/usr/bin/gnome-settings-daemon", &error); + if (error != NULL) { + g_warning ("Error starting settings daemon: %s", error->message); + g_error_free (error); Copied: gdm/repos/gnome-unstable-i686/PKGBUILD (from rev 136866, gdm/trunk/PKGBUILD) =================================================================== --- gnome-unstable-i686/PKGBUILD (rev 0) +++ gnome-unstable-i686/PKGBUILD 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,58 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> +pkgname=gdm +pkgver=3.1.90 +pkgrel=1 +pkgdesc="Gnome Display Manager (a reimplementation of xdm)" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org" +backup=('etc/pam.d/gdm' 'etc/pam.d/gdm-autologin' 'etc/gdm/custom.conf') +groups=('gnome-extra') +options=('!libtool') +depends=('libcanberra' 'libxklavier' 'gnome-session' 'upower' 'accountsservice' 'consolekit' 'xorg-xrdb' 'nss') +makedepends=('intltool' 'gnome-doc-utils' 'xorg-server') +install=gdm.install +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz + fix_external_program_directories.patch + gdm.pam + gdm-autologin.pam + gdm) +sha256sums=('3fb9c52b8a18f39539c53d84645b89836de25a3eb3a0b84388e76a4f988178bf' + 'c02af756912f744a0b32c05f2b552fd425b4d30cf9f8fe22e04be8746c325fc0' + 'f1dfa4d88288d4b0a631a68a51b46c2da537bee8fe5a99f9f288c8ff75a50b19' + '3daff680ff6b7ea56f84f40843e46e72477c81e9e405028203c942af04d07ae5' + '272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/fix_external_program_directories.patch" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/gdm \ + --localstatedir=/var \ + --with-at-spi-registryd-directory=/usr/lib/at-spi2-core \ + --disable-scrollkeeper \ + --disable-static \ + --without-tcp-wrappers + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gdm ${pkgdir}/etc/gconf/schemas/*.schemas + rm -r "${pkgdir}/etc/gconf/" + + install -m644 "${srcdir}/gdm.pam" "${pkgdir}/etc/pam.d/gdm" + install -m644 "${srcdir}/gdm-autologin.pam" "${pkgdir}/etc/pam.d/gdm-autologin" + sed -e 's/include\s*system-auth/required\tpam_unix.so/' -i "${pkgdir}/etc/pam.d/gdm-welcome" + + install -m755 -d "${pkgdir}/etc/rc.d" + install -m755 "${srcdir}/gdm" "${pkgdir}/etc/rc.d/" + + rmdir "${pkgdir}/var/gdm" + chmod 1770 "${pkgdir}/var/log/gdm" + rm -rf "${pkgdir}/var/run" +} Copied: gdm/repos/gnome-unstable-i686/fix_external_program_directories.patch (from rev 136866, gdm/trunk/fix_external_program_directories.patch) =================================================================== --- gnome-unstable-i686/fix_external_program_directories.patch (rev 0) +++ gnome-unstable-i686/fix_external_program_directories.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,24 @@ +diff -Nur gdm-3.1.90.orig/daemon/gdm-server.c gdm-3.1.90/daemon/gdm-server.c +--- gdm-3.1.90.orig/daemon/gdm-server.c 2011-09-02 13:13:16.132989960 +0000 ++++ gdm-3.1.90/daemon/gdm-server.c 2011-09-02 13:18:17.495996840 +0000 +@@ -131,7 +131,7 @@ + g_return_val_if_fail (GDM_IS_SERVER (server), NULL); + + error = NULL; +- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s", ++ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s", + server->priv->display_name); + + g_debug ("GdmServer: Running helper %s", command); +diff -Nur gdm-3.1.90.orig/gui/simple-chooser/gdm-chooser-session.c gdm-3.1.90/gui/simple-chooser/gdm-chooser-session.c +--- gdm-3.1.90.orig/gui/simple-chooser/gdm-chooser-session.c 2011-09-02 13:13:16.136323327 +0000 ++++ gdm-3.1.90/gui/simple-chooser/gdm-chooser-session.c 2011-09-02 13:22:54.168703021 +0000 +@@ -131,7 +131,7 @@ + ret = FALSE; + + error = NULL; +- g_spawn_command_line_async (LIBEXECDIR "/gnome-settings-daemon", &error); ++ g_spawn_command_line_async ("/usr/lib/gnome-settings-daemon/gnome-settings-daemon", &error); + if (error != NULL) { + g_warning ("Error starting settings daemon: %s", error->message); + g_error_free (error); Copied: gdm/repos/gnome-unstable-i686/gdm (from rev 136866, gdm/trunk/gdm) =================================================================== --- gnome-unstable-i686/gdm (rev 0) +++ gnome-unstable-i686/gdm 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting GDM" + /usr/sbin/gdm & + if [ $? -gt 0 ]; then + stat_fail + else + + add_daemon gdm + stat_done + fi + ;; + stop) + stat_busy "Stopping GDM" + [ -f /var/run/gdm.pid ] && kill `cat /var/run/gdm.pid` &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon gdm + stat_done + fi + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 Copied: gdm/repos/gnome-unstable-i686/gdm-autologin.pam (from rev 136866, gdm/trunk/gdm-autologin.pam) =================================================================== --- gnome-unstable-i686/gdm-autologin.pam (rev 0) +++ gnome-unstable-i686/gdm-autologin.pam 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,8 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth required pam_env.so +auth required pam_permit.so +account required pam_unix.so +password required pam_unix.so +session required pam_limits.so +session required pam_unix.so Copied: gdm/repos/gnome-unstable-i686/gdm-vt-allocation-hack.patch (from rev 136866, gdm/trunk/gdm-vt-allocation-hack.patch) =================================================================== --- gnome-unstable-i686/gdm-vt-allocation-hack.patch (rev 0) +++ gnome-unstable-i686/gdm-vt-allocation-hack.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -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; Copied: gdm/repos/gnome-unstable-i686/gdm.install (from rev 136866, gdm/trunk/gdm.install) =================================================================== --- gnome-unstable-i686/gdm.install (rev 0) +++ gnome-unstable-i686/gdm.install 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,29 @@ +pkgname=gdm + +post_install() { + getent group gdm >/dev/null 2>&1 || groupadd -g 120 gdm + getent passwd gdm > /dev/null 2>&1 || usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm + passwd -l gdm > /dev/null + chown -R gdm:gdm /var/lib/gdm > /dev/null + + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + gconfpkg --install ${pkgname} + glib-compile-schemas usr/share/glib-2.0/schemas +} + +pre_remove() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + gconfpkg --uninstall ${pkgname} + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + getent passwd gdm >/dev/null 2>&1 && userdel gdm + getent group gdm >/dev/null 2>&1 && groupdel gdm +} Copied: gdm/repos/gnome-unstable-i686/gdm.pam (from rev 136866, gdm/trunk/gdm.pam) =================================================================== --- gnome-unstable-i686/gdm.pam (rev 0) +++ gnome-unstable-i686/gdm.pam 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,10 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth required pam_env.so +auth required pam_unix.so +auth optional pam_gnome_keyring.so +account required pam_unix.so +session required pam_limits.so +session required pam_unix.so +session optional pam_gnome_keyring.so auto_start +password required pam_unix.so Copied: gdm/repos/gnome-unstable-x86_64/2.91_fix_external_program_directories.patch (from rev 136866, gdm/trunk/2.91_fix_external_program_directories.patch) =================================================================== --- gnome-unstable-x86_64/2.91_fix_external_program_directories.patch (rev 0) +++ gnome-unstable-x86_64/2.91_fix_external_program_directories.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,48 @@ +diff -Nur gdm-2.91.91.orig/daemon/gdm-server.c gdm-2.91.91/daemon/gdm-server.c +--- gdm-2.91.91.orig/daemon/gdm-server.c 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/daemon/gdm-server.c 2011-02-27 16:56:51.283347074 -0800 +@@ -131,7 +131,7 @@ + g_return_val_if_fail (GDM_IS_SERVER (server), NULL); + + error = NULL; +- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s", ++ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s", + server->priv->display_name); + + g_debug ("GdmServer: Running helper %s", command); +diff -Nur gdm-2.91.91.orig/data/greeter-autostart/gnome-settings-daemon.desktop.in.in gdm-2.91.91/data/greeter-autostart/gnome-settings-daemon.desktop.in.in +--- gdm-2.91.91.orig/data/greeter-autostart/gnome-settings-daemon.desktop.in.in 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/data/greeter-autostart/gnome-settings-daemon.desktop.in.in 2011-02-26 08:43:28.700009251 -0800 +@@ -1,8 +1,8 @@ + [Desktop Entry] + Type=Application + _Name=GNOME Settings Daemon +-TryExec=@LIBEXECDIR@/gnome-settings-daemon +-Exec=@LIBEXECDIR@/gnome-settings-daemon ++TryExec=/usr/bin/gnome-settings-daemon ++Exec=/usr/bin/gnome-settings-daemon + OnlyShowIn=GNOME; + X-GNOME-Autostart-Phase=Initialization + X-GNOME-Autostart-Notify=true +diff -Nur gdm-2.91.91.orig/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in gdm-2.91.91/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in +--- gdm-2.91.91.orig/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/data/greeter-autostart/polkit-gnome-authentication-agent-1.desktop.in.in 2011-02-26 08:44:06.810009153 -0800 +@@ -1,5 +1,5 @@ + [Desktop Entry] + Type=Application + _Name=PolicyKit Authentication Agent +-Exec=@LIBEXECDIR@/polkit-gnome-authentication-agent-1 ++Exec=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + OnlyShowIn=GNOME; +diff -Nur gdm-2.91.91.orig/gui/simple-chooser/gdm-chooser-session.c gdm-2.91.91/gui/simple-chooser/gdm-chooser-session.c +--- gdm-2.91.91.orig/gui/simple-chooser/gdm-chooser-session.c 2011-02-17 19:27:53.000000000 -0800 ++++ gdm-2.91.91/gui/simple-chooser/gdm-chooser-session.c 2011-02-26 08:45:01.946675918 -0800 +@@ -131,7 +131,7 @@ + ret = FALSE; + + error = NULL; +- g_spawn_command_line_async (LIBEXECDIR "/gnome-settings-daemon", &error); ++ g_spawn_command_line_async ("/usr/bin/gnome-settings-daemon", &error); + if (error != NULL) { + g_warning ("Error starting settings daemon: %s", error->message); + g_error_free (error); Copied: gdm/repos/gnome-unstable-x86_64/PKGBUILD (from rev 136866, gdm/trunk/PKGBUILD) =================================================================== --- gnome-unstable-x86_64/PKGBUILD (rev 0) +++ gnome-unstable-x86_64/PKGBUILD 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,58 @@ +# $Id$ +# Maintainer: Jan de Groot <j...@archlinux.org> +pkgname=gdm +pkgver=3.1.90 +pkgrel=1 +pkgdesc="Gnome Display Manager (a reimplementation of xdm)" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.gnome.org" +backup=('etc/pam.d/gdm' 'etc/pam.d/gdm-autologin' 'etc/gdm/custom.conf') +groups=('gnome-extra') +options=('!libtool') +depends=('libcanberra' 'libxklavier' 'gnome-session' 'upower' 'accountsservice' 'consolekit' 'xorg-xrdb' 'nss') +makedepends=('intltool' 'gnome-doc-utils' 'xorg-server') +install=gdm.install +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz + fix_external_program_directories.patch + gdm.pam + gdm-autologin.pam + gdm) +sha256sums=('3fb9c52b8a18f39539c53d84645b89836de25a3eb3a0b84388e76a4f988178bf' + 'c02af756912f744a0b32c05f2b552fd425b4d30cf9f8fe22e04be8746c325fc0' + 'f1dfa4d88288d4b0a631a68a51b46c2da537bee8fe5a99f9f288c8ff75a50b19' + '3daff680ff6b7ea56f84f40843e46e72477c81e9e405028203c942af04d07ae5' + '272c08d8e8b50bf424d0705ac864d4c18c47ec4f6893b1af732c2efbc86c9550') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/fix_external_program_directories.patch" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/gdm \ + --localstatedir=/var \ + --with-at-spi-registryd-directory=/usr/lib/at-spi2-core \ + --disable-scrollkeeper \ + --disable-static \ + --without-tcp-wrappers + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gdm ${pkgdir}/etc/gconf/schemas/*.schemas + rm -r "${pkgdir}/etc/gconf/" + + install -m644 "${srcdir}/gdm.pam" "${pkgdir}/etc/pam.d/gdm" + install -m644 "${srcdir}/gdm-autologin.pam" "${pkgdir}/etc/pam.d/gdm-autologin" + sed -e 's/include\s*system-auth/required\tpam_unix.so/' -i "${pkgdir}/etc/pam.d/gdm-welcome" + + install -m755 -d "${pkgdir}/etc/rc.d" + install -m755 "${srcdir}/gdm" "${pkgdir}/etc/rc.d/" + + rmdir "${pkgdir}/var/gdm" + chmod 1770 "${pkgdir}/var/log/gdm" + rm -rf "${pkgdir}/var/run" +} Copied: gdm/repos/gnome-unstable-x86_64/fix_external_program_directories.patch (from rev 136866, gdm/trunk/fix_external_program_directories.patch) =================================================================== --- gnome-unstable-x86_64/fix_external_program_directories.patch (rev 0) +++ gnome-unstable-x86_64/fix_external_program_directories.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,24 @@ +diff -Nur gdm-3.1.90.orig/daemon/gdm-server.c gdm-3.1.90/daemon/gdm-server.c +--- gdm-3.1.90.orig/daemon/gdm-server.c 2011-09-02 13:13:16.132989960 +0000 ++++ gdm-3.1.90/daemon/gdm-server.c 2011-09-02 13:18:17.495996840 +0000 +@@ -131,7 +131,7 @@ + g_return_val_if_fail (GDM_IS_SERVER (server), NULL); + + error = NULL; +- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s", ++ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s", + server->priv->display_name); + + g_debug ("GdmServer: Running helper %s", command); +diff -Nur gdm-3.1.90.orig/gui/simple-chooser/gdm-chooser-session.c gdm-3.1.90/gui/simple-chooser/gdm-chooser-session.c +--- gdm-3.1.90.orig/gui/simple-chooser/gdm-chooser-session.c 2011-09-02 13:13:16.136323327 +0000 ++++ gdm-3.1.90/gui/simple-chooser/gdm-chooser-session.c 2011-09-02 13:22:54.168703021 +0000 +@@ -131,7 +131,7 @@ + ret = FALSE; + + error = NULL; +- g_spawn_command_line_async (LIBEXECDIR "/gnome-settings-daemon", &error); ++ g_spawn_command_line_async ("/usr/lib/gnome-settings-daemon/gnome-settings-daemon", &error); + if (error != NULL) { + g_warning ("Error starting settings daemon: %s", error->message); + g_error_free (error); Copied: gdm/repos/gnome-unstable-x86_64/gdm (from rev 136866, gdm/trunk/gdm) =================================================================== --- gnome-unstable-x86_64/gdm (rev 0) +++ gnome-unstable-x86_64/gdm 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,36 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting GDM" + /usr/sbin/gdm & + if [ $? -gt 0 ]; then + stat_fail + else + + add_daemon gdm + stat_done + fi + ;; + stop) + stat_busy "Stopping GDM" + [ -f /var/run/gdm.pid ] && kill `cat /var/run/gdm.pid` &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon gdm + stat_done + fi + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 Copied: gdm/repos/gnome-unstable-x86_64/gdm-autologin.pam (from rev 136867, gdm/trunk/gdm-autologin.pam) =================================================================== --- gnome-unstable-x86_64/gdm-autologin.pam (rev 0) +++ gnome-unstable-x86_64/gdm-autologin.pam 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,8 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth required pam_env.so +auth required pam_permit.so +account required pam_unix.so +password required pam_unix.so +session required pam_limits.so +session required pam_unix.so Copied: gdm/repos/gnome-unstable-x86_64/gdm-vt-allocation-hack.patch (from rev 136867, gdm/trunk/gdm-vt-allocation-hack.patch) =================================================================== --- gnome-unstable-x86_64/gdm-vt-allocation-hack.patch (rev 0) +++ gnome-unstable-x86_64/gdm-vt-allocation-hack.patch 2011-09-02 14:23:08 UTC (rev 136868) @@ -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; Copied: gdm/repos/gnome-unstable-x86_64/gdm.install (from rev 136867, gdm/trunk/gdm.install) =================================================================== --- gnome-unstable-x86_64/gdm.install (rev 0) +++ gnome-unstable-x86_64/gdm.install 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,29 @@ +pkgname=gdm + +post_install() { + getent group gdm >/dev/null 2>&1 || groupadd -g 120 gdm + getent passwd gdm > /dev/null 2>&1 || usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm + passwd -l gdm > /dev/null + chown -R gdm:gdm /var/lib/gdm > /dev/null + + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + gconfpkg --install ${pkgname} + glib-compile-schemas usr/share/glib-2.0/schemas +} + +pre_remove() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + gconfpkg --uninstall ${pkgname} + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + getent passwd gdm >/dev/null 2>&1 && userdel gdm + getent group gdm >/dev/null 2>&1 && groupdel gdm +} Copied: gdm/repos/gnome-unstable-x86_64/gdm.pam (from rev 136867, gdm/trunk/gdm.pam) =================================================================== --- gnome-unstable-x86_64/gdm.pam (rev 0) +++ gnome-unstable-x86_64/gdm.pam 2011-09-02 14:23:08 UTC (rev 136868) @@ -0,0 +1,10 @@ +#%PAM-1.0 +auth requisite pam_nologin.so +auth required pam_env.so +auth required pam_unix.so +auth optional pam_gnome_keyring.so +account required pam_unix.so +session required pam_limits.so +session required pam_unix.so +session optional pam_gnome_keyring.so auto_start +password required pam_unix.so