[arch-commits] Commit in xorg-xinit/trunk (4 files)

Laurent Carlier lcarlier at archlinux.org
Tue Aug 26 12:06:48 UTC 2014


    Date: Tuesday, August 26, 2014 @ 14:06:47
  Author: lcarlier
Revision: 220665

upgpkg: xorg-xinit 1.3.3-4

add more upstream fixes, with one for systemd-login

Added:
  xorg-xinit/trunk/git-upstream-fixes.patch
Modified:
  xorg-xinit/trunk/PKGBUILD
Deleted:
  xorg-xinit/trunk/cpp-4.8-compat.patch
  xorg-xinit/trunk/fix-globals-shadowing.patch

-----------------------------+
 PKGBUILD                    |   11 
 cpp-4.8-compat.patch        |   22 -
 fix-globals-shadowing.patch |   58 ----
 git-upstream-fixes.patch    |  517 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 521 insertions(+), 87 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-08-26 08:54:21 UTC (rev 220664)
+++ PKGBUILD	2014-08-26 12:06:47 UTC (rev 220665)
@@ -4,7 +4,7 @@
 
 pkgname=xorg-xinit
 pkgver=1.3.3
-pkgrel=3
+pkgrel=4
 pkgdesc="X.Org initialisation program "
 arch=('i686' 'x86_64')
 license=('custom')
@@ -22,8 +22,7 @@
         xinitrc
         xsession
         xserverrc
-        cpp-4.8-compat.patch
-        fix-globals-shadowing.patch)
+        git-upstream-fixes.patch)
 options=(!emptydirs)
 sha256sums=('74b2878de6e3d5b5948f1562a77e7f53b4e10621e505ddb278050c7f3cae00af'
             'a5c6ced5822bbb3145e0f30a4b12995782ca6d80ff2d927851ec91b5e41212cb'
@@ -31,15 +30,13 @@
             '38a23848b49de8a5c635a128a8b32a6cd0a08a9ee153ad97cb25abd82cfda1bc'
             '2b94a42f2521cb5662fb9a5765a7507456dc0352ac9d0f44c56b359dcdb38898'
             '5e87bff928c143d9db9966048f6530e83e9e9a1cac09ce4c25f8aabc08611b6f'
-            '194104efba9bcbf8ec0bd9ac1b145017d459b734afbc8bbfc37e361efd467a96'
-            '6491c96dd0e98b6f5a45c4f0183eabcf2fb54728c81e793910c19d4107606bb1')
+            'dc520f1fb5b57a6ae1622efc1fda7348c1e6ed85972404368362ed62cbb5da88')
 
 prepare() {
   cd xinit-${pkgver}
   patch -Np1 -i ../06_move_serverauthfile_into_tmp.diff
   patch -Np1 -i ../fs25361.patch
-  patch -Np1 -i ../cpp-4.8-compat.patch
-  patch -Np1 -i ../fix-globals-shadowing.patch
+  patch -Np1 -i ../git-upstream-fixes.patch
   sed -i -e 's/XSLASHGLOB.sh/XSLASHGLOB/' xinitrc.cpp
 }
 

Deleted: cpp-4.8-compat.patch
===================================================================
--- cpp-4.8-compat.patch	2014-08-26 08:54:21 UTC (rev 220664)
+++ cpp-4.8-compat.patch	2014-08-26 12:06:47 UTC (rev 220665)
@@ -1,22 +0,0 @@
-From 463b85fcf51d8ff5886ebe1f3481e5cb4d603436 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <alan.coopersmith at oracle.com>
-Date: Sat, 23 Nov 2013 07:03:39 +0000
-Subject: Pass files to cpp via CLI arg instead of stdin to workaround gcc 4.8 change
-
-Fixes Bug 69439 - Empty lines before #!/bin/sh in startx
-https://bugs.freedesktop.org/show_bug.cgi?id=69439
-
-Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
----
-diff --git a/cpprules.in b/cpprules.in
-index eaea428..0931bee 100644
---- a/cpprules.in
-+++ b/cpprules.in
-@@ -15,4 +15,4 @@ CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
- SUFFIXES = .cpp
- 
- .cpp:
--	$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
-+	$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
---
-cgit v0.9.0.2-2-gbebe

Deleted: fix-globals-shadowing.patch
===================================================================
--- fix-globals-shadowing.patch	2014-08-26 08:54:21 UTC (rev 220664)
+++ fix-globals-shadowing.patch	2014-08-26 12:06:47 UTC (rev 220665)
@@ -1,58 +0,0 @@
-From 182920f156c87715d91b2f64b8781a0072af996e Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <alan.coopersmith at oracle.com>
-Date: Sun, 08 Sep 2013 16:48:50 +0000
-Subject: Fix warnings about parameters to startServer & startClient shadowing globals
-
-Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
----
-diff --git a/xinit.c b/xinit.c
-index 18e3e10..1b04911 100644
---- a/xinit.c
-+++ b/xinit.c
-@@ -390,7 +390,7 @@ processTimeout(int timeout, const char *string)
- }
- 
- static pid_t
--startServer(char *server[])
-+startServer(char *server_argv[])
- {
-     sigset_t mask, old;
-     const char * const *cpp;
-@@ -422,12 +422,12 @@ startServer(char *server[])
-          * if client is xterm -L
-          */
-         setpgid(0,getpid());
--        Execute(server);
-+        Execute(server_argv);
- 
--        Error("unable to run server \"%s\"", server[0]);
-+        Error("unable to run server \"%s\"", server_argv[0]);
- 
-         fprintf(stderr, "Use the -- option, or make sure that %s is in your path and\n", bindir);
--        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server[0]);
-+        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server_argv[0]);
-         fprintf(stderr, "for your display.  Possible server names include:\n\n");
-         for (cpp = server_names; *cpp; cpp++)
-             fprintf(stderr, "    %s\n", *cpp);
-@@ -556,7 +556,7 @@ setWindowPath(void)
- }
- 
- static pid_t
--startClient(char *client[])
-+startClient(char *client_argv[])
- {
-     clientpid = fork();
-     if (clientpid == 0) {
-@@ -568,8 +568,8 @@ startClient(char *client[])
-             _exit(EXIT_FAILURE);
-         }
-         setpgid(0, getpid());
--        Execute(client);
--        Error("Unable to run program \"%s\"", client[0]);
-+        Execute(client_argv);
-+        Error("Unable to run program \"%s\"", client_argv[0]);
- 
-         fprintf(stderr, "Specify a program on the command line or make sure that %s\n", bindir);
-         fprintf(stderr, "is in your path.\n\n");
---
-cgit v0.9.0.2-2-gbebe

Added: git-upstream-fixes.patch
===================================================================
--- git-upstream-fixes.patch	                        (rev 0)
+++ git-upstream-fixes.patch	2014-08-26 12:06:47 UTC (rev 220665)
@@ -0,0 +1,517 @@
+From 182920f156c87715d91b2f64b8781a0072af996e Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date: Sun, 8 Sep 2013 09:48:50 -0700
+Subject: [PATCH 1/9] Fix warnings about parameters to startServer &
+ startClient shadowing globals
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+---
+ xinit.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/xinit.c b/xinit.c
+index 18e3e10..1b04911 100644
+--- a/xinit.c
++++ b/xinit.c
+@@ -390,7 +390,7 @@ processTimeout(int timeout, const char *string)
+ }
+ 
+ static pid_t
+-startServer(char *server[])
++startServer(char *server_argv[])
+ {
+     sigset_t mask, old;
+     const char * const *cpp;
+@@ -422,12 +422,12 @@ startServer(char *server[])
+          * if client is xterm -L
+          */
+         setpgid(0,getpid());
+-        Execute(server);
++        Execute(server_argv);
+ 
+-        Error("unable to run server \"%s\"", server[0]);
++        Error("unable to run server \"%s\"", server_argv[0]);
+ 
+         fprintf(stderr, "Use the -- option, or make sure that %s is in your path and\n", bindir);
+-        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server[0]);
++        fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server_argv[0]);
+         fprintf(stderr, "for your display.  Possible server names include:\n\n");
+         for (cpp = server_names; *cpp; cpp++)
+             fprintf(stderr, "    %s\n", *cpp);
+@@ -556,7 +556,7 @@ setWindowPath(void)
+ }
+ 
+ static pid_t
+-startClient(char *client[])
++startClient(char *client_argv[])
+ {
+     clientpid = fork();
+     if (clientpid == 0) {
+@@ -568,8 +568,8 @@ startClient(char *client[])
+             _exit(EXIT_FAILURE);
+         }
+         setpgid(0, getpid());
+-        Execute(client);
+-        Error("Unable to run program \"%s\"", client[0]);
++        Execute(client_argv);
++        Error("Unable to run program \"%s\"", client_argv[0]);
+ 
+         fprintf(stderr, "Specify a program on the command line or make sure that %s\n", bindir);
+         fprintf(stderr, "is in your path.\n\n");
+-- 
+2.1.0
+
+From 463b85fcf51d8ff5886ebe1f3481e5cb4d603436 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date: Fri, 22 Nov 2013 23:03:39 -0800
+Subject: [PATCH 2/9] Pass files to cpp via CLI arg instead of stdin to
+ workaround gcc 4.8 change
+
+Fixes Bug 69439 - Empty lines before #!/bin/sh in startx
+https://bugs.freedesktop.org/show_bug.cgi?id=69439
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+---
+ cpprules.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpprules.in b/cpprules.in
+index eaea428..0931bee 100644
+--- a/cpprules.in
++++ b/cpprules.in
+@@ -15,4 +15,4 @@ CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
+ SUFFIXES = .cpp
+ 
+ .cpp:
+-	$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
++	$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
+-- 
+2.1.0
+
+From fdf03cd2fdfd9cd5635334c5e4dc2bb23e92e37a Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 27 Mar 2014 12:29:19 +0100
+Subject: [PATCH 3/9] Remove unixware / sco support
+
+We don't support SCO / Unixware anymore, so lets remove the SCO / Unixware
+specific bits from startx and xinitrc
+
+SCO support was removed from the server in 2010:
+http://lists.x.org/archives/xorg-devel/2010-December/017209.html
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Mark Kettenis <kettenis at openbsd.org>
+Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
+---
+ startx.cpp  | 53 +----------------------------------------------------
+ xinitrc.cpp | 43 -------------------------------------------
+ 2 files changed, 1 insertion(+), 95 deletions(-)
+
+diff --git a/startx.cpp b/startx.cpp
+index c595b84..b7a29f9 100644
+--- a/startx.cpp
++++ b/startx.cpp
+@@ -14,7 +14,7 @@ XCOMM
+ unset DBUS_SESSION_BUS_ADDRESS
+ unset SESSION_MANAGER
+ 
+-#if defined(__SCO__) || defined(__UNIXWARE__) || defined(__APPLE__)
++#ifdef __APPLE__
+ 
+ XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them.
+ XCOMM This allows startx to be placed in a place like /usr/bin or /usr/local/bin
+@@ -33,11 +33,7 @@ case $PATH in
+ esac
+ 
+ XCOMM Now the "old" compiled path
+-#ifdef __APPLE__
+ oldbindir=/usr/X11R6/bin
+-#else
+-oldbindir=/usr/bin/X11
+-#endif
+ 
+ if [ -d "$oldbindir" ] ; then
+     case $PATH in
+@@ -51,24 +47,8 @@ XCOMM so export the new PATH just in case the user changes the shell
+ export PATH
+ #endif
+ 
+-#if defined(__SCO__) || defined(__UNIXWARE__)
+-XCOMM Set up the XMERGE env var so that dos merge is happy under X
+-
+-if [ -f /usr/lib/merge/xmergeset.sh ]; then
+-	. /usr/lib/merge/xmergeset.sh
+-elif [ -f /usr/lib/merge/console.disp ]; then
+-	XMERGE=`cat /usr/lib/merge/console.disp`
+-	export XMERGE
+-fi
+-
+-userclientrc=$HOME/.startxrc
+-sysclientrc=LIBDIR/sys.startxrc
+-scouserclientrc=$HOME/.xinitrc
+-scosysclientrc=XINITDIR/xinitrc
+-#else
+ userclientrc=$HOME/.xinitrc
+ sysclientrc=XINITDIR/xinitrc
+-#endif
+ 
+ userserverrc=$HOME/.xserverrc
+ sysserverrc=XINITDIR/xserverrc
+@@ -145,21 +125,6 @@ done
+ defaultdisplay=":$d"
+ unset d
+ 
+-#if defined(__SCO__) || defined(__UNIXWARE__)
+-
+-XCOMM SCO -t option: do not start an X server
+-case $1 in
+-  -t)   if [ -n "$DISPLAY" ]; then
+-                REMOTE_SERVER=TRUE
+-                shift
+-        else
+-                echo "DISPLAY environment variable not set"
+-                exit 1
+-        fi
+-        ;;
+-esac
+-#endif
+-
+ whoseargs="client"
+ while [ x"$1" != x ]; do
+     case "$1" in
+@@ -209,12 +174,6 @@ if [ x"$client" = x ]; then
+             client=$userclientrc
+         elif [ -f "$sysclientrc" ]; then
+             client=$sysclientrc
+-#if defined(__SCO__) || defined(__UNIXWARE__)
+-        elif [ -f "$scouserclientrc" ]; then
+-            client=$scouserclientrc
+-        elif [ -f "$scosysclientrc" ]; then
+-            client=$scosysclientrc
+-#endif
+         fi
+     fi
+ fi
+@@ -319,21 +278,11 @@ EOF
+     done
+ fi
+ 
+-#if defined(__SCO__) || defined(__UNIXWARE__)
+-if [ "$REMOTE_SERVER" = "TRUE" ]; then
+-        exec SHELL_CMD ${client}
+-else
+-        XINIT "$client" $clientargs -- "$server" $display $serverargs
+-fi
+-#else
+-
+ #if defined(__APPLE__) || defined(__CYGWIN__)
+ eval XINIT \"$client\" $clientargs -- \"$server\" $display $serverargs
+ #else
+ XINIT "$client" $clientargs -- "$server" $display $serverargs
+ #endif
+-
+-#endif
+ retval=$?
+ 
+ if [ x"$enable_xauth" = x1 ] ; then
+diff --git a/xinitrc.cpp b/xinitrc.cpp
+index 81c238b..14d3cbc 100644
+--- a/xinitrc.cpp
++++ b/xinitrc.cpp
+@@ -41,49 +41,6 @@ fi
+ 
+ XCOMM start some nice programs
+ 
+-#if defined(__SCO__) || defined(__UNIXWARE__)
+-if [ -r /etc/default/xdesktops ]; then
+-  . /etc/default/xdesktops
+-fi
+-
+-if [ -r $HOME/.x11rc ]; then
+-  . $HOME/.x11rc
+-else
+-  if [ -r /etc/default/X11 ]; then
+-  . /etc/default/X11
+-  fi
+-fi
+-
+-#if defined(__SCO__)
+-if [ -n "$XSESSION" ]; then
+-  case "$XSESSION" in
+-    [Yy][Ee][Ss])
+-      [ -x /usr/bin/X11/scosession ] && exec /usr/bin/X11/scosession
+-      ;;
+-  esac
+-fi
+-
+-if [ -n "$XDESKTOP" ]; then
+-  exec `eval echo $"$XDESKTOP"`
+-else
+-  if [ -x /usr/bin/X11/pmwm -a -x /usr/bin/X11/scoterm ]; then
+-    /usr/bin/X11/scoterm 2> /dev/null &
+-    exec /usr/bin/X11/pmwm    2> /dev/null
+-  fi
+-fi
+-#elif defined(__UNIXWARE__)
+-if [ -n "$XDESKTOP" ]; then
+-  exec `eval echo $"$XDESKTOP"`
+-else
+-  if [ -x /usr/X/bin/pmwm ]; then
+-    exec /usr/X/bin/pmwm    2> /dev/null
+-  fi
+-fi
+-#endif
+-
+-XCOMM This is the fallback case if nothing else is executed above
+-#endif /* !defined(__SCO__)  && !defined(__UNIXWARE__) */
+-
+ if [ -d XINITDIR/xinitrc.d ] ; then
+ 	for f in XINITDIR/xinitrc.d/?*.sh ; do
+ 		[ -x "$f" ] && . "$f"
+-- 
+2.1.0
+
+From 7f54370baca4203bb344f5f8a4c2683f5b78d50b Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 27 Mar 2014 14:37:19 +0100
+Subject: [PATCH 4/9] Bump required util-macros version to 1.19
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3d5ea79..37eabfa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,10 +31,10 @@ AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+ AM_MAINTAINER_MODE
+ 
+-# Require X.Org macros 1.8 or later for AC_PROG_SED in XORG_DEFAULT_OPTIONS
++# Require X.Org macros 1.19 or later for TRADITIONALCPPFLAGS
+ m4_ifndef([XORG_MACROS_VERSION],
+-          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+-XORG_MACROS_VERSION(1.8)
++          [m4_fatal([must install xorg-macros 1.19 or later before running autoconf/autogen])])
++XORG_MACROS_VERSION(1.19)
+ XORG_DEFAULT_OPTIONS
+ 
+ XORG_PROG_RAWCPP
+-- 
+2.1.0
+
+From 79479a0c45f3177ddf0bb2666d39535b6c767c07 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Tue, 25 Mar 2014 11:48:58 +0100
+Subject: [PATCH 5/9] Replace $RAWCPPFLAGS with $TRADITIONALCPPFLAGS when
+ processing cpp files
+
+Various .cpp files containt things like #ifdef __APPLE__ and #ifdef __linux__
+these have been broken (all #ifdef-s always seen as false) since:
+http://cgit.freedesktop.org/xorg/util/macros/commit/?id=d690e4a9febd07988d149a967791c5629c17b258
+
+This commit makes these work again by removing -undef from the cpp flags.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
+---
+ cpprules.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cpprules.in b/cpprules.in
+index 0931bee..870efde 100644
+--- a/cpprules.in
++++ b/cpprules.in
+@@ -15,4 +15,4 @@ CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
+ SUFFIXES = .cpp
+ 
+ .cpp:
+-	$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
++	$(AM_V_GEN)$(RAWCPP) $(TRADITIONALCPPFLAGS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
+-- 
+2.1.0
+
+From 44915d6953076849b69a017f6fc8234b0f254362 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Tue, 25 Mar 2014 11:54:31 +0100
+Subject: [PATCH 6/9] startx: Under Linux start X on the current VT
+
+When we let X allocate a new VT, systemd-logind will not recognize any
+processes running on this VT as belonging to a valid session (since there
+was no pam session opened on that tty).
+
+This causes problems like PolicyKit denials for these processes.
+
+ConsoleKit under Linux has been deprecated for a few years now and is no
+longer being maintained, so simply make this the default under Linux.
+
+Note we do not pass in the vt if the user has specified an alternative server
+to start, as the vtX argument is only valid for the Xorg server, likewise we
+omit it if the user has specified any other server arguments.
+
+Fixes:
+https://bugzilla.redhat.com/show_bug.cgi?id=806491
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
+---
+ startx.cpp | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/startx.cpp b/startx.cpp
+index b7a29f9..f4a0283 100644
+--- a/startx.cpp
++++ b/startx.cpp
+@@ -187,6 +187,17 @@ XCOMM process server arguments
+ if [ x"$server" = x ]; then
+     server=$defaultserver
+ 
++#ifdef __linux__
++    XCOMM When starting the defaultserver start X on the current tty to avoid
++    XCOMM the startx session being seen as inactive:
++    XCOMM https://bugzilla.redhat.com/show_bug.cgi?id=806491
++    tty=$(tty)
++    if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
++        tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
++        defaultserverargs=${defaultserverargs}" vt"${tty_num}
++    fi
++#endif
++
+     XCOMM For compatibility reasons, only use xserverrc if there were no server command line arguments
+     if [ x"$serverargs" = x -a x"$display" = x ]; then
+ 	if [ -f "$userserverrc" ]; then
+-- 
+2.1.0
+
+From 1b23094a8606bf383ec6c7803a9cd300b1bb96a7 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Mon, 7 Apr 2014 11:23:48 +0200
+Subject: [PATCH 7/9] startx: Pass vtX as long as the user did not specify one
+
+Adding vtX to $defaultserverargs means that it will only be added when
+the user specifies no server arguments.
+
+This means that doing ie: "startx -- -depth 16" will cause the server to start
+on a different vt then just "startx", which does not meat the principle of
+least surprise.
+
+Instead always pass the vtX argument, except when the user has specified its
+own vtX argument. Note that vtX still only gets added for the default server,
+since for ie Xnest or Xephyr it makes no sense.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+Reviewed-by: James Cloos <cloos at jhcloos.com>
+---
+ startx.cpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/startx.cpp b/startx.cpp
+index f4a0283..5dafce7 100644
+--- a/startx.cpp
++++ b/startx.cpp
+@@ -59,6 +59,7 @@ defaultserverargs=""
+ defaultdisplay=":0"
+ clientargs=""
+ serverargs=""
++vtarg=""
+ 
+ #ifdef __APPLE__
+ 
+@@ -194,7 +195,7 @@ if [ x"$server" = x ]; then
+     tty=$(tty)
+     if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
+         tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
+-        defaultserverargs=${defaultserverargs}" vt"${tty_num}
++        vtarg="vt$tty_num"
+     fi
+ #endif
+ 
+@@ -213,6 +214,17 @@ if [ x"$serverargs" = x ]; then
+     serverargs=$defaultserverargs
+ fi
+ 
++XCOMM if no vt is specified add vtarg (which may be empty)
++have_vtarg="no"
++for i in $serverargs; do
++    if expr match "$i" '^vt[0-9]\+$' > /dev/null; then
++        have_vtarg="yes"
++    fi
++done
++if [ "$have_vtarg" = "no" ]; then
++    serverargs="$serverargs $vtarg"
++fi
++
+ XCOMM if no display, use default
+ if [ x"$display" = x ]; then
+     display=$defaultdisplay
+-- 
+2.1.0
+
+From a6a720b5181d4d0529e4eb203ece234ba45f69dd Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date: Sat, 31 May 2014 21:38:41 -0700
+Subject: [PATCH 8/9] configure: Drop AM_MAINTAINER_MODE
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+---
+ autogen.sh   | 2 +-
+ configure.ac | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index e81f989..80ae530 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -9,5 +9,5 @@ cd $srcdir
+ autoreconf -v --install || exit 1
+ cd $ORIGDIR || exit $?
+ 
+-$srcdir/configure --enable-maintainer-mode "$@"
++$srcdir/configure "$@"
+ 
+diff --git a/configure.ac b/configure.ac
+index 37eabfa..f04b7c1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,6 @@ AC_CONFIG_HEADERS([config.h])
+ 
+ # Initialize Automake
+ AM_INIT_AUTOMAKE([foreign dist-bzip2])
+-AM_MAINTAINER_MODE
+ 
+ # Require X.Org macros 1.19 or later for TRADITIONALCPPFLAGS
+ m4_ifndef([XORG_MACROS_VERSION],
+-- 
+2.1.0
+
+From 5502aaf99f4e723e96791e8f4cf01e0c200ec269 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith at oracle.com>
+Date: Sat, 31 May 2014 21:39:32 -0700
+Subject: [PATCH 9/9] autogen.sh: Honor NOCONFIGURE=1
+
+See http://people.gnome.org/~walters/docs/build-api.txt
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
+---
+ autogen.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 80ae530..fc34bd5 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -9,5 +9,6 @@ cd $srcdir
+ autoreconf -v --install || exit 1
+ cd $ORIGDIR || exit $?
+ 
+-$srcdir/configure "$@"
+-
++if test -z "$NOCONFIGURE"; then
++    $srcdir/configure "$@"
++fi
+-- 
+2.1.0
+




More information about the arch-commits mailing list