xinit: Changes to 'upstream-unstable'
autogen.sh | 5 ++-
configure.ac | 12 +++------
cpprules.in | 2 -
startx.cpp | 76 ++++++++++++++++++-----------------------------------------
xinit.c | 14 +++++-----
xinitrc.cpp | 43 ---------------------------------
6 files changed, 39 insertions(+), 113 deletions(-)
New commits:
commit 6f6747d500439782476cf5c029a7fc45fc954c86
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Sep 11 16:29:06 2014 +0200
xinit 1.3.4
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/configure.ac b/configure.ac
index 3e9bd79..18794b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([xinit], [1.3.3],
+AC_INIT([xinit], [1.3.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinit])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
commit e91faac94e36937c96c04277eae7960bf5132b5b
Author: Brad Smith <brad@comstyle.com>
Date: Fri Aug 29 01:34:16 2014 -0400
Remove hardcoded path to OpenSSL for OpenBSD
Since xinit's autoconf script was changed to use AC_PATH_PROGS() to find
openssl this hardcoded path to openssl can be removed. This was noticed
recently when openssl was moved from /usr/sbin to /usr/bin and developers
were looking for anything having hardcoded paths.
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
diff --git a/configure.ac b/configure.ac
index f04b7c1..3e9bd79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -160,9 +160,6 @@ if test "x$MCOOKIE" = x ; then
MCOOKIE="$OPENSSL rand -hex 16"
else
case $host_os in
- *openbsd*)
- MCOOKIE='/usr/sbin/openssl rand -hex 16'
- ;;
*solaris*)
MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '"
;;
commit 94b002262d27975dabf56c77fd308ebabc894090
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Aug 26 11:52:20 2014 +0200
startx: Make the bugzilla reference in a comment survive cpp processing
https://bugs.freedesktop.org/show_bug.cgi?id=83019
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/startx.cpp b/startx.cpp
index 5dafce7..1c6fce0 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -191,7 +191,7 @@ if [ x"$server" = x ]; then
#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
+ 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]+$')
commit 5502aaf99f4e723e96791e8f4cf01e0c200ec269
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat May 31 21:39:32 2014 -0700
autogen.sh: Honor NOCONFIGURE=1
See http://people.gnome.org/~walters/docs/build-api.txt
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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
commit a6a720b5181d4d0529e4eb203ece234ba45f69dd
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat May 31 21:38:41 2014 -0700
configure: Drop AM_MAINTAINER_MODE
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
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],
commit 1b23094a8606bf383ec6c7803a9cd300b1bb96a7
Author: Hans de Goede <hdegoede@redhat.com>
Date: Mon Apr 7 11:23:48 2014 +0200
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@redhat.com>
Reviewed-by: James Cloos <cloos@jhcloos.com>
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
commit 44915d6953076849b69a017f6fc8234b0f254362
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Mar 25 11:54:31 2014 +0100
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@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
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
commit 79479a0c45f3177ddf0bb2666d39535b6c767c07
Author: Hans de Goede <hdegoede@redhat.com>
Date: Tue Mar 25 11:48:58 2014 +0100
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@redhat.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
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) > $@
commit 7f54370baca4203bb344f5f8a4c2683f5b78d50b
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 27 14:37:19 2014 +0100
Bump required util-macros version to 1.19
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
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
commit fdf03cd2fdfd9cd5635334c5e4dc2bb23e92e37a
Author: Hans de Goede <hdegoede@redhat.com>
Date: Thu Mar 27 12:29:19 2014 +0100
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@redhat.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
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"
commit 463b85fcf51d8ff5886ebe1f3481e5cb4d603436
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Nov 22 23:03:39 2013 -0800
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@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) > $@
commit 182920f156c87715d91b2f64b8781a0072af996e
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Sep 8 09:48:50 2013 -0700
Fix warnings about parameters to startServer & startClient shadowing globals
Signed-off-by: Alan Coopersmith <alan.coopersmith@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");
Reply to: