From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 16DF0138010 for ; Wed, 12 Sep 2012 12:06:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B0D221C01E; Wed, 12 Sep 2012 12:06:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D855121C01E for ; Wed, 12 Sep 2012 12:06:48 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBFF333D808 for ; Wed, 12 Sep 2012 12:06:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AAFB9E543C for ; Wed, 12 Sep 2012 12:06:46 +0000 (UTC) From: "Nirbheek Chauhan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nirbheek Chauhan" Message-ID: <1347451539.3e604a8c0dd7aeae36091704cc2f56690bae2845.nirbheek@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: gnome-base/gdm/, gnome-base/gdm/files/ X-VCS-Repository: proj/gnome X-VCS-Files: gnome-base/gdm/0001-ibus.patch gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch gnome-base/gdm/files/gdm-2.32.0-custom-session.patch gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch gnome-base/gdm/files/gdm-2.32.0-fix-vt-problems.patch gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch gnome-base/gdm/files/gdm-3.5.91-fix-daemonize-regression.patch gnome-base/gdm/files/gdm.sh gnome-base/gdm/gdm-3.5.91-r1.ebuild gnome-base/gdm/gdm-9999.ebuild X-VCS-Directories: gnome-base/gdm/ gnome-base/gdm/files/ X-VCS-Committer: nirbheek X-VCS-Committer-Name: Nirbheek Chauhan X-VCS-Revision: 3e604a8c0dd7aeae36091704cc2f56690bae2845 X-VCS-Branch: master Date: Wed, 12 Sep 2012 12:06:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f3961b00-c9ac-4783-a57b-01cfb8ef7b41 X-Archives-Hash: fff75a7bd1430e99c9d1abcd5370d516 commit: 3e604a8c0dd7aeae36091704cc2f56690bae2845 Author: Nirbheek Chauhan gentoo org> AuthorDate: Wed Sep 12 12:05:39 2012 +0000 Commit: Nirbheek Chauhan gentoo org> CommitDate: Wed Sep 12 12:05:39 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=3e604a8c gnome-base/gdm: fix problems with 3.5.91 and remove old patches GDM 3.5.91 will now work properly --- gnome-base/gdm/0001-ibus.patch | 91 +++++++++ .../gdm-2.32.0-automagic-libxklavier-support.patch | 60 ------ .../gdm/files/gdm-2.32.0-custom-session.patch | 51 ----- .../gdm-2.32.0-fix-daemonize-regression.patch | 126 ------------- .../gdm/files/gdm-2.32.0-fix-vt-problems.patch | 195 -------------------- .../gdm/files/gdm-2.32.0-selinux-remove-attr.patch | 27 --- .../gdm-3.5.91-fix-daemonize-regression.patch | 125 ------------- gnome-base/gdm/files/gdm.sh | 3 + gnome-base/gdm/gdm-3.5.91-r1.ebuild | 10 +- gnome-base/gdm/gdm-9999.ebuild | 10 +- 10 files changed, 100 insertions(+), 598 deletions(-) diff --git a/gnome-base/gdm/0001-ibus.patch b/gnome-base/gdm/0001-ibus.patch new file mode 100644 index 0000000..fc9f76b --- /dev/null +++ b/gnome-base/gdm/0001-ibus.patch @@ -0,0 +1,91 @@ +From 1176f42d2aee73ac93a4d96d6cfdcb2513f3c031 Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan +Date: Wed, 12 Sep 2012 17:11:39 +0530 +Subject: [PATCH] ibus + +--- + app-i18n/ibus/Manifest | 2 +- + app-i18n/ibus/ibus-1.4.99.20120822.ebuild | 17 +++++++---------- + 2 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/app-i18n/ibus/Manifest b/app-i18n/ibus/Manifest +index b86e7fd..1e6c5e8 100644 +--- a/app-i18n/ibus/Manifest ++++ b/app-i18n/ibus/Manifest +@@ -1,2 +1,2 @@ + DIST ibus-1.4.99.20120822.tar.gz 1736787 SHA256 237c623d24b356e2d43d1a66cfe839849f9ea85d04c809cc2b5650db097a4173 SHA512 f193fa7522d64944bff8a34a0fa0f85a9afd491ebe9c6cd1c27d64b7382ed21e4319a939b959d42d321d44fb6b129b5ed52fec372eaaea0d4905b08053e36d25 WHIRLPOOL 1b96a9d9835138b211554af90e15e5b2373c1ec65cafd20783279084848f7148a2a44b2b86d0fc8f9ab7f86319b2a712241901b215caa7de24c1653f48917b2b +-EBUILD ibus-1.4.99.20120822.ebuild 3805 SHA256 441e6af243b43567ec68a2dc0324d7f9330f023f3fc38eb986783f88ae700dbb SHA512 a7bf07ac33b0279a3d84fe27e36838692f48dea166bf1f7bee73659654869eec395227451b2edd7dfeb3dab0e111e5781d5455a7f68c25803ac8c3c50aa07913 WHIRLPOOL efa7a8c85f04c6dee4c428cfd6a3dd5619d795baf2eecd3ca182825abf7ee3b0dd0665f9e9801103fc335d6317b8e90c14813ab93627fc3431914b179464aab3 ++EBUILD ibus-1.4.99.20120822.ebuild 3673 SHA256 cb9a349db47f89fbce01006e156782c080b7a747b316823ee0c7a0738dcefb1a SHA512 78b971e906bed4eecfaef4f38aafaa532748897d6a993920931c49dccf4b2047a4a9f5de7686d1d1a56cd0bffc8a76efc767aa3aa532235986e4e091b7133671 WHIRLPOOL 120a8b421da300a3727502382fe1c8ded337765c7528d6c4d86a8a6abe2f6c0886c0831fa904265a5ce1a3f83bfb0105ed967e53688e64b921eb37dbb503e9e7 +diff --git a/app-i18n/ibus/ibus-1.4.99.20120822.ebuild b/app-i18n/ibus/ibus-1.4.99.20120822.ebuild +index dc7bf8b..048c53f 100644 +--- a/app-i18n/ibus/ibus-1.4.99.20120822.ebuild ++++ b/app-i18n/ibus/ibus-1.4.99.20120822.ebuild +@@ -3,7 +3,7 @@ + # $Header: /var/cvsroot/gentoo-x86/app-i18n/ibus/ibus-1.4.2.ebuild,v 1.1 2012/08/29 10:30:59 naota Exp $ + + EAPI="4" +-PYTHON_DEPEND="gui? 2:2.5" ++PYTHON_DEPEND="python-library? 2:2.5" + + inherit eutils gnome2-utils multilib python virtualx + +@@ -14,8 +14,8 @@ SRC_URI="http://ibus.googlecode.com/files/${P}.tar.gz" + LICENSE="LGPL-2.1" + SLOT="0" + KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd" +-IUSE="dconf doc +gconf gtk gtk3 +introspection nls +gui +python-library test vala +X" +-REQUIRED_USE="|| ( gtk gtk3 X ) gui? ( gtk3 )" #342903 ++IUSE="+dconf doc gconf gtk +gtk3 +introspection nls +python-library test vala X" ++REQUIRED_USE="|| ( gtk gtk3 X )" #342903 + + COMMON_DEPEND=">=dev-libs/glib-2.26:2 + gnome-base/librsvg:2 +@@ -32,10 +32,6 @@ COMMON_DEPEND=">=dev-libs/glib-2.26:2 + introspection? ( >=dev-libs/gobject-introspection-0.6.8 ) + nls? ( virtual/libintl )" + RDEPEND="${COMMON_DEPEND} +- gui? ( +- x11-libs/gdk-pixbuf:2[introspection] +- x11-libs/pango[introspection] +- x11-libs/gtk+:3[introspection] ) + python-library? ( + dev-python/pygtk:2 + >=dev-python/dbus-python-0.83 )" +@@ -56,7 +52,7 @@ RESTRICT="test" + DOCS="AUTHORS ChangeLog NEWS README" + + pkg_setup() { +- if use python-library || use gui; then ++ if use python-library; then + python_set_active_version 2 + python_pkg_setup + fi +@@ -64,7 +60,7 @@ pkg_setup() { + + src_configure() { + local python valac +- if use python-library || use gui; then ++ if use python-library; then + # We cannot call $(PYTHON) if we haven't called python_pkg_setup + python="PYTHON=$(PYTHON)" + fi +@@ -72,6 +68,8 @@ src_configure() { + vala="VALAC=$(type -P valac-0.18) VAPIGEN=$(type -P vapigen-0.18)" + fi + econf \ ++ --disable-ui \ ++ --disable-engine \ + $(use_enable dconf) \ + $(use_enable doc gtk-doc) \ + $(use_enable doc gtk-doc-html) \ +@@ -80,7 +78,6 @@ src_configure() { + $(use_enable gtk gtk2) \ + $(use_enable gtk xim) \ + $(use_enable gtk3) \ +- $(use_enable gtk3 ui) \ + $(use_enable gtk3 setup) \ + $(use_enable nls) \ + $(use_enable python-library) \ +-- +1.7.8.6 + diff --git a/gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch b/gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch deleted file mode 100644 index 90c1cef..0000000 --- a/gnome-base/gdm/files/gdm-2.32.0-automagic-libxklavier-support.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 481fe43b653b443ecfa8d4f3aa88d734d17cccd5 Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue -Date: Tue, 2 Nov 2010 23:21:27 +0100 -Subject: [PATCH 6/6] fix libxklavier automagic support - -libxklavier support is optional, make that fact explicit. ---- - configure.ac | 28 +++++++++++++++++++--------- - 1 files changed, 19 insertions(+), 9 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 71d0247..10dbb72 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -129,17 +129,26 @@ SIMPLE_GREETER_LIBS="$SIMPLE_GREETER_LIBS -lm" - 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(SIMPLE_CHOOSER, - dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION -@@ -1467,5 +1476,6 @@ echo \ - SELinux support: ${with_selinux} - ConsoleKit support: ${use_console_kit} - UPower support: ${have_upower} -+ Libxklavier support: ${have_libxklavier} - Build with RBAC: ${msg_rbac_shutdown} - " --- -1.7.3.1 - diff --git a/gnome-base/gdm/files/gdm-2.32.0-custom-session.patch b/gnome-base/gdm/files/gdm-2.32.0-custom-session.patch deleted file mode 100644 index c48cb07..0000000 --- a/gnome-base/gdm/files/gdm-2.32.0-custom-session.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2dc0d268c7cc5d6133a9594adcd67dc543288b8f Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue -Date: Tue, 2 Nov 2010 23:19:07 +0100 -Subject: [PATCH 4/6] make custom session work - -Gentoo bug: #216984 - -fix custom sessions not doing sourcing in the proper order. ---- - data/Xsession.in | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/data/Xsession.in b/data/Xsession.in -index b2d98f2..0da187d 100755 ---- a/data/Xsession.in -+++ b/data/Xsession.in -@@ -153,15 +153,6 @@ if [ -n "$GDM_LANG" ]; then - export LANG - 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" -a ! -d "$i" ]; then -- . "$i" -- fi -- done --fi -- - if [ "x$command" = "xcustom" ] ; then - if [ -x "$HOME/.xsession" ]; then - command="$HOME/.xsession" -@@ -189,6 +180,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 --- -1.7.3.1 - diff --git a/gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch b/gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch deleted file mode 100644 index 2ae7f61..0000000 --- a/gnome-base/gdm/files/gdm-2.32.0-fix-daemonize-regression.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 7f5104b242e6b36e6143183b14582d362763ff2a Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue -Date: Tue, 2 Nov 2010 23:16:51 +0100 -Subject: [PATCH 2/6] daemonize so that the boot process can continue - -Gentoo bug: #236701 - -Originally from: Dan Nicholson - -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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 64 insertions(+), 0 deletions(-) - -diff --git a/daemon/main.c b/daemon/main.c -index 5b8d66b..191b6e3 100644 ---- a/daemon/main.c -+++ b/daemon/main.c -@@ -513,6 +513,56 @@ is_debug_set (void) - return debug; - } - -+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) -@@ -523,14 +573,17 @@ main (int argc, - DBusGConnection *connection; - GError *error; - int ret; -+ int i; - gboolean res; - gboolean xdmcp_enabled; - GdmSignalHandler *signal_handler; - static gboolean do_timed_exit = FALSE; - static gboolean print_version = FALSE; - static gboolean fatal_warnings = FALSE; -+ static gboolean no_daemon = FALSE; - static GOptionEntry entries [] = { - { "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 }, - -@@ -547,6 +600,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); -@@ -617,6 +678,9 @@ main (int argc, - exit (-1); - } - -+ if (no_daemon == FALSE) -+ daemonify (); -+ - /* pid file */ - delete_pid (); - write_pid (); --- -1.7.3.1 - diff --git a/gnome-base/gdm/files/gdm-2.32.0-fix-vt-problems.patch b/gnome-base/gdm/files/gdm-2.32.0-fix-vt-problems.patch deleted file mode 100644 index f219a14..0000000 --- a/gnome-base/gdm/files/gdm-2.32.0-fix-vt-problems.patch +++ /dev/null @@ -1,195 +0,0 @@ -From 64002e623fea54ab10040206d164c5fdee4a43d2 Mon Sep 17 00:00:00 2001 -From: Nirbheek Chauhan -Date: Fri, 15 Apr 2011 22:13:44 +0530 -Subject: [PATCH] Fix VT grab race with getty causing X to grab the wrong VT - -On bootup, if X is spawned without any args, it'll take up the first unused VT. -If GDM starts up before gettys are spawned, X takes up VT1 or VT2 depending on -the init system and bootsplash. - -This is problematic because afterwards getty will come up underneath X, and -cause keyboard problems and eventually crash X. - -So we read /etc/inittab, check for open VTs, compare the two values, and take -the conservative one. ---- - configure.ac | 4 ++ - daemon/Makefile.am | 1 + - daemon/gdm-server.c | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++- - 3 files changed, 110 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ca0f8bb..b9e7462 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -302,6 +302,10 @@ AC_CHECK_TYPE(socklen_t,, - AC_CHECK_HEADERS(sys/sockio.h) - AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv]) - -+dnl Needed for querying the kernel for free VTs -+AC_CHECK_HEADERS(sys/vt.h) -+AC_CHECK_HEADERS(sys/ioctl.h) -+ - dnl checks needed for Darwin compatibility to linux **environ. - AC_CHECK_HEADERS(crt_externs.h) - AC_CHECK_FUNCS(_NSGetEnviron) -diff --git a/daemon/Makefile.am b/daemon/Makefile.am -index da18835..c1b6bda 100644 ---- a/daemon/Makefile.am -+++ b/daemon/Makefile.am -@@ -14,6 +14,7 @@ AM_CPPFLAGS = \ - -DLIBEXECDIR=\"$(libexecdir)\" \ - -DLOGDIR=\"$(logdir)\" \ - -DSBINDIR=\"$(sbindir)\" \ -+ -DSYSCONFDIR=\""$(sysconfdir)"\" \ - -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ - -DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \ - -DGDM_SCREENSHOT_DIR=\"$(GDM_SCREENSHOT_DIR)\" \ -diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c -index 339f3cc..29d16dc 100644 ---- a/daemon/gdm-server.c -+++ b/daemon/gdm-server.c -@@ -26,6 +26,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include -@@ -42,6 +44,7 @@ - #include - #include - #include -+#include - - #include /* for Display */ - -@@ -54,6 +57,8 @@ extern char **environ; - - #define GDM_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SERVER, GdmServerPrivate)) - -+#define INITTAB SYSCONFDIR"/inittab" -+ - /* These are the servstat values, also used as server - * process exit codes */ - #define SERVER_TIMEOUT 2 /* Server didn't start */ -@@ -674,6 +679,105 @@ gdm_server_spawn (GdmServer *server, - } - - /** -+ * Parse the inittab file used by getty to spawn VTs to find unused ttys -+ */ -+static int -+get_free_vt_from_inittab () -+{ -+ GFile *gfile; -+ GFileInputStream *contents; -+ GDataInputStream *dstream; -+ GRegex *getty; -+ GMatchInfo *tty_match = NULL; -+ GSList *tty_list = NULL; -+ GError *error = NULL; -+ gchar *temp = NULL; -+ int vtno = 0; -+ -+ gfile = g_file_new_for_path (INITTAB); -+ contents = g_file_read (gfile, NULL, &error); -+ g_object_unref (gfile); -+ if (!contents) { -+ if (error) { -+ g_debug ("Unable to open file %s", INITTAB); -+ g_error_free (error); -+ } -+ goto out; -+ } -+ -+ dstream = g_data_input_stream_new (G_INPUT_STREAM (contents)); -+ getty = g_regex_new ("^c[0-9]+:.+getty.+tty([0-9]+)", 0, 0, NULL); -+ g_object_unref (contents); -+ -+ while (1) { -+ temp = g_data_input_stream_read_line (dstream, NULL, NULL, &error); -+ if (!temp) -+ break; -+ if (!g_regex_match (getty, temp, 0, &tty_match)) -+ continue; -+ g_free (temp); -+ temp = g_match_info_fetch (tty_match, 1); -+ if (!temp) -+ continue; -+ tty_list = g_slist_insert_sorted (tty_list, temp, (GCompareFunc)g_strcmp0); -+ g_match_info_free (tty_match); -+ } -+ -+ if (error) { -+ g_debug ("Unable to read line from %s", INITTAB); -+ g_error_free (error); -+ goto free; -+ } -+ -+ /* Ignore holes in vt allocation, just take the last one */ -+ temp = g_slist_last (tty_list)->data; -+ if (temp) -+ vtno = (int) g_ascii_strtoull (temp, NULL, 10) + 1; -+ -+free: -+ g_object_unref (dstream); -+ g_regex_unref (getty); -+ g_slist_free_full (tty_list, g_free); -+ g_free (error); -+out: -+ return vtno; -+} -+ -+/** -+ * Query the VT_* kernel ioctls to find an empty tty -+ */ -+static int -+get_free_vt_from_kernel() -+{ -+ int fd, vtno = 0; -+ -+ fd = open ("/dev/tty0", O_WRONLY, 0); -+ if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || (vtno == -1)) { -+ vtno = 0; -+ g_debug ("Unable to find a free vt, falling back to Xorg autodetect"); -+ } -+ return vtno; -+} -+ -+static gchar* -+get_free_vt () -+{ -+ int inittab_vtno, kernel_vtno; -+ gchar* vt = NULL; -+ -+ inittab_vtno = get_free_vt_from_inittab(); -+ if (inittab_vtno > 0) -+ g_debug ("Inittab says vt%i is free\n", inittab_vtno); -+ kernel_vtno = get_free_vt_from_kernel(); -+ if (kernel_vtno > 0) -+ g_debug ("Kernel says vt%i is free\n", kernel_vtno); -+ /* Select the greater of the two because getty will use the others */ -+ if (kernel_vtno != 0 && inittab_vtno != 0) -+ vt = g_strdup_printf ("vt%i", kernel_vtno > inittab_vtno ? kernel_vtno : inittab_vtno); -+ return vt; -+} -+ -+/** - * gdm_server_start: - * @disp: Pointer to a GdmDisplay structure - * -@@ -686,7 +790,7 @@ gdm_server_start (GdmServer *server) - gboolean res; - - /* fork X server process */ -- res = gdm_server_spawn (server, NULL); -+ res = gdm_server_spawn (server, get_free_vt()); - - return res; - } --- -1.7.3.4 - diff --git a/gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch b/gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch deleted file mode 100644 index e563aa4..0000000 --- a/gnome-base/gdm/files/gdm-2.32.0-selinux-remove-attr.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 41badd6d2ca652a875fec3eea420ae876023076d Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue -Date: Tue, 2 Nov 2010 23:15:54 +0100 -Subject: [PATCH 1/6] remove unneeded linker directive for selinux - -Gentoo bug: #41022 - ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ed07dce..71d0247 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -873,7 +873,7 @@ if test "x$with_selinux" = "xyes" ; then - AC_CHECK_LIB(selinux,setexeccon,/bin/true) - AC_CHECK_LIB(selinux,is_selinux_enabled,/bin/true) - AC_DEFINE(HAVE_SELINUX, 1, [Define if have selinux]) -- EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lselinux -lattr" -+ EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lselinux" - fi - - dnl --------------------------------------------------------------------------- --- -1.7.3.1 - diff --git a/gnome-base/gdm/files/gdm-3.5.91-fix-daemonize-regression.patch b/gnome-base/gdm/files/gdm-3.5.91-fix-daemonize-regression.patch deleted file mode 100644 index 60aea72..0000000 --- a/gnome-base/gdm/files/gdm-3.5.91-fix-daemonize-regression.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 7f5104b242e6b36e6143183b14582d362763ff2a Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue -Date: Tue, 2 Nov 2010 23:16:51 +0100 -Subject: [PATCH 2/6] daemonize so that the boot process can continue - -Gentoo bug: #236701 - -Originally from: Dan Nicholson - -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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 64 insertions(+), 0 deletions(-) - -diff --git a/daemon/main.c b/daemon/main.c -index 5b8d66b..191b6e3 100644 ---- a/daemon/main.c -+++ b/daemon/main.c -@@ -513,6 +513,56 @@ is_debug_set (void) - return debug; - } - -+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) -@@ -523,13 +573,16 @@ main (int argc, - DBusGConnection *connection; - GError *error; - int ret; -+ int i; - gboolean res; - GdmSignalHandler *signal_handler; - static gboolean do_timed_exit = FALSE; - static gboolean print_version = FALSE; - static gboolean fatal_warnings = FALSE; -+ static gboolean no_daemon = FALSE; - static GOptionEntry entries [] = { - { "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 }, - -@@ -547,6 +600,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); -@@ -617,6 +678,9 @@ main (int argc, - exit (-1); - } - -+ if (no_daemon == FALSE) -+ daemonify (); -+ - /* pid file */ - delete_pid (); - write_pid (); --- -1.7.3.1 - diff --git a/gnome-base/gdm/files/gdm.sh b/gnome-base/gdm/files/gdm.sh new file mode 100644 index 0000000..609f10a --- /dev/null +++ b/gnome-base/gdm/files/gdm.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +gdm-binary & diff --git a/gnome-base/gdm/gdm-3.5.91-r1.ebuild b/gnome-base/gdm/gdm-3.5.91-r1.ebuild index aac7b7e..52e1779 100644 --- a/gnome-base/gdm/gdm-3.5.91-r1.ebuild +++ b/gnome-base/gdm/gdm-3.5.91-r1.ebuild @@ -150,9 +150,6 @@ pkg_setup() { } src_prepare() { - # daemonize so that the boot process can continue, bug #236701 - epatch "${FILESDIR}/${PN}-3.5.91-fix-daemonize-regression.patch" - # GDM grabs VT2 instead of VT7, bug 261339, bug 284053, bug 288852 # XXX: We can now pass a hard-coded initial value; temporary fix #epatch "${FILESDIR}/${PN}-2.32.0-fix-vt-problems.patch" @@ -187,11 +184,10 @@ src_install() { # Install the systemd unit file systemd_dounit "${FILESDIR}/3.4.1/gdm.service" - # gdm-binary should be gdm to work with our init (#5598) - rm -f "${ED}/usr/sbin/gdm" - ln -sfn /usr/sbin/gdm-binary "${ED}/usr/sbin/gdm" + # Install a shell script that runs gdm-binary in the background + cp "${FILESDIR}/gdm.sh" "${ED}/usr/sbin/gdm" # our x11's scripts point to /usr/bin/gdm - ln -sfn /usr/sbin/gdm-binary "${ED}/usr/bin/gdm" + ln -sfn /usr/sbin/gdm "${ED}/usr/bin/gdm" # log, etc. keepdir /var/log/gdm diff --git a/gnome-base/gdm/gdm-9999.ebuild b/gnome-base/gdm/gdm-9999.ebuild index aac7b7e..52e1779 100644 --- a/gnome-base/gdm/gdm-9999.ebuild +++ b/gnome-base/gdm/gdm-9999.ebuild @@ -150,9 +150,6 @@ pkg_setup() { } src_prepare() { - # daemonize so that the boot process can continue, bug #236701 - epatch "${FILESDIR}/${PN}-3.5.91-fix-daemonize-regression.patch" - # GDM grabs VT2 instead of VT7, bug 261339, bug 284053, bug 288852 # XXX: We can now pass a hard-coded initial value; temporary fix #epatch "${FILESDIR}/${PN}-2.32.0-fix-vt-problems.patch" @@ -187,11 +184,10 @@ src_install() { # Install the systemd unit file systemd_dounit "${FILESDIR}/3.4.1/gdm.service" - # gdm-binary should be gdm to work with our init (#5598) - rm -f "${ED}/usr/sbin/gdm" - ln -sfn /usr/sbin/gdm-binary "${ED}/usr/sbin/gdm" + # Install a shell script that runs gdm-binary in the background + cp "${FILESDIR}/gdm.sh" "${ED}/usr/sbin/gdm" # our x11's scripts point to /usr/bin/gdm - ln -sfn /usr/sbin/gdm-binary "${ED}/usr/bin/gdm" + ln -sfn /usr/sbin/gdm "${ED}/usr/bin/gdm" # log, etc. keepdir /var/log/gdm