From 5b4afe216d2759050181a0321b3315e8c2898cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Mon, 25 Jul 2011 20:28:41 +0200 Subject: [PATCH] Upgrade to the current upstream version. --- .gitignore | 1 + sources | 2 +- xinit-1.0.2-client-session.patch | 61 +++++++++++++++++++------------- xinit-1.0.7-unset.patch | 13 ------- xinit-1.0.9-unset.patch | 11 +++--- xorg-x11-xinit.spec | 7 ++-- 6 files changed, 50 insertions(+), 45 deletions(-) delete mode 100644 xinit-1.0.7-unset.patch diff --git a/.gitignore b/.gitignore index 70677d0..1c57f69 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ xinit-1.0.7.tar.bz2 +/xinit-1.3.1.tar.bz2 diff --git a/sources b/sources index 5d28666..8a2c96c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -224c36057e4416205d4e421af01a2f15 xinit-1.0.9.tar.bz2 +ee234056d8a3dbf37b61b4bcb35b88e4 xinit-1.3.1.tar.bz2 diff --git a/xinit-1.0.2-client-session.patch b/xinit-1.0.2-client-session.patch index c75a693..a38c883 100644 --- a/xinit-1.0.2-client-session.patch +++ b/xinit-1.0.2-client-session.patch @@ -1,26 +1,39 @@ -diff -up xinit-1.0.9/xinit.c.client-session xinit-1.0.9/xinit.c ---- xinit-1.0.9/xinit.c.client-session 2008-05-21 14:09:16.000000000 -0400 -+++ xinit-1.0.9/xinit.c 2008-08-25 09:57:56.000000000 -0400 -@@ -727,11 +727,21 @@ startClient(char *client[]) +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[]) { - setWindowPath(); - if ((clientpid = vfork()) == 0) { -+ int fd; - if (setuid(getuid()) == -1) { - Error("cannot change uid: %s\n", strerror(errno)); - _exit(ERR_EXIT); - } -- setpgid(0, getpid()); -+ fd = open ("/dev/null", O_RDONLY); + 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(); - environ = newenviron; - #ifdef __UNIXOS2__ - #undef environ ++ 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/xinit-1.0.7-unset.patch b/xinit-1.0.7-unset.patch deleted file mode 100644 index ad19be0..0000000 --- a/xinit-1.0.7-unset.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up xinit-1.0.7/startx.cpp.jx xinit-1.0.7/startx.cpp ---- xinit-1.0.7/startx.cpp.jx 2007-09-16 17:24:48.000000000 -0400 -+++ xinit-1.0.7/startx.cpp 2008-02-11 14:05:03.000000000 -0500 -@@ -13,6 +13,9 @@ XCOMM Site administrators are STRONGLY u - XCOMM - XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $ - -+unset DBUS_SESSION_BUS_ADDRESS -+unset SESSION_MANAGER -+ - #if defined(__SCO__) || defined(__UNIXWARE__) - - XCOMM Check for /usr/bin/X11 and BINDIR in the path, if not add them. diff --git a/xinit-1.0.9-unset.patch b/xinit-1.0.9-unset.patch index 0f9b04f..b8ae4ae 100644 --- a/xinit-1.0.9-unset.patch +++ b/xinit-1.0.9-unset.patch @@ -1,9 +1,10 @@ -diff -up xinit-1.0.9/startx.cpp.jx xinit-1.0.9/startx.cpp ---- xinit-1.0.9/startx.cpp.jx 2008-05-21 14:29:51.000000000 -0400 -+++ xinit-1.0.9/startx.cpp 2009-05-08 13:46:44.000000000 -0400 -@@ -13,6 +13,7 @@ XCOMM Site administrators are STRONGLY u +Index: xinit-1.3.1/startx.cpp +=================================================================== +--- xinit-1.3.1.orig/startx.cpp ++++ xinit-1.3.1/startx.cpp +@@ -11,6 +11,7 @@ XCOMM + XCOMM Site administrators are STRONGLY urged to write nicer versions. XCOMM - XCOMM $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $ +unset XDG_SESSION_COOKIE unset DBUS_SESSION_BUS_ADDRESS diff --git a/xorg-x11-xinit.spec b/xorg-x11-xinit.spec index 4c9a171..92d8d92 100644 --- a/xorg-x11-xinit.spec +++ b/xorg-x11-xinit.spec @@ -2,8 +2,8 @@ Summary: X.Org X11 X Window System xinit startup scripts Name: xorg-x11-%{pkgname} -Version: 1.0.9 -Release: 21%{?dist} +Version: 1.3.1 +Release: 1%{?dist} License: MIT Group: User Interface/X URL: http://www.x.org @@ -123,6 +123,9 @@ install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compa %{_datadir}/xsessions/xinit-compat.desktop %changelog +* Mon Jul 25 2011 Matěj Cepl - 1.3.1-1 +- New upstream version. Patches updated. + * Sat May 28 2011 Matěj Cepl - 1.0.9-21 - xinitrc-common sources ~/.profile (Bug 551508)