From a03561534dfd4462cef00df2b1103b016231cf72 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: May 14 2012 07:43:18 +0000 Subject: server 1.12.1 - force autoreconf to avoid libtool errors - update patches for new indentation style. --- diff --git a/.gitignore b/.gitignore index 39afc54..a613892 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ xorg-server-1.9.1.tar.bz2 /xorg-server-20120124.tar.xz /xorg-server-20120215.tar.xz /xorg-server-1.12.0.tar.bz2 +/xorg-server-1.12.1.tar.bz2 diff --git a/sources b/sources index 6681ac7..6e1fab1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3a3c4281f32c8702749e8f129372a355 xorg-server-1.12.0.tar.bz2 +20e73b422bda6f0d1405af676983cc70 xorg-server-1.12.1.tar.bz2 diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 81fd52a..63c8df0 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -47,8 +47,8 @@ Summary: X.Org X11 X server Name: xorg-x11-server -Version: 1.12.0 -Release: 6%{?gitdate:.%{gitdate}}%{dist} +Version: 1.12.1 +Release: 1%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -369,7 +369,7 @@ test `getminor extension` == %{extension_minor} %endif # --with-pie ? -autoreconf -v --install || exit 1 +autoreconf -f -v --install || exit 1 # export CFLAGS="${RPM_OPT_FLAGS}" %configure --enable-maintainer-mode %{xservers} \ --disable-static \ @@ -574,6 +574,11 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Mon May 14 2012 Peter Hutterer 1.12.1-1 +- server 1.12.1 +- force autoreconf to avoid libtool errors +- update patches for new indentation style. + * Mon May 14 2012 Peter Hutterer 1.12.0-6 - Make timers signal-safe (#814869) diff --git a/xserver-1.10.99.1-test.patch b/xserver-1.10.99.1-test.patch index 8d704c3..76c29d1 100644 --- a/xserver-1.10.99.1-test.patch +++ b/xserver-1.10.99.1-test.patch @@ -1,19 +1,19 @@ -From 56a6a585918f1aa84da244dec803783cd90b92ac Mon Sep 17 00:00:00 2001 -From: Dan HorĂ¡k +From db8153bd5f476114f6a1b7ac40357c8bc39331ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 29 Jun 2011 15:08:27 +0200 -Subject: [PATCH] test subdir requires xorg to be built +Subject: [PATCH 5/7] test subdir requires xorg to be built Something changed between 20110418 and 20110510 and the test subdir is now processed. But it needs some libraries that are built as part of xorg driver. --- Makefile.am | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 62c8d95..bc4091d 100644 +index cea140b..72f3d74 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -38,8 +38,7 @@ SUBDIRS = \ +@@ -39,8 +39,7 @@ SUBDIRS = \ $(GLX_DIR) \ exa \ config \ @@ -23,7 +23,7 @@ index 62c8d95..bc4091d 100644 if XORG aclocaldir = $(datadir)/aclocal -@@ -47,6 +46,8 @@ aclocal_DATA = xorg-server.m4 +@@ -48,6 +47,8 @@ aclocal_DATA = xorg-server.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-server.pc @@ -33,5 +33,5 @@ index 62c8d95..bc4091d 100644 EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh -- -1.7.4.4 +1.7.10.1 diff --git a/xserver-1.12-Xext-fix-selinux-build-failure.patch b/xserver-1.12-Xext-fix-selinux-build-failure.patch index e92a462..a48a013 100644 --- a/xserver-1.12-Xext-fix-selinux-build-failure.patch +++ b/xserver-1.12-Xext-fix-selinux-build-failure.patch @@ -1,7 +1,7 @@ -From 080b3903ee57a682ac67306d7ff855bbf1dccda3 Mon Sep 17 00:00:00 2001 +From 5d16c39108c72b08478b6bd548494d6c675495ee Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Jan 2012 09:31:51 +1000 -Subject: [PATCH] Xext: fix selinux build failure +Subject: [PATCH 6/7] Xext: fix selinux build failure The server builds with -Werror=missing-braces, causing @@ -22,31 +22,31 @@ Signed-off-by: Peter Hutterer 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xselinux_hooks.c b/Xext/xselinux_hooks.c -index 0d4c9ab..943e5cc 100644 +index e9c7e93..0302f2f 100644 --- a/Xext/xselinux_hooks.c +++ b/Xext/xselinux_hooks.c -@@ -848,7 +848,7 @@ SELinuxFlaskReset(void) +@@ -851,7 +851,7 @@ SELinuxFlaskReset(void) void SELinuxFlaskInit(void) { -- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *)0 }; -+ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *)0 } }; +- struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 }; ++ struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, { (char *) 0 } }; security_context_t ctx; int ret = TRUE; diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c -index e5929fa..de49f83 100644 +index 2c33d1c..81f2f36 100644 --- a/Xext/xselinux_label.c +++ b/Xext/xselinux_label.c -@@ -354,7 +354,7 @@ SELinuxDefaultClientLabel(void) +@@ -361,7 +361,7 @@ SELinuxDefaultClientLabel(void) void SELinuxLabelInit(void) { -- struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *)1 }; +- struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 }; + struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, { (char *)1 } }; label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1); if (!label_hnd) -- -1.7.7.4 +1.7.10.1 diff --git a/xserver-1.12-os-make-timers-signal-safe.patch b/xserver-1.12-os-make-timers-signal-safe.patch index 6b0ef5e..ec47c9e 100644 --- a/xserver-1.12-os-make-timers-signal-safe.patch +++ b/xserver-1.12-os-make-timers-signal-safe.patch @@ -1,7 +1,7 @@ -From 7089841a7e026799328e97292c2f81aa4aa01f57 Mon Sep 17 00:00:00 2001 +From be0213313d42beeaaa4aa4a9637f2df8a849c98e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 27 Apr 2012 10:52:39 +1000 -Subject: [PATCH] os: make timers signal-safe +Subject: [PATCH 7/7] os: make timers signal-safe If TimerSet() is called from a signal handler (synaptics tap handling code) may result in list corruption if we're currently inside TimerSet(). @@ -13,28 +13,23 @@ Block signals for all list manipulations in the timers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas -(cherry picked from commit 08962951de969b9d8c870af8b6e47303dc0decfd) - -Conflicts: - - os/WaitFor.c --- os/WaitFor.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/os/WaitFor.c b/os/WaitFor.c -index 867cb04..236406e 100644 +index 4c3be34..59f3af6 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c -@@ -405,6 +405,7 @@ CheckAllTimers(void) +@@ -382,6 +382,7 @@ CheckAllTimers(void) OsTimerPtr timer; CARD32 now; + OsBlockSignals(); - start: + start: now = GetTimeInMillis(); -@@ -414,6 +415,7 @@ start: +@@ -391,6 +392,7 @@ CheckAllTimers(void) goto start; } } @@ -42,45 +37,44 @@ index 867cb04..236406e 100644 } static void -@@ -421,11 +423,13 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) +@@ -398,11 +400,13 @@ DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) { CARD32 newTime; + OsBlockSignals(); *prev = timer->next; timer->next = NULL; - newTime = (*timer->callback)(timer, now, timer->arg); + newTime = (*timer->callback) (timer, now, timer->arg); if (newTime) - TimerSet(timer, 0, newTime, timer->callback, timer->arg); + TimerSet(timer, 0, newTime, timer->callback, timer->arg); + OsReleaseSignals(); } OsTimerPtr -@@ -443,6 +447,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, +@@ -418,6 +422,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, + return NULL; } - else - { + else { + OsBlockSignals(); - for (prev = &timers; *prev; prev = &(*prev)->next) - { - if (*prev == timer) -@@ -453,6 +458,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, - break; - } - } + for (prev = &timers; *prev; prev = &(*prev)->next) { + if (*prev == timer) { + *prev = timer->next; +@@ -426,6 +431,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, + break; + } + } + OsReleaseSignals(); } if (!millis) - return timer; -@@ -473,29 +479,35 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, - if (!millis) - return timer; + return timer; +@@ -445,26 +451,32 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, + if (!millis) + return timer; } + OsBlockSignals(); for (prev = &timers; - *prev && (int) ((*prev)->expires - millis) <= 0; - prev = &(*prev)->next) - ; + *prev && (int) ((*prev)->expires - millis) <= 0; + prev = &(*prev)->next); timer->next = *prev; *prev = timer; + OsReleaseSignals(); @@ -94,33 +88,30 @@ index 867cb04..236406e 100644 OsTimerPtr *prev; + OsBlockSignals(); - for (prev = &timers; *prev; prev = &(*prev)->next) - { - if (*prev == timer) - { - DoTimer(timer, GetTimeInMillis(), prev); -- return TRUE; -+ rc = TRUE; -+ break; - } + for (prev = &timers; *prev; prev = &(*prev)->next) { + if (*prev == timer) { + DoTimer(timer, GetTimeInMillis(), prev); +- return TRUE; ++ rc = TRUE; ++ break; + } } - return FALSE; + OsReleaseSignals(); + return rc; } - -@@ -506,6 +518,7 @@ TimerCancel(OsTimerPtr timer) + void +@@ -474,12 +486,14 @@ TimerCancel(OsTimerPtr timer) if (!timer) - return; + return; + OsBlockSignals(); - for (prev = &timers; *prev; prev = &(*prev)->next) - { - if (*prev == timer) -@@ -514,6 +527,7 @@ TimerCancel(OsTimerPtr timer) - break; - } + for (prev = &timers; *prev; prev = &(*prev)->next) { + if (*prev == timer) { + *prev = timer->next; + break; + } } + OsReleaseSignals(); } diff --git a/xserver-1.4.99-ssh-isnt-local.patch b/xserver-1.4.99-ssh-isnt-local.patch index d0b95a0..2d33bed 100644 --- a/xserver-1.4.99-ssh-isnt-local.patch +++ b/xserver-1.4.99-ssh-isnt-local.patch @@ -1,22 +1,22 @@ -From a02009f81a8ee019b0642716eb68475c75eca5ec Mon Sep 17 00:00:00 2001 +From 66a3b14e118e90db80f96fcab52af4df35bc2377 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 10 Dec 2007 11:26:57 -0500 Subject: [PATCH] Hack for proper MIT-SHM rejection for ssh-forwarded clients. --- Xext/shm.c | 16 ++++++++++++++++ - 1 files changed, 16 insertions(+), 0 deletions(-) + 1 file changed, 16 insertions(+) diff --git a/Xext/shm.c b/Xext/shm.c -index 23afe6b..1e2f9f5 100644 +index de48020..c011210 100644 --- a/Xext/shm.c +++ b/Xext/shm.c -@@ -325,8 +325,21 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly) +@@ -321,8 +321,21 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) mode_t mask; int uidset = 0, gidset = 0; LocalClientCredRec *lcc; + Bool is_ssh = FALSE; - + if (GetLocalClientCreds(client, &lcc) != -1) { +#ifdef linux + if (lcc->fieldsSet & LCC_PID_SET) { @@ -31,18 +31,18 @@ index 23afe6b..1e2f9f5 100644 + } +#endif - if (lcc->fieldsSet & LCC_UID_SET) { - uid = lcc->euid; -@@ -345,6 +358,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE *perm, int readonly) - } + if (lcc->fieldsSet & LCC_UID_SET) { + uid = lcc->euid; +@@ -342,6 +355,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) #endif - FreeLocalClientCreds(lcc); + FreeLocalClientCreds(lcc); + ++ if (is_ssh) ++ return -1; + -+ if (is_ssh) -+ return -1; - - if (uidset) { - /* User id 0 always gets access */ + if (uidset) { + /* User id 0 always gets access */ + if (uid == 0) { -- -1.7.3.2 +1.7.10.1 diff --git a/xserver-1.6.0-displayfd.patch b/xserver-1.6.0-displayfd.patch index 1eec93a..9e63767 100644 --- a/xserver-1.6.0-displayfd.patch +++ b/xserver-1.6.0-displayfd.patch @@ -1,20 +1,35 @@ -From 47d4a39c0c82d45b8e0eada36d14c233dbb1cff2 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Thu, 18 Jun 2009 16:56:41 +1000 -Subject: [PATCH] displayfd hack +From 247319fe3750671cd962df2c12548affb0351775 Mon Sep 17 00:00:00 2001 +From: Chase Douglas +Date: Wed, 4 Apr 2012 15:29:42 -0700 +Subject: [PATCH 3/7] os: Add -displayfd option +This option specifies a file descriptor in the launching process. X +will scan for an available display number and write that number back to +the launching process, at the same time as SIGUSR1 generation. This +means display managers don't need to guess at available display numbers. +As a consequence, if X fails to start when using -displayfd, it's not +because the display was in use, so there's no point in retrying the X +launch on a higher display number. + +Signed-off-by: Adam Jackson +Signed-off-by: Chase Douglas +Reviewed-by: Julien Cristau +Tested-by: Julien Cristau +Reviewed-by: Alan Coopersmith +Signed-off-by: Peter Hutterer --- dix/globals.c | 1 + include/opaque.h | 1 + - os/connection.c | 73 +++++++++++++++++++++++++++++++++++++----------------- - os/utils.c | 11 ++++++++ - 4 files changed, 63 insertions(+), 23 deletions(-) + man/Xserver.man | 7 ++++++ + os/connection.c | 68 ++++++++++++++++++++++++++++++++++++++---------------- + os/utils.c | 9 ++++++++ + 5 files changed, 66 insertions(+), 20 deletions(-) diff --git a/dix/globals.c b/dix/globals.c -index 0a6b170..0ee83c0 100644 +index c0cae15..db113ca 100644 --- a/dix/globals.c +++ b/dix/globals.c -@@ -126,6 +126,7 @@ int defaultColorVisualClass = -1; +@@ -128,6 +128,7 @@ int defaultColorVisualClass = -1; int monitorResolution = 0; char *display; @@ -23,7 +38,7 @@ index 0a6b170..0ee83c0 100644 CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; diff --git a/include/opaque.h b/include/opaque.h -index 5c70717..f23203f 100644 +index 9ca408a..b76ab6e 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -50,6 +50,7 @@ extern _X_EXPORT int ScreenSaverAllowExposures; @@ -34,27 +49,48 @@ index 5c70717..f23203f 100644 extern _X_EXPORT int defaultBackingStore; extern _X_EXPORT Bool disableBackingStore; +diff --git a/man/Xserver.man b/man/Xserver.man +index 0cd9b94..8d243d6 100644 +--- a/man/Xserver.man ++++ b/man/Xserver.man +@@ -127,6 +127,13 @@ Not obeyed by all servers. + .B \-core + causes the server to generate a core dump on fatal errors. + .TP 8 ++.B \-displayfd \fIfd\fP ++specifies a file descriptor in the launching process. Rather than specify ++a display number, the X server will attempt to listen on successively higher ++display numbers, and upon finding a free one, will write the port number back ++on this file descriptor as a newline-terminated string. The \-pn option is ++ignored when using \-displayfd. ++.TP 8 + .B \-deferglyphs \fIwhichfonts\fP + specifies the types of fonts for which the server should attempt to use + deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), diff --git a/os/connection.c b/os/connection.c -index 8a677a7..fea227a 100644 +index 1099752..039942f 100644 --- a/os/connection.c +++ b/os/connection.c -@@ -145,6 +145,7 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ - static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ - Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or - equivalent) will send SIGCONT back. */ -+static char dynamic_display[7]; - Bool PartialNetwork; /* continue even if unable to bind all addrs */ +@@ -142,6 +142,7 @@ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ + static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ + Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or + equivalent) will send SIGCONT back. */ ++static char dynamic_display[7]; /* display name */ + Bool PartialNetwork; /* continue even if unable to bind all addrs */ static Pid_t ParentProcess; -@@ -356,11 +357,26 @@ NotifyParentProcess(void) - kill (ParentProcess, SIGUSR1); - } - } -+ if (dynamic_display[0]) -+ write(displayfd, dynamic_display, strlen(dynamic_display)); -+ - if (RunFromSigStopParent) - raise (SIGSTOP); +@@ -350,6 +351,10 @@ void + NotifyParentProcess(void) + { + #if !defined(WIN32) ++ if (dynamic_display[0]) { ++ write(displayfd, dynamic_display, strlen(dynamic_display)); ++ close(displayfd); ++ } + if (RunFromSmartParent) { + if (ParentProcess > 1) { + kill(ParentProcess, SIGUSR1); +@@ -360,6 +365,18 @@ NotifyParentProcess(void) #endif } @@ -63,113 +99,105 @@ index 8a677a7..fea227a 100644 +{ + char port[20]; + -+ snprintf (port, sizeof(port), "%d", num); ++ snprintf(port, sizeof(port), "%d", num); + -+ return _XSERVTransMakeAllCOTSServerListeners(port, partial, -+ &ListenTransCount, -+ &ListenTransConns); ++ return (_XSERVTransMakeAllCOTSServerListeners(port, partial, ++ &ListenTransCount, ++ &ListenTransConns) >= 0); +} + /***************** * CreateWellKnownSockets * At initialization, create the sockets to listen on for new clients. -@@ -371,7 +387,6 @@ CreateWellKnownSockets(void) +@@ -370,7 +387,6 @@ CreateWellKnownSockets(void) { - int i; - int partial; -- char port[20]; + int i; + int partial; +- char port[20]; FD_ZERO(&AllSockets); FD_ZERO(&AllClients); -@@ -386,32 +401,44 @@ CreateWellKnownSockets(void) +@@ -386,29 +402,41 @@ CreateWellKnownSockets(void) - FD_ZERO (&WellKnownConnections); + FD_ZERO(&WellKnownConnections); -- snprintf (port, sizeof(port), "%d", atoi (display)); +- snprintf(port, sizeof(port), "%d", atoi(display)); - -- if ((_XSERVTransMakeAllCOTSServerListeners (port, &partial, -- &ListenTransCount, &ListenTransConns) >= 0) && -- (ListenTransCount >= 1)) -+ if (display) - { -- if (!PartialNetwork && partial) -- { -- FatalError ("Failed to establish all listening sockets"); -- } -- else -+ if (TryCreateSocket(atoi(display), &partial) && -+ (ListenTransCount >= 1)) -+ if (!PartialNetwork && partial) -+ FatalError ("Failed to establish all listening sockets"); +- if ((_XSERVTransMakeAllCOTSServerListeners(port, &partial, +- &ListenTransCount, +- &ListenTransConns) >= 0) && +- (ListenTransCount >= 1)) { +- if (!PartialNetwork && partial) { +- FatalError("Failed to establish all listening sockets"); ++ /* display is initialized to "0" by main(). It is then set to the display ++ * number if specified on the command line, or to NULL when the -displayfd ++ * option is used. */ ++ if (display) { ++ if (TryCreateSocket(atoi(display), &partial) && ++ ListenTransCount >= 1) ++ if (!PartialNetwork && partial) ++ FatalError ("Failed to establish all listening sockets"); + } -+ else /* -displayfd */ -+ { -+ Bool found = 0; -+ for (i = 0; i < 65535 - 1024; i++) - { -- ListenTransFds = malloc(ListenTransCount * sizeof (int)); -- -- for (i = 0; i < ListenTransCount; i++) -+ if (!TryCreateSocket(i, &partial) && !partial) - { -- int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]); -- -- ListenTransFds[i] = fd; -- FD_SET (fd, &WellKnownConnections); -- -- if (!_XSERVTransIsLocal (ListenTransConns[i])) -- { -- DefineSelf (fd); -- } -+ found = 1; -+ break; - } -+ else -+ CloseWellKnownConnections(); -+ } -+ if (!found) -+ FatalError("Failed to find a socket to listen on"); -+ sprintf(dynamic_display, "%d\n", i); -+ display = dynamic_display; ++ else { /* -displayfd */ ++ Bool found = 0; ++ for (i = 0; i < 65535 - X_TCP_PORT; i++) { ++ if (TryCreateSocket(i, &partial) && !partial) { ++ found = 1; ++ break; ++ } ++ else ++ CloseWellKnownConnections(); + } +- else { +- ListenTransFds = malloc(ListenTransCount * sizeof(int)); ++ if (!found) ++ FatalError("Failed to find a socket to listen on"); ++ snprintf(dynamic_display, sizeof(dynamic_display), "%d", i); ++ display = dynamic_display; + } + +- for (i = 0; i < ListenTransCount; i++) { +- int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]); ++ ListenTransFds = malloc(ListenTransCount * sizeof (int)); + +- ListenTransFds[i] = fd; +- FD_SET(fd, &WellKnownConnections); ++ for (i = 0; i < ListenTransCount; i++) { ++ int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]); + +- if (!_XSERVTransIsLocal(ListenTransConns[i])) { +- DefineSelf(fd); +- } +- } +- } ++ ListenTransFds[i] = fd; ++ FD_SET(fd, &WellKnownConnections); + -+ ListenTransFds = xalloc (ListenTransCount * sizeof (int)); -+ -+ for (i = 0; i < ListenTransCount; i++) -+ { -+ int fd = _XSERVTransGetConnectionNumber (ListenTransConns[i]); -+ -+ ListenTransFds[i] = fd; -+ FD_SET (fd, &WellKnownConnections); -+ -+ if (!_XSERVTransIsLocal (ListenTransConns[i])) -+ { -+ DefineSelf (fd); - } ++ if (!_XSERVTransIsLocal(ListenTransConns[i])) ++ DefineSelf (fd); } + if (!XFD_ANYSET(&WellKnownConnections)) diff --git a/os/utils.c b/os/utils.c -index 6461ed5..17860df 100644 +index 30592d2..3a1ef93 100644 --- a/os/utils.c +++ b/os/utils.c -@@ -661,6 +661,17 @@ ProcessCommandLine(int argc, char *argv[]) - else - UseMsg(); - } -+ else if (strcmp(argv[i], "-displayfd") == 0) -+ { -+ if (++i < argc) -+ { -+ displayfd = atoi(argv[i]); -+ display = NULL; -+ nolock = TRUE; -+ } -+ else -+ UseMsg(); -+ } +@@ -659,6 +659,15 @@ ProcessCommandLine(int argc, char *argv[]) + else + UseMsg(); + } ++ else if (strcmp(argv[i], "-displayfd") == 0) { ++ if (++i < argc) { ++ displayfd = atoi(argv[i]); ++ display = NULL; ++ nolock = TRUE; ++ } ++ else ++ UseMsg(); ++ } #ifdef DPMSExtension - else if ( strcmp( argv[i], "dpms") == 0) - /* ignored for compatibility */ ; + else if (strcmp(argv[i], "dpms") == 0) + /* ignored for compatibility */ ; -- -1.7.7.4 +1.7.10.1 diff --git a/xserver-1.6.0-less-acpi-brokenness.patch b/xserver-1.6.0-less-acpi-brokenness.patch index 41e6ff3..b42c2d7 100644 --- a/xserver-1.6.0-less-acpi-brokenness.patch +++ b/xserver-1.6.0-less-acpi-brokenness.patch @@ -1,18 +1,18 @@ -From 392ce7dc5062416a8cf1c9a66e0dce1677f46804 Mon Sep 17 00:00:00 2001 +From 0002cde5312e785529b2901d7f8a82d5623e4ca7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 9 Nov 2011 11:52:06 +1000 -Subject: [PATCH] Don't build the ACPI code. +Subject: [PATCH 2/7] Don't build the ACPI code. No good can come of this. --- configure.ac | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 63d59f9..6683005 100644 +index a12783c..54f4464 100644 --- a/configure.ac +++ b/configure.ac -@@ -1624,7 +1624,6 @@ if test "x$XORG" = xyes; then +@@ -1620,7 +1620,6 @@ if test "x$XORG" = xyes; then linux_alpha=yes ;; i*86|amd64*|x86_64*|ia64*) @@ -21,5 +21,5 @@ index 63d59f9..6683005 100644 *) ;; -- -1.7.7 +1.7.10.1 diff --git a/xserver-1.6.99-right-of.patch b/xserver-1.6.99-right-of.patch index a0c9e7f..f6cd6e3 100644 --- a/xserver-1.6.99-right-of.patch +++ b/xserver-1.6.99-right-of.patch @@ -1,20 +1,20 @@ -From 12aa6574fd87ec28186a75256a5111e9703d932e Mon Sep 17 00:00:00 2001 +From d91c3a11db2657e33087464463c9aa44aaf5c8b8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 28 Jul 2009 11:07:13 -0400 -Subject: [PATCH 4/9] RANDR: right-of placement by default +Subject: [PATCH 4/7] RANDR: right-of placement by default [Enhanced to add a new prefer clone option for drivers. This allows for servers like RN50 where two heads are disjoint. - airlied] --- - hw/xfree86/common/xf86str.h | 9 ++++- - hw/xfree86/modes/xf86Crtc.c | 74 ++++++++++++++++++++++++++++++++++++++---- - 2 files changed, 74 insertions(+), 9 deletions(-) + hw/xfree86/common/xf86str.h | 8 ++++- + hw/xfree86/modes/xf86Crtc.c | 76 ++++++++++++++++++++++++++++++++++++++----- + 2 files changed, 75 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h -index 0493dc5..d66e373 100644 +index 6294845..7d1fbab 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h -@@ -496,10 +496,13 @@ typedef struct _confdrirec { +@@ -497,10 +497,13 @@ typedef struct _confdrirec { } confDRIRec, *confDRIPtr; /* These values should be adjusted when new fields are added to ScrnInfoRec */ @@ -26,20 +26,12 @@ index 0493dc5..d66e373 100644 +/* let clients know they can use this */ +#define XF86_SCRN_HAS_PREFER_CLONE 1 + - typedef pointer (*funcPointer)(void); + typedef pointer (*funcPointer) (void); /* flags for depth 24 pixmap options */ -@@ -659,7 +662,6 @@ typedef void xf86ModeSetProc (ScrnInfoPtr); - * are to be dependent on compile-time defines. - */ - -- - typedef struct _ScrnInfoRec { - int driverVersion; - char * driverName; /* canonical name used in */ -@@ -761,6 +763,9 @@ typedef struct _ScrnInfoRec { - ClockRangePtr clockRanges; - int adjustFlags; +@@ -758,6 +761,9 @@ typedef struct _ScrnInfoRec { + ClockRangePtr clockRanges; + int adjustFlags; + /* initial rightof support disable */ + int preferClone; @@ -48,26 +40,26 @@ index 0493dc5..d66e373 100644 * These can be used when the minor ABI version is incremented. * The NUM_* parameters must be reduced appropriately to keep the diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c -index c2814d4..b25876f 100644 +index 6d5e92f..7d560f4 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c -@@ -1139,6 +1139,15 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) - int o; - int min_x, min_y; - +@@ -1114,6 +1114,15 @@ xf86InitialOutputPositions(ScrnInfoPtr scrn, DisplayModePtr * modes) + int o; + int min_x, min_y; + + /* check for initial right-of heuristic */ + for (o = 0; o < config->num_output; o++) + { -+ xf86OutputPtr output = config->output[o]; ++ xf86OutputPtr output = config->output[o]; + -+ if (output->initial_x || output->initial_y) ++ if (output->initial_x || output->initial_y) + return TRUE; + } + - for (o = 0; o < config->num_output; o++) - { - xf86OutputPtr output = config->output[o]; -@@ -2030,6 +2039,57 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) + for (o = 0; o < config->num_output; o++) { + xf86OutputPtr output = config->output[o]; + +@@ -1982,6 +1991,57 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) return match; } @@ -83,40 +75,40 @@ index c2814d4..b25876f 100644 + +static Bool +xf86TargetRightOf(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, -+ DisplayModePtr *modes, Bool *enabled, -+ int width, int height) ++ DisplayModePtr *modes, Bool *enabled, ++ int width, int height) +{ + int o; + int w = 0; + + if (scrn->preferClone) -+ return FALSE; ++ return FALSE; + + if (numEnabledOutputs(config, enabled) < 2) -+ return FALSE; ++ return FALSE; + + for (o = -1; nextEnabledOutput(config, enabled, &o); ) { -+ DisplayModePtr mode = -+ xf86OutputHasPreferredMode(config->output[o], width, height); ++ DisplayModePtr mode = ++ xf86OutputHasPreferredMode(config->output[o], width, height); + -+ if (!mode) -+ return FALSE; ++ if (!mode) ++ return FALSE; + -+ w += mode->HDisplay; ++ w += mode->HDisplay; + } + + if (w > width) -+ return FALSE; ++ return FALSE; + + w = 0; + for (o = -1; nextEnabledOutput(config, enabled, &o); ) { -+ DisplayModePtr mode = -+ xf86OutputHasPreferredMode(config->output[o], width, height); ++ DisplayModePtr mode = ++ xf86OutputHasPreferredMode(config->output[o], width, height); + -+ config->output[o]->initial_x = w; -+ w += mode->HDisplay; ++ config->output[o]->initial_x = w; ++ w += mode->HDisplay; + -+ modes[o] = mode; ++ modes[o] = mode; + } + + return TRUE; @@ -124,44 +116,46 @@ index c2814d4..b25876f 100644 + static Bool xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, - DisplayModePtr *modes, Bool *enabled, -@@ -2087,13 +2147,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, - * biggest mode for its aspect ratio, assuming one exists. + DisplayModePtr * modes, Bool *enabled, +@@ -2058,13 +2118,9 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, */ - if (!ret) do { -- int i = 0; - float aspect = 0.0; + if (!ret) + do { +- int i = 0; + float aspect = 0.0; -- /* count the number of enabled outputs */ -- for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ; +- /* count the number of enabled outputs */ +- for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++); - -- if (i != 1) -+ if (numEnabledOutputs(config, enabled) != 1) - break; +- if (i != 1) ++ if (numEnabledOutputs(config, enabled) != 1) + break; - p = -1; -@@ -2388,6 +2444,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) - } else { - if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); -+ else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height)) -+ xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n"); - else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); - else if (xf86TargetAspect(scrn, config, modes, enabled, width, height)) -@@ -2405,8 +2463,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) - config->output[o]->name); - else - xf86DrvMsg (scrn->scrnIndex, X_INFO, -- "Output %s using initial mode %s\n", -- config->output[o]->name, modes[o]->name); -+ "Output %s using initial mode %s +%d+%d\n", -+ config->output[o]->name, modes[o]->name, + p = -1; +@@ -2365,6 +2421,8 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow) + else { + if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); ++ else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height)) ++ xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n"); + else if (xf86TargetPreferred + (scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); +@@ -2384,9 +2442,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow) + "Output %s enabled but has no modes\n", + config->output[o]->name); + else +- xf86DrvMsg(scrn->scrnIndex, X_INFO, +- "Output %s using initial mode %s\n", +- config->output[o]->name, modes[o]->name); ++ xf86DrvMsg (scrn->scrnIndex, X_INFO, ++ "Output %s using initial mode %s +%d+%d\n", ++ config->output[o]->name, modes[o]->name, + config->output[o]->initial_x, + config->output[o]->initial_y); } /* -- -1.7.4.4 +1.7.10.1