From eabec94692ed5d1fed0f96e03f3760933f16816a Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 5 Feb 2013 20:20:53 +0100 Subject: [PATCH] xorg-x11-xinit: Update to 1.3.2. This is a major update to the latest stable version. --- .../patches/xinit-1.0.2-client-session.patch | 39 +++++++++++++++++++ .../xorg-x11-xinit-1.3.2-systemd-logind.patch | 27 +++++++++++++ xorg-x11-xinit/xorg-x11-xinit.nm | 10 ++++- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 xorg-x11-xinit/patches/xinit-1.0.2-client-session.patch create mode 100644 xorg-x11-xinit/patches/xorg-x11-xinit-1.3.2-systemd-logind.patch diff --git a/xorg-x11-xinit/patches/xinit-1.0.2-client-session.patch b/xorg-x11-xinit/patches/xinit-1.0.2-client-session.patch new file mode 100644 index 000000000..a38c883b8 --- /dev/null +++ b/xorg-x11-xinit/patches/xinit-1.0.2-client-session.patch @@ -0,0 +1,39 @@ +Index: xinit-1.3.1/xinit.c +=================================================================== +--- xinit-1.3.1.orig/xinit.c ++++ xinit-1.3.1/xinit.c +@@ -91,6 +91,8 @@ char xserverrcbuf[256]; + + #define TRUE 1 + #define FALSE 0 ++#define OK_EXIT 0 ++#define ERR_EXIT 1 + + static char *default_server = "X"; + static char *default_display = ":0"; /* choose most efficient */ +@@ -561,6 +563,7 @@ startClient(char *client[]) + { + clientpid = fork(); + if (clientpid == 0) { ++ int fd; + set_environment(); + setWindowPath(); + +@@ -568,7 +571,16 @@ startClient(char *client[]) + Error("cannot change uid"); + _exit(EXIT_FAILURE); + } +- setpgid(0, getpid()); ++ fd = open ("/dev/null", O_RDONLY); ++ ++ if (fd < 0) { ++ Error("cannot open /dev/null: %s\n", strerror(errno)); ++ _exit(ERR_EXIT); ++ } ++ close (STDIN_FILENO); ++ dup2 (fd, STDIN_FILENO); ++ close (fd); ++ setsid(); + Execute(client); + Error("Unable to run program \"%s\"", client[0]); + diff --git a/xorg-x11-xinit/patches/xorg-x11-xinit-1.3.2-systemd-logind.patch b/xorg-x11-xinit/patches/xorg-x11-xinit-1.3.2-systemd-logind.patch new file mode 100644 index 000000000..85261da5e --- /dev/null +++ b/xorg-x11-xinit/patches/xorg-x11-xinit-1.3.2-systemd-logind.patch @@ -0,0 +1,27 @@ +diff -Nur xinit-1.3.2.orig/startx.cpp xinit-1.3.2/startx.cpp +--- xinit-1.3.2.orig/startx.cpp 2012-09-29 11:55:06.661264745 -0600 ++++ xinit-1.3.2/startx.cpp 2012-09-29 11:56:24.849771316 -0600 +@@ -80,6 +80,7 @@ + defaultdisplay=":0" + clientargs="" + serverargs="" ++tty_num=$(tty | grep -oE '[0-9]+$') + + #ifdef __APPLE__ + +@@ -135,6 +136,15 @@ + enable_xauth=1 + #endif + ++if [ x"$tty_num" != x ]; then ++ # Specify TTY number directly to avoid recognizing startx session as ++ # inactive: RHBZ#820675 ++ serverargs=${serverargs}" vt"${tty_num} ++else ++ echo "Error getting tty num" ++ exit 1 ++fi ++ + XCOMM Automatically determine an unused $DISPLAY + d=0 + while true ; do diff --git a/xorg-x11-xinit/xorg-x11-xinit.nm b/xorg-x11-xinit/xorg-x11-xinit.nm index c9991fb8b..c3ad69098 100644 --- a/xorg-x11-xinit/xorg-x11-xinit.nm +++ b/xorg-x11-xinit/xorg-x11-xinit.nm @@ -4,7 +4,7 @@ ############################################################################### name = xorg-x11-xinit -version = 1.2.1 +version = 1.3.2 release = 1 thisapp = xinit-%{version} @@ -21,9 +21,17 @@ source_dl = http://ftp.x.org/pub/individual/app/ build requires + autoconf + automake libX11-devel + libtool xorg-x11-util-macros end + + prepare_cmds + # Regenerate build system. + autoreconf -vfi + end end packages