Commit 6c0418ee authored by Jérome Perrin's avatar Jérome Perrin

xorg /tmp/ patch

parent 11e4364d
......@@ -17,6 +17,7 @@ extends =
../perl-XML-Parser/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
./buildout.hash.cfg
parts =
libXdmcp
......@@ -67,7 +68,7 @@ shared = true
url = http://www.x.org/releases/X11R7.7/src/everything/xtrans-1.2.7.tar.bz2
md5sum = 84c66908cf003ad8c272b0eecbdbaee3
patches =
${:_profile_base_location_}/xtrans_tmp_env.patch#37d82a3b6009113023599632117a6855
${:_profile_base_location_}/xtrans_tmp_env.patch#${xtrans_tmp_env.patch:md5sum}
patch-options = -p1
configure-options =
--disable-docs
......@@ -109,7 +110,7 @@ shared = true
url = http://xcb.freedesktop.org/dist/libxcb-1.9.1.tar.bz2
md5sum = ed632cb0dc31b6fbd7ea5c0f931cf5a4
patches =
${:_profile_base_location_}/libxcb_tmp_env.patch#61f39878120ba434a169e24cae2af862
${:_profile_base_location_}/libxcb_tmp_env.patch#${libxcb_tmp_env.patch:md5sum}
patch-options = -p1
configure-options =
--disable-static
......@@ -554,7 +555,7 @@ shared = true
url = http://www.x.org/releases/X11R7.7/src/everything/xorg-server-1.12.2.tar.bz2
md5sum = 791f0323b886abb7954de7f042bb7dc6
patches =
${:_profile_base_location_}/xorg-server_tmp_env.patch#8b60ab8121f0564a681fc00d03101696
${:_profile_base_location_}/xorg-server_tmp_env.patch#${xorg-server_tmp_env.patch:md5sum}
patch-options = -p1
configure-options =
--enable-xvfb
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[libxcb_tmp_env.patch]
filename = libxcb_tmp_env.patch
md5sum = f4d7c0b21da21f18f5eba17d7d19a06c
[xorg-server_tmp_env.patch]
filename = xorg-server_tmp_env.patch
md5sum = cf8587363c7896333034a67537cadc0c
[xtrans_tmp_env.patch]
filename = xtrans_tmp_env.patch
md5sum = 3f41f5145b1c421327b7ecd0ded18b30
Store Xorg lock files and sockets in different directories
see xorg-server_tmp_env.patch
--- libxcb-1.7/src/xcb_util.c.back 2012-04-03 13:30:36.000000000 +0200
+++ libxcb-1.7/src/xcb_util.c 2012-04-03 14:47:00.000000000 +0200
@@ -147,11 +147,31 @@
......@@ -30,7 +34,7 @@
- static const char unix_base[] = "/tmp/.X11-unix/X";
- const char *base = unix_base;
+ char *base;
+ base = _xcb_getandappendcompatibleenv("TMPDIR", "/tmp", "/.X11-unix/X");
+ base = _xcb_getandappendcompatibleenv("SLAPOS_XORG_LOCK_DIR", "/tmp", "/.X11-unix/X");
size_t filelen;
char *file = NULL;
int actual_filelen;
Store Xorg lock files and sockets in different directories
This patch allow easy enable isolation of multiple Xorg servers and clients
running on same machine, instead of using the convention to store sockets and
lock files in /tmp/ store them in a directory defined in SLAPOS_XORG_LOCK_DIR
environment variable.
When this environment variable is not set, fallbacks to the traditional
behavior of using /tmp/ .
--- xorg-server-1.9.3/os/utils.c.old 2012-03-29 18:20:02.000000000 +0200
+++ xorg-server-1.9.3/os/utils.c 2012-03-29 18:39:33.000000000 +0200
@@ -226,7 +226,26 @@ OsSignal(int sig, OsSigHandlerPtr handle
......@@ -24,7 +33,7 @@
+
+}
+
+#define LOCK_DIR getcompatibleenv("TMPDIR", "/tmp")
+#define LOCK_DIR getcompatibleenv("SLAPOS_XORG_LOCK_DIR", "/tmp")
#define LOCK_TMP_PREFIX "/.tX"
#define LOCK_PREFIX "/.X"
#define LOCK_SUFFIX "-lock"
Store Xorg lock files and sockets in different directories
see xorg-server_tmp_env.patch
--- xtrans-1.2.6/Xtranssock.c.old 2012-03-29 14:25:45.000000000 +0200
+++ xtrans-1.2.6/Xtranssock.c 2012-03-29 18:40:54.000000000 +0200
@@ -207,29 +207,49 @@ static int TRANS(SocketINETClose) (Xtran
......@@ -27,38 +31,38 @@
#if defined(X11_t)
-#define UNIX_PATH "/tmp/.X11-unix/X"
-#define UNIX_DIR "/tmp/.X11-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.X11-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.X11-unix")
#endif /* X11_t */
#if defined(XIM_t)
-#define UNIX_PATH "/tmp/.XIM-unix/XIM"
-#define UNIX_DIR "/tmp/.XIM-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.XIM-unix/XIM")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.XIM-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.XIM-unix/XIM")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.XIM-unix")
#endif /* XIM_t */
#if defined(FS_t) || defined(FONT_t)
-#define UNIX_PATH "/tmp/.font-unix/fs"
-#define UNIX_DIR "/tmp/.font-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.font-unix/fs")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.font-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.font-unix/fs")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.font-unix")
#endif /* FS_t || FONT_t */
#if defined(ICE_t)
-#define UNIX_PATH "/tmp/.ICE-unix/"
-#define UNIX_DIR "/tmp/.ICE-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.ICE-unix/")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.ICE-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.ICE-unix/")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.ICE-unix")
#endif /* ICE_t */
#if defined(TEST_t)
-#define UNIX_PATH "/tmp/.Test-unix/test"
-#define UNIX_DIR "/tmp/.Test-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.Test-unix/test")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.Test-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.Test-unix/test")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.Test-unix")
#endif
#if defined(LBXPROXY_t)
-#define UNIX_PATH "/tmp/.X11-unix/X"
-#define UNIX_DIR "/tmp/.X11-unix"
+#define UNIX_PATH getandappendcompatibleenv(0, "TMPDIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "TMPDIR", "/tmp", "/.X11-unix")
+#define UNIX_PATH getandappendcompatibleenv(0, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.X11-unix/X")
+#define UNIX_DIR getandappendcompatibleenv(1, "SLAPOS_XORG_LOCK_DIR", "/tmp", "/.X11-unix")
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment