summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2009-06-04 10:56:29 +0530
committerNirbheek Chauhan <nirbheek@gentoo.org>2009-06-04 13:15:37 +0530
commita00066b17a6ba094637e18a71035a7b5bc48534d (patch)
treef692ad9c64cf2a2750a53a84467c0493574ef547 /gnome-base
parentgnome-base/gconf: Sync with tree (diff)
downloadgnome-live-a00066b17a6ba094637e18a71035a7b5bc48534d.tar.gz
gnome-live-a00066b17a6ba094637e18a71035a7b5bc48534d.tar.bz2
gnome-live-a00066b17a6ba094637e18a71035a7b5bc48534d.zip
gnome-base/gdm, eclass/gnome2-eapi-fixes.eclass
* Sync with tree * Update for git move * Update for EAPI=2 support in gnome2.eclass
Diffstat (limited to 'gnome-base')
-rw-r--r--gnome-base/gdm/Manifest14
-rw-r--r--gnome-base/gdm/files/49-keychain9
-rw-r--r--gnome-base/gdm/files/50-ssh-agent10
-rw-r--r--gnome-base/gdm/files/gdm-2.24.1-automagic-libxklavier-support.patch52
-rw-r--r--gnome-base/gdm/files/gdm-2.24.1-fix-daemonize-regression.patch121
-rw-r--r--gnome-base/gdm/files/gdm-2.26.1-broken-VT-detection.patch79
-rw-r--r--gnome-base/gdm/files/gdm-2.26.1-custom-session.patch42
-rw-r--r--gnome-base/gdm/files/gdm-2.26.1-xinitrc-ssh-agent.patch26
-rw-r--r--gnome-base/gdm/files/gdm-fix-daemonize-regression.patch114
-rw-r--r--gnome-base/gdm/files/gdm-selinux-remove-attr.patch7
-rw-r--r--gnome-base/gdm/gdm-9999.ebuild150
11 files changed, 427 insertions, 197 deletions
diff --git a/gnome-base/gdm/Manifest b/gnome-base/gdm/Manifest
index c8e7bd1..8d1e9e2 100644
--- a/gnome-base/gdm/Manifest
+++ b/gnome-base/gdm/Manifest
@@ -1,4 +1,10 @@
-AUX gdm-fix-daemonize-regression.patch 3810 RMD160 4d6cd08ba2cb27f3d4702a7f7d8cb55ba84e2e1f SHA1 c5c0569f2bf5f95ac86389da2c21088755dfd422 SHA256 95725e57a6c19667e7bbf7ac533c031dc6590e869b3a8b93916c5cda9b91ca71
-AUX gdm-selinux-remove-attr.patch 522 RMD160 212f4abb28c03015c46b9f4252a3a789fc28273c SHA1 5d2ea44054b1b9dea2988daddf31294b342d078d SHA256 02bd787501596555d51de7fa40f6466495b9e73630259ccc612c61921b2059f9
-DIST gdm-2.20.5-gentoo-files.tar.bz2 3214 RMD160 a075aa94fc3f6f2947bddf46f008979d62cc94d3 SHA1 9654caf36a91a83ffb5d4e53078a70e8c29a0b61 SHA256 47716f35eb1c6875e9c8e42120ff5f65da806aa06f15a48b082a6f5e5a94da83
-EBUILD gdm-9999.ebuild 4450 RMD160 b265bfc93289818a45aa263efa203c55ed288aa4 SHA1 d6e6748257ef044239fca89298ecc3e68ae8705c SHA256 4c361a224b253f30c3d7f4feac8fb2006e05ce4cba209eb1638f16672f86032e
+AUX 49-keychain 181 RMD160 32ce131e93fc2d8640edee72ad42124537860156 SHA1 b4518f9d8ba65d0cf4d64ded844e59be343088d3 SHA256 d73e07847bfa6ac69938aa309f5c137d4c36248cedf9834db1315ba1b2b87140
+AUX 50-ssh-agent 246 RMD160 0a1d9955b82a5b54af9ef7e61a5fe2f52b8aa217 SHA1 5a418c885a6b4a280d60c501ec9dc3230e9d7b6c SHA256 b8abb694982613258dcf8b327ef878d6ee9738fa53bbd23edfef1de618ff435f
+AUX gdm-2.24.1-automagic-libxklavier-support.patch 1878 RMD160 b2f7ed17e26d74e7898ca32ccd7ee3241b28c61e SHA1 010cef9dccd94a68e8b41c2c7fa910af20e8b496 SHA256 b429131b08879c8d64e3887317687b3f73fcf194f53afc556c11c8028e6677a3
+AUX gdm-2.24.1-fix-daemonize-regression.patch 4057 RMD160 c4f91953751ac4fb1ac5153787f34d6ad084ce6e SHA1 d9a59c722c8f859302439a61938f8383e00cb19f SHA256 0db448d8eee8374c2a710655b228c847d68ee36a50c08ef0ed541d93d99e254f
+AUX gdm-2.26.1-broken-VT-detection.patch 2507 RMD160 9873aeab6b76d9d464a80237a9c303f559a055ee SHA1 1f9f16a553bb176bb92db432bf50c8f2f92d5cda SHA256 0e605c7656239ad6331d6eb15f3da5c8a4db027aae6ce3db68a21479486d2801
+AUX gdm-2.26.1-custom-session.patch 1097 RMD160 1d4cd37ece2e76f1dead3b1e7bc34f0a6900c93c SHA1 b309d46810cc28d33074051820e37e3795aa76ce SHA256 1222c4c567c15bc6c6ab5693c3660ee40a83d5c5710f33a51553d201bda73443
+AUX gdm-2.26.1-xinitrc-ssh-agent.patch 696 RMD160 15a236bf516fb05faf94c14663a4cc0051c18546 SHA1 3ecce067b42dcf4d4f7151d3b6dfe12afc3fe167 SHA256 77c19caf6fa8e6a1bba94ee35128d1563f88fc004670001758ed3a3b1bc9600e
+AUX gdm-selinux-remove-attr.patch 564 RMD160 a70a19ca73baf7bc2a3ca2ee3076358fdbef1b32 SHA1 f893a7914a8fe88948a4391e4e0ea2f5697a06fd SHA256 8b0315412a54614d1dc228a431c4ce3ea59064a7e6b1b5a0239794e5dcb29ff6
+DIST gdm-2.20.9-gentoo-files-r1.tar.bz2 3494 RMD160 9d8f9954bd0d8b657a2faf2516b4548b9f1556d3 SHA1 28ceedb42440fdb50dffa7e69b18f213b00e3935 SHA256 666c0bf1ba28ccc257bf1235b5286e1eb9e15230c0036413ab428e09c54238f9
+EBUILD gdm-9999.ebuild 4856 RMD160 f312493c9b3d9395ba8ed28eb571163d6b358fcf SHA1 a17c50a17a0b43f041f626b8461fb3690217022b SHA256 d725484894b16540ec41190801734e17289cf580a38dfd04c24e3f7e197c6960
diff --git a/gnome-base/gdm/files/49-keychain b/gnome-base/gdm/files/49-keychain
new file mode 100644
index 0000000..77310b2
--- /dev/null
+++ b/gnome-base/gdm/files/49-keychain
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# source keychain variables
+
+keychain="`which keychain`"
+if [ -n "$keychain" ] && [ -x "$keychain" ] && [ -f "$HOME/.bash_profile" ]
+then
+ . "${HOME}/.bash_profile"
+fi
diff --git a/gnome-base/gdm/files/50-ssh-agent b/gnome-base/gdm/files/50-ssh-agent
new file mode 100644
index 0000000..10460c5
--- /dev/null
+++ b/gnome-base/gdm/files/50-ssh-agent
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# add ssh-agent if found
+
+sshagent="`gdmwhich ssh-agent`"
+if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
+ command="$sshagent -- $command"
+elif [ -z "$sshagent" ] ; then
+ echo "$0: ssh-agent not found!"
+fi
diff --git a/gnome-base/gdm/files/gdm-2.24.1-automagic-libxklavier-support.patch b/gnome-base/gdm/files/gdm-2.24.1-automagic-libxklavier-support.patch
new file mode 100644
index 0000000..8278ede
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.24.1-automagic-libxklavier-support.patch
@@ -0,0 +1,52 @@
+ configure.ac | 30 ++++++++++++++++++++----------
+ 1 files changed, 20 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be6580d..04d58cc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -106,17 +106,26 @@ PKG_CHECK_MODULES(SIMPLE_GREETER,
+ AC_SUBST(SIMPLE_GREETER_CFLAGS)
+ AC_SUBST(SIMPLE_GREETER_LIBS)
+
+-PKG_CHECK_MODULES(LIBXKLAVIER,
+- libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
+- have_libxklavier=yes,
+- have_libxklavier=no)
+-if test "x$have_libxklavier" = "xyes" ; then
+- AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
++AC_ARG_ENABLE([libxklavier],
++ AS_HELP_STRING([--enable-libxklavier],
++ [Enable libxklavier support @<:@default=yes@:>@]),
++ enable_libxklavier=$enableval,
++ enable_libxklavier=yes)
++have_libxklavier=no
++if test "x$enable_libxklavier" = "xyes"; then
++ PKG_CHECK_MODULES(LIBXKLAVIER,
++ libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
++ have_libxklavier=yes,
++ have_libxklavier=no)
++ if test "x$have_libxklavier" = "xyes" ; then
++ AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
++ fi
++ AC_SUBST(HAVE_LIBXKLAVIER)
++ AC_SUBST(LIBXKLAVIER_CFLAGS)
++ AC_SUBST(LIBXKLAVIER_LIBS)
+ fi
++
+ AM_CONDITIONAL(HAVE_LIBXKLAVIER, test x$have_libxklavier = xyes)
+-AC_SUBST(HAVE_LIBXKLAVIER)
+-AC_SUBST(LIBXKLAVIER_CFLAGS)
+-AC_SUBST(LIBXKLAVIER_LIBS)
+
+ PKG_CHECK_MODULES(POLKIT_GNOME,
+ polkit-gnome >= $POLICYKIT_REQUIRED_VERSION,
+@@ -1420,6 +1429,7 @@ echo \
+ " Xinerama support: ${XINERAMA_SUPPORT}
+ XDMCP support: ${XDMCP_SUPPORT}
+ SELinux support: ${with_selinux}
+- ConsoleKit support: ${use_console_kit}
++ ConsoleKit support: ${use_console_kit}
++ Libxklavier support: ${have_libxklavier}
+ Build with RBAC: ${msg_rbac_shutdown}
+ "
diff --git a/gnome-base/gdm/files/gdm-2.24.1-fix-daemonize-regression.patch b/gnome-base/gdm/files/gdm-2.24.1-fix-daemonize-regression.patch
new file mode 100644
index 0000000..5b48b46
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.24.1-fix-daemonize-regression.patch
@@ -0,0 +1,121 @@
+From b9f261de75356be6e4ee94c0cc53f2edbd8fe4d2 Mon Sep 17 00:00:00 2001
+From: Dan Nicholson <dbn.lists@gmail.com>
+Date: Tue, 14 Oct 2008 07:06:21 -0700
+Subject: [PATCH] Fork gdm-binary, except when -nodaemon is used
+
+gdm-binary now forks and the parent terminates, except when the
+-nodaemon or --nodaemon options are used. This provides compatibility
+with xdm. Fixes bug #550170.
+---
+ daemon/main.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 71 insertions(+), 0 deletions(-)
+
+diff --git a/daemon/main.c b/daemon/main.c
+index 9d7ab5e..4a2f2a5 100644
+--- a/daemon/main.c
++++ b/daemon/main.c
+@@ -495,6 +495,56 @@ signal_cb (int signo,
+ return ret;
+ }
+
++static void
++dup_dev_null (int fd, int flags)
++{
++ int nullfd;
++ int dupfd;
++
++ VE_IGNORE_EINTR (nullfd = open ("/dev/null", flags));
++ if (G_UNLIKELY (nullfd < 0)) {
++ gdm_fail (_("Cannot open /dev/null: %s!"),
++ strerror (errno));
++ exit (EXIT_FAILURE);
++ }
++
++ VE_IGNORE_EINTR (dupfd = dup2 (nullfd, fd));
++ if (G_UNLIKELY (dupfd < 0)) {
++ gdm_fail (_("Cannot duplicate /dev/null: %s!"),
++ strerror (errno));
++ exit (EXIT_FAILURE);
++ }
++
++ VE_IGNORE_EINTR (close (nullfd));
++}
++
++static void
++daemonify (void)
++{
++ pid_t pid;
++
++ pid = fork ();
++
++ /* terminate the parent */
++ if (pid > 0)
++ exit (EXIT_SUCCESS);
++
++ if (G_UNLIKELY (pid < 0)) {
++ gdm_fail (_("fork () failed: %s!"), strerror (errno));
++ exit (EXIT_FAILURE);
++ }
++
++ if (G_UNLIKELY (setsid () < 0)) {
++ gdm_fail (_("setsid () failed: %s!"), strerror (errno));
++ exit (EXIT_FAILURE);
++ }
++
++ /* reopen stdin, stdout, stderr with /dev/null */
++ dup_dev_null (STDIN_FILENO, O_RDONLY);
++ dup_dev_null (STDOUT_FILENO, O_RDWR);
++ dup_dev_null (STDERR_FILENO, O_RDWR);
++}
++
+ int
+ main (int argc,
+ char **argv)
+@@ -505,6 +555,7 @@ main (int argc,
+ DBusGConnection *connection;
+ GError *error;
+ int ret;
++ int i;
+ gboolean res;
+ gboolean xdmcp_enabled;
+ GdmSignalHandler *signal_handler;
+@@ -512,9 +563,11 @@ main (int argc,
+ static gboolean do_timed_exit = FALSE;
+ static gboolean print_version = FALSE;
+ static gboolean fatal_warnings = FALSE;
++ static gboolean no_daemon = FALSE;
+ static GOptionEntry entries [] = {
+ { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
+ { "fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &fatal_warnings, N_("Make all warnings fatal"), NULL },
++ { "nodaemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Do not fork into the background"), NULL },
+ { "timed-exit", 0, 0, G_OPTION_ARG_NONE, &do_timed_exit, N_("Exit after a time - for debugging"), NULL },
+ { "version", 0, 0, G_OPTION_ARG_NONE, &print_version, N_("Print GDM version"), NULL },
+
+@@ -531,6 +584,14 @@ main (int argc,
+
+ g_type_init ();
+
++ /* preprocess the arguments to support the xdm style
++ * -nodaemon option
++ */
++ for (i = 0; i < argc; i++) {
++ if (strcmp (argv[i], "-nodaemon") == 0)
++ argv[i] = "--nodaemon";
++ }
++
+ context = g_option_context_new (_("GNOME Display Manager"));
+ g_option_context_add_main_entries (context, entries, NULL);
+ g_option_context_set_ignore_unknown_options (context, TRUE);
+@@ -596,6 +657,9 @@ main (int argc,
+ exit (-1);
+ }
+
++ if (no_daemon == FALSE)
++ daemonify ();
++
+ /* pid file */
+ delete_pid ();
+ write_pid ();
+--
+1.5.6.5
+
diff --git a/gnome-base/gdm/files/gdm-2.26.1-broken-VT-detection.patch b/gnome-base/gdm/files/gdm-2.26.1-broken-VT-detection.patch
new file mode 100644
index 0000000..202e247
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.26.1-broken-VT-detection.patch
@@ -0,0 +1,79 @@
+diff -Naur gdm-2.26.1.orig/common/gdm-settings-keys.h gdm-2.26.1/common/gdm-settings-keys.h
+--- gdm-2.26.1.orig/common/gdm-settings-keys.h 2009-05-12 16:52:49.747175254 +0200
++++ gdm-2.26.1/common/gdm-settings-keys.h 2009-05-12 17:02:36.826359776 +0200
+@@ -27,6 +27,7 @@
+
+ #define GDM_KEY_USER "daemon/User"
+ #define GDM_KEY_GROUP "daemon/Group"
++#define GDM_KEY_VT "daemon/VT"
+ #define GDM_KEY_AUTO_LOGIN_ENABLE "daemon/AutomaticLoginEnable"
+ #define GDM_KEY_AUTO_LOGIN_USER "daemon/AutomaticLogin"
+ #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
+diff -Naur gdm-2.26.1.orig/daemon/gdm-server.c gdm-2.26.1/daemon/gdm-server.c
+--- gdm-2.26.1.orig/daemon/gdm-server.c 2009-05-12 16:52:49.697174894 +0200
++++ gdm-2.26.1/daemon/gdm-server.c 2009-05-12 20:32:56.127640378 +0200
+@@ -43,7 +43,9 @@
+
+ #include "gdm-common.h"
+ #include "gdm-signal-handler.h"
+-
++#include "gdm-settings.h"
++#include "gdm-settings-direct.h"
++#include "gdm-settings-keys.h"
+ #include "gdm-server.h"
+
+ extern char **environ;
+@@ -79,7 +81,7 @@
+ char *parent_display_name;
+ char *parent_auth_file;
+ char *chosen_hostname;
+-
++ char *vt;
+ guint child_watch_id;
+ };
+
+@@ -676,7 +678,7 @@
+ gboolean res;
+
+ /* fork X server process */
+- res = gdm_server_spawn (server, NULL);
++ res = gdm_server_spawn (server, server->priv->vt);
+
+ return res;
+ }
+@@ -927,6 +929,8 @@
+ static void
+ gdm_server_init (GdmServer *server)
+ {
++ int vt;
++ gboolean has_vt;
+
+ server->priv = GDM_SERVER_GET_PRIVATE (server);
+
+@@ -934,6 +938,11 @@
+ server->priv->command = g_strdup (X_SERVER " -br -verbose");
+ server->priv->log_dir = g_strdup (LOGDIR);
+
++ has_vt = gdm_settings_direct_get_int (GDM_KEY_VT, &vt);
++ if (has_vt) {
++ server->priv->vt = g_strdup_printf ("vt %d", vt);
++ }
++
+ add_ready_handler (server);
+ }
+
+diff -Naur gdm-2.26.1.orig/data/gdm.schemas.in.in gdm-2.26.1/data/gdm.schemas.in.in
+--- gdm-2.26.1.orig/data/gdm.schemas.in.in 2009-05-12 16:52:49.703840966 +0200
++++ gdm-2.26.1/data/gdm.schemas.in.in 2009-05-12 17:03:42.806980552 +0200
+@@ -23,6 +23,11 @@
+ <default>@GDM_GROUPNAME@</default>
+ </schema>
+ <schema>
++ <key>daemon/VT</key>
++ <signature>i</signature>
++ <default>7</default>
++ </schema>
++ <schema>
+ <key>daemon/AutomaticLoginEnable</key>
+ <signature>b</signature>
+ <default>false</default>
diff --git a/gnome-base/gdm/files/gdm-2.26.1-custom-session.patch b/gnome-base/gdm/files/gdm-2.26.1-custom-session.patch
new file mode 100644
index 0000000..d9597ee
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.26.1-custom-session.patch
@@ -0,0 +1,42 @@
+---
+ fix custom sessions (see bug #216984, work done by Gilles, I'm just committing)
+
+ data/Xsession.in | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+Index: b/data/Xsession.in
+===================================================================
+--- a/data/Xsession.in
++++ b/data/Xsession.in
+@@ -177,15 +177,6 @@ if [ -n "$GDM_LANG" ]; then
+ fi
+ fi
+
+-# run all system xinitrc shell scripts.
+-if [ -d /etc/X11/xinit/xinitrc.d ]; then
+- for i in /etc/X11/xinit/xinitrc.d/* ; do
+- if [ -x "$i" ]; then
+- . "$i"
+- fi
+- done
+-fi
+-
+ if [ "x$command" = "xcustom" ] ; then
+ if [ -x "$HOME/.xsession" ]; then
+ command="$HOME/.xsession"
+@@ -213,6 +204,15 @@ if [ "x$command" = "xdefault" ] ; then
+ fi
+ fi
+
++# run all system xinitrc shell scripts.
++if [ -d /etc/X11/xinit/xinitrc.d ]; then
++ for i in /etc/X11/xinit/xinitrc.d/* ; do
++ if [ -x "$i" ]; then
++ . "$i"
++ fi
++ done
++fi
++
+ # add ssh-agent if found
+ sshagent="`gdmwhich ssh-agent`"
+ if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
diff --git a/gnome-base/gdm/files/gdm-2.26.1-xinitrc-ssh-agent.patch b/gnome-base/gdm/files/gdm-2.26.1-xinitrc-ssh-agent.patch
new file mode 100644
index 0000000..f0432d3
--- /dev/null
+++ b/gnome-base/gdm/files/gdm-2.26.1-xinitrc-ssh-agent.patch
@@ -0,0 +1,26 @@
+---
+ ssh-agent really needs to be handled by xinitrc like other agents.
+ Gentoo bug: 220603
+
+ data/Xsession.in | 8 --------
+ 1 file changed, 8 deletions(-)
+
+Index: b/data/Xsession.in
+===================================================================
+--- a/data/Xsession.in
++++ b/data/Xsession.in
+@@ -213,14 +213,6 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
+ done
+ fi
+
+-# add ssh-agent if found
+-sshagent="`gdmwhich ssh-agent`"
+-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
+- command="$sshagent -- $command"
+-elif [ -z "$sshagent" ] ; then
+- echo "$0: ssh-agent not found!"
+-fi
+-
+ echo "$0: Setup done, will execute: $command"
+
+ eval exec $command
diff --git a/gnome-base/gdm/files/gdm-fix-daemonize-regression.patch b/gnome-base/gdm/files/gdm-fix-daemonize-regression.patch
deleted file mode 100644
index 698993c..0000000
--- a/gnome-base/gdm/files/gdm-fix-daemonize-regression.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -Naur gdm.orig/daemon/main.c gdm.trunk/daemon/main.c
---- gdm.orig/daemon/main.c 2008-08-15 22:43:36.000000000 +0530
-+++ gdm.trunk/daemon/main.c 2008-10-24 21:25:19.000000000 +0530
-@@ -495,6 +495,63 @@
- return ret;
- }
-
-+static void
-+gdm_signal_ignore (int signal)
-+{
-+ struct sigaction ign_signal;
-+
-+ ign_signal.sa_handler = SIG_IGN;
-+ ign_signal.sa_flags = SA_RESTART;
-+ sigemptyset (&ign_signal.sa_mask);
-+
-+ if G_UNLIKELY (sigaction (signal, &ign_signal, NULL) < 0)
-+ gdm_error (_("%s: Error setting signal %d to %s"),
-+ "gdm_signal_ignore", signal, "SIG_IGN");
-+}
-+
-+static void
-+gdm_open_dev_null (mode_t mode)
-+{
-+ int ret;
-+ VE_IGNORE_EINTR (ret = open ("/dev/null", mode));
-+ if G_UNLIKELY (ret < 0) {
-+ /*
-+ * Never output anything, we're likely in some
-+ * strange state right now
-+ */
-+ gdm_signal_ignore (SIGPIPE);
-+ VE_IGNORE_EINTR (close (2));
-+ gdm_fail ("Cannot open /dev/null!");
-+ }
-+}
-+
-+static void
-+gdm_daemonify (void)
-+{
-+ pid_t pid;
-+
-+ pid = fork ();
-+
-+ /* terminate the parent */
-+ if (pid > 0)
-+ exit (EXIT_SUCCESS);
-+
-+ if G_UNLIKELY (pid < 0)
-+ gdm_fail (_("%s: fork () failed!"), "gdm_daemonify");
-+
-+ if G_UNLIKELY (setsid () < 0)
-+ gdm_fail (_("%s: setsid () failed: %s!"), "gdm_daemonify",
-+ strerror (errno));
-+
-+ /* reopen stdin, stdout, stderr with /dev/null */
-+ VE_IGNORE_EINTR (close (0));
-+ VE_IGNORE_EINTR (close (1));
-+ VE_IGNORE_EINTR (close (2));
-+ gdm_open_dev_null (O_RDONLY);
-+ gdm_open_dev_null (O_RDWR);
-+ gdm_open_dev_null (O_RDWR);
-+}
-+
- int
- main (int argc,
- char **argv)
-@@ -505,6 +562,7 @@
- DBusGConnection *connection;
- GError *error;
- int ret;
-+ int i;
- gboolean res;
- gboolean xdmcp_enabled;
- GdmSignalHandler *signal_handler;
-@@ -512,9 +570,11 @@
- static gboolean do_timed_exit = FALSE;
- static gboolean print_version = FALSE;
- static gboolean fatal_warnings = FALSE;
-+ static gboolean no_daemon = FALSE;
- static GOptionEntry entries [] = {
- { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
- { "fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &fatal_warnings, N_("Make all warnings fatal"), NULL },
-+ { "nodaemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Do not fork into the background"), NULL },
- { "timed-exit", 0, 0, G_OPTION_ARG_NONE, &do_timed_exit, N_("Exit after a time - for debugging"), NULL },
- { "version", 0, 0, G_OPTION_ARG_NONE, &print_version, N_("Print GDM version"), NULL },
-
-@@ -531,6 +591,14 @@
-
- g_type_init ();
-
-+ /* preprocess the arguments to support the xdm style -nodaemon
-+ * option
-+ */
-+ for (i = 0; i < argc; i++) {
-+ if (strcmp (argv[i], "-nodaemon") == 0)
-+ argv[i] = "--nodaemon";
-+ }
-+
- context = g_option_context_new (_("GNOME Display Manager"));
- g_option_context_add_main_entries (context, entries, NULL);
- g_option_context_set_ignore_unknown_options (context, TRUE);
-@@ -596,6 +664,11 @@
- exit (-1);
- }
-
-+ if (!no_daemon) {
-+ /* fork */
-+ gdm_daemonify ();
-+ }
-+
- /* pid file */
- delete_pid ();
- write_pid ();
diff --git a/gnome-base/gdm/files/gdm-selinux-remove-attr.patch b/gnome-base/gdm/files/gdm-selinux-remove-attr.patch
index 8a3b6ff..e9a90c2 100644
--- a/gnome-base/gdm/files/gdm-selinux-remove-attr.patch
+++ b/gnome-base/gdm/files/gdm-selinux-remove-attr.patch
@@ -1,7 +1,6 @@
-Index: configure.ac
-===================================================================
---- configure.ac (revision 6635)
-+++ configure.ac (working copy)
+diff -Naur gdm-2.25.2/configure.ac gdm-2.25.2.new/configure.ac
+--- gdm-2.25.2/configure.ac 2008-12-03 11:06:35.000000000 +0530
++++ gdm-2.25.2.new/configure.ac 2009-02-15 23:08:49.370809193 +0530
@@ -873,7 +873,7 @@
AC_CHECK_LIB(selinux,setexeccon,/bin/true)
AC_CHECK_LIB(selinux,is_selinux_enabled,/bin/true)
diff --git a/gnome-base/gdm/gdm-9999.ebuild b/gnome-base/gdm/gdm-9999.ebuild
index 26d01bb..f36a929 100644
--- a/gnome-base/gdm/gdm-9999.ebuild
+++ b/gnome-base/gdm/gdm-9999.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-EAPI=2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gdm/gdm-2.20.7.ebuild,v 1.5 2008/08/12 13:54:55 armin76 Exp $
-inherit eutils pam gnome2 gnome2-live gnome2-eapi-fixes
+EAPI="2"
+
+inherit eutils pam gnome2 gnome2-live
DESCRIPTION="GNOME Display Manager"
HOMEPAGE="http://www.gnome.org/projects/gdm/"
@@ -13,75 +14,81 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE_LIBC="elibc_glibc"
-IUSE="accessibility afs debug ipv6 gnome-keyring policykit selinux tcpd xinerama $IUSE_LIBC"
+IUSE="accessibility +consolekit debug ipv6 gnome-keyring policykit selinux tcpd test xinerama +xklavier $IUSE_LIBC"
# Name of the tarball with gentoo specific files
-GDM_EXTRA="${PN}-2.20.5-gentoo-files"
+GDM_EXTRA="${PN}-2.20.9-gentoo-files-r1"
SRC_URI="${SRC_URI}
- mirror://gentoo/${GDM_EXTRA}.tar.bz2"
-
-# FIXME: automagic libxklavier check
+ mirror://gentoo/${GDM_EXTRA}.tar.bz2"
RDEPEND=">=dev-libs/dbus-glib-0.74
- dev-libs/glib:2
- x11-libs/gtk+:2
- x11-libs/pango
- gnome-base/libglade:2.0
- gnome-base/gconf:2
- gnome-base/gnome-panel
- x11-wm/metacity
- >=x11-libs/libxklavier-3.5
- virtual/xft
- app-text/iso-codes
-
- x11-libs/gksu
- x11-libs/libXi
- x11-libs/libXau
- x11-libs/libX11
- x11-libs/libXext
- x11-apps/sessreg
- x11-libs/libXdmcp
- sys-auth/consolekit
- virtual/pam
- sys-auth/pambase[gnome-keyring?]
-
- accessibility? ( x11-libs/libXevie )
- afs? ( net-fs/openafs sys-libs/lwp )
- gnome-keyring? (
- gnome-base/gnome-keyring[pam]
- )
- policykit? ( >=sys-auth/policykit-0.8 )
- selinux? ( sys-libs/libselinux )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
- xinerama? ( x11-libs/libXinerama )
- !gnome-extra/fast-user-switch-applet"
+ >=dev-libs/glib-2.15.4
+ >=x11-libs/gtk+-2.10.0
+ >=x11-libs/pango-1.3
+ >=gnome-base/libglade-2
+ >=gnome-base/gconf-2.6.1
+ >=gnome-base/gnome-panel-2
+ xklavier? ( >=x11-libs/libxklavier-3.5 )
+ x11-libs/libXft
+ app-text/iso-codes
+
+ x11-libs/gksu
+ x11-libs/libXi
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-apps/sessreg
+ x11-libs/libXdmcp
+ virtual/pam
+ consolekit? (
+ sys-auth/consolekit
+ >=sys-apps/hal-0.5.12_rc1-r1[consolekit] )
+
+ accessibility? ( x11-libs/libXevie )
+ gnome-keyring? ( >=gnome-base/gnome-keyring-2.22[pam] )
+ policykit? (
+ >=sys-auth/policykit-0.8
+ >=gnome-extra/policykit-gnome-0.8 )
+ selinux? ( sys-libs/libselinux )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ xinerama? ( x11-libs/libXinerama )
+
+ !gnome-extra/fast-user-switch-applet"
DEPEND="${RDEPEND}
- test? ( >=dev-libs/check-0.9.4 )
- sys-devel/gettext
- x11-proto/inputproto
- >=dev-util/intltool-0.40
- >=dev-util/pkgconfig-0.19
- >=app-text/scrollkeeper-0.1.4
- >=app-text/gnome-doc-utils-0.3.2"
+ test? ( >=dev-libs/check-0.9.4 )
+ xinerama? ( x11-proto/xineramaproto )
+ sys-devel/gettext
+ x11-proto/inputproto
+ >=dev-util/intltool-0.40
+ >=dev-util/pkgconfig-0.19
+ >=app-text/scrollkeeper-0.1.4
+ >=app-text/gnome-doc-utils-0.3.2"
+PDEPEND=">=sys-auth/pambase-20090430[consolekit=,gnome-keyring=]"
DOCS="AUTHORS ChangeLog NEWS README TODO"
-PATCHES="
-${PN}-selinux-remove-attr.patch
-${PN}-fix-daemonize-regression.patch"
+
+PATCHES="${FILESDIR}/${PN}-selinux-remove-attr.patch
+${FILESDIR}/${PN}-2.24.1-fix-daemonize-regression.patch
+${FILESDIR}/${PN}-2.26.1-broken-VT-detection.patch
+${FILESDIR}/${PN}-2.26.1-custom-session.patch
+${FILESDIR}/${PN}-2.26.1-xinitrc-ssh-agent.patch
+${FILESDIR}/${PN}-2.24.1-automagic-libxklavier-support.patch"
pkg_setup() {
G2CONF="${G2CONF}
--disable-schemas-install
--localstatedir=/var
--with-xdmcp=yes
- --with-pam-prefix=/etc
--enable-authentication-scheme=pam
- --with-console-kit=yes
+ --with-pam-prefix=/etc
+ SOUND_PROGRAM=/usr/bin/gdmplay
$(use_with accessibility xevie)
$(use_enable debug)
$(use_enable ipv6)
+ $(use_enable xklavier libxklavier)
$(use_enable policykit polkit)
+ $(use_with consolekit console-kit)
$(use_with selinux)
$(use_with tcpd tcp-wrappers)
$(use_with xinerama)"
@@ -90,6 +97,7 @@ pkg_setup() {
enewuser gdm -1 -1 /var/lib/gdm gdm
}
+
src_install() {
gnome2_src_install
@@ -109,14 +117,21 @@ src_install() {
fowners root:gdm /var/gdm
fperms 1770 /var/gdm
- # use our own session script
- rm -f "${D}/etc/X11/gdm/Xsession"
- exeinto /etc/X11/gdm
- doexe "${gentoodir}/Xsession"
-
# add a custom xsession .desktop by default (#44537)
exeinto /etc/X11/dm/Sessions
- doexe "${gentoodir}/custom.desktop"
+ doexe "${gentoodir}/custom.desktop" || die "doexe 1 failed"
+
+ # add xinitrc.d scripts
+ exeinto /etc/X11/xinit/xinitrc.d
+ doexe "${FILESDIR}/49-keychain" || die "doexe 2 failed"
+ doexe "${FILESDIR}/50-ssh-agent" || die "doexe 3 failed"
+
+ # install XDG_DATA_DIRS gdm changes
+ echo 'XDG_DATA_DIRS="/usr/share/gdm"' > 99xdg-gdm
+ doenvd 99xdg-gdm || die "doenvd failed"
+
+ # add a custom sound playing script (#248253)
+ dobin "${gentoodir}/gdmplay"
# avoid file collision, bug #213118
rm -f "${D}/usr/share/xsessions/gnome.desktop"
@@ -124,7 +139,6 @@ src_install() {
# We replace the pam stuff by our own
rm -rf "${D}/etc/pam.d"
- # GDM 2.24 doesn't work without PAM
use gnome-keyring && sed -i "s:#Keyring=::g" "${gentoodir}"/pam.d/*
dopamd "${gentoodir}"/pam.d/*
@@ -132,7 +146,7 @@ src_install() {
}
pkg_postinst() {
- gnome2_pkg_postinst
+ gnome2-live_pkg_postinst
ewarn
ewarn "This is an EXPERIMENTAL release, please bear with its bugs and"
@@ -152,20 +166,6 @@ pkg_postinst() {
elog "file. It has been moved to /etc/X11/gdm/gdm-pre-gnome-2.16"
mv /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm-pre-gnome-2.16
fi
-
- # Soft restart, assumes Gentoo defaults for file locations
- # Do restart after gdm.conf move above
- FIFOFILE=/var/gdm/.gdmfifo
- PIDFILE=/var/run/gdm.pid
-
- if [ -w ${FIFOFILE} ] ; then
- if [ -f ${PIDFILE} ] ; then
- if kill -0 `cat ${PIDFILE}`; then
- (echo;echo SOFT_RESTART) >> ${FIFOFILE}
- fi
- fi
- fi
- gnome2-live_pkg_postinst
}
pkg_postrm() {